chamba 0.2.0 → 0.3.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 (75) hide show
  1. package/README.md +6 -7
  2. package/inject/annotate.js +18 -49
  3. package/package.json +6 -7
  4. package/skill/SKILL.md +67 -259
  5. package/web/assets/highlighted-body-OFNGDK62-Bn4Eu7CG.js +1 -0
  6. package/web/assets/index-B9DI4F1Z.js +202 -0
  7. package/web/assets/index-DK_n6CTo.css +2 -0
  8. package/web/assets/mermaid-GHXKKRXX-CEMduc-U.js +1 -0
  9. package/web/index.html +2 -2
  10. package/web/assets/abnfDiagram-VRR7QNED-C5V2hrtE.js +0 -1
  11. package/web/assets/arc-d7OTmxZy.js +0 -1
  12. package/web/assets/architectureDiagram-ZJ3FMSHR--CztaeAS.js +0 -36
  13. package/web/assets/blockDiagram-677ZJIJ3-DkA5Z_uK.js +0 -132
  14. package/web/assets/c4Diagram-LMCZKHZV-C78dI0l-.js +0 -10
  15. package/web/assets/channel-D9AxU8kk.js +0 -1
  16. package/web/assets/chunk-2Q5K7J3B-LBNP12XV.js +0 -1
  17. package/web/assets/chunk-32BRIVSS-DZoXrhCs.js +0 -1
  18. package/web/assets/chunk-5VM5RSS4-CPjoRxF_.js +0 -15
  19. package/web/assets/chunk-EX3LRPZG-DSlL8FE9.js +0 -231
  20. package/web/assets/chunk-JWPE2WC7-BjbBLYge.js +0 -1
  21. package/web/assets/chunk-MOJQB5TN-DCKqdaDr.js +0 -88
  22. package/web/assets/chunk-RYQCIY6F-D5yAURhE.js +0 -1
  23. package/web/assets/chunk-V7JOEXUC-DKY2sn06.js +0 -206
  24. package/web/assets/chunk-VR4S4FIN-DGiVMHh6.js +0 -1
  25. package/web/assets/chunk-XXDRQBXY-CUI1Tkrr.js +0 -1
  26. package/web/assets/classDiagram-OUVF2IWQ-D7gWuzIF.js +0 -1
  27. package/web/assets/classDiagram-v2-EOCWNBFH-D7gWuzIF.js +0 -1
  28. package/web/assets/cose-bilkent-JH36ORCC-Ao3LzalV.js +0 -1
  29. package/web/assets/cynefin-VYW2F7L2-7JQwpRwH.js +0 -178
  30. package/web/assets/cynefinDiagram-TSTJHNR4-BfuANy_V.js +0 -62
  31. package/web/assets/cytoscape.esm-DTSO7Bv0.js +0 -331
  32. package/web/assets/dagre-VKFMJZFB-DHVnVJCL.js +0 -4
  33. package/web/assets/defaultLocale-DX6XiGOO.js +0 -1
  34. package/web/assets/diagram-FQU43EPY-OYrtwA2f.js +0 -3
  35. package/web/assets/diagram-G47NLZAW-CbkLZxYp.js +0 -24
  36. package/web/assets/diagram-NH7WQ7WH-B0z_jTdi.js +0 -24
  37. package/web/assets/diagram-OA4YK3LP-BRu_2nwx.js +0 -30
  38. package/web/assets/diagram-WEI45ONY-B9cpw86D.js +0 -41
  39. package/web/assets/ebnfDiagram-CCIWWBDH-DaBQ7T4R.js +0 -1
  40. package/web/assets/erDiagram-Q63AITRT-D6PQiFj3.js +0 -85
  41. package/web/assets/flowDiagram-23GEKE2U-p_8Wj7It.js +0 -156
  42. package/web/assets/ganttDiagram-NO4QXBWP-BZBwuqu3.js +0 -292
  43. package/web/assets/gitGraphDiagram-IHSO6WYX-DyPcQ-91.js +0 -106
  44. package/web/assets/graph-C9eacEi8.js +0 -1
  45. package/web/assets/highlighted-body-OFNGDK62-Cq7RJZcn.js +0 -1
  46. package/web/assets/index-BN-QUr5b.js +0 -350
  47. package/web/assets/index-D6-LVQ5m.css +0 -1
  48. package/web/assets/infoDiagram-FWYZ7A6U-sAgBAeWC.js +0 -2
  49. package/web/assets/init-Gi6I4Gst.js +0 -1
  50. package/web/assets/ishikawaDiagram-FXEZZL3T-COEn9wCs.js +0 -70
  51. package/web/assets/journeyDiagram-5HDEW3XC-BPddPRXW.js +0 -139
  52. package/web/assets/kanban-definition-HUTT4EX6-B8TW97Oy.js +0 -89
  53. package/web/assets/katex-C5jXJg4s.js +0 -257
  54. package/web/assets/layout-DEXfKzaS.js +0 -1
  55. package/web/assets/linear-CnW5uQ_k.js +0 -1
  56. package/web/assets/map-Czzmt4hB.js +0 -1
  57. package/web/assets/mermaid.core-bOV5iNX_.js +0 -314
  58. package/web/assets/mindmap-definition-LN4V7U3C-Dtr4xW_-.js +0 -96
  59. package/web/assets/ordinal-Cboi1Yqb.js +0 -1
  60. package/web/assets/pegDiagram-2B236MQR-DqBITK5N.js +0 -1
  61. package/web/assets/pieDiagram-ENE6RG2P-DXjxZgy3.js +0 -39
  62. package/web/assets/quadrantDiagram-ABIIQ3AL-D4MXx3U7.js +0 -7
  63. package/web/assets/railroadDiagram-RFXS5EU6-LPfpHg4_.js +0 -1
  64. package/web/assets/requirementDiagram-TGXJPOKE-CiDswbjt.js +0 -84
  65. package/web/assets/sankeyDiagram-HTMAVEWB-VfN_qTEI.js +0 -40
  66. package/web/assets/sequenceDiagram-DBY2YBRQ-kJRIx4zm.js +0 -162
  67. package/web/assets/sizeCapture-X5ZJPWSS-D8vJbAt-.js +0 -1
  68. package/web/assets/stateDiagram-2N3HPSRC-9qku-qAj.js +0 -1
  69. package/web/assets/stateDiagram-v2-6OUMAXLB-DbOQICyv.js +0 -1
  70. package/web/assets/swimlanes-5IMT3BWC-Cdb5FDUM.js +0 -2
  71. package/web/assets/swimlanesDiagram-G3AALYLV-EDpLmqQv.js +0 -8
  72. package/web/assets/timeline-definition-FHXFAJF6-D0hyJCMm.js +0 -120
  73. package/web/assets/vennDiagram-L72KCM5P-KsCkGMtr.js +0 -34
  74. package/web/assets/wardleyDiagram-EHGQE667-B4jT_1ak.js +0 -78
  75. package/web/assets/xychartDiagram-FW5EYKEG-Bmy0rt8j.js +0 -7
@@ -1,350 +0,0 @@
1
- var JS=Object.defineProperty;var ek=(e,t,n)=>t in e?JS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var xt=(e,t,n)=>ek(e,typeof t!="symbol"?t+"":t,n);function tk(e,t){for(var n=0;n<t.length;n++){const a=t[n];if(typeof a!="string"&&!Array.isArray(a)){for(const s in a)if(s!=="default"&&!(s in e)){const u=Object.getOwnPropertyDescriptor(a,s);u&&Object.defineProperty(e,s,u.get?u:{enumerable:!0,get:()=>a[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const u of s)if(u.type==="childList")for(const o of u.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&a(o)}).observe(document,{childList:!0,subtree:!0});function n(s){const u={};return s.integrity&&(u.integrity=s.integrity),s.referrerPolicy&&(u.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?u.credentials="include":s.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(s){if(s.ep)return;s.ep=!0;const u=n(s);fetch(s.href,u)}})();function Qm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _h={exports:{}},Ds={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Gb;function nk(){if(Gb)return Ds;Gb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,u){var o=null;if(u!==void 0&&(o=""+u),s.key!==void 0&&(o=""+s.key),"key"in s){u={};for(var f in s)f!=="key"&&(u[f]=s[f])}else u=s;return s=u.ref,{$$typeof:e,type:a,key:o,ref:s!==void 0?s:null,props:u}}return Ds.Fragment=t,Ds.jsx=n,Ds.jsxs=n,Ds}var Qb;function rk(){return Qb||(Qb=1,_h.exports=nk()),_h.exports}var T=rk(),vh={exports:{}},Pe={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Xb;function ak(){if(Xb)return Pe;Xb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),u=Symbol.for("react.consumer"),o=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),E=Symbol.iterator;function x(I){return I===null||typeof I!="object"?null:(I=E&&I[E]||I["@@iterator"],typeof I=="function"?I:null)}var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function O(I,K,A){this.props=I,this.context=K,this.refs=w,this.updater=A||v}O.prototype.isReactComponent={},O.prototype.setState=function(I,K){if(typeof I!="object"&&typeof I!="function"&&I!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,I,K,"setState")},O.prototype.forceUpdate=function(I){this.updater.enqueueForceUpdate(this,I,"forceUpdate")};function z(){}z.prototype=O.prototype;function U(I,K,A){this.props=I,this.context=K,this.refs=w,this.updater=A||v}var D=U.prototype=new z;D.constructor=U,N(D,O.prototype),D.isPureReactComponent=!0;var q=Array.isArray;function M(){}var $={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function de(I,K,A){var ee=A.ref;return{$$typeof:e,type:I,key:K,ref:ee!==void 0?ee:null,props:A}}function F(I,K){return de(I.type,K,I.props)}function oe(I){return typeof I=="object"&&I!==null&&I.$$typeof===e}function ce(I){var K={"=":"=0",":":"=2"};return"$"+I.replace(/[=:]/g,function(A){return K[A]})}var we=/\/+/g;function pe(I,K){return typeof I=="object"&&I!==null&&I.key!=null?ce(""+I.key):K.toString(36)}function ae(I){switch(I.status){case"fulfilled":return I.value;case"rejected":throw I.reason;default:switch(typeof I.status=="string"?I.then(M,M):(I.status="pending",I.then(function(K){I.status==="pending"&&(I.status="fulfilled",I.value=K)},function(K){I.status==="pending"&&(I.status="rejected",I.reason=K)})),I.status){case"fulfilled":return I.value;case"rejected":throw I.reason}}throw I}function P(I,K,A,ee,se){var ie=typeof I;(ie==="undefined"||ie==="boolean")&&(I=null);var he=!1;if(I===null)he=!0;else switch(ie){case"bigint":case"string":case"number":he=!0;break;case"object":switch(I.$$typeof){case e:case t:he=!0;break;case b:return he=I._init,P(he(I._payload),K,A,ee,se)}}if(he)return se=se(I),he=ee===""?"."+pe(I,0):ee,q(se)?(A="",he!=null&&(A=he.replace(we,"$&/")+"/"),P(se,K,A,"",function(Ye){return Ye})):se!=null&&(oe(se)&&(se=F(se,A+(se.key==null||I&&I.key===se.key?"":(""+se.key).replace(we,"$&/")+"/")+he)),K.push(se)),1;he=0;var _e=ee===""?".":ee+":";if(q(I))for(var Ee=0;Ee<I.length;Ee++)ee=I[Ee],ie=_e+pe(ee,Ee),he+=P(ee,K,A,ie,se);else if(Ee=x(I),typeof Ee=="function")for(I=Ee.call(I),Ee=0;!(ee=I.next()).done;)ee=ee.value,ie=_e+pe(ee,Ee++),he+=P(ee,K,A,ie,se);else if(ie==="object"){if(typeof I.then=="function")return P(ae(I),K,A,ee,se);throw K=String(I),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(I).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return he}function ne(I,K,A){if(I==null)return I;var ee=[],se=0;return P(I,ee,"","",function(ie){return K.call(A,ie,se++)}),ee}function xe(I){if(I._status===-1){var K=I._result;K=K(),K.then(function(A){(I._status===0||I._status===-1)&&(I._status=1,I._result=A)},function(A){(I._status===0||I._status===-1)&&(I._status=2,I._result=A)}),I._status===-1&&(I._status=0,I._result=K)}if(I._status===1)return I._result.default;throw I._result}var Te=typeof reportError=="function"?reportError:function(I){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof I=="object"&&I!==null&&typeof I.message=="string"?String(I.message):String(I),error:I});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",I);return}console.error(I)},C={map:ne,forEach:function(I,K,A){ne(I,function(){K.apply(this,arguments)},A)},count:function(I){var K=0;return ne(I,function(){K++}),K},toArray:function(I){return ne(I,function(K){return K})||[]},only:function(I){if(!oe(I))throw Error("React.Children.only expected to receive a single React element child.");return I}};return Pe.Activity=g,Pe.Children=C,Pe.Component=O,Pe.Fragment=n,Pe.Profiler=s,Pe.PureComponent=U,Pe.StrictMode=a,Pe.Suspense=d,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(I){return $.H.useMemoCache(I)}},Pe.cache=function(I){return function(){return I.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(I,K,A){if(I==null)throw Error("The argument must be a React element, but you passed "+I+".");var ee=N({},I.props),se=I.key;if(K!=null)for(ie in K.key!==void 0&&(se=""+K.key),K)!G.call(K,ie)||ie==="key"||ie==="__self"||ie==="__source"||ie==="ref"&&K.ref===void 0||(ee[ie]=K[ie]);var ie=arguments.length-2;if(ie===1)ee.children=A;else if(1<ie){for(var he=Array(ie),_e=0;_e<ie;_e++)he[_e]=arguments[_e+2];ee.children=he}return de(I.type,se,ee)},Pe.createContext=function(I){return I={$$typeof:o,_currentValue:I,_currentValue2:I,_threadCount:0,Provider:null,Consumer:null},I.Provider=I,I.Consumer={$$typeof:u,_context:I},I},Pe.createElement=function(I,K,A){var ee,se={},ie=null;if(K!=null)for(ee in K.key!==void 0&&(ie=""+K.key),K)G.call(K,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(se[ee]=K[ee]);var he=arguments.length-2;if(he===1)se.children=A;else if(1<he){for(var _e=Array(he),Ee=0;Ee<he;Ee++)_e[Ee]=arguments[Ee+2];se.children=_e}if(I&&I.defaultProps)for(ee in he=I.defaultProps,he)se[ee]===void 0&&(se[ee]=he[ee]);return de(I,ie,se)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(I){return{$$typeof:f,render:I}},Pe.isValidElement=oe,Pe.lazy=function(I){return{$$typeof:b,_payload:{_status:-1,_result:I},_init:xe}},Pe.memo=function(I,K){return{$$typeof:h,type:I,compare:K===void 0?null:K}},Pe.startTransition=function(I){var K=$.T,A={};$.T=A;try{var ee=I(),se=$.S;se!==null&&se(A,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(M,Te)}catch(ie){Te(ie)}finally{K!==null&&A.types!==null&&(K.types=A.types),$.T=K}},Pe.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Pe.use=function(I){return $.H.use(I)},Pe.useActionState=function(I,K,A){return $.H.useActionState(I,K,A)},Pe.useCallback=function(I,K){return $.H.useCallback(I,K)},Pe.useContext=function(I){return $.H.useContext(I)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(I,K){return $.H.useDeferredValue(I,K)},Pe.useEffect=function(I,K){return $.H.useEffect(I,K)},Pe.useEffectEvent=function(I){return $.H.useEffectEvent(I)},Pe.useId=function(){return $.H.useId()},Pe.useImperativeHandle=function(I,K,A){return $.H.useImperativeHandle(I,K,A)},Pe.useInsertionEffect=function(I,K){return $.H.useInsertionEffect(I,K)},Pe.useLayoutEffect=function(I,K){return $.H.useLayoutEffect(I,K)},Pe.useMemo=function(I,K){return $.H.useMemo(I,K)},Pe.useOptimistic=function(I,K){return $.H.useOptimistic(I,K)},Pe.useReducer=function(I,K,A){return $.H.useReducer(I,K,A)},Pe.useRef=function(I){return $.H.useRef(I)},Pe.useState=function(I){return $.H.useState(I)},Pe.useSyncExternalStore=function(I,K,A){return $.H.useSyncExternalStore(I,K,A)},Pe.useTransition=function(){return $.H.useTransition()},Pe.version="19.2.7",Pe}var Zb;function Xm(){return Zb||(Zb=1,vh.exports=ak()),vh.exports}var S=Xm();const ik=Qm(S),Ox=tk({__proto__:null,default:ik},[S]);var Sh={exports:{}},Is={},kh={exports:{}},Ah={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var Kb;function lk(){return Kb||(Kb=1,(function(e){function t(P,ne){var xe=P.length;P.push(ne);e:for(;0<xe;){var Te=xe-1>>>1,C=P[Te];if(0<s(C,ne))P[Te]=ne,P[xe]=C,xe=Te;else break e}}function n(P){return P.length===0?null:P[0]}function a(P){if(P.length===0)return null;var ne=P[0],xe=P.pop();if(xe!==ne){P[0]=xe;e:for(var Te=0,C=P.length,I=C>>>1;Te<I;){var K=2*(Te+1)-1,A=P[K],ee=K+1,se=P[ee];if(0>s(A,xe))ee<C&&0>s(se,A)?(P[Te]=se,P[ee]=xe,Te=ee):(P[Te]=A,P[K]=xe,Te=K);else if(ee<C&&0>s(se,xe))P[Te]=se,P[ee]=xe,Te=ee;else break e}}return ne}function s(P,ne){var xe=P.sortIndex-ne.sortIndex;return xe!==0?xe:P.id-ne.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var o=Date,f=o.now();e.unstable_now=function(){return o.now()-f}}var d=[],h=[],b=1,g=null,E=3,x=!1,v=!1,N=!1,w=!1,O=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function D(P){for(var ne=n(h);ne!==null;){if(ne.callback===null)a(h);else if(ne.startTime<=P)a(h),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(h)}}function q(P){if(N=!1,D(P),!v)if(n(d)!==null)v=!0,M||(M=!0,ce());else{var ne=n(h);ne!==null&&ae(q,ne.startTime-P)}}var M=!1,$=-1,G=5,de=-1;function F(){return w?!0:!(e.unstable_now()-de<G)}function oe(){if(w=!1,M){var P=e.unstable_now();de=P;var ne=!0;try{e:{v=!1,N&&(N=!1,z($),$=-1),x=!0;var xe=E;try{t:{for(D(P),g=n(d);g!==null&&!(g.expirationTime>P&&F());){var Te=g.callback;if(typeof Te=="function"){g.callback=null,E=g.priorityLevel;var C=Te(g.expirationTime<=P);if(P=e.unstable_now(),typeof C=="function"){g.callback=C,D(P),ne=!0;break t}g===n(d)&&a(d),D(P)}else a(d);g=n(d)}if(g!==null)ne=!0;else{var I=n(h);I!==null&&ae(q,I.startTime-P),ne=!1}}break e}finally{g=null,E=xe,x=!1}ne=void 0}}finally{ne?ce():M=!1}}}var ce;if(typeof U=="function")ce=function(){U(oe)};else if(typeof MessageChannel<"u"){var we=new MessageChannel,pe=we.port2;we.port1.onmessage=oe,ce=function(){pe.postMessage(null)}}else ce=function(){O(oe,0)};function ae(P,ne){$=O(function(){P(e.unstable_now())},ne)}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(P){P.callback=null},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_next=function(P){switch(E){case 1:case 2:case 3:var ne=3;break;default:ne=E}var xe=E;E=ne;try{return P()}finally{E=xe}},e.unstable_requestPaint=function(){w=!0},e.unstable_runWithPriority=function(P,ne){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var xe=E;E=P;try{return ne()}finally{E=xe}},e.unstable_scheduleCallback=function(P,ne,xe){var Te=e.unstable_now();switch(typeof xe=="object"&&xe!==null?(xe=xe.delay,xe=typeof xe=="number"&&0<xe?Te+xe:Te):xe=Te,P){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=xe+C,P={id:b++,callback:ne,priorityLevel:P,startTime:xe,expirationTime:C,sortIndex:-1},xe>Te?(P.sortIndex=xe,t(h,P),n(d)===null&&P===n(h)&&(N?(z($),$=-1):N=!0,ae(q,xe-Te))):(P.sortIndex=C,t(d,P),v||x||(v=!0,M||(M=!0,ce()))),P},e.unstable_shouldYield=F,e.unstable_wrapCallback=function(P){var ne=E;return function(){var xe=E;E=ne;try{return P.apply(this,arguments)}finally{E=xe}}}})(Ah)),Ah}var Wb;function sk(){return Wb||(Wb=1,kh.exports=lk()),kh.exports}var Ch={exports:{}},un={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var Jb;function uk(){if(Jb)return un;Jb=1;var e=Xm();function t(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function u(d,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:d,containerInfo:h,implementation:b}}var o=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return un.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,un.createPortal=function(d,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return u(d,h,null,b)},un.flushSync=function(d){var h=o.T,b=a.p;try{if(o.T=null,a.p=2,d)return d()}finally{o.T=h,a.p=b,a.d.f()}},un.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(d,h))},un.prefetchDNS=function(d){typeof d=="string"&&a.d.D(d)},un.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin),E=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?a.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:E,fetchPriority:x}):b==="script"&&a.d.X(d,{crossOrigin:g,integrity:E,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},un.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=f(h.as,h.crossOrigin);a.d.M(d,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(d)},un.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=f(b,h.crossOrigin);a.d.L(d,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},un.preloadModule=function(d,h){if(typeof d=="string")if(h){var b=f(h.as,h.crossOrigin);a.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(d)},un.requestFormReset=function(d){a.d.r(d)},un.unstable_batchedUpdates=function(d,h){return d(h)},un.useFormState=function(d,h,b){return o.H.useFormState(d,h,b)},un.useFormStatus=function(){return o.H.useHostTransitionStatus()},un.version="19.2.7",un}var ey;function Lx(){if(ey)return Ch.exports;ey=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(),Ch.exports=uk(),Ch.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var ty;function ok(){if(ty)return Is;ty=1;var e=sk(),t=Xm(),n=Lx();function a(r){var i="https://react.dev/errors/"+r;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)i+="&args[]="+encodeURIComponent(arguments[l])}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."}function s(r){return!(!r||r.nodeType!==1&&r.nodeType!==9&&r.nodeType!==11)}function u(r){var i=r,l=r;if(r.alternate)for(;i.return;)i=i.return;else{r=i;do i=r,(i.flags&4098)!==0&&(l=i.return),r=i.return;while(r)}return i.tag===3?l:null}function o(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 f(r){if(r.tag===31){var i=r.memoizedState;if(i===null&&(r=r.alternate,r!==null&&(i=r.memoizedState)),i!==null)return i.dehydrated}return null}function d(r){if(u(r)!==r)throw Error(a(188))}function h(r){var i=r.alternate;if(!i){if(i=u(r),i===null)throw Error(a(188));return i!==r?null:r}for(var l=r,c=i;;){var m=l.return;if(m===null)break;var p=m.alternate;if(p===null){if(c=m.return,c!==null){l=c;continue}break}if(m.child===p.child){for(p=m.child;p;){if(p===l)return d(m),r;if(p===c)return d(m),i;p=p.sibling}throw Error(a(188))}if(l.return!==c.return)l=m,c=p;else{for(var _=!1,k=m.child;k;){if(k===l){_=!0,l=m,c=p;break}if(k===c){_=!0,c=m,l=p;break}k=k.sibling}if(!_){for(k=p.child;k;){if(k===l){_=!0,l=p,c=m;break}if(k===c){_=!0,c=p,l=m;break}k=k.sibling}if(!_)throw Error(a(189))}}if(l.alternate!==c)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?r:i}function b(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r;for(r=r.child;r!==null;){if(i=b(r),i!==null)return i;r=r.sibling}return null}var g=Object.assign,E=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),v=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),O=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),U=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),de=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ce(r){return r===null||typeof r!="object"?null:(r=oe&&r[oe]||r["@@iterator"],typeof r=="function"?r:null)}var we=Symbol.for("react.client.reference");function pe(r){if(r==null)return null;if(typeof r=="function")return r.$$typeof===we?null:r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case N:return"Fragment";case O:return"Profiler";case w:return"StrictMode";case q:return"Suspense";case M:return"SuspenseList";case de:return"Activity"}if(typeof r=="object")switch(r.$$typeof){case v:return"Portal";case U:return r.displayName||"Context";case z:return(r._context.displayName||"Context")+".Consumer";case D:var i=r.render;return r=r.displayName,r||(r=i.displayName||i.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case $:return i=r.displayName||null,i!==null?i:pe(r.type)||"Memo";case G:i=r._payload,r=r._init;try{return pe(r(i))}catch{}}return null}var ae=Array.isArray,P=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,xe={pending:!1,data:null,method:null,action:null},Te=[],C=-1;function I(r){return{current:r}}function K(r){0>C||(r.current=Te[C],Te[C]=null,C--)}function A(r,i){C++,Te[C]=r.current,r.current=i}var ee=I(null),se=I(null),ie=I(null),he=I(null);function _e(r,i){switch(A(ie,i),A(se,r),A(ee,null),i.nodeType){case 9:case 11:r=(r=i.documentElement)&&(r=r.namespaceURI)?gb(r):0;break;default:if(r=i.tagName,i=i.namespaceURI)i=gb(i),r=bb(i,r);else switch(r){case"svg":r=1;break;case"math":r=2;break;default:r=0}}K(ee),A(ee,r)}function Ee(){K(ee),K(se),K(ie)}function Ye(r){r.memoizedState!==null&&A(he,r);var i=ee.current,l=bb(i,r.type);i!==l&&(A(se,r),A(ee,l))}function _t(r){se.current===r&&(K(ee),K(se)),he.current===r&&(K(he),ws._currentValue=xe)}var wt,rt;function mt(r){if(wt===void 0)try{throw Error()}catch(l){var i=l.stack.trim().match(/\n( *(at )?)/);wt=i&&i[1]||"",rt=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+wt+r+rt}var dn=!1;function hn(r,i){if(!r||dn)return"";dn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var c={DetermineComponentFrameRoot:function(){try{if(i){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(W){var Z=W}Reflect.construct(r,[],ue)}else{try{ue.call()}catch(W){Z=W}r.call(ue.prototype)}}else{try{throw Error()}catch(W){Z=W}(ue=r())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(W){if(W&&Z&&typeof W.stack=="string")return[W.stack,Z.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var p=c.DetermineComponentFrameRoot(),_=p[0],k=p[1];if(_&&k){var H=_.split(`
44
- `),X=k.split(`
45
- `);for(m=c=0;c<H.length&&!H[c].includes("DetermineComponentFrameRoot");)c++;for(;m<X.length&&!X[m].includes("DetermineComponentFrameRoot");)m++;if(c===H.length||m===X.length)for(c=H.length-1,m=X.length-1;1<=c&&0<=m&&H[c]!==X[m];)m--;for(;1<=c&&0<=m;c--,m--)if(H[c]!==X[m]){if(c!==1||m!==1)do if(c--,m--,0>m||H[c]!==X[m]){var te=`
46
- `+H[c].replace(" at new "," at ");return r.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",r.displayName)),te}while(1<=c&&0<=m);break}}}finally{dn=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?mt(l):""}function gr(r,i){switch(r.tag){case 26:case 27:case 5:return mt(r.type);case 16:return mt("Lazy");case 13:return r.child!==i&&i!==null?mt("Suspense Fallback"):mt("Suspense");case 19:return mt("SuspenseList");case 0:case 15:return hn(r.type,!1);case 11:return hn(r.type.render,!1);case 1:return hn(r.type,!0);case 31:return mt("Activity");default:return""}}function Le(r){try{var i="",l=null;do i+=gr(r,l),l=r,r=r.return;while(r);return i}catch(c){return`
47
- Error generating stack: `+c.message+`
48
- `+c.stack}}var st=Object.prototype.hasOwnProperty,jt=e.unstable_scheduleCallback,Ft=e.unstable_cancelCallback,$n=e.unstable_shouldYield,jl=e.unstable_requestPaint,mn=e.unstable_now,of=e.unstable_getCurrentPriorityLevel,re=e.unstable_ImmediatePriority,ye=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Ze=e.unstable_LowPriority,ht=e.unstable_IdlePriority,Ln=e.log,wr=e.unstable_setDisableYieldValue,pn=null,Xt=null;function Tn(r){if(typeof Ln=="function"&&wr(r),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(pn,r)}catch{}}var vt=Math.clz32?Math.clz32:Uv,aa=Math.log,sr=Math.LN2;function Uv(r){return r>>>=0,r===0?32:31-(aa(r)/sr|0)|0}var Su=256,ku=262144,Au=4194304;function Ga(r){var i=r&42;if(i!==0)return i;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Cu(r,i,l){var c=r.pendingLanes;if(c===0)return 0;var m=0,p=r.suspendedLanes,_=r.pingedLanes;r=r.warmLanes;var k=c&134217727;return k!==0?(c=k&~p,c!==0?m=Ga(c):(_&=k,_!==0?m=Ga(_):l||(l=k&~r,l!==0&&(m=Ga(l))))):(k=c&~p,k!==0?m=Ga(k):_!==0?m=Ga(_):l||(l=c&~r,l!==0&&(m=Ga(l)))),m===0?0:i!==0&&i!==m&&(i&p)===0&&(p=m&-m,l=i&-i,p>=l||p===32&&(l&4194048)!==0)?i:m}function Fl(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function Pv(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function K0(){var r=Au;return Au<<=1,(Au&62914560)===0&&(Au=4194304),r}function cf(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function ql(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function jv(r,i,l,c,m,p){var _=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var k=r.entanglements,H=r.expirationTimes,X=r.hiddenUpdates;for(l=_&~l;0<l;){var te=31-vt(l),ue=1<<te;k[te]=0,H[te]=-1;var Z=X[te];if(Z!==null)for(X[te]=null,te=0;te<Z.length;te++){var W=Z[te];W!==null&&(W.lane&=-536870913)}l&=~ue}c!==0&&W0(r,c,0),p!==0&&m===0&&r.tag!==0&&(r.suspendedLanes|=p&~(_&~i))}function W0(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var c=31-vt(i);r.entangledLanes|=i,r.entanglements[c]=r.entanglements[c]|1073741824|l&261930}function J0(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var c=31-vt(l),m=1<<c;m&i|r[c]&i&&(r[c]|=i),l&=~m}}function ep(r,i){var l=i&-i;return l=(l&42)!==0?1:ff(l),(l&(r.suspendedLanes|i))!==0?0:l}function ff(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=16;break;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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function df(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function tp(){var r=ne.p;return r!==0?r:(r=window.event,r===void 0?32:Pb(r.type))}function np(r,i){var l=ne.p;try{return ne.p=r,i()}finally{ne.p=l}}var ia=Math.random().toString(36).slice(2),nn="__reactFiber$"+ia,_n="__reactProps$"+ia,Mi="__reactContainer$"+ia,hf="__reactEvents$"+ia,Fv="__reactListeners$"+ia,qv="__reactHandles$"+ia,rp="__reactResources$"+ia,Yl="__reactMarker$"+ia;function mf(r){delete r[nn],delete r[_n],delete r[hf],delete r[Fv],delete r[qv]}function Bi(r){var i=r[nn];if(i)return i;for(var l=r.parentNode;l;){if(i=l[Mi]||l[nn]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Sb(r);r!==null;){if(l=r[nn])return l;r=Sb(r)}return i}r=l,l=r.parentNode}return null}function zi(r){if(r=r[nn]||r[Mi]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function $l(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function Hi(r){var i=r[rp];return i||(i=r[rp]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Wt(r){r[Yl]=!0}var ap=new Set,ip={};function Qa(r,i){Ui(r,i),Ui(r+"Capture",i)}function Ui(r,i){for(ip[r]=i,r=0;r<i.length;r++)ap.add(i[r])}var Yv=RegExp("^[: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]*$"),lp={},sp={};function $v(r){return st.call(sp,r)?!0:st.call(lp,r)?!1:Yv.test(r)?sp[r]=!0:(lp[r]=!0,!1)}function Nu(r,i,l){if($v(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var c=i.toLowerCase().slice(0,5);if(c!=="data-"&&c!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function wu(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function Rr(r,i,l,c){if(c===null)r.removeAttribute(l);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+c)}}function Vn(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function up(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function Vv(r,i,l){var c=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof c<"u"&&typeof c.get=="function"&&typeof c.set=="function"){var m=c.get,p=c.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return m.call(this)},set:function(_){l=""+_,p.call(this,_)}}),Object.defineProperty(r,i,{enumerable:c.enumerable}),{getValue:function(){return l},setValue:function(_){l=""+_},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function pf(r){if(!r._valueTracker){var i=up(r)?"checked":"value";r._valueTracker=Vv(r,i,""+r[i])}}function op(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),c="";return r&&(c=up(r)?r.checked?"true":"false":r.value),r=c,r!==l?(i.setValue(r),!0):!1}function Ru(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}}var Gv=/[\n"\\]/g;function Gn(r){return r.replace(Gv,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function gf(r,i,l,c,m,p,_,k){r.name="",_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?r.type=_:r.removeAttribute("type"),i!=null?_==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+Vn(i)):r.value!==""+Vn(i)&&(r.value=""+Vn(i)):_!=="submit"&&_!=="reset"||r.removeAttribute("value"),i!=null?bf(r,_,Vn(i)):l!=null?bf(r,_,Vn(l)):c!=null&&r.removeAttribute("value"),m==null&&p!=null&&(r.defaultChecked=!!p),m!=null&&(r.checked=m&&typeof m!="function"&&typeof m!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?r.name=""+Vn(k):r.removeAttribute("name")}function cp(r,i,l,c,m,p,_,k){if(p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"&&(r.type=p),i!=null||l!=null){if(!(p!=="submit"&&p!=="reset"||i!=null)){pf(r);return}l=l!=null?""+Vn(l):"",i=i!=null?""+Vn(i):l,k||i===r.value||(r.value=i),r.defaultValue=i}c=c??m,c=typeof c!="function"&&typeof c!="symbol"&&!!c,r.checked=k?r.checked:!!c,r.defaultChecked=!!c,_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"&&(r.name=_),pf(r)}function bf(r,i,l){i==="number"&&Ru(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function Pi(r,i,l,c){if(r=r.options,i){i={};for(var m=0;m<l.length;m++)i["$"+l[m]]=!0;for(l=0;l<r.length;l++)m=i.hasOwnProperty("$"+r[l].value),r[l].selected!==m&&(r[l].selected=m),m&&c&&(r[l].defaultSelected=!0)}else{for(l=""+Vn(l),i=null,m=0;m<r.length;m++){if(r[m].value===l){r[m].selected=!0,c&&(r[m].defaultSelected=!0);return}i!==null||r[m].disabled||(i=r[m])}i!==null&&(i.selected=!0)}}function fp(r,i,l){if(i!=null&&(i=""+Vn(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?""+Vn(l):""}function dp(r,i,l,c){if(i==null){if(c!=null){if(l!=null)throw Error(a(92));if(ae(c)){if(1<c.length)throw Error(a(93));c=c[0]}l=c}l==null&&(l=""),i=l}l=Vn(i),r.defaultValue=l,c=r.textContent,c===l&&c!==""&&c!==null&&(r.value=c),pf(r)}function ji(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var Qv=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function hp(r,i,l){var c=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?c?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":c?r.setProperty(i,l):typeof l!="number"||l===0||Qv.has(i)?i==="float"?r.cssFloat=l:r[i]=(""+l).trim():r[i]=l+"px"}function mp(r,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,l!=null){for(var c in l)!l.hasOwnProperty(c)||i!=null&&i.hasOwnProperty(c)||(c.indexOf("--")===0?r.setProperty(c,""):c==="float"?r.cssFloat="":r[c]="");for(var m in i)c=i[m],i.hasOwnProperty(m)&&l[m]!==c&&hp(r,m,c)}else for(var p in i)i.hasOwnProperty(p)&&hp(r,p,i[p])}function yf(r){if(r.indexOf("-")===-1)return!1;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 Xv=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Zv=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ou(r){return Zv.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function Or(){}var Ef=null;function xf(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var Fi=null,qi=null;function pp(r){var i=zi(r);if(i&&(r=i.stateNode)){var l=r[_n]||null;e:switch(r=i.stateNode,i.type){case"input":if(gf(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Gn(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var c=l[i];if(c!==r&&c.form===r.form){var m=c[_n]||null;if(!m)throw Error(a(90));gf(c,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<l.length;i++)c=l[i],c.form===r.form&&op(c)}break e;case"textarea":fp(r,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&Pi(r,!!l.multiple,i,!1)}}}var Tf=!1;function gp(r,i,l){if(Tf)return r(i,l);Tf=!0;try{var c=r(i);return c}finally{if(Tf=!1,(Fi!==null||qi!==null)&&(Eo(),Fi&&(i=Fi,r=qi,qi=Fi=null,pp(i),r)))for(i=0;i<r.length;i++)pp(r[i])}}function Vl(r,i){var l=r.stateNode;if(l===null)return null;var c=l[_n]||null;if(c===null)return null;l=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(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var Lr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_f=!1;if(Lr)try{var Gl={};Object.defineProperty(Gl,"passive",{get:function(){_f=!0}}),window.addEventListener("test",Gl,Gl),window.removeEventListener("test",Gl,Gl)}catch{_f=!1}var la=null,vf=null,Lu=null;function bp(){if(Lu)return Lu;var r,i=vf,l=i.length,c,m="value"in la?la.value:la.textContent,p=m.length;for(r=0;r<l&&i[r]===m[r];r++);var _=l-r;for(c=1;c<=_&&i[l-c]===m[p-c];c++);return Lu=m.slice(r,1<c?1-c:void 0)}function Du(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 Iu(){return!0}function yp(){return!1}function vn(r){function i(l,c,m,p,_){this._reactName=l,this._targetInst=m,this.type=c,this.nativeEvent=p,this.target=_,this.currentTarget=null;for(var k in r)r.hasOwnProperty(k)&&(l=r[k],this[k]=l?l(p):p[k]);return this.isDefaultPrevented=(p.defaultPrevented!=null?p.defaultPrevented:p.returnValue===!1)?Iu:yp,this.isPropagationStopped=yp,this}return g(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Iu)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Iu)},persist:function(){},isPersistent:Iu}),i}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mu=vn(Xa),Ql=g({},Xa,{view:0,detail:0}),Kv=vn(Ql),Sf,kf,Xl,Bu=g({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cf,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!==Xl&&(Xl&&r.type==="mousemove"?(Sf=r.screenX-Xl.screenX,kf=r.screenY-Xl.screenY):kf=Sf=0,Xl=r),Sf)},movementY:function(r){return"movementY"in r?r.movementY:kf}}),Ep=vn(Bu),Wv=g({},Bu,{dataTransfer:0}),Jv=vn(Wv),e3=g({},Ql,{relatedTarget:0}),Af=vn(e3),t3=g({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),n3=vn(t3),r3=g({},Xa,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),a3=vn(r3),i3=g({},Xa,{data:0}),xp=vn(i3),l3={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s3={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"},u3={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function o3(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=u3[r])?!!i[r]:!1}function Cf(){return o3}var c3=g({},Ql,{key:function(r){if(r.key){var i=l3[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Du(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?s3[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cf,charCode:function(r){return r.type==="keypress"?Du(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Du(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),f3=vn(c3),d3=g({},Bu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Tp=vn(d3),h3=g({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cf}),m3=vn(h3),p3=g({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),g3=vn(p3),b3=g({},Bu,{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}),y3=vn(b3),E3=g({},Xa,{newState:0,oldState:0}),x3=vn(E3),T3=[9,13,27,32],Nf=Lr&&"CompositionEvent"in window,Zl=null;Lr&&"documentMode"in document&&(Zl=document.documentMode);var _3=Lr&&"TextEvent"in window&&!Zl,_p=Lr&&(!Nf||Zl&&8<Zl&&11>=Zl),vp=" ",Sp=!1;function kp(r,i){switch(r){case"keyup":return T3.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ap(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var Yi=!1;function v3(r,i){switch(r){case"compositionend":return Ap(i);case"keypress":return i.which!==32?null:(Sp=!0,vp);case"textInput":return r=i.data,r===vp&&Sp?null:r;default:return null}}function S3(r,i){if(Yi)return r==="compositionend"||!Nf&&kp(r,i)?(r=bp(),Lu=vf=la=null,Yi=!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 _p&&i.locale!=="ko"?null:i.data;default:return null}}var k3={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 Cp(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!k3[r.type]:i==="textarea"}function Np(r,i,l,c){Fi?qi?qi.push(c):qi=[c]:Fi=c,i=Ao(i,"onChange"),0<i.length&&(l=new Mu("onChange","change",null,l,c),r.push({event:l,listeners:i}))}var Kl=null,Wl=null;function A3(r){cb(r,0)}function zu(r){var i=$l(r);if(op(i))return r}function wp(r,i){if(r==="change")return i}var Rp=!1;if(Lr){var wf;if(Lr){var Rf="oninput"in document;if(!Rf){var Op=document.createElement("div");Op.setAttribute("oninput","return;"),Rf=typeof Op.oninput=="function"}wf=Rf}else wf=!1;Rp=wf&&(!document.documentMode||9<document.documentMode)}function Lp(){Kl&&(Kl.detachEvent("onpropertychange",Dp),Wl=Kl=null)}function Dp(r){if(r.propertyName==="value"&&zu(Wl)){var i=[];Np(i,Wl,r,xf(r)),gp(A3,i)}}function C3(r,i,l){r==="focusin"?(Lp(),Kl=i,Wl=l,Kl.attachEvent("onpropertychange",Dp)):r==="focusout"&&Lp()}function N3(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return zu(Wl)}function w3(r,i){if(r==="click")return zu(i)}function R3(r,i){if(r==="input"||r==="change")return zu(i)}function O3(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var Dn=typeof Object.is=="function"?Object.is:O3;function Jl(r,i){if(Dn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),c=Object.keys(i);if(l.length!==c.length)return!1;for(c=0;c<l.length;c++){var m=l[c];if(!st.call(i,m)||!Dn(r[m],i[m]))return!1}return!0}function Ip(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function Mp(r,i){var l=Ip(r);r=0;for(var c;l;){if(l.nodeType===3){if(c=r+l.textContent.length,r<=i&&c>=i)return{node:l,offset:i-r};r=c}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ip(l)}}function Bp(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?Bp(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function zp(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Ru(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=Ru(r.document)}return i}function Of(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")}var L3=Lr&&"documentMode"in document&&11>=document.documentMode,$i=null,Lf=null,es=null,Df=!1;function Hp(r,i,l){var c=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Df||$i==null||$i!==Ru(c)||(c=$i,"selectionStart"in c&&Of(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}),es&&Jl(es,c)||(es=c,c=Ao(Lf,"onSelect"),0<c.length&&(i=new Mu("onSelect","select",null,i,l),r.push({event:i,listeners:c}),i.target=$i)))}function Za(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var Vi={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},If={},Up={};Lr&&(Up=document.createElement("div").style,"AnimationEvent"in window||(delete Vi.animationend.animation,delete Vi.animationiteration.animation,delete Vi.animationstart.animation),"TransitionEvent"in window||delete Vi.transitionend.transition);function Ka(r){if(If[r])return If[r];if(!Vi[r])return r;var i=Vi[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in Up)return If[r]=i[l];return r}var Pp=Ka("animationend"),jp=Ka("animationiteration"),Fp=Ka("animationstart"),D3=Ka("transitionrun"),I3=Ka("transitionstart"),M3=Ka("transitioncancel"),qp=Ka("transitionend"),Yp=new Map,Mf="abort auxClick beforeToggle 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(" ");Mf.push("scrollEnd");function ur(r,i){Yp.set(r,i),Qa(i,[r])}var Hu=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Qn=[],Gi=0,Bf=0;function Uu(){for(var r=Gi,i=Bf=Gi=0;i<r;){var l=Qn[i];Qn[i++]=null;var c=Qn[i];Qn[i++]=null;var m=Qn[i];Qn[i++]=null;var p=Qn[i];if(Qn[i++]=null,c!==null&&m!==null){var _=c.pending;_===null?m.next=m:(m.next=_.next,_.next=m),c.pending=m}p!==0&&$p(l,m,p)}}function Pu(r,i,l,c){Qn[Gi++]=r,Qn[Gi++]=i,Qn[Gi++]=l,Qn[Gi++]=c,Bf|=c,r.lanes|=c,r=r.alternate,r!==null&&(r.lanes|=c)}function zf(r,i,l,c){return Pu(r,i,l,c),ju(r)}function Wa(r,i){return Pu(r,null,null,i),ju(r)}function $p(r,i,l){r.lanes|=l;var c=r.alternate;c!==null&&(c.lanes|=l);for(var m=!1,p=r.return;p!==null;)p.childLanes|=l,c=p.alternate,c!==null&&(c.childLanes|=l),p.tag===22&&(r=p.stateNode,r===null||r._visibility&1||(m=!0)),r=p,p=p.return;return r.tag===3?(p=r.stateNode,m&&i!==null&&(m=31-vt(l),r=p.hiddenUpdates,c=r[m],c===null?r[m]=[i]:c.push(i),i.lane=l|536870912),p):null}function ju(r){if(50<_s)throw _s=0,Vd=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var Qi={};function B3(r,i,l,c){this.tag=r,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=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 In(r,i,l,c){return new B3(r,i,l,c)}function Hf(r){return r=r.prototype,!(!r||!r.isReactComponent)}function Dr(r,i){var l=r.alternate;return l===null?(l=In(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function Vp(r,i){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Fu(r,i,l,c,m,p){var _=0;if(c=r,typeof r=="function")Hf(r)&&(_=1);else if(typeof r=="string")_=jS(r,l,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case de:return r=In(31,l,i,m),r.elementType=de,r.lanes=p,r;case N:return Ja(l.children,m,p,i);case w:_=8,m|=24;break;case O:return r=In(12,l,i,m|2),r.elementType=O,r.lanes=p,r;case q:return r=In(13,l,i,m),r.elementType=q,r.lanes=p,r;case M:return r=In(19,l,i,m),r.elementType=M,r.lanes=p,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case U:_=10;break e;case z:_=9;break e;case D:_=11;break e;case $:_=14;break e;case G:_=16,c=null;break e}_=29,l=Error(a(130,r===null?"null":typeof r,"")),c=null}return i=In(_,l,i,m),i.elementType=r,i.type=c,i.lanes=p,i}function Ja(r,i,l,c){return r=In(7,r,c,i),r.lanes=l,r}function Uf(r,i,l){return r=In(6,r,null,i),r.lanes=l,r}function Gp(r){var i=In(18,null,null,0);return i.stateNode=r,i}function Pf(r,i,l){return i=In(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var Qp=new WeakMap;function Xn(r,i){if(typeof r=="object"&&r!==null){var l=Qp.get(r);return l!==void 0?l:(i={value:r,source:i,stack:Le(i)},Qp.set(r,i),i)}return{value:r,source:i,stack:Le(i)}}var Xi=[],Zi=0,qu=null,ts=0,Zn=[],Kn=0,sa=null,br=1,yr="";function Ir(r,i){Xi[Zi++]=ts,Xi[Zi++]=qu,qu=r,ts=i}function Xp(r,i,l){Zn[Kn++]=br,Zn[Kn++]=yr,Zn[Kn++]=sa,sa=r;var c=br;r=yr;var m=32-vt(c)-1;c&=~(1<<m),l+=1;var p=32-vt(i)+m;if(30<p){var _=m-m%5;p=(c&(1<<_)-1).toString(32),c>>=_,m-=_,br=1<<32-vt(i)+m|l<<m|c,yr=p+r}else br=1<<p|l<<m|c,yr=r}function jf(r){r.return!==null&&(Ir(r,1),Xp(r,1,0))}function Ff(r){for(;r===qu;)qu=Xi[--Zi],Xi[Zi]=null,ts=Xi[--Zi],Xi[Zi]=null;for(;r===sa;)sa=Zn[--Kn],Zn[Kn]=null,yr=Zn[--Kn],Zn[Kn]=null,br=Zn[--Kn],Zn[Kn]=null}function Zp(r,i){Zn[Kn++]=br,Zn[Kn++]=yr,Zn[Kn++]=sa,br=i.id,yr=i.overflow,sa=r}var rn=null,Ct=null,nt=!1,ua=null,Wn=!1,qf=Error(a(519));function oa(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ns(Xn(i,r)),qf}function Kp(r){var i=r.stateNode,l=r.type,c=r.memoizedProps;switch(i[nn]=r,i[_n]=c,l){case"dialog":We("cancel",i),We("close",i);break;case"iframe":case"object":case"embed":We("load",i);break;case"video":case"audio":for(l=0;l<Ss.length;l++)We(Ss[l],i);break;case"source":We("error",i);break;case"img":case"image":case"link":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"input":We("invalid",i),cp(i,c.value,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name,!0);break;case"select":We("invalid",i);break;case"textarea":We("invalid",i),dp(i,c.value,c.defaultValue,c.children)}l=c.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||c.suppressHydrationWarning===!0||mb(i.textContent,l)?(c.popover!=null&&(We("beforetoggle",i),We("toggle",i)),c.onScroll!=null&&We("scroll",i),c.onScrollEnd!=null&&We("scrollend",i),c.onClick!=null&&(i.onclick=Or),i=!0):i=!1,i||oa(r,!0)}function Wp(r){for(rn=r.return;rn;)switch(rn.tag){case 5:case 31:case 13:Wn=!1;return;case 27:case 3:Wn=!0;return;default:rn=rn.return}}function Ki(r){if(r!==rn)return!1;if(!nt)return Wp(r),nt=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||sh(r.type,r.memoizedProps)),l=!l),l&&Ct&&oa(r),Wp(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ct=vb(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));Ct=vb(r)}else i===27?(i=Ct,va(r.type)?(r=dh,dh=null,Ct=r):Ct=i):Ct=rn?er(r.stateNode.nextSibling):null;return!0}function ei(){Ct=rn=null,nt=!1}function Yf(){var r=ua;return r!==null&&(Cn===null?Cn=r:Cn.push.apply(Cn,r),ua=null),r}function ns(r){ua===null?ua=[r]:ua.push(r)}var $f=I(null),ti=null,Mr=null;function ca(r,i,l){A($f,i._currentValue),i._currentValue=l}function Br(r){r._currentValue=$f.current,K($f)}function Vf(r,i,l){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===l)break;r=r.return}}function Gf(r,i,l,c){var m=r.child;for(m!==null&&(m.return=r);m!==null;){var p=m.dependencies;if(p!==null){var _=m.child;p=p.firstContext;e:for(;p!==null;){var k=p;p=m;for(var H=0;H<i.length;H++)if(k.context===i[H]){p.lanes|=l,k=p.alternate,k!==null&&(k.lanes|=l),Vf(p.return,l,r),c||(_=null);break e}p=k.next}}else if(m.tag===18){if(_=m.return,_===null)throw Error(a(341));_.lanes|=l,p=_.alternate,p!==null&&(p.lanes|=l),Vf(_,l,r),_=null}else _=m.child;if(_!==null)_.return=m;else for(_=m;_!==null;){if(_===r){_=null;break}if(m=_.sibling,m!==null){m.return=_.return,_=m;break}_=_.return}m=_}}function Wi(r,i,l,c){r=null;for(var m=i,p=!1;m!==null;){if(!p){if((m.flags&524288)!==0)p=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var _=m.alternate;if(_===null)throw Error(a(387));if(_=_.memoizedProps,_!==null){var k=m.type;Dn(m.pendingProps.value,_.value)||(r!==null?r.push(k):r=[k])}}else if(m===he.current){if(_=m.alternate,_===null)throw Error(a(387));_.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(r!==null?r.push(ws):r=[ws])}m=m.return}r!==null&&Gf(i,r,l,c),i.flags|=262144}function Yu(r){for(r=r.firstContext;r!==null;){if(!Dn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ni(r){ti=r,Mr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function an(r){return Jp(ti,r)}function $u(r,i){return ti===null&&ni(r),Jp(r,i)}function Jp(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},Mr===null){if(r===null)throw Error(a(308));Mr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else Mr=Mr.next=i;return l}var z3=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,c){r.push(c)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},H3=e.unstable_scheduleCallback,U3=e.unstable_NormalPriority,qt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Qf(){return{controller:new z3,data:new Map,refCount:0}}function rs(r){r.refCount--,r.refCount===0&&H3(U3,function(){r.controller.abort()})}var as=null,Xf=0,Ji=0,el=null;function P3(r,i){if(as===null){var l=as=[];Xf=0,Ji=Wd(),el={status:"pending",value:void 0,then:function(c){l.push(c)}}}return Xf++,i.then(e1,e1),i}function e1(){if(--Xf===0&&as!==null){el!==null&&(el.status="fulfilled");var r=as;as=null,Ji=0,el=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function j3(r,i){var l=[],c={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return r.then(function(){c.status="fulfilled",c.value=i;for(var m=0;m<l.length;m++)(0,l[m])(i)},function(m){for(c.status="rejected",c.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),c}var t1=P.S;P.S=function(r,i){Hg=mn(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&P3(r,i),t1!==null&&t1(r,i)};var ri=I(null);function Zf(){var r=ri.current;return r!==null?r:St.pooledCache}function Vu(r,i){i===null?A(ri,ri.current):A(ri,i.pool)}function n1(){var r=Zf();return r===null?null:{parent:qt._currentValue,pool:r}}var tl=Error(a(460)),Kf=Error(a(474)),Gu=Error(a(542)),Qu={then:function(){}};function r1(r){return r=r.status,r==="fulfilled"||r==="rejected"}function a1(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(Or,Or),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,l1(r),r;default:if(typeof i.status=="string")i.then(Or,Or);else{if(r=St,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(c){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=c}},function(c){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=c}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,l1(r),r}throw ii=i,tl}}function ai(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ii=l,tl):l}}var ii=null;function i1(){if(ii===null)throw Error(a(459));var r=ii;return ii=null,r}function l1(r){if(r===tl||r===Gu)throw Error(a(483))}var nl=null,is=0;function Xu(r){var i=is;return is+=1,nl===null&&(nl=[]),a1(nl,r,i)}function ls(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Zu(r,i){throw i.$$typeof===E?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function s1(r){function i(Y,j){if(r){var Q=Y.deletions;Q===null?(Y.deletions=[j],Y.flags|=16):Q.push(j)}}function l(Y,j){if(!r)return null;for(;j!==null;)i(Y,j),j=j.sibling;return null}function c(Y){for(var j=new Map;Y!==null;)Y.key!==null?j.set(Y.key,Y):j.set(Y.index,Y),Y=Y.sibling;return j}function m(Y,j){return Y=Dr(Y,j),Y.index=0,Y.sibling=null,Y}function p(Y,j,Q){return Y.index=Q,r?(Q=Y.alternate,Q!==null?(Q=Q.index,Q<j?(Y.flags|=67108866,j):Q):(Y.flags|=67108866,j)):(Y.flags|=1048576,j)}function _(Y){return r&&Y.alternate===null&&(Y.flags|=67108866),Y}function k(Y,j,Q,le){return j===null||j.tag!==6?(j=Uf(Q,Y.mode,le),j.return=Y,j):(j=m(j,Q),j.return=Y,j)}function H(Y,j,Q,le){var Oe=Q.type;return Oe===N?te(Y,j,Q.props.children,le,Q.key):j!==null&&(j.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===G&&ai(Oe)===j.type)?(j=m(j,Q.props),ls(j,Q),j.return=Y,j):(j=Fu(Q.type,Q.key,Q.props,null,Y.mode,le),ls(j,Q),j.return=Y,j)}function X(Y,j,Q,le){return j===null||j.tag!==4||j.stateNode.containerInfo!==Q.containerInfo||j.stateNode.implementation!==Q.implementation?(j=Pf(Q,Y.mode,le),j.return=Y,j):(j=m(j,Q.children||[]),j.return=Y,j)}function te(Y,j,Q,le,Oe){return j===null||j.tag!==7?(j=Ja(Q,Y.mode,le,Oe),j.return=Y,j):(j=m(j,Q),j.return=Y,j)}function ue(Y,j,Q){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Uf(""+j,Y.mode,Q),j.return=Y,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case x:return Q=Fu(j.type,j.key,j.props,null,Y.mode,Q),ls(Q,j),Q.return=Y,Q;case v:return j=Pf(j,Y.mode,Q),j.return=Y,j;case G:return j=ai(j),ue(Y,j,Q)}if(ae(j)||ce(j))return j=Ja(j,Y.mode,Q,null),j.return=Y,j;if(typeof j.then=="function")return ue(Y,Xu(j),Q);if(j.$$typeof===U)return ue(Y,$u(Y,j),Q);Zu(Y,j)}return null}function Z(Y,j,Q,le){var Oe=j!==null?j.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Oe!==null?null:k(Y,j,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return Q.key===Oe?H(Y,j,Q,le):null;case v:return Q.key===Oe?X(Y,j,Q,le):null;case G:return Q=ai(Q),Z(Y,j,Q,le)}if(ae(Q)||ce(Q))return Oe!==null?null:te(Y,j,Q,le,null);if(typeof Q.then=="function")return Z(Y,j,Xu(Q),le);if(Q.$$typeof===U)return Z(Y,j,$u(Y,Q),le);Zu(Y,Q)}return null}function W(Y,j,Q,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Y=Y.get(Q)||null,k(j,Y,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return Y=Y.get(le.key===null?Q:le.key)||null,H(j,Y,le,Oe);case v:return Y=Y.get(le.key===null?Q:le.key)||null,X(j,Y,le,Oe);case G:return le=ai(le),W(Y,j,Q,le,Oe)}if(ae(le)||ce(le))return Y=Y.get(Q)||null,te(j,Y,le,Oe,null);if(typeof le.then=="function")return W(Y,j,Q,Xu(le),Oe);if(le.$$typeof===U)return W(Y,j,Q,$u(j,le),Oe);Zu(j,le)}return null}function Ae(Y,j,Q,le){for(var Oe=null,ot=null,Ne=j,Fe=j=0,tt=null;Ne!==null&&Fe<Q.length;Fe++){Ne.index>Fe?(tt=Ne,Ne=null):tt=Ne.sibling;var ct=Z(Y,Ne,Q[Fe],le);if(ct===null){Ne===null&&(Ne=tt);break}r&&Ne&&ct.alternate===null&&i(Y,Ne),j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct,Ne=tt}if(Fe===Q.length)return l(Y,Ne),nt&&Ir(Y,Fe),Oe;if(Ne===null){for(;Fe<Q.length;Fe++)Ne=ue(Y,Q[Fe],le),Ne!==null&&(j=p(Ne,j,Fe),ot===null?Oe=Ne:ot.sibling=Ne,ot=Ne);return nt&&Ir(Y,Fe),Oe}for(Ne=c(Ne);Fe<Q.length;Fe++)tt=W(Ne,Y,Fe,Q[Fe],le),tt!==null&&(r&&tt.alternate!==null&&Ne.delete(tt.key===null?Fe:tt.key),j=p(tt,j,Fe),ot===null?Oe=tt:ot.sibling=tt,ot=tt);return r&&Ne.forEach(function(Na){return i(Y,Na)}),nt&&Ir(Y,Fe),Oe}function Ie(Y,j,Q,le){if(Q==null)throw Error(a(151));for(var Oe=null,ot=null,Ne=j,Fe=j=0,tt=null,ct=Q.next();Ne!==null&&!ct.done;Fe++,ct=Q.next()){Ne.index>Fe?(tt=Ne,Ne=null):tt=Ne.sibling;var Na=Z(Y,Ne,ct.value,le);if(Na===null){Ne===null&&(Ne=tt);break}r&&Ne&&Na.alternate===null&&i(Y,Ne),j=p(Na,j,Fe),ot===null?Oe=Na:ot.sibling=Na,ot=Na,Ne=tt}if(ct.done)return l(Y,Ne),nt&&Ir(Y,Fe),Oe;if(Ne===null){for(;!ct.done;Fe++,ct=Q.next())ct=ue(Y,ct.value,le),ct!==null&&(j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct);return nt&&Ir(Y,Fe),Oe}for(Ne=c(Ne);!ct.done;Fe++,ct=Q.next())ct=W(Ne,Y,Fe,ct.value,le),ct!==null&&(r&&ct.alternate!==null&&Ne.delete(ct.key===null?Fe:ct.key),j=p(ct,j,Fe),ot===null?Oe=ct:ot.sibling=ct,ot=ct);return r&&Ne.forEach(function(WS){return i(Y,WS)}),nt&&Ir(Y,Fe),Oe}function Et(Y,j,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===N&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:e:{for(var Oe=Q.key;j!==null;){if(j.key===Oe){if(Oe=Q.type,Oe===N){if(j.tag===7){l(Y,j.sibling),le=m(j,Q.props.children),le.return=Y,Y=le;break e}}else if(j.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===G&&ai(Oe)===j.type){l(Y,j.sibling),le=m(j,Q.props),ls(le,Q),le.return=Y,Y=le;break e}l(Y,j);break}else i(Y,j);j=j.sibling}Q.type===N?(le=Ja(Q.props.children,Y.mode,le,Q.key),le.return=Y,Y=le):(le=Fu(Q.type,Q.key,Q.props,null,Y.mode,le),ls(le,Q),le.return=Y,Y=le)}return _(Y);case v:e:{for(Oe=Q.key;j!==null;){if(j.key===Oe)if(j.tag===4&&j.stateNode.containerInfo===Q.containerInfo&&j.stateNode.implementation===Q.implementation){l(Y,j.sibling),le=m(j,Q.children||[]),le.return=Y,Y=le;break e}else{l(Y,j);break}else i(Y,j);j=j.sibling}le=Pf(Q,Y.mode,le),le.return=Y,Y=le}return _(Y);case G:return Q=ai(Q),Et(Y,j,Q,le)}if(ae(Q))return Ae(Y,j,Q,le);if(ce(Q)){if(Oe=ce(Q),typeof Oe!="function")throw Error(a(150));return Q=Oe.call(Q),Ie(Y,j,Q,le)}if(typeof Q.then=="function")return Et(Y,j,Xu(Q),le);if(Q.$$typeof===U)return Et(Y,j,$u(Y,Q),le);Zu(Y,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,j!==null&&j.tag===6?(l(Y,j.sibling),le=m(j,Q),le.return=Y,Y=le):(l(Y,j),le=Uf(Q,Y.mode,le),le.return=Y,Y=le),_(Y)):l(Y,j)}return function(Y,j,Q,le){try{is=0;var Oe=Et(Y,j,Q,le);return nl=null,Oe}catch(Ne){if(Ne===tl||Ne===Gu)throw Ne;var ot=In(29,Ne,null,Y.mode);return ot.lanes=le,ot.return=Y,ot}finally{}}}var li=s1(!0),u1=s1(!1),fa=!1;function Wf(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Jf(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function da(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function ha(r,i,l){var c=r.updateQueue;if(c===null)return null;if(c=c.shared,(dt&2)!==0){var m=c.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),c.pending=i,i=ju(r),$p(r,null,l),i}return Pu(r,c,i,l),ju(r)}function ss(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var c=i.lanes;c&=r.pendingLanes,l|=c,i.lanes=l,J0(r,l)}}function ed(r,i){var l=r.updateQueue,c=r.alternate;if(c!==null&&(c=c.updateQueue,l===c)){var m=null,p=null;if(l=l.firstBaseUpdate,l!==null){do{var _={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};p===null?m=p=_:p=p.next=_,l=l.next}while(l!==null);p===null?m=p=i:p=p.next=i}else m=p=i;l={baseState:c.baseState,firstBaseUpdate:m,lastBaseUpdate:p,shared:c.shared,callbacks:c.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var td=!1;function us(){if(td){var r=el;if(r!==null)throw r}}function os(r,i,l,c){td=!1;var m=r.updateQueue;fa=!1;var p=m.firstBaseUpdate,_=m.lastBaseUpdate,k=m.shared.pending;if(k!==null){m.shared.pending=null;var H=k,X=H.next;H.next=null,_===null?p=X:_.next=X,_=H;var te=r.alternate;te!==null&&(te=te.updateQueue,k=te.lastBaseUpdate,k!==_&&(k===null?te.firstBaseUpdate=X:k.next=X,te.lastBaseUpdate=H))}if(p!==null){var ue=m.baseState;_=0,te=X=H=null,k=p;do{var Z=k.lane&-536870913,W=Z!==k.lane;if(W?(et&Z)===Z:(c&Z)===Z){Z!==0&&Z===Ji&&(td=!0),te!==null&&(te=te.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var Ae=r,Ie=k;Z=i;var Et=l;switch(Ie.tag){case 1:if(Ae=Ie.payload,typeof Ae=="function"){ue=Ae.call(Et,ue,Z);break e}ue=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ie.payload,Z=typeof Ae=="function"?Ae.call(Et,ue,Z):Ae,Z==null)break e;ue=g({},ue,Z);break e;case 2:fa=!0}}Z=k.callback,Z!==null&&(r.flags|=64,W&&(r.flags|=8192),W=m.callbacks,W===null?m.callbacks=[Z]:W.push(Z))}else W={lane:Z,tag:k.tag,payload:k.payload,callback:k.callback,next:null},te===null?(X=te=W,H=ue):te=te.next=W,_|=Z;if(k=k.next,k===null){if(k=m.shared.pending,k===null)break;W=k,k=W.next,W.next=null,m.lastBaseUpdate=W,m.shared.pending=null}}while(!0);te===null&&(H=ue),m.baseState=H,m.firstBaseUpdate=X,m.lastBaseUpdate=te,p===null&&(m.shared.lanes=0),ya|=_,r.lanes=_,r.memoizedState=ue}}function o1(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function c1(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)o1(l[r],i)}var rl=I(null),Ku=I(0);function f1(r,i){r=$r,A(Ku,r),A(rl,i),$r=r|i.baseLanes}function nd(){A(Ku,$r),A(rl,rl.current)}function rd(){$r=Ku.current,K(rl),K(Ku)}var Mn=I(null),Jn=null;function ma(r){var i=r.alternate;A(Ht,Ht.current&1),A(Mn,r),Jn===null&&(i===null||rl.current!==null||i.memoizedState!==null)&&(Jn=r)}function ad(r){A(Ht,Ht.current),A(Mn,r),Jn===null&&(Jn=r)}function d1(r){r.tag===22?(A(Ht,Ht.current),A(Mn,r),Jn===null&&(Jn=r)):pa()}function pa(){A(Ht,Ht.current),A(Mn,Mn.current)}function Bn(r){K(Mn),Jn===r&&(Jn=null),K(Ht)}var Ht=I(0);function Wu(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ch(l)||fh(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){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 zr=0,je=null,bt=null,Yt=null,Ju=!1,al=!1,si=!1,eo=0,cs=0,il=null,F3=0;function Dt(){throw Error(a(321))}function id(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!Dn(r[l],i[l]))return!1;return!0}function ld(r,i,l,c,m,p){return zr=p,je=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,P.H=r===null||r.memoizedState===null?X1:Td,si=!1,p=l(c,m),si=!1,al&&(p=m1(i,l,c,m)),h1(r),p}function h1(r){P.H=hs;var i=bt!==null&&bt.next!==null;if(zr=0,Yt=bt=je=null,Ju=!1,cs=0,il=null,i)throw Error(a(300));r===null||$t||(r=r.dependencies,r!==null&&Yu(r)&&($t=!0))}function m1(r,i,l,c){je=r;var m=0;do{if(al&&(il=null),cs=0,al=!1,25<=m)throw Error(a(301));if(m+=1,Yt=bt=null,r.updateQueue!=null){var p=r.updateQueue;p.lastEffect=null,p.events=null,p.stores=null,p.memoCache!=null&&(p.memoCache.index=0)}P.H=Z1,p=i(l,c)}while(al);return p}function q3(){var r=P.H,i=r.useState()[0];return i=typeof i.then=="function"?fs(i):i,r=r.useState()[0],(bt!==null?bt.memoizedState:null)!==r&&(je.flags|=1024),i}function sd(){var r=eo!==0;return eo=0,r}function ud(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function od(r){if(Ju){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}Ju=!1}zr=0,Yt=bt=je=null,al=!1,cs=eo=0,il=null}function gn(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Yt===null?je.memoizedState=Yt=r:Yt=Yt.next=r,Yt}function Ut(){if(bt===null){var r=je.alternate;r=r!==null?r.memoizedState:null}else r=bt.next;var i=Yt===null?je.memoizedState:Yt.next;if(i!==null)Yt=i,bt=r;else{if(r===null)throw je.alternate===null?Error(a(467)):Error(a(310));bt=r,r={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Yt===null?je.memoizedState=Yt=r:Yt=Yt.next=r}return Yt}function to(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fs(r){var i=cs;return cs+=1,il===null&&(il=[]),r=a1(il,r,i),i=je,(Yt===null?i.memoizedState:Yt.next)===null&&(i=i.alternate,P.H=i===null||i.memoizedState===null?X1:Td),r}function no(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return fs(r);if(r.$$typeof===U)return an(r)}throw Error(a(438,String(r)))}function cd(r){var i=null,l=je.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var c=je.alternate;c!==null&&(c=c.updateQueue,c!==null&&(c=c.memoCache,c!=null&&(i={data:c.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=to(),je.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),c=0;c<r;c++)l[c]=F;return i.index++,l}function Hr(r,i){return typeof i=="function"?i(r):i}function ro(r){var i=Ut();return fd(i,bt,r)}function fd(r,i,l){var c=r.queue;if(c===null)throw Error(a(311));c.lastRenderedReducer=l;var m=r.baseQueue,p=c.pending;if(p!==null){if(m!==null){var _=m.next;m.next=p.next,p.next=_}i.baseQueue=m=p,c.pending=null}if(p=r.baseState,m===null)r.memoizedState=p;else{i=m.next;var k=_=null,H=null,X=i,te=!1;do{var ue=X.lane&-536870913;if(ue!==X.lane?(et&ue)===ue:(zr&ue)===ue){var Z=X.revertLane;if(Z===0)H!==null&&(H=H.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ue===Ji&&(te=!0);else if((zr&Z)===Z){X=X.next,Z===Ji&&(te=!0);continue}else ue={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(k=H=ue,_=p):H=H.next=ue,je.lanes|=Z,ya|=Z;ue=X.action,si&&l(p,ue),p=X.hasEagerState?X.eagerState:l(p,ue)}else Z={lane:ue,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},H===null?(k=H=Z,_=p):H=H.next=Z,je.lanes|=ue,ya|=ue;X=X.next}while(X!==null&&X!==i);if(H===null?_=p:H.next=k,!Dn(p,r.memoizedState)&&($t=!0,te&&(l=el,l!==null)))throw l;r.memoizedState=p,r.baseState=_,r.baseQueue=H,c.lastRenderedState=p}return m===null&&(c.lanes=0),[r.memoizedState,c.dispatch]}function dd(r){var i=Ut(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var c=l.dispatch,m=l.pending,p=i.memoizedState;if(m!==null){l.pending=null;var _=m=m.next;do p=r(p,_.action),_=_.next;while(_!==m);Dn(p,i.memoizedState)||($t=!0),i.memoizedState=p,i.baseQueue===null&&(i.baseState=p),l.lastRenderedState=p}return[p,c]}function p1(r,i,l){var c=je,m=Ut(),p=nt;if(p){if(l===void 0)throw Error(a(407));l=l()}else l=i();var _=!Dn((bt||m).memoizedState,l);if(_&&(m.memoizedState=l,$t=!0),m=m.queue,pd(y1.bind(null,c,m,r),[r]),m.getSnapshot!==i||_||Yt!==null&&Yt.memoizedState.tag&1){if(c.flags|=2048,ll(9,{destroy:void 0},b1.bind(null,c,m,l,i),null),St===null)throw Error(a(349));p||(zr&127)!==0||g1(c,i,l)}return l}function g1(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=je.updateQueue,i===null?(i=to(),je.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function b1(r,i,l,c){i.value=l,i.getSnapshot=c,E1(i)&&x1(r)}function y1(r,i,l){return l(function(){E1(i)&&x1(r)})}function E1(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!Dn(r,l)}catch{return!0}}function x1(r){var i=Wa(r,2);i!==null&&Nn(i,r,2)}function hd(r){var i=gn();if(typeof r=="function"){var l=r;if(r=l(),si){Tn(!0);try{l()}finally{Tn(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:r},i}function T1(r,i,l,c){return r.baseState=l,fd(r,bt,typeof c=="function"?c:Hr)}function Y3(r,i,l,c,m){if(lo(r))throw Error(a(485));if(r=i.action,r!==null){var p={payload:m,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(_){p.listeners.push(_)}};P.T!==null?l(!0):p.isTransition=!1,c(p),l=i.pending,l===null?(p.next=i.pending=p,_1(i,p)):(p.next=l.next,i.pending=l.next=p)}}function _1(r,i){var l=i.action,c=i.payload,m=r.state;if(i.isTransition){var p=P.T,_={};P.T=_;try{var k=l(m,c),H=P.S;H!==null&&H(_,k),v1(r,i,k)}catch(X){md(r,i,X)}finally{p!==null&&_.types!==null&&(p.types=_.types),P.T=p}}else try{p=l(m,c),v1(r,i,p)}catch(X){md(r,i,X)}}function v1(r,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(c){S1(r,i,c)},function(c){return md(r,i,c)}):S1(r,i,l)}function S1(r,i,l){i.status="fulfilled",i.value=l,k1(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,_1(r,l)))}function md(r,i,l){var c=r.pending;if(r.pending=null,c!==null){c=c.next;do i.status="rejected",i.reason=l,k1(i),i=i.next;while(i!==c)}r.action=null}function k1(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function A1(r,i){return i}function C1(r,i){if(nt){var l=St.formState;if(l!==null){e:{var c=je;if(nt){if(Ct){t:{for(var m=Ct,p=Wn;m.nodeType!==8;){if(!p){m=null;break t}if(m=er(m.nextSibling),m===null){m=null;break t}}p=m.data,m=p==="F!"||p==="F"?m:null}if(m){Ct=er(m.nextSibling),c=m.data==="F!";break e}}oa(c)}c=!1}c&&(i=l[0])}}return l=gn(),l.memoizedState=l.baseState=i,c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:A1,lastRenderedState:i},l.queue=c,l=V1.bind(null,je,c),c.dispatch=l,c=hd(!1),p=xd.bind(null,je,!1,c.queue),c=gn(),m={state:i,dispatch:null,action:r,pending:null},c.queue=m,l=Y3.bind(null,je,m,p,l),m.dispatch=l,c.memoizedState=r,[i,l,!1]}function N1(r){var i=Ut();return w1(i,bt,r)}function w1(r,i,l){if(i=fd(r,i,A1)[0],r=ro(Hr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var c=fs(i)}catch(_){throw _===tl?Gu:_}else c=i;i=Ut();var m=i.queue,p=m.dispatch;return l!==i.memoizedState&&(je.flags|=2048,ll(9,{destroy:void 0},$3.bind(null,m,l),null)),[c,p,r]}function $3(r,i){r.action=i}function R1(r){var i=Ut(),l=bt;if(l!==null)return w1(i,l,r);Ut(),i=i.memoizedState,l=Ut();var c=l.queue.dispatch;return l.memoizedState=r,[i,c,!1]}function ll(r,i,l,c){return r={tag:r,create:l,deps:c,inst:i,next:null},i=je.updateQueue,i===null&&(i=to(),je.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(c=l.next,l.next=r,r.next=c,i.lastEffect=r),r}function O1(){return Ut().memoizedState}function ao(r,i,l,c){var m=gn();je.flags|=r,m.memoizedState=ll(1|i,{destroy:void 0},l,c===void 0?null:c)}function io(r,i,l,c){var m=Ut();c=c===void 0?null:c;var p=m.memoizedState.inst;bt!==null&&c!==null&&id(c,bt.memoizedState.deps)?m.memoizedState=ll(i,p,l,c):(je.flags|=r,m.memoizedState=ll(1|i,p,l,c))}function L1(r,i){ao(8390656,8,r,i)}function pd(r,i){io(2048,8,r,i)}function V3(r){je.flags|=4;var i=je.updateQueue;if(i===null)i=to(),je.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function D1(r){var i=Ut().memoizedState;return V3({ref:i,nextImpl:r}),function(){if((dt&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function I1(r,i){return io(4,2,r,i)}function M1(r,i){return io(4,4,r,i)}function B1(r,i){if(typeof i=="function"){r=r();var l=i(r);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function z1(r,i,l){l=l!=null?l.concat([r]):null,io(4,4,B1.bind(null,i,r),l)}function gd(){}function H1(r,i){var l=Ut();i=i===void 0?null:i;var c=l.memoizedState;return i!==null&&id(i,c[1])?c[0]:(l.memoizedState=[r,i],r)}function U1(r,i){var l=Ut();i=i===void 0?null:i;var c=l.memoizedState;if(i!==null&&id(i,c[1]))return c[0];if(c=r(),si){Tn(!0);try{r()}finally{Tn(!1)}}return l.memoizedState=[c,i],c}function bd(r,i,l){return l===void 0||(zr&1073741824)!==0&&(et&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=Pg(),je.lanes|=r,ya|=r,l)}function P1(r,i,l,c){return Dn(l,i)?l:rl.current!==null?(r=bd(r,l,c),Dn(r,i)||($t=!0),r):(zr&42)===0||(zr&1073741824)!==0&&(et&261930)===0?($t=!0,r.memoizedState=l):(r=Pg(),je.lanes|=r,ya|=r,i)}function j1(r,i,l,c,m){var p=ne.p;ne.p=p!==0&&8>p?p:8;var _=P.T,k={};P.T=k,xd(r,!1,i,l);try{var H=m(),X=P.S;if(X!==null&&X(k,H),H!==null&&typeof H=="object"&&typeof H.then=="function"){var te=j3(H,c);ds(r,i,te,Un(r))}else ds(r,i,c,Un(r))}catch(ue){ds(r,i,{then:function(){},status:"rejected",reason:ue},Un())}finally{ne.p=p,_!==null&&k.types!==null&&(_.types=k.types),P.T=_}}function G3(){}function yd(r,i,l,c){if(r.tag!==5)throw Error(a(476));var m=F1(r).queue;j1(r,m,i,xe,l===null?G3:function(){return q1(r),l(c)})}function F1(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:xe,baseState:xe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:xe},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hr,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function q1(r){var i=F1(r);i.next===null&&(i=r.alternate.memoizedState),ds(r,i.next.queue,{},Un())}function Ed(){return an(ws)}function Y1(){return Ut().memoizedState}function $1(){return Ut().memoizedState}function Q3(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=Un();r=da(l);var c=ha(i,r,l);c!==null&&(Nn(c,i,l),ss(c,i,l)),i={cache:Qf()},r.payload=i;return}i=i.return}}function X3(r,i,l){var c=Un();l={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},lo(r)?G1(i,l):(l=zf(r,i,l,c),l!==null&&(Nn(l,r,c),Q1(l,i,c)))}function V1(r,i,l){var c=Un();ds(r,i,l,c)}function ds(r,i,l,c){var m={lane:c,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(lo(r))G1(i,m);else{var p=r.alternate;if(r.lanes===0&&(p===null||p.lanes===0)&&(p=i.lastRenderedReducer,p!==null))try{var _=i.lastRenderedState,k=p(_,l);if(m.hasEagerState=!0,m.eagerState=k,Dn(k,_))return Pu(r,i,m,0),St===null&&Uu(),!1}catch{}finally{}if(l=zf(r,i,m,c),l!==null)return Nn(l,r,c),Q1(l,i,c),!0}return!1}function xd(r,i,l,c){if(c={lane:2,revertLane:Wd(),gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},lo(r)){if(i)throw Error(a(479))}else i=zf(r,l,c,2),i!==null&&Nn(i,r,2)}function lo(r){var i=r.alternate;return r===je||i!==null&&i===je}function G1(r,i){al=Ju=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function Q1(r,i,l){if((l&4194048)!==0){var c=i.lanes;c&=r.pendingLanes,l|=c,i.lanes=l,J0(r,l)}}var hs={readContext:an,use:no,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useLayoutEffect:Dt,useInsertionEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useSyncExternalStore:Dt,useId:Dt,useHostTransitionStatus:Dt,useFormState:Dt,useActionState:Dt,useOptimistic:Dt,useMemoCache:Dt,useCacheRefresh:Dt};hs.useEffectEvent=Dt;var X1={readContext:an,use:no,useCallback:function(r,i){return gn().memoizedState=[r,i===void 0?null:i],r},useContext:an,useEffect:L1,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,ao(4194308,4,B1.bind(null,i,r),l)},useLayoutEffect:function(r,i){return ao(4194308,4,r,i)},useInsertionEffect:function(r,i){ao(4,2,r,i)},useMemo:function(r,i){var l=gn();i=i===void 0?null:i;var c=r();if(si){Tn(!0);try{r()}finally{Tn(!1)}}return l.memoizedState=[c,i],c},useReducer:function(r,i,l){var c=gn();if(l!==void 0){var m=l(i);if(si){Tn(!0);try{l(i)}finally{Tn(!1)}}}else m=i;return c.memoizedState=c.baseState=m,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:m},c.queue=r,r=r.dispatch=X3.bind(null,je,r),[c.memoizedState,r]},useRef:function(r){var i=gn();return r={current:r},i.memoizedState=r},useState:function(r){r=hd(r);var i=r.queue,l=V1.bind(null,je,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:gd,useDeferredValue:function(r,i){var l=gn();return bd(l,r,i)},useTransition:function(){var r=hd(!1);return r=j1.bind(null,je,r.queue,!0,!1),gn().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var c=je,m=gn();if(nt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),St===null)throw Error(a(349));(et&127)!==0||g1(c,i,l)}m.memoizedState=l;var p={value:l,getSnapshot:i};return m.queue=p,L1(y1.bind(null,c,p,r),[r]),c.flags|=2048,ll(9,{destroy:void 0},b1.bind(null,c,p,l,i),null),l},useId:function(){var r=gn(),i=St.identifierPrefix;if(nt){var l=yr,c=br;l=(c&~(1<<32-vt(c)-1)).toString(32)+l,i="_"+i+"R_"+l,l=eo++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=F3++,i="_"+i+"r_"+l.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:Ed,useFormState:C1,useActionState:C1,useOptimistic:function(r){var i=gn();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=xd.bind(null,je,!0,l),l.dispatch=i,[r,i]},useMemoCache:cd,useCacheRefresh:function(){return gn().memoizedState=Q3.bind(null,je)},useEffectEvent:function(r){var i=gn(),l={impl:r};return i.memoizedState=l,function(){if((dt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},Td={readContext:an,use:no,useCallback:H1,useContext:an,useEffect:pd,useImperativeHandle:z1,useInsertionEffect:I1,useLayoutEffect:M1,useMemo:U1,useReducer:ro,useRef:O1,useState:function(){return ro(Hr)},useDebugValue:gd,useDeferredValue:function(r,i){var l=Ut();return P1(l,bt.memoizedState,r,i)},useTransition:function(){var r=ro(Hr)[0],i=Ut().memoizedState;return[typeof r=="boolean"?r:fs(r),i]},useSyncExternalStore:p1,useId:Y1,useHostTransitionStatus:Ed,useFormState:N1,useActionState:N1,useOptimistic:function(r,i){var l=Ut();return T1(l,bt,r,i)},useMemoCache:cd,useCacheRefresh:$1};Td.useEffectEvent=D1;var Z1={readContext:an,use:no,useCallback:H1,useContext:an,useEffect:pd,useImperativeHandle:z1,useInsertionEffect:I1,useLayoutEffect:M1,useMemo:U1,useReducer:dd,useRef:O1,useState:function(){return dd(Hr)},useDebugValue:gd,useDeferredValue:function(r,i){var l=Ut();return bt===null?bd(l,r,i):P1(l,bt.memoizedState,r,i)},useTransition:function(){var r=dd(Hr)[0],i=Ut().memoizedState;return[typeof r=="boolean"?r:fs(r),i]},useSyncExternalStore:p1,useId:Y1,useHostTransitionStatus:Ed,useFormState:R1,useActionState:R1,useOptimistic:function(r,i){var l=Ut();return bt!==null?T1(l,bt,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:cd,useCacheRefresh:$1};Z1.useEffectEvent=D1;function _d(r,i,l,c){i=r.memoizedState,l=l(c,i),l=l==null?i:g({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var vd={enqueueSetState:function(r,i,l){r=r._reactInternals;var c=Un(),m=da(c);m.payload=i,l!=null&&(m.callback=l),i=ha(r,m,c),i!==null&&(Nn(i,r,c),ss(i,r,c))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var c=Un(),m=da(c);m.tag=1,m.payload=i,l!=null&&(m.callback=l),i=ha(r,m,c),i!==null&&(Nn(i,r,c),ss(i,r,c))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=Un(),c=da(l);c.tag=2,i!=null&&(c.callback=i),i=ha(r,c,l),i!==null&&(Nn(i,r,l),ss(i,r,l))}};function K1(r,i,l,c,m,p,_){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(c,p,_):i.prototype&&i.prototype.isPureReactComponent?!Jl(l,c)||!Jl(m,p):!0}function W1(r,i,l,c){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,c),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,c),i.state!==r&&vd.enqueueReplaceState(i,i.state,null)}function ui(r,i){var l=i;if("ref"in i){l={};for(var c in i)c!=="ref"&&(l[c]=i[c])}if(r=r.defaultProps){l===i&&(l=g({},l));for(var m in r)l[m]===void 0&&(l[m]=r[m])}return l}function J1(r){Hu(r)}function eg(r){console.error(r)}function tg(r){Hu(r)}function so(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(c){setTimeout(function(){throw c})}}function ng(r,i,l){try{var c=r.onCaughtError;c(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function Sd(r,i,l){return l=da(l),l.tag=3,l.payload={element:null},l.callback=function(){so(r,i)},l}function rg(r){return r=da(r),r.tag=3,r}function ag(r,i,l,c){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var p=c.value;r.payload=function(){return m(p)},r.callback=function(){ng(i,l,c)}}var _=l.stateNode;_!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){ng(i,l,c),typeof m!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var k=c.stack;this.componentDidCatch(c.value,{componentStack:k!==null?k:""})})}function Z3(r,i,l,c,m){if(l.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){if(i=l.alternate,i!==null&&Wi(i,l,m,!0),l=Mn.current,l!==null){switch(l.tag){case 31:case 13:return Jn===null?xo():l.alternate===null&&It===0&&(It=3),l.flags&=-257,l.flags|=65536,l.lanes=m,c===Qu?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([c]):i.add(c),Xd(r,c,m)),!1;case 22:return l.flags|=65536,c===Qu?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([c])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([c]):l.add(c)),Xd(r,c,m)),!1}throw Error(a(435,l.tag))}return Xd(r,c,m),xo(),!1}if(nt)return i=Mn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,c!==qf&&(r=Error(a(422),{cause:c}),ns(Xn(r,l)))):(c!==qf&&(i=Error(a(423),{cause:c}),ns(Xn(i,l))),r=r.current.alternate,r.flags|=65536,m&=-m,r.lanes|=m,c=Xn(c,l),m=Sd(r.stateNode,c,m),ed(r,m),It!==4&&(It=2)),!1;var p=Error(a(520),{cause:c});if(p=Xn(p,l),Ts===null?Ts=[p]:Ts.push(p),It!==4&&(It=2),i===null)return!0;c=Xn(c,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=m&-m,l.lanes|=r,r=Sd(l.stateNode,c,r),ed(l,r),!1;case 1:if(i=l.type,p=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||p!==null&&typeof p.componentDidCatch=="function"&&(Ea===null||!Ea.has(p))))return l.flags|=65536,m&=-m,l.lanes|=m,m=rg(m),ag(m,r,l,c),ed(l,m),!1}l=l.return}while(l!==null);return!1}var kd=Error(a(461)),$t=!1;function ln(r,i,l,c){i.child=r===null?u1(i,null,l,c):li(i,r.child,l,c)}function ig(r,i,l,c,m){l=l.render;var p=i.ref;if("ref"in c){var _={};for(var k in c)k!=="ref"&&(_[k]=c[k])}else _=c;return ni(i),c=ld(r,i,l,_,p,m),k=sd(),r!==null&&!$t?(ud(r,i,m),Ur(r,i,m)):(nt&&k&&jf(i),i.flags|=1,ln(r,i,c,m),i.child)}function lg(r,i,l,c,m){if(r===null){var p=l.type;return typeof p=="function"&&!Hf(p)&&p.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=p,sg(r,i,p,c,m)):(r=Fu(l.type,null,c,i,i.mode,m),r.ref=i.ref,r.return=i,i.child=r)}if(p=r.child,!Dd(r,m)){var _=p.memoizedProps;if(l=l.compare,l=l!==null?l:Jl,l(_,c)&&r.ref===i.ref)return Ur(r,i,m)}return i.flags|=1,r=Dr(p,c),r.ref=i.ref,r.return=i,i.child=r}function sg(r,i,l,c,m){if(r!==null){var p=r.memoizedProps;if(Jl(p,c)&&r.ref===i.ref)if($t=!1,i.pendingProps=c=p,Dd(r,m))(r.flags&131072)!==0&&($t=!0);else return i.lanes=r.lanes,Ur(r,i,m)}return Ad(r,i,l,c,m)}function ug(r,i,l,c){var m=c.children,p=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),c.mode==="hidden"){if((i.flags&128)!==0){if(p=p!==null?p.baseLanes|l:l,r!==null){for(c=i.child=r.child,m=0;c!==null;)m=m|c.lanes|c.childLanes,c=c.sibling;c=m&~p}else c=0,i.child=null;return og(r,i,p,l,c)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Vu(i,p!==null?p.cachePool:null),p!==null?f1(i,p):nd(),d1(i);else return c=i.lanes=536870912,og(r,i,p!==null?p.baseLanes|l:l,l,c)}else p!==null?(Vu(i,p.cachePool),f1(i,p),pa(),i.memoizedState=null):(r!==null&&Vu(i,null),nd(),pa());return ln(r,i,m,l),i.child}function ms(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function og(r,i,l,c,m){var p=Zf();return p=p===null?null:{parent:qt._currentValue,pool:p},i.memoizedState={baseLanes:l,cachePool:p},r!==null&&Vu(i,null),nd(),d1(i),r!==null&&Wi(r,i,c,!0),i.childLanes=m,null}function uo(r,i){return i=co({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function cg(r,i,l){return li(i,r.child,null,l),r=uo(i,i.pendingProps),r.flags|=2,Bn(i),i.memoizedState=null,r}function K3(r,i,l){var c=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(nt){if(c.mode==="hidden")return r=uo(i,c),i.lanes=536870912,ms(null,r);if(ad(i),(r=Ct)?(r=_b(r,Wn),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:sa!==null?{id:br,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},l=Gp(r),l.return=i,i.child=l,rn=i,Ct=null)):r=null,r===null)throw oa(i);return i.lanes=536870912,null}return uo(i,c)}var p=r.memoizedState;if(p!==null){var _=p.dehydrated;if(ad(i),m)if(i.flags&256)i.flags&=-257,i=cg(r,i,l);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if($t||Wi(r,i,l,!1),m=(l&r.childLanes)!==0,$t||m){if(c=St,c!==null&&(_=ep(c,l),_!==0&&_!==p.retryLane))throw p.retryLane=_,Wa(r,_),Nn(c,r,_),kd;xo(),i=cg(r,i,l)}else r=p.treeContext,Ct=er(_.nextSibling),rn=i,nt=!0,ua=null,Wn=!1,r!==null&&Zp(i,r),i=uo(i,c),i.flags|=4096;return i}return r=Dr(r.child,{mode:c.mode,children:c.children}),r.ref=i.ref,i.child=r,r.return=i,r}function oo(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function Ad(r,i,l,c,m){return ni(i),l=ld(r,i,l,c,void 0,m),c=sd(),r!==null&&!$t?(ud(r,i,m),Ur(r,i,m)):(nt&&c&&jf(i),i.flags|=1,ln(r,i,l,m),i.child)}function fg(r,i,l,c,m,p){return ni(i),i.updateQueue=null,l=m1(i,c,l,m),h1(r),c=sd(),r!==null&&!$t?(ud(r,i,p),Ur(r,i,p)):(nt&&c&&jf(i),i.flags|=1,ln(r,i,l,p),i.child)}function dg(r,i,l,c,m){if(ni(i),i.stateNode===null){var p=Qi,_=l.contextType;typeof _=="object"&&_!==null&&(p=an(_)),p=new l(c,p),i.memoizedState=p.state!==null&&p.state!==void 0?p.state:null,p.updater=vd,i.stateNode=p,p._reactInternals=i,p=i.stateNode,p.props=c,p.state=i.memoizedState,p.refs={},Wf(i),_=l.contextType,p.context=typeof _=="object"&&_!==null?an(_):Qi,p.state=i.memoizedState,_=l.getDerivedStateFromProps,typeof _=="function"&&(_d(i,l,_,c),p.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof p.getSnapshotBeforeUpdate=="function"||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(_=p.state,typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount(),_!==p.state&&vd.enqueueReplaceState(p,p.state,null),os(i,c,p,m),us(),p.state=i.memoizedState),typeof p.componentDidMount=="function"&&(i.flags|=4194308),c=!0}else if(r===null){p=i.stateNode;var k=i.memoizedProps,H=ui(l,k);p.props=H;var X=p.context,te=l.contextType;_=Qi,typeof te=="object"&&te!==null&&(_=an(te));var ue=l.getDerivedStateFromProps;te=typeof ue=="function"||typeof p.getSnapshotBeforeUpdate=="function",k=i.pendingProps!==k,te||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(k||X!==_)&&W1(i,p,c,_),fa=!1;var Z=i.memoizedState;p.state=Z,os(i,c,p,m),us(),X=i.memoizedState,k||Z!==X||fa?(typeof ue=="function"&&(_d(i,l,ue,c),X=i.memoizedState),(H=fa||K1(i,l,H,c,Z,X,_))?(te||typeof p.UNSAFE_componentWillMount!="function"&&typeof p.componentWillMount!="function"||(typeof p.componentWillMount=="function"&&p.componentWillMount(),typeof p.UNSAFE_componentWillMount=="function"&&p.UNSAFE_componentWillMount()),typeof p.componentDidMount=="function"&&(i.flags|=4194308)):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=c,i.memoizedState=X),p.props=c,p.state=X,p.context=_,c=H):(typeof p.componentDidMount=="function"&&(i.flags|=4194308),c=!1)}else{p=i.stateNode,Jf(r,i),_=i.memoizedProps,te=ui(l,_),p.props=te,ue=i.pendingProps,Z=p.context,X=l.contextType,H=Qi,typeof X=="object"&&X!==null&&(H=an(X)),k=l.getDerivedStateFromProps,(X=typeof k=="function"||typeof p.getSnapshotBeforeUpdate=="function")||typeof p.UNSAFE_componentWillReceiveProps!="function"&&typeof p.componentWillReceiveProps!="function"||(_!==ue||Z!==H)&&W1(i,p,c,H),fa=!1,Z=i.memoizedState,p.state=Z,os(i,c,p,m),us();var W=i.memoizedState;_!==ue||Z!==W||fa||r!==null&&r.dependencies!==null&&Yu(r.dependencies)?(typeof k=="function"&&(_d(i,l,k,c),W=i.memoizedState),(te=fa||K1(i,l,te,c,Z,W,H)||r!==null&&r.dependencies!==null&&Yu(r.dependencies))?(X||typeof p.UNSAFE_componentWillUpdate!="function"&&typeof p.componentWillUpdate!="function"||(typeof p.componentWillUpdate=="function"&&p.componentWillUpdate(c,W,H),typeof p.UNSAFE_componentWillUpdate=="function"&&p.UNSAFE_componentWillUpdate(c,W,H)),typeof p.componentDidUpdate=="function"&&(i.flags|=4),typeof p.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof p.componentDidUpdate!="function"||_===r.memoizedProps&&Z===r.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&Z===r.memoizedState||(i.flags|=1024),i.memoizedProps=c,i.memoizedState=W),p.props=c,p.state=W,p.context=H,c=te):(typeof p.componentDidUpdate!="function"||_===r.memoizedProps&&Z===r.memoizedState||(i.flags|=4),typeof p.getSnapshotBeforeUpdate!="function"||_===r.memoizedProps&&Z===r.memoizedState||(i.flags|=1024),c=!1)}return p=c,oo(r,i),c=(i.flags&128)!==0,p||c?(p=i.stateNode,l=c&&typeof l.getDerivedStateFromError!="function"?null:p.render(),i.flags|=1,r!==null&&c?(i.child=li(i,r.child,null,m),i.child=li(i,null,l,m)):ln(r,i,l,m),i.memoizedState=p.state,r=i.child):r=Ur(r,i,m),r}function hg(r,i,l,c){return ei(),i.flags|=256,ln(r,i,l,c),i.child}var Cd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nd(r){return{baseLanes:r,cachePool:n1()}}function wd(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=Hn),r}function mg(r,i,l){var c=i.pendingProps,m=!1,p=(i.flags&128)!==0,_;if((_=p)||(_=r!==null&&r.memoizedState===null?!1:(Ht.current&2)!==0),_&&(m=!0,i.flags&=-129),_=(i.flags&32)!==0,i.flags&=-33,r===null){if(nt){if(m?ma(i):pa(),(r=Ct)?(r=_b(r,Wn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:sa!==null?{id:br,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},l=Gp(r),l.return=i,i.child=l,rn=i,Ct=null)):r=null,r===null)throw oa(i);return fh(r)?i.lanes=32:i.lanes=536870912,null}var k=c.children;return c=c.fallback,m?(pa(),m=i.mode,k=co({mode:"hidden",children:k},m),c=Ja(c,m,l,null),k.return=i,c.return=i,k.sibling=c,i.child=k,c=i.child,c.memoizedState=Nd(l),c.childLanes=wd(r,_,l),i.memoizedState=Cd,ms(null,c)):(ma(i),Rd(i,k))}var H=r.memoizedState;if(H!==null&&(k=H.dehydrated,k!==null)){if(p)i.flags&256?(ma(i),i.flags&=-257,i=Od(r,i,l)):i.memoizedState!==null?(pa(),i.child=r.child,i.flags|=128,i=null):(pa(),k=c.fallback,m=i.mode,c=co({mode:"visible",children:c.children},m),k=Ja(k,m,l,null),k.flags|=2,c.return=i,k.return=i,c.sibling=k,i.child=c,li(i,r.child,null,l),c=i.child,c.memoizedState=Nd(l),c.childLanes=wd(r,_,l),i.memoizedState=Cd,i=ms(null,c));else if(ma(i),fh(k)){if(_=k.nextSibling&&k.nextSibling.dataset,_)var X=_.dgst;_=X,c=Error(a(419)),c.stack="",c.digest=_,ns({value:c,source:null,stack:null}),i=Od(r,i,l)}else if($t||Wi(r,i,l,!1),_=(l&r.childLanes)!==0,$t||_){if(_=St,_!==null&&(c=ep(_,l),c!==0&&c!==H.retryLane))throw H.retryLane=c,Wa(r,c),Nn(_,r,c),kd;ch(k)||xo(),i=Od(r,i,l)}else ch(k)?(i.flags|=192,i.child=r.child,i=null):(r=H.treeContext,Ct=er(k.nextSibling),rn=i,nt=!0,ua=null,Wn=!1,r!==null&&Zp(i,r),i=Rd(i,c.children),i.flags|=4096);return i}return m?(pa(),k=c.fallback,m=i.mode,H=r.child,X=H.sibling,c=Dr(H,{mode:"hidden",children:c.children}),c.subtreeFlags=H.subtreeFlags&65011712,X!==null?k=Dr(X,k):(k=Ja(k,m,l,null),k.flags|=2),k.return=i,c.return=i,c.sibling=k,i.child=c,ms(null,c),c=i.child,k=r.child.memoizedState,k===null?k=Nd(l):(m=k.cachePool,m!==null?(H=qt._currentValue,m=m.parent!==H?{parent:H,pool:H}:m):m=n1(),k={baseLanes:k.baseLanes|l,cachePool:m}),c.memoizedState=k,c.childLanes=wd(r,_,l),i.memoizedState=Cd,ms(r.child,c)):(ma(i),l=r.child,r=l.sibling,l=Dr(l,{mode:"visible",children:c.children}),l.return=i,l.sibling=null,r!==null&&(_=i.deletions,_===null?(i.deletions=[r],i.flags|=16):_.push(r)),i.child=l,i.memoizedState=null,l)}function Rd(r,i){return i=co({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function co(r,i){return r=In(22,r,null,i),r.lanes=0,r}function Od(r,i,l){return li(i,r.child,null,l),r=Rd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function pg(r,i,l){r.lanes|=i;var c=r.alternate;c!==null&&(c.lanes|=i),Vf(r.return,i,l)}function Ld(r,i,l,c,m,p){var _=r.memoizedState;_===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:c,tail:l,tailMode:m,treeForkCount:p}:(_.isBackwards=i,_.rendering=null,_.renderingStartTime=0,_.last=c,_.tail=l,_.tailMode=m,_.treeForkCount=p)}function gg(r,i,l){var c=i.pendingProps,m=c.revealOrder,p=c.tail;c=c.children;var _=Ht.current,k=(_&2)!==0;if(k?(_=_&1|2,i.flags|=128):_&=1,A(Ht,_),ln(r,i,c,l),c=nt?ts:0,!k&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&pg(r,l,i);else if(r.tag===19)pg(r,l,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}switch(m){case"forwards":for(l=i.child,m=null;l!==null;)r=l.alternate,r!==null&&Wu(r)===null&&(m=l),l=l.sibling;l=m,l===null?(m=i.child,i.child=null):(m=l.sibling,l.sibling=null),Ld(i,!1,m,l,p,c);break;case"backwards":case"unstable_legacy-backwards":for(l=null,m=i.child,i.child=null;m!==null;){if(r=m.alternate,r!==null&&Wu(r)===null){i.child=m;break}r=m.sibling,m.sibling=l,l=m,m=r}Ld(i,!0,l,null,p,c);break;case"together":Ld(i,!1,null,null,void 0,c);break;default:i.memoizedState=null}return i.child}function Ur(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),ya|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Wi(r,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,l=Dr(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=Dr(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function Dd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Yu(r)))}function W3(r,i,l){switch(i.tag){case 3:_e(i,i.stateNode.containerInfo),ca(i,qt,r.memoizedState.cache),ei();break;case 27:case 5:Ye(i);break;case 4:_e(i,i.stateNode.containerInfo);break;case 10:ca(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,ad(i),null;break;case 13:var c=i.memoizedState;if(c!==null)return c.dehydrated!==null?(ma(i),i.flags|=128,null):(l&i.child.childLanes)!==0?mg(r,i,l):(ma(i),r=Ur(r,i,l),r!==null?r.sibling:null);ma(i);break;case 19:var m=(r.flags&128)!==0;if(c=(l&i.childLanes)!==0,c||(Wi(r,i,l,!1),c=(l&i.childLanes)!==0),m){if(c)return gg(r,i,l);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),A(Ht,Ht.current),c)break;return null;case 22:return i.lanes=0,ug(r,i,l,i.pendingProps);case 24:ca(i,qt,r.memoizedState.cache)}return Ur(r,i,l)}function bg(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)$t=!0;else{if(!Dd(r,l)&&(i.flags&128)===0)return $t=!1,W3(r,i,l);$t=(r.flags&131072)!==0}else $t=!1,nt&&(i.flags&1048576)!==0&&Xp(i,ts,i.index);switch(i.lanes=0,i.tag){case 16:e:{var c=i.pendingProps;if(r=ai(i.elementType),i.type=r,typeof r=="function")Hf(r)?(c=ui(r,c),i.tag=1,i=dg(null,i,r,c,l)):(i.tag=0,i=Ad(null,i,r,c,l));else{if(r!=null){var m=r.$$typeof;if(m===D){i.tag=11,i=ig(null,i,r,c,l);break e}else if(m===$){i.tag=14,i=lg(null,i,r,c,l);break e}}throw i=pe(r)||r,Error(a(306,i,""))}}return i;case 0:return Ad(r,i,i.type,i.pendingProps,l);case 1:return c=i.type,m=ui(c,i.pendingProps),dg(r,i,c,m,l);case 3:e:{if(_e(i,i.stateNode.containerInfo),r===null)throw Error(a(387));c=i.pendingProps;var p=i.memoizedState;m=p.element,Jf(r,i),os(i,c,null,l);var _=i.memoizedState;if(c=_.cache,ca(i,qt,c),c!==p.cache&&Gf(i,[qt],l,!0),us(),c=_.element,p.isDehydrated)if(p={element:c,isDehydrated:!1,cache:_.cache},i.updateQueue.baseState=p,i.memoizedState=p,i.flags&256){i=hg(r,i,c,l);break e}else if(c!==m){m=Xn(Error(a(424)),i),ns(m),i=hg(r,i,c,l);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(Ct=er(r.firstChild),rn=i,nt=!0,ua=null,Wn=!0,l=u1(i,null,c,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(ei(),c===m){i=Ur(r,i,l);break e}ln(r,i,c,l)}i=i.child}return i;case 26:return oo(r,i),r===null?(l=Nb(i.type,null,i.pendingProps,null))?i.memoizedState=l:nt||(l=i.type,r=i.pendingProps,c=Co(ie.current).createElement(l),c[nn]=i,c[_n]=r,sn(c,l,r),Wt(c),i.stateNode=c):i.memoizedState=Nb(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return Ye(i),r===null&&nt&&(c=i.stateNode=kb(i.type,i.pendingProps,ie.current),rn=i,Wn=!0,m=Ct,va(i.type)?(dh=m,Ct=er(c.firstChild)):Ct=m),ln(r,i,i.pendingProps.children,l),oo(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&nt&&((m=c=Ct)&&(c=NS(c,i.type,i.pendingProps,Wn),c!==null?(i.stateNode=c,rn=i,Ct=er(c.firstChild),Wn=!1,m=!0):m=!1),m||oa(i)),Ye(i),m=i.type,p=i.pendingProps,_=r!==null?r.memoizedProps:null,c=p.children,sh(m,p)?c=null:_!==null&&sh(m,_)&&(i.flags|=32),i.memoizedState!==null&&(m=ld(r,i,q3,null,null,l),ws._currentValue=m),oo(r,i),ln(r,i,c,l),i.child;case 6:return r===null&&nt&&((r=l=Ct)&&(l=wS(l,i.pendingProps,Wn),l!==null?(i.stateNode=l,rn=i,Ct=null,r=!0):r=!1),r||oa(i)),null;case 13:return mg(r,i,l);case 4:return _e(i,i.stateNode.containerInfo),c=i.pendingProps,r===null?i.child=li(i,null,c,l):ln(r,i,c,l),i.child;case 11:return ig(r,i,i.type,i.pendingProps,l);case 7:return ln(r,i,i.pendingProps,l),i.child;case 8:return ln(r,i,i.pendingProps.children,l),i.child;case 12:return ln(r,i,i.pendingProps.children,l),i.child;case 10:return c=i.pendingProps,ca(i,i.type,c.value),ln(r,i,c.children,l),i.child;case 9:return m=i.type._context,c=i.pendingProps.children,ni(i),m=an(m),c=c(m),i.flags|=1,ln(r,i,c,l),i.child;case 14:return lg(r,i,i.type,i.pendingProps,l);case 15:return sg(r,i,i.type,i.pendingProps,l);case 19:return gg(r,i,l);case 31:return K3(r,i,l);case 22:return ug(r,i,l,i.pendingProps);case 24:return ni(i),c=an(qt),r===null?(m=Zf(),m===null&&(m=St,p=Qf(),m.pooledCache=p,p.refCount++,p!==null&&(m.pooledCacheLanes|=l),m=p),i.memoizedState={parent:c,cache:m},Wf(i),ca(i,qt,m)):((r.lanes&l)!==0&&(Jf(r,i),os(i,null,null,l),us()),m=r.memoizedState,p=i.memoizedState,m.parent!==c?(m={parent:c,cache:c},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),ca(i,qt,c)):(c=p.cache,ca(i,qt,c),c!==m.cache&&Gf(i,[qt],l,!0))),ln(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function Pr(r){r.flags|=4}function Id(r,i,l,c,m){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(m&335544128)===m)if(r.stateNode.complete)r.flags|=8192;else if(Yg())r.flags|=8192;else throw ii=Qu,Kf}else r.flags&=-16777217}function yg(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Db(i))if(Yg())r.flags|=8192;else throw ii=Qu,Kf}function fo(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?K0():536870912,r.lanes|=i,cl|=i)}function ps(r,i){if(!nt)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var c=null;l!==null;)l.alternate!==null&&(c=l),l=l.sibling;c===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:c.sibling=null}}function Nt(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,c=0;if(i)for(var m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags&65011712,c|=m.flags&65011712,m.return=r,m=m.sibling;else for(m=r.child;m!==null;)l|=m.lanes|m.childLanes,c|=m.subtreeFlags,c|=m.flags,m.return=r,m=m.sibling;return r.subtreeFlags|=c,r.childLanes=l,i}function J3(r,i,l){var c=i.pendingProps;switch(Ff(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Nt(i),null;case 1:return Nt(i),null;case 3:return l=i.stateNode,c=null,r!==null&&(c=r.memoizedState.cache),i.memoizedState.cache!==c&&(i.flags|=2048),Br(qt),Ee(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(Ki(i)?Pr(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Yf())),Nt(i),null;case 26:var m=i.type,p=i.memoizedState;return r===null?(Pr(i),p!==null?(Nt(i),yg(i,p)):(Nt(i),Id(i,m,null,c,l))):p?p!==r.memoizedState?(Pr(i),Nt(i),yg(i,p)):(Nt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==c&&Pr(i),Nt(i),Id(i,m,r,c,l)),null;case 27:if(_t(i),l=ie.current,m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Nt(i),null}r=ee.current,Ki(i)?Kp(i):(r=kb(m,c,l),i.stateNode=r,Pr(i))}return Nt(i),null;case 5:if(_t(i),m=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(!c){if(i.stateNode===null)throw Error(a(166));return Nt(i),null}if(p=ee.current,Ki(i))Kp(i);else{var _=Co(ie.current);switch(p){case 1:p=_.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:p=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":p=_.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":p=_.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":p=_.createElement("div"),p.innerHTML="<script><\/script>",p=p.removeChild(p.firstChild);break;case"select":p=typeof c.is=="string"?_.createElement("select",{is:c.is}):_.createElement("select"),c.multiple?p.multiple=!0:c.size&&(p.size=c.size);break;default:p=typeof c.is=="string"?_.createElement(m,{is:c.is}):_.createElement(m)}}p[nn]=i,p[_n]=c;e:for(_=i.child;_!==null;){if(_.tag===5||_.tag===6)p.appendChild(_.stateNode);else if(_.tag!==4&&_.tag!==27&&_.child!==null){_.child.return=_,_=_.child;continue}if(_===i)break e;for(;_.sibling===null;){if(_.return===null||_.return===i)break e;_=_.return}_.sibling.return=_.return,_=_.sibling}i.stateNode=p;e:switch(sn(p,m,c),m){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}c&&Pr(i)}}return Nt(i),Id(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==c&&Pr(i);else{if(typeof c!="string"&&i.stateNode===null)throw Error(a(166));if(r=ie.current,Ki(i)){if(r=i.stateNode,l=i.memoizedProps,c=null,m=rn,m!==null)switch(m.tag){case 27:case 5:c=m.memoizedProps}r[nn]=i,r=!!(r.nodeValue===l||c!==null&&c.suppressHydrationWarning===!0||mb(r.nodeValue,l)),r||oa(i,!0)}else r=Co(r).createTextNode(c),r[nn]=i,i.stateNode=r}return Nt(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(c=Ki(i),l!==null){if(r===null){if(!c)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[nn]=i}else ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Nt(i),r=!1}else l=Yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(Bn(i),i):(Bn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return Nt(i),null;case 13:if(c=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(m=Ki(i),c!==null&&c.dehydrated!==null){if(r===null){if(!m)throw Error(a(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[nn]=i}else ei(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Nt(i),m=!1}else m=Yf(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(Bn(i),i):(Bn(i),null)}return Bn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=c!==null,r=r!==null&&r.memoizedState!==null,l&&(c=i.child,m=null,c.alternate!==null&&c.alternate.memoizedState!==null&&c.alternate.memoizedState.cachePool!==null&&(m=c.alternate.memoizedState.cachePool.pool),p=null,c.memoizedState!==null&&c.memoizedState.cachePool!==null&&(p=c.memoizedState.cachePool.pool),p!==m&&(c.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),fo(i,i.updateQueue),Nt(i),null);case 4:return Ee(),r===null&&nh(i.stateNode.containerInfo),Nt(i),null;case 10:return Br(i.type),Nt(i),null;case 19:if(K(Ht),c=i.memoizedState,c===null)return Nt(i),null;if(m=(i.flags&128)!==0,p=c.rendering,p===null)if(m)ps(c,!1);else{if(It!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(p=Wu(r),p!==null){for(i.flags|=128,ps(c,!1),r=p.updateQueue,i.updateQueue=r,fo(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)Vp(l,r),l=l.sibling;return A(Ht,Ht.current&1|2),nt&&Ir(i,c.treeForkCount),i.child}r=r.sibling}c.tail!==null&&mn()>bo&&(i.flags|=128,m=!0,ps(c,!1),i.lanes=4194304)}else{if(!m)if(r=Wu(p),r!==null){if(i.flags|=128,m=!0,r=r.updateQueue,i.updateQueue=r,fo(i,r),ps(c,!0),c.tail===null&&c.tailMode==="hidden"&&!p.alternate&&!nt)return Nt(i),null}else 2*mn()-c.renderingStartTime>bo&&l!==536870912&&(i.flags|=128,m=!0,ps(c,!1),i.lanes=4194304);c.isBackwards?(p.sibling=i.child,i.child=p):(r=c.last,r!==null?r.sibling=p:i.child=p,c.last=p)}return c.tail!==null?(r=c.tail,c.rendering=r,c.tail=r.sibling,c.renderingStartTime=mn(),r.sibling=null,l=Ht.current,A(Ht,m?l&1|2:l&1),nt&&Ir(i,c.treeForkCount),r):(Nt(i),null);case 22:case 23:return Bn(i),rd(),c=i.memoizedState!==null,r!==null?r.memoizedState!==null!==c&&(i.flags|=8192):c&&(i.flags|=8192),c?(l&536870912)!==0&&(i.flags&128)===0&&(Nt(i),i.subtreeFlags&6&&(i.flags|=8192)):Nt(i),l=i.updateQueue,l!==null&&fo(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),c=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(c=i.memoizedState.cachePool.pool),c!==l&&(i.flags|=2048),r!==null&&K(ri),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Br(qt),Nt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function eS(r,i){switch(Ff(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Br(qt),Ee(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return _t(i),null;case 31:if(i.memoizedState!==null){if(Bn(i),i.alternate===null)throw Error(a(340));ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Bn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));ei()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return K(Ht),null;case 4:return Ee(),null;case 10:return Br(i.type),null;case 22:case 23:return Bn(i),rd(),r!==null&&K(ri),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Br(qt),null;case 25:return null;default:return null}}function Eg(r,i){switch(Ff(i),i.tag){case 3:Br(qt),Ee();break;case 26:case 27:case 5:_t(i);break;case 4:Ee();break;case 31:i.memoizedState!==null&&Bn(i);break;case 13:Bn(i);break;case 19:K(Ht);break;case 10:Br(i.type);break;case 22:case 23:Bn(i),rd(),r!==null&&K(ri);break;case 24:Br(qt)}}function gs(r,i){try{var l=i.updateQueue,c=l!==null?l.lastEffect:null;if(c!==null){var m=c.next;l=m;do{if((l.tag&r)===r){c=void 0;var p=l.create,_=l.inst;c=p(),_.destroy=c}l=l.next}while(l!==m)}}catch(k){gt(i,i.return,k)}}function ga(r,i,l){try{var c=i.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var p=m.next;c=p;do{if((c.tag&r)===r){var _=c.inst,k=_.destroy;if(k!==void 0){_.destroy=void 0,m=i;var H=l,X=k;try{X()}catch(te){gt(m,H,te)}}}c=c.next}while(c!==p)}}catch(te){gt(i,i.return,te)}}function xg(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{c1(i,l)}catch(c){gt(r,r.return,c)}}}function Tg(r,i,l){l.props=ui(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(c){gt(r,i,c)}}function bs(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var c=r.stateNode;break;case 30:c=r.stateNode;break;default:c=r.stateNode}typeof l=="function"?r.refCleanup=l(c):l.current=c}}catch(m){gt(r,i,m)}}function Er(r,i){var l=r.ref,c=r.refCleanup;if(l!==null)if(typeof c=="function")try{c()}catch(m){gt(r,i,m)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){gt(r,i,m)}else l.current=null}function _g(r){var i=r.type,l=r.memoizedProps,c=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&c.focus();break e;case"img":l.src?c.src=l.src:l.srcSet&&(c.srcset=l.srcSet)}}catch(m){gt(r,r.return,m)}}function Md(r,i,l){try{var c=r.stateNode;_S(c,r.type,l,i),c[_n]=i}catch(m){gt(r,r.return,m)}}function vg(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&va(r.type)||r.tag===4}function Bd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||vg(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.tag===27&&va(r.type)||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 zd(r,i,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=Or));else if(c!==4&&(c===27&&va(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(zd(r,i,l),r=r.sibling;r!==null;)zd(r,i,l),r=r.sibling}function ho(r,i,l){var c=r.tag;if(c===5||c===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(c!==4&&(c===27&&va(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(ho(r,i,l),r=r.sibling;r!==null;)ho(r,i,l),r=r.sibling}function Sg(r){var i=r.stateNode,l=r.memoizedProps;try{for(var c=r.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);sn(i,c,l),i[nn]=r,i[_n]=l}catch(p){gt(r,r.return,p)}}var jr=!1,Vt=!1,Hd=!1,kg=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function tS(r,i){if(r=r.containerInfo,ih=Io,r=zp(r),Of(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var c=l.getSelection&&l.getSelection();if(c&&c.rangeCount!==0){l=c.anchorNode;var m=c.anchorOffset,p=c.focusNode;c=c.focusOffset;try{l.nodeType,p.nodeType}catch{l=null;break e}var _=0,k=-1,H=-1,X=0,te=0,ue=r,Z=null;t:for(;;){for(var W;ue!==l||m!==0&&ue.nodeType!==3||(k=_+m),ue!==p||c!==0&&ue.nodeType!==3||(H=_+c),ue.nodeType===3&&(_+=ue.nodeValue.length),(W=ue.firstChild)!==null;)Z=ue,ue=W;for(;;){if(ue===r)break t;if(Z===l&&++X===m&&(k=_),Z===p&&++te===c&&(H=_),(W=ue.nextSibling)!==null)break;ue=Z,Z=ue.parentNode}ue=W}l=k===-1||H===-1?null:{start:k,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(lh={focusedElem:r,selectionRange:l},Io=!1,Jt=i;Jt!==null;)if(i=Jt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Jt=r;else for(;Jt!==null;){switch(i=Jt,p=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)m=r[l],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&p!==null){r=void 0,l=i,m=p.memoizedProps,p=p.memoizedState,c=l.stateNode;try{var Ae=ui(l.type,m);r=c.getSnapshotBeforeUpdate(Ae,p),c.__reactInternalSnapshotBeforeUpdate=r}catch(Ie){gt(l,l.return,Ie)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)oh(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":oh(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Jt=r;break}Jt=i.return}}function Ag(r,i,l){var c=l.flags;switch(l.tag){case 0:case 11:case 15:qr(r,l),c&4&&gs(5,l);break;case 1:if(qr(r,l),c&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(_){gt(l,l.return,_)}else{var m=ui(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(m,i,r.__reactInternalSnapshotBeforeUpdate)}catch(_){gt(l,l.return,_)}}c&64&&xg(l),c&512&&bs(l,l.return);break;case 3:if(qr(r,l),c&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{c1(r,i)}catch(_){gt(l,l.return,_)}}break;case 27:i===null&&c&4&&Sg(l);case 26:case 5:qr(r,l),i===null&&c&4&&_g(l),c&512&&bs(l,l.return);break;case 12:qr(r,l);break;case 31:qr(r,l),c&4&&wg(r,l);break;case 13:qr(r,l),c&4&&Rg(r,l),c&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=cS.bind(null,l),RS(r,l))));break;case 22:if(c=l.memoizedState!==null||jr,!c){i=i!==null&&i.memoizedState!==null||Vt,m=jr;var p=Vt;jr=c,(Vt=i)&&!p?Yr(r,l,(l.subtreeFlags&8772)!==0):qr(r,l),jr=m,Vt=p}break;case 30:break;default:qr(r,l)}}function Cg(r){var i=r.alternate;i!==null&&(r.alternate=null,Cg(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&mf(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var Rt=null,Sn=!1;function Fr(r,i,l){for(l=l.child;l!==null;)Ng(r,i,l),l=l.sibling}function Ng(r,i,l){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(pn,l)}catch{}switch(l.tag){case 26:Vt||Er(l,i),Fr(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Vt||Er(l,i);var c=Rt,m=Sn;va(l.type)&&(Rt=l.stateNode,Sn=!1),Fr(r,i,l),As(l.stateNode),Rt=c,Sn=m;break;case 5:Vt||Er(l,i);case 6:if(c=Rt,m=Sn,Rt=null,Fr(r,i,l),Rt=c,Sn=m,Rt!==null)if(Sn)try{(Rt.nodeType===9?Rt.body:Rt.nodeName==="HTML"?Rt.ownerDocument.body:Rt).removeChild(l.stateNode)}catch(p){gt(l,i,p)}else try{Rt.removeChild(l.stateNode)}catch(p){gt(l,i,p)}break;case 18:Rt!==null&&(Sn?(r=Rt,xb(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),yl(r)):xb(Rt,l.stateNode));break;case 4:c=Rt,m=Sn,Rt=l.stateNode.containerInfo,Sn=!0,Fr(r,i,l),Rt=c,Sn=m;break;case 0:case 11:case 14:case 15:ga(2,l,i),Vt||ga(4,l,i),Fr(r,i,l);break;case 1:Vt||(Er(l,i),c=l.stateNode,typeof c.componentWillUnmount=="function"&&Tg(l,i,c)),Fr(r,i,l);break;case 21:Fr(r,i,l);break;case 22:Vt=(c=Vt)||l.memoizedState!==null,Fr(r,i,l),Vt=c;break;default:Fr(r,i,l)}}function wg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{yl(r)}catch(l){gt(i,i.return,l)}}}function Rg(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{yl(r)}catch(l){gt(i,i.return,l)}}function nS(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new kg),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new kg),i;default:throw Error(a(435,r.tag))}}function mo(r,i){var l=nS(r);i.forEach(function(c){if(!l.has(c)){l.add(c);var m=fS.bind(null,r,c);c.then(m,m)}})}function kn(r,i){var l=i.deletions;if(l!==null)for(var c=0;c<l.length;c++){var m=l[c],p=r,_=i,k=_;e:for(;k!==null;){switch(k.tag){case 27:if(va(k.type)){Rt=k.stateNode,Sn=!1;break e}break;case 5:Rt=k.stateNode,Sn=!1;break e;case 3:case 4:Rt=k.stateNode.containerInfo,Sn=!0;break e}k=k.return}if(Rt===null)throw Error(a(160));Ng(p,_,m),Rt=null,Sn=!1,p=m.alternate,p!==null&&(p.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)Og(i,r),i=i.sibling}var or=null;function Og(r,i){var l=r.alternate,c=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:kn(i,r),An(r),c&4&&(ga(3,r,r.return),gs(3,r),ga(5,r,r.return));break;case 1:kn(i,r),An(r),c&512&&(Vt||l===null||Er(l,l.return)),c&64&&jr&&(r=r.updateQueue,r!==null&&(c=r.callbacks,c!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?c:l.concat(c))));break;case 26:var m=or;if(kn(i,r),An(r),c&512&&(Vt||l===null||Er(l,l.return)),c&4){var p=l!==null?l.memoizedState:null;if(c=r.memoizedState,l===null)if(c===null)if(r.stateNode===null){e:{c=r.type,l=r.memoizedProps,m=m.ownerDocument||m;t:switch(c){case"title":p=m.getElementsByTagName("title")[0],(!p||p[Yl]||p[nn]||p.namespaceURI==="http://www.w3.org/2000/svg"||p.hasAttribute("itemprop"))&&(p=m.createElement(c),m.head.insertBefore(p,m.querySelector("head > title"))),sn(p,c,l),p[nn]=r,Wt(p),c=p;break e;case"link":var _=Ob("link","href",m).get(c+(l.href||""));if(_){for(var k=0;k<_.length;k++)if(p=_[k],p.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&p.getAttribute("rel")===(l.rel==null?null:l.rel)&&p.getAttribute("title")===(l.title==null?null:l.title)&&p.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){_.splice(k,1);break t}}p=m.createElement(c),sn(p,c,l),m.head.appendChild(p);break;case"meta":if(_=Ob("meta","content",m).get(c+(l.content||""))){for(k=0;k<_.length;k++)if(p=_[k],p.getAttribute("content")===(l.content==null?null:""+l.content)&&p.getAttribute("name")===(l.name==null?null:l.name)&&p.getAttribute("property")===(l.property==null?null:l.property)&&p.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&p.getAttribute("charset")===(l.charSet==null?null:l.charSet)){_.splice(k,1);break t}}p=m.createElement(c),sn(p,c,l),m.head.appendChild(p);break;default:throw Error(a(468,c))}p[nn]=r,Wt(p),c=p}r.stateNode=c}else Lb(m,r.type,r.stateNode);else r.stateNode=Rb(m,c,r.memoizedProps);else p!==c?(p===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):p.count--,c===null?Lb(m,r.type,r.stateNode):Rb(m,c,r.memoizedProps)):c===null&&r.stateNode!==null&&Md(r,r.memoizedProps,l.memoizedProps)}break;case 27:kn(i,r),An(r),c&512&&(Vt||l===null||Er(l,l.return)),l!==null&&c&4&&Md(r,r.memoizedProps,l.memoizedProps);break;case 5:if(kn(i,r),An(r),c&512&&(Vt||l===null||Er(l,l.return)),r.flags&32){m=r.stateNode;try{ji(m,"")}catch(Ae){gt(r,r.return,Ae)}}c&4&&r.stateNode!=null&&(m=r.memoizedProps,Md(r,m,l!==null?l.memoizedProps:m)),c&1024&&(Hd=!0);break;case 6:if(kn(i,r),An(r),c&4){if(r.stateNode===null)throw Error(a(162));c=r.memoizedProps,l=r.stateNode;try{l.nodeValue=c}catch(Ae){gt(r,r.return,Ae)}}break;case 3:if(Ro=null,m=or,or=No(i.containerInfo),kn(i,r),or=m,An(r),c&4&&l!==null&&l.memoizedState.isDehydrated)try{yl(i.containerInfo)}catch(Ae){gt(r,r.return,Ae)}Hd&&(Hd=!1,Lg(r));break;case 4:c=or,or=No(r.stateNode.containerInfo),kn(i,r),An(r),or=c;break;case 12:kn(i,r),An(r);break;case 31:kn(i,r),An(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,mo(r,c)));break;case 13:kn(i,r),An(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(go=mn()),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,mo(r,c)));break;case 22:m=r.memoizedState!==null;var H=l!==null&&l.memoizedState!==null,X=jr,te=Vt;if(jr=X||m,Vt=te||H,kn(i,r),Vt=te,jr=X,An(r),c&8192)e:for(i=r.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(l===null||H||jr||Vt||oi(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){H=l=i;try{if(p=H.stateNode,m)_=p.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none";else{k=H.stateNode;var ue=H.memoizedProps.style,Z=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;k.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Ae){gt(H,H.return,Ae)}}}else if(i.tag===6){if(l===null){H=i;try{H.stateNode.nodeValue=m?"":H.memoizedProps}catch(Ae){gt(H,H.return,Ae)}}}else if(i.tag===18){if(l===null){H=i;try{var W=H.stateNode;m?Tb(W,!0):Tb(H.stateNode,!1)}catch(Ae){gt(H,H.return,Ae)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}c&4&&(c=r.updateQueue,c!==null&&(l=c.retryQueue,l!==null&&(c.retryQueue=null,mo(r,l))));break;case 19:kn(i,r),An(r),c&4&&(c=r.updateQueue,c!==null&&(r.updateQueue=null,mo(r,c)));break;case 30:break;case 21:break;default:kn(i,r),An(r)}}function An(r){var i=r.flags;if(i&2){try{for(var l,c=r.return;c!==null;){if(vg(c)){l=c;break}c=c.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,p=Bd(r);ho(r,p,m);break;case 5:var _=l.stateNode;l.flags&32&&(ji(_,""),l.flags&=-33);var k=Bd(r);ho(r,k,_);break;case 3:case 4:var H=l.stateNode.containerInfo,X=Bd(r);zd(r,X,H);break;default:throw Error(a(161))}}catch(te){gt(r,r.return,te)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function Lg(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;Lg(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function qr(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Ag(r,i.alternate,i),i=i.sibling}function oi(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:ga(4,i,i.return),oi(i);break;case 1:Er(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&Tg(i,i.return,l),oi(i);break;case 27:As(i.stateNode);case 26:case 5:Er(i,i.return),oi(i);break;case 22:i.memoizedState===null&&oi(i);break;case 30:oi(i);break;default:oi(i)}r=r.sibling}}function Yr(r,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var c=i.alternate,m=r,p=i,_=p.flags;switch(p.tag){case 0:case 11:case 15:Yr(m,p,l),gs(4,p);break;case 1:if(Yr(m,p,l),c=p,m=c.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(X){gt(c,c.return,X)}if(c=p,m=c.updateQueue,m!==null){var k=c.stateNode;try{var H=m.shared.hiddenCallbacks;if(H!==null)for(m.shared.hiddenCallbacks=null,m=0;m<H.length;m++)o1(H[m],k)}catch(X){gt(c,c.return,X)}}l&&_&64&&xg(p),bs(p,p.return);break;case 27:Sg(p);case 26:case 5:Yr(m,p,l),l&&c===null&&_&4&&_g(p),bs(p,p.return);break;case 12:Yr(m,p,l);break;case 31:Yr(m,p,l),l&&_&4&&wg(m,p);break;case 13:Yr(m,p,l),l&&_&4&&Rg(m,p);break;case 22:p.memoizedState===null&&Yr(m,p,l),bs(p,p.return);break;case 30:break;default:Yr(m,p,l)}i=i.sibling}}function Ud(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&rs(l))}function Pd(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&rs(r))}function cr(r,i,l,c){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Dg(r,i,l,c),i=i.sibling}function Dg(r,i,l,c){var m=i.flags;switch(i.tag){case 0:case 11:case 15:cr(r,i,l,c),m&2048&&gs(9,i);break;case 1:cr(r,i,l,c);break;case 3:cr(r,i,l,c),m&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&rs(r)));break;case 12:if(m&2048){cr(r,i,l,c),r=i.stateNode;try{var p=i.memoizedProps,_=p.id,k=p.onPostCommit;typeof k=="function"&&k(_,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(H){gt(i,i.return,H)}}else cr(r,i,l,c);break;case 31:cr(r,i,l,c);break;case 13:cr(r,i,l,c);break;case 23:break;case 22:p=i.stateNode,_=i.alternate,i.memoizedState!==null?p._visibility&2?cr(r,i,l,c):ys(r,i):p._visibility&2?cr(r,i,l,c):(p._visibility|=2,sl(r,i,l,c,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Ud(_,i);break;case 24:cr(r,i,l,c),m&2048&&Pd(i.alternate,i);break;default:cr(r,i,l,c)}}function sl(r,i,l,c,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var p=r,_=i,k=l,H=c,X=_.flags;switch(_.tag){case 0:case 11:case 15:sl(p,_,k,H,m),gs(8,_);break;case 23:break;case 22:var te=_.stateNode;_.memoizedState!==null?te._visibility&2?sl(p,_,k,H,m):ys(p,_):(te._visibility|=2,sl(p,_,k,H,m)),m&&X&2048&&Ud(_.alternate,_);break;case 24:sl(p,_,k,H,m),m&&X&2048&&Pd(_.alternate,_);break;default:sl(p,_,k,H,m)}i=i.sibling}}function ys(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,c=i,m=c.flags;switch(c.tag){case 22:ys(l,c),m&2048&&Ud(c.alternate,c);break;case 24:ys(l,c),m&2048&&Pd(c.alternate,c);break;default:ys(l,c)}i=i.sibling}}var Es=8192;function ul(r,i,l){if(r.subtreeFlags&Es)for(r=r.child;r!==null;)Ig(r,i,l),r=r.sibling}function Ig(r,i,l){switch(r.tag){case 26:ul(r,i,l),r.flags&Es&&r.memoizedState!==null&&FS(l,or,r.memoizedState,r.memoizedProps);break;case 5:ul(r,i,l);break;case 3:case 4:var c=or;or=No(r.stateNode.containerInfo),ul(r,i,l),or=c;break;case 22:r.memoizedState===null&&(c=r.alternate,c!==null&&c.memoizedState!==null?(c=Es,Es=16777216,ul(r,i,l),Es=c):ul(r,i,l));break;default:ul(r,i,l)}}function Mg(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function xs(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Jt=c,zg(c,r)}Mg(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Bg(r),r=r.sibling}function Bg(r){switch(r.tag){case 0:case 11:case 15:xs(r),r.flags&2048&&ga(9,r,r.return);break;case 3:xs(r);break;case 12:xs(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,po(r)):xs(r);break;default:xs(r)}}function po(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var c=i[l];Jt=c,zg(c,r)}Mg(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:ga(8,i,i.return),po(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,po(i));break;default:po(i)}r=r.sibling}}function zg(r,i){for(;Jt!==null;){var l=Jt;switch(l.tag){case 0:case 11:case 15:ga(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var c=l.memoizedState.cachePool.pool;c!=null&&c.refCount++}break;case 24:rs(l.memoizedState.cache)}if(c=l.child,c!==null)c.return=l,Jt=c;else e:for(l=r;Jt!==null;){c=Jt;var m=c.sibling,p=c.return;if(Cg(c),c===l){Jt=null;break e}if(m!==null){m.return=p,Jt=m;break e}Jt=p}}}var rS={getCacheForType:function(r){var i=an(qt),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return an(qt).controller.signal}},aS=typeof WeakMap=="function"?WeakMap:Map,dt=0,St=null,Ke=null,et=0,pt=0,zn=null,ba=!1,ol=!1,jd=!1,$r=0,It=0,ya=0,ci=0,Fd=0,Hn=0,cl=0,Ts=null,Cn=null,qd=!1,go=0,Hg=0,bo=1/0,yo=null,Ea=null,Zt=0,xa=null,fl=null,Vr=0,Yd=0,$d=null,Ug=null,_s=0,Vd=null;function Un(){return(dt&2)!==0&&et!==0?et&-et:P.T!==null?Wd():tp()}function Pg(){if(Hn===0)if((et&536870912)===0||nt){var r=ku;ku<<=1,(ku&3932160)===0&&(ku=262144),Hn=r}else Hn=536870912;return r=Mn.current,r!==null&&(r.flags|=32),Hn}function Nn(r,i,l){(r===St&&(pt===2||pt===9)||r.cancelPendingCommit!==null)&&(dl(r,0),Ta(r,et,Hn,!1)),ql(r,l),((dt&2)===0||r!==St)&&(r===St&&((dt&2)===0&&(ci|=l),It===4&&Ta(r,et,Hn,!1)),xr(r))}function jg(r,i,l){if((dt&6)!==0)throw Error(a(327));var c=!l&&(i&127)===0&&(i&r.expiredLanes)===0||Fl(r,i),m=c?sS(r,i):Qd(r,i,!0),p=c;do{if(m===0){ol&&!c&&Ta(r,i,0,!1);break}else{if(l=r.current.alternate,p&&!iS(l)){m=Qd(r,i,!1),p=!1;continue}if(m===2){if(p=i,r.errorRecoveryDisabledLanes&p)var _=0;else _=r.pendingLanes&-536870913,_=_!==0?_:_&536870912?536870912:0;if(_!==0){i=_;e:{var k=r;m=Ts;var H=k.current.memoizedState.isDehydrated;if(H&&(dl(k,_).flags|=256),_=Qd(k,_,!1),_!==2){if(jd&&!H){k.errorRecoveryDisabledLanes|=p,ci|=p,m=4;break e}p=Cn,Cn=m,p!==null&&(Cn===null?Cn=p:Cn.push.apply(Cn,p))}m=_}if(p=!1,m!==2)continue}}if(m===1){dl(r,0),Ta(r,i,0,!0);break}e:{switch(c=r,p=m,p){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:Ta(c,i,Hn,!ba);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(m=go+300-mn(),10<m)){if(Ta(c,i,Hn,!ba),Cu(c,0,!0)!==0)break e;Vr=i,c.timeoutHandle=yb(Fg.bind(null,c,l,Cn,yo,qd,i,Hn,ci,cl,ba,p,"Throttled",-0,0),m);break e}Fg(c,l,Cn,yo,qd,i,Hn,ci,cl,ba,p,null,-0,0)}}break}while(!0);xr(r)}function Fg(r,i,l,c,m,p,_,k,H,X,te,ue,Z,W){if(r.timeoutHandle=-1,ue=i.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Or},Ig(i,p,ue);var Ae=(p&62914560)===p?go-mn():(p&4194048)===p?Hg-mn():0;if(Ae=qS(ue,Ae),Ae!==null){Vr=p,r.cancelPendingCommit=Ae(Zg.bind(null,r,i,p,l,c,m,_,k,H,te,ue,null,Z,W)),Ta(r,p,_,!X);return}}Zg(r,i,p,l,c,m,_,k,H)}function iS(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var c=0;c<l.length;c++){var m=l[c],p=m.getSnapshot;m=m.value;try{if(!Dn(p(),m))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;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 Ta(r,i,l,c){i&=~Fd,i&=~ci,r.suspendedLanes|=i,r.pingedLanes&=~i,c&&(r.warmLanes|=i),c=r.expirationTimes;for(var m=i;0<m;){var p=31-vt(m),_=1<<p;c[p]=-1,m&=~_}l!==0&&W0(r,l,i)}function Eo(){return(dt&6)===0?(vs(0),!1):!0}function Gd(){if(Ke!==null){if(pt===0)var r=Ke.return;else r=Ke,Mr=ti=null,od(r),nl=null,is=0,r=Ke;for(;r!==null;)Eg(r.alternate,r),r=r.return;Ke=null}}function dl(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,kS(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Vr=0,Gd(),St=r,Ke=l=Dr(r.current,null),et=i,pt=0,zn=null,ba=!1,ol=Fl(r,i),jd=!1,cl=Hn=Fd=ci=ya=It=0,Cn=Ts=null,qd=!1,(i&8)!==0&&(i|=i&32);var c=r.entangledLanes;if(c!==0)for(r=r.entanglements,c&=i;0<c;){var m=31-vt(c),p=1<<m;i|=r[m],c&=~p}return $r=i,Uu(),l}function qg(r,i){je=null,P.H=hs,i===tl||i===Gu?(i=i1(),pt=3):i===Kf?(i=i1(),pt=4):pt=i===kd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,zn=i,Ke===null&&(It=1,so(r,Xn(i,r.current)))}function Yg(){var r=Mn.current;return r===null?!0:(et&4194048)===et?Jn===null:(et&62914560)===et||(et&536870912)!==0?r===Jn:!1}function $g(){var r=P.H;return P.H=hs,r===null?hs:r}function Vg(){var r=P.A;return P.A=rS,r}function xo(){It=4,ba||(et&4194048)!==et&&Mn.current!==null||(ol=!0),(ya&134217727)===0&&(ci&134217727)===0||St===null||Ta(St,et,Hn,!1)}function Qd(r,i,l){var c=dt;dt|=2;var m=$g(),p=Vg();(St!==r||et!==i)&&(yo=null,dl(r,i)),i=!1;var _=It;e:do try{if(pt!==0&&Ke!==null){var k=Ke,H=zn;switch(pt){case 8:Gd(),_=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(i=!0);var X=pt;if(pt=0,zn=null,hl(r,k,H,X),l&&ol){_=0;break e}break;default:X=pt,pt=0,zn=null,hl(r,k,H,X)}}lS(),_=It;break}catch(te){qg(r,te)}while(!0);return i&&r.shellSuspendCounter++,Mr=ti=null,dt=c,P.H=m,P.A=p,Ke===null&&(St=null,et=0,Uu()),_}function lS(){for(;Ke!==null;)Gg(Ke)}function sS(r,i){var l=dt;dt|=2;var c=$g(),m=Vg();St!==r||et!==i?(yo=null,bo=mn()+500,dl(r,i)):ol=Fl(r,i);e:do try{if(pt!==0&&Ke!==null){i=Ke;var p=zn;t:switch(pt){case 1:pt=0,zn=null,hl(r,i,p,1);break;case 2:case 9:if(r1(p)){pt=0,zn=null,Qg(i);break}i=function(){pt!==2&&pt!==9||St!==r||(pt=7),xr(r)},p.then(i,i);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:r1(p)?(pt=0,zn=null,Qg(i)):(pt=0,zn=null,hl(r,i,p,7));break;case 5:var _=null;switch(Ke.tag){case 26:_=Ke.memoizedState;case 5:case 27:var k=Ke;if(_?Db(_):k.stateNode.complete){pt=0,zn=null;var H=k.sibling;if(H!==null)Ke=H;else{var X=k.return;X!==null?(Ke=X,To(X)):Ke=null}break t}}pt=0,zn=null,hl(r,i,p,5);break;case 6:pt=0,zn=null,hl(r,i,p,6);break;case 8:Gd(),It=6;break e;default:throw Error(a(462))}}uS();break}catch(te){qg(r,te)}while(!0);return Mr=ti=null,P.H=c,P.A=m,dt=l,Ke!==null?0:(St=null,et=0,Uu(),It)}function uS(){for(;Ke!==null&&!$n();)Gg(Ke)}function Gg(r){var i=bg(r.alternate,r,$r);r.memoizedProps=r.pendingProps,i===null?To(r):Ke=i}function Qg(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=fg(l,i,i.pendingProps,i.type,void 0,et);break;case 11:i=fg(l,i,i.pendingProps,i.type.render,i.ref,et);break;case 5:od(i);default:Eg(l,i),i=Ke=Vp(i,$r),i=bg(l,i,$r)}r.memoizedProps=r.pendingProps,i===null?To(r):Ke=i}function hl(r,i,l,c){Mr=ti=null,od(i),nl=null,is=0;var m=i.return;try{if(Z3(r,m,i,l,et)){It=1,so(r,Xn(l,r.current)),Ke=null;return}}catch(p){if(m!==null)throw Ke=m,p;It=1,so(r,Xn(l,r.current)),Ke=null;return}i.flags&32768?(nt||c===1?r=!0:ol||(et&536870912)!==0?r=!1:(ba=r=!0,(c===2||c===9||c===3||c===6)&&(c=Mn.current,c!==null&&c.tag===13&&(c.flags|=16384))),Xg(i,r)):To(i)}function To(r){var i=r;do{if((i.flags&32768)!==0){Xg(i,ba);return}r=i.return;var l=J3(i.alternate,i,$r);if(l!==null){Ke=l;return}if(i=i.sibling,i!==null){Ke=i;return}Ke=i=r}while(i!==null);It===0&&(It=5)}function Xg(r,i){do{var l=eS(r.alternate,r);if(l!==null){l.flags&=32767,Ke=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){Ke=r;return}Ke=r=l}while(r!==null);It=6,Ke=null}function Zg(r,i,l,c,m,p,_,k,H){r.cancelPendingCommit=null;do _o();while(Zt!==0);if((dt&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(p=i.lanes|i.childLanes,p|=Bf,jv(r,l,p,_,k,H),r===St&&(Ke=St=null,et=0),fl=i,xa=r,Vr=l,Yd=p,$d=m,Ug=c,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,dS(Me,function(){return tb(),null})):(r.callbackNode=null,r.callbackPriority=0),c=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||c){c=P.T,P.T=null,m=ne.p,ne.p=2,_=dt,dt|=4;try{tS(r,i,l)}finally{dt=_,ne.p=m,P.T=c}}Zt=1,Kg(),Wg(),Jg()}}function Kg(){if(Zt===1){Zt=0;var r=xa,i=fl,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=P.T,P.T=null;var c=ne.p;ne.p=2;var m=dt;dt|=4;try{Og(i,r);var p=lh,_=zp(r.containerInfo),k=p.focusedElem,H=p.selectionRange;if(_!==k&&k&&k.ownerDocument&&Bp(k.ownerDocument.documentElement,k)){if(H!==null&&Of(k)){var X=H.start,te=H.end;if(te===void 0&&(te=X),"selectionStart"in k)k.selectionStart=X,k.selectionEnd=Math.min(te,k.value.length);else{var ue=k.ownerDocument||document,Z=ue&&ue.defaultView||window;if(Z.getSelection){var W=Z.getSelection(),Ae=k.textContent.length,Ie=Math.min(H.start,Ae),Et=H.end===void 0?Ie:Math.min(H.end,Ae);!W.extend&&Ie>Et&&(_=Et,Et=Ie,Ie=_);var Y=Mp(k,Ie),j=Mp(k,Et);if(Y&&j&&(W.rangeCount!==1||W.anchorNode!==Y.node||W.anchorOffset!==Y.offset||W.focusNode!==j.node||W.focusOffset!==j.offset)){var Q=ue.createRange();Q.setStart(Y.node,Y.offset),W.removeAllRanges(),Ie>Et?(W.addRange(Q),W.extend(j.node,j.offset)):(Q.setEnd(j.node,j.offset),W.addRange(Q))}}}}for(ue=[],W=k;W=W.parentNode;)W.nodeType===1&&ue.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ue.length;k++){var le=ue[k];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Io=!!ih,lh=ih=null}finally{dt=m,ne.p=c,P.T=l}}r.current=i,Zt=2}}function Wg(){if(Zt===2){Zt=0;var r=xa,i=fl,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=P.T,P.T=null;var c=ne.p;ne.p=2;var m=dt;dt|=4;try{Ag(r,i.alternate,i)}finally{dt=m,ne.p=c,P.T=l}}Zt=3}}function Jg(){if(Zt===4||Zt===3){Zt=0,jl();var r=xa,i=fl,l=Vr,c=Ug;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Zt=5:(Zt=0,fl=xa=null,eb(r,r.pendingLanes));var m=r.pendingLanes;if(m===0&&(Ea=null),df(l),i=i.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(pn,i,void 0,(i.current.flags&128)===128)}catch{}if(c!==null){i=P.T,m=ne.p,ne.p=2,P.T=null;try{for(var p=r.onRecoverableError,_=0;_<c.length;_++){var k=c[_];p(k.value,{componentStack:k.stack})}}finally{P.T=i,ne.p=m}}(Vr&3)!==0&&_o(),xr(r),m=r.pendingLanes,(l&261930)!==0&&(m&42)!==0?r===Vd?_s++:(_s=0,Vd=r):_s=0,vs(0)}}function eb(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,rs(i)))}function _o(){return Kg(),Wg(),Jg(),tb()}function tb(){if(Zt!==5)return!1;var r=xa,i=Yd;Yd=0;var l=df(Vr),c=P.T,m=ne.p;try{ne.p=32>l?32:l,P.T=null,l=$d,$d=null;var p=xa,_=Vr;if(Zt=0,fl=xa=null,Vr=0,(dt&6)!==0)throw Error(a(331));var k=dt;if(dt|=4,Bg(p.current),Dg(p,p.current,_,l),dt=k,vs(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(pn,p)}catch{}return!0}finally{ne.p=m,P.T=c,eb(r,i)}}function nb(r,i,l){i=Xn(l,i),i=Sd(r.stateNode,i,2),r=ha(r,i,2),r!==null&&(ql(r,2),xr(r))}function gt(r,i,l){if(r.tag===3)nb(r,r,l);else for(;i!==null;){if(i.tag===3){nb(i,r,l);break}else if(i.tag===1){var c=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(Ea===null||!Ea.has(c))){r=Xn(l,r),l=rg(2),c=ha(i,l,2),c!==null&&(ag(l,c,i,r),ql(c,2),xr(c));break}}i=i.return}}function Xd(r,i,l){var c=r.pingCache;if(c===null){c=r.pingCache=new aS;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(l)||(jd=!0,m.add(l),r=oS.bind(null,r,i,l),i.then(r,r))}function oS(r,i,l){var c=r.pingCache;c!==null&&c.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,St===r&&(et&l)===l&&(It===4||It===3&&(et&62914560)===et&&300>mn()-go?(dt&2)===0&&dl(r,0):Fd|=l,cl===et&&(cl=0)),xr(r)}function rb(r,i){i===0&&(i=K0()),r=Wa(r,i),r!==null&&(ql(r,i),xr(r))}function cS(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),rb(r,l)}function fS(r,i){var l=0;switch(r.tag){case 31:case 13:var c=r.stateNode,m=r.memoizedState;m!==null&&(l=m.retryLane);break;case 19:c=r.stateNode;break;case 22:c=r.stateNode._retryCache;break;default:throw Error(a(314))}c!==null&&c.delete(i),rb(r,l)}function dS(r,i){return jt(r,i)}var vo=null,ml=null,Zd=!1,So=!1,Kd=!1,_a=0;function xr(r){r!==ml&&r.next===null&&(ml===null?vo=ml=r:ml=ml.next=r),So=!0,Zd||(Zd=!0,mS())}function vs(r,i){if(!Kd&&So){Kd=!0;do for(var l=!1,c=vo;c!==null;){if(r!==0){var m=c.pendingLanes;if(m===0)var p=0;else{var _=c.suspendedLanes,k=c.pingedLanes;p=(1<<31-vt(42|r)+1)-1,p&=m&~(_&~k),p=p&201326741?p&201326741|1:p?p|2:0}p!==0&&(l=!0,sb(c,p))}else p=et,p=Cu(c,c===St?p:0,c.cancelPendingCommit!==null||c.timeoutHandle!==-1),(p&3)===0||Fl(c,p)||(l=!0,sb(c,p));c=c.next}while(l);Kd=!1}}function hS(){ab()}function ab(){So=Zd=!1;var r=0;_a!==0&&SS()&&(r=_a);for(var i=mn(),l=null,c=vo;c!==null;){var m=c.next,p=ib(c,i);p===0?(c.next=null,l===null?vo=m:l.next=m,m===null&&(ml=l)):(l=c,(r!==0||(p&3)!==0)&&(So=!0)),c=m}Zt!==0&&Zt!==5||vs(r),_a!==0&&(_a=0)}function ib(r,i){for(var l=r.suspendedLanes,c=r.pingedLanes,m=r.expirationTimes,p=r.pendingLanes&-62914561;0<p;){var _=31-vt(p),k=1<<_,H=m[_];H===-1?((k&l)===0||(k&c)!==0)&&(m[_]=Pv(k,i)):H<=i&&(r.expiredLanes|=k),p&=~k}if(i=St,l=et,l=Cu(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c=r.callbackNode,l===0||r===i&&(pt===2||pt===9)||r.cancelPendingCommit!==null)return c!==null&&c!==null&&Ft(c),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Fl(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(c!==null&&Ft(c),df(l)){case 2:case 8:l=ye;break;case 32:l=Me;break;case 268435456:l=ht;break;default:l=Me}return c=lb.bind(null,r),l=jt(l,c),r.callbackPriority=i,r.callbackNode=l,i}return c!==null&&c!==null&&Ft(c),r.callbackPriority=2,r.callbackNode=null,2}function lb(r,i){if(Zt!==0&&Zt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(_o()&&r.callbackNode!==l)return null;var c=et;return c=Cu(r,r===St?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),c===0?null:(jg(r,c,i),ib(r,mn()),r.callbackNode!=null&&r.callbackNode===l?lb.bind(null,r):null)}function sb(r,i){if(_o())return null;jg(r,i,!0)}function mS(){AS(function(){(dt&6)!==0?jt(re,hS):ab()})}function Wd(){if(_a===0){var r=Ji;r===0&&(r=Su,Su<<=1,(Su&261888)===0&&(Su=256)),_a=r}return _a}function ub(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Ou(""+r)}function ob(r,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute("form",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function pS(r,i,l,c,m){if(i==="submit"&&l&&l.stateNode===m){var p=ub((m[_n]||null).action),_=c.submitter;_&&(i=(i=_[_n]||null)?ub(i.formAction):_.getAttribute("formAction"),i!==null&&(p=i,_=null));var k=new Mu("action","action",null,c,m);r.push({event:k,listeners:[{instance:null,listener:function(){if(c.defaultPrevented){if(_a!==0){var H=_?ob(m,_):new FormData(m);yd(l,{pending:!0,data:H,method:m.method,action:p},null,H)}}else typeof p=="function"&&(k.preventDefault(),H=_?ob(m,_):new FormData(m),yd(l,{pending:!0,data:H,method:m.method,action:p},p,H))},currentTarget:m}]})}}for(var Jd=0;Jd<Mf.length;Jd++){var eh=Mf[Jd],gS=eh.toLowerCase(),bS=eh[0].toUpperCase()+eh.slice(1);ur(gS,"on"+bS)}ur(Pp,"onAnimationEnd"),ur(jp,"onAnimationIteration"),ur(Fp,"onAnimationStart"),ur("dblclick","onDoubleClick"),ur("focusin","onFocus"),ur("focusout","onBlur"),ur(D3,"onTransitionRun"),ur(I3,"onTransitionStart"),ur(M3,"onTransitionCancel"),ur(qp,"onTransitionEnd"),Ui("onMouseEnter",["mouseout","mouseover"]),Ui("onMouseLeave",["mouseout","mouseover"]),Ui("onPointerEnter",["pointerout","pointerover"]),Ui("onPointerLeave",["pointerout","pointerover"]),Qa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qa("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qa("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(" "),yS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ss));function cb(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var c=r[l],m=c.event;c=c.listeners;e:{var p=void 0;if(i)for(var _=c.length-1;0<=_;_--){var k=c[_],H=k.instance,X=k.currentTarget;if(k=k.listener,H!==p&&m.isPropagationStopped())break e;p=k,m.currentTarget=X;try{p(m)}catch(te){Hu(te)}m.currentTarget=null,p=H}else for(_=0;_<c.length;_++){if(k=c[_],H=k.instance,X=k.currentTarget,k=k.listener,H!==p&&m.isPropagationStopped())break e;p=k,m.currentTarget=X;try{p(m)}catch(te){Hu(te)}m.currentTarget=null,p=H}}}}function We(r,i){var l=i[hf];l===void 0&&(l=i[hf]=new Set);var c=r+"__bubble";l.has(c)||(fb(i,r,2,!1),l.add(c))}function th(r,i,l){var c=0;i&&(c|=4),fb(l,r,c,i)}var ko="_reactListening"+Math.random().toString(36).slice(2);function nh(r){if(!r[ko]){r[ko]=!0,ap.forEach(function(l){l!=="selectionchange"&&(yS.has(l)||th(l,!1,r),th(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[ko]||(i[ko]=!0,th("selectionchange",!1,i))}}function fb(r,i,l,c){switch(Pb(i)){case 2:var m=VS;break;case 8:m=GS;break;default:m=bh}l=m.bind(null,i,l,r),m=void 0,!_f||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),c?m!==void 0?r.addEventListener(i,l,{capture:!0,passive:m}):r.addEventListener(i,l,!0):m!==void 0?r.addEventListener(i,l,{passive:m}):r.addEventListener(i,l,!1)}function rh(r,i,l,c,m){var p=c;if((i&1)===0&&(i&2)===0&&c!==null)e:for(;;){if(c===null)return;var _=c.tag;if(_===3||_===4){var k=c.stateNode.containerInfo;if(k===m)break;if(_===4)for(_=c.return;_!==null;){var H=_.tag;if((H===3||H===4)&&_.stateNode.containerInfo===m)return;_=_.return}for(;k!==null;){if(_=Bi(k),_===null)return;if(H=_.tag,H===5||H===6||H===26||H===27){c=p=_;continue e}k=k.parentNode}}c=c.return}gp(function(){var X=p,te=xf(l),ue=[];e:{var Z=Yp.get(r);if(Z!==void 0){var W=Mu,Ae=r;switch(r){case"keypress":if(Du(l)===0)break e;case"keydown":case"keyup":W=f3;break;case"focusin":Ae="focus",W=Af;break;case"focusout":Ae="blur",W=Af;break;case"beforeblur":case"afterblur":W=Af;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=Ep;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Jv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=m3;break;case Pp:case jp:case Fp:W=n3;break;case qp:W=g3;break;case"scroll":case"scrollend":W=Kv;break;case"wheel":W=y3;break;case"copy":case"cut":case"paste":W=a3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Tp;break;case"toggle":case"beforetoggle":W=x3}var Ie=(i&4)!==0,Et=!Ie&&(r==="scroll"||r==="scrollend"),Y=Ie?Z!==null?Z+"Capture":null:Z;Ie=[];for(var j=X,Q;j!==null;){var le=j;if(Q=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Q===null||Y===null||(le=Vl(j,Y),le!=null&&Ie.push(ks(j,le,Q))),Et)break;j=j.return}0<Ie.length&&(Z=new W(Z,Ae,null,l,te),ue.push({event:Z,listeners:Ie}))}}if((i&7)===0){e:{if(Z=r==="mouseover"||r==="pointerover",W=r==="mouseout"||r==="pointerout",Z&&l!==Ef&&(Ae=l.relatedTarget||l.fromElement)&&(Bi(Ae)||Ae[Mi]))break e;if((W||Z)&&(Z=te.window===te?te:(Z=te.ownerDocument)?Z.defaultView||Z.parentWindow:window,W?(Ae=l.relatedTarget||l.toElement,W=X,Ae=Ae?Bi(Ae):null,Ae!==null&&(Et=u(Ae),Ie=Ae.tag,Ae!==Et||Ie!==5&&Ie!==27&&Ie!==6)&&(Ae=null)):(W=null,Ae=X),W!==Ae)){if(Ie=Ep,le="onMouseLeave",Y="onMouseEnter",j="mouse",(r==="pointerout"||r==="pointerover")&&(Ie=Tp,le="onPointerLeave",Y="onPointerEnter",j="pointer"),Et=W==null?Z:$l(W),Q=Ae==null?Z:$l(Ae),Z=new Ie(le,j+"leave",W,l,te),Z.target=Et,Z.relatedTarget=Q,le=null,Bi(te)===X&&(Ie=new Ie(Y,j+"enter",Ae,l,te),Ie.target=Q,Ie.relatedTarget=Et,le=Ie),Et=le,W&&Ae)t:{for(Ie=ES,Y=W,j=Ae,Q=0,le=Y;le;le=Ie(le))Q++;le=0;for(var Oe=j;Oe;Oe=Ie(Oe))le++;for(;0<Q-le;)Y=Ie(Y),Q--;for(;0<le-Q;)j=Ie(j),le--;for(;Q--;){if(Y===j||j!==null&&Y===j.alternate){Ie=Y;break t}Y=Ie(Y),j=Ie(j)}Ie=null}else Ie=null;W!==null&&db(ue,Z,W,Ie,!1),Ae!==null&&Et!==null&&db(ue,Et,Ae,Ie,!0)}}e:{if(Z=X?$l(X):window,W=Z.nodeName&&Z.nodeName.toLowerCase(),W==="select"||W==="input"&&Z.type==="file")var ot=wp;else if(Cp(Z))if(Rp)ot=R3;else{ot=N3;var Ne=C3}else W=Z.nodeName,!W||W.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?X&&yf(X.elementType)&&(ot=wp):ot=w3;if(ot&&(ot=ot(r,X))){Np(ue,ot,l,te);break e}Ne&&Ne(r,Z,X),r==="focusout"&&X&&Z.type==="number"&&X.memoizedProps.value!=null&&bf(Z,"number",Z.value)}switch(Ne=X?$l(X):window,r){case"focusin":(Cp(Ne)||Ne.contentEditable==="true")&&($i=Ne,Lf=X,es=null);break;case"focusout":es=Lf=$i=null;break;case"mousedown":Df=!0;break;case"contextmenu":case"mouseup":case"dragend":Df=!1,Hp(ue,l,te);break;case"selectionchange":if(L3)break;case"keydown":case"keyup":Hp(ue,l,te)}var Fe;if(Nf)e:{switch(r){case"compositionstart":var tt="onCompositionStart";break e;case"compositionend":tt="onCompositionEnd";break e;case"compositionupdate":tt="onCompositionUpdate";break e}tt=void 0}else Yi?kp(r,l)&&(tt="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(tt="onCompositionStart");tt&&(_p&&l.locale!=="ko"&&(Yi||tt!=="onCompositionStart"?tt==="onCompositionEnd"&&Yi&&(Fe=bp()):(la=te,vf="value"in la?la.value:la.textContent,Yi=!0)),Ne=Ao(X,tt),0<Ne.length&&(tt=new xp(tt,r,null,l,te),ue.push({event:tt,listeners:Ne}),Fe?tt.data=Fe:(Fe=Ap(l),Fe!==null&&(tt.data=Fe)))),(Fe=_3?v3(r,l):S3(r,l))&&(tt=Ao(X,"onBeforeInput"),0<tt.length&&(Ne=new xp("onBeforeInput","beforeinput",null,l,te),ue.push({event:Ne,listeners:tt}),Ne.data=Fe)),pS(ue,r,X,l,te)}cb(ue,i)})}function ks(r,i,l){return{instance:r,listener:i,currentTarget:l}}function Ao(r,i){for(var l=i+"Capture",c=[];r!==null;){var m=r,p=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||p===null||(m=Vl(r,l),m!=null&&c.unshift(ks(r,m,p)),m=Vl(r,i),m!=null&&c.push(ks(r,m,p))),r.tag===3)return c;r=r.return}return[]}function ES(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function db(r,i,l,c,m){for(var p=i._reactName,_=[];l!==null&&l!==c;){var k=l,H=k.alternate,X=k.stateNode;if(k=k.tag,H!==null&&H===c)break;k!==5&&k!==26&&k!==27||X===null||(H=X,m?(X=Vl(l,p),X!=null&&_.unshift(ks(l,X,H))):m||(X=Vl(l,p),X!=null&&_.push(ks(l,X,H)))),l=l.return}_.length!==0&&r.push({event:i,listeners:_})}var xS=/\r\n?/g,TS=/\u0000|\uFFFD/g;function hb(r){return(typeof r=="string"?r:""+r).replace(xS,`
49
- `).replace(TS,"")}function mb(r,i){return i=hb(i),hb(r)===i}function yt(r,i,l,c,m,p){switch(l){case"children":typeof c=="string"?i==="body"||i==="textarea"&&c===""||ji(r,c):(typeof c=="number"||typeof c=="bigint")&&i!=="body"&&ji(r,""+c);break;case"className":wu(r,"class",c);break;case"tabIndex":wu(r,"tabindex",c);break;case"dir":case"role":case"viewBox":case"width":case"height":wu(r,l,c);break;case"style":mp(r,c,p);break;case"data":if(i!=="object"){wu(r,"data",c);break}case"src":case"href":if(c===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(c==null||typeof c=="function"||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Ou(""+c),r.setAttribute(l,c);break;case"action":case"formAction":if(typeof c=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof p=="function"&&(l==="formAction"?(i!=="input"&&yt(r,i,"name",m.name,m,null),yt(r,i,"formEncType",m.formEncType,m,null),yt(r,i,"formMethod",m.formMethod,m,null),yt(r,i,"formTarget",m.formTarget,m,null)):(yt(r,i,"encType",m.encType,m,null),yt(r,i,"method",m.method,m,null),yt(r,i,"target",m.target,m,null)));if(c==null||typeof c=="symbol"||typeof c=="boolean"){r.removeAttribute(l);break}c=Ou(""+c),r.setAttribute(l,c);break;case"onClick":c!=null&&(r.onclick=Or);break;case"onScroll":c!=null&&We("scroll",r);break;case"onScrollEnd":c!=null&&We("scrollend",r);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=c&&typeof c!="function"&&typeof c!="symbol";break;case"muted":r.muted=c&&typeof c!="function"&&typeof c!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(c==null||typeof c=="function"||typeof c=="boolean"||typeof c=="symbol"){r.removeAttribute("xlink:href");break}l=Ou(""+c),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""+c):r.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":c&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":c===!0?r.setAttribute(l,""):c!==!1&&c!=null&&typeof c!="function"&&typeof c!="symbol"?r.setAttribute(l,c):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":c!=null&&typeof c!="function"&&typeof c!="symbol"&&!isNaN(c)&&1<=c?r.setAttribute(l,c):r.removeAttribute(l);break;case"rowSpan":case"start":c==null||typeof c=="function"||typeof c=="symbol"||isNaN(c)?r.removeAttribute(l):r.setAttribute(l,c);break;case"popover":We("beforetoggle",r),We("toggle",r),Nu(r,"popover",c);break;case"xlinkActuate":Rr(r,"http://www.w3.org/1999/xlink","xlink:actuate",c);break;case"xlinkArcrole":Rr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",c);break;case"xlinkRole":Rr(r,"http://www.w3.org/1999/xlink","xlink:role",c);break;case"xlinkShow":Rr(r,"http://www.w3.org/1999/xlink","xlink:show",c);break;case"xlinkTitle":Rr(r,"http://www.w3.org/1999/xlink","xlink:title",c);break;case"xlinkType":Rr(r,"http://www.w3.org/1999/xlink","xlink:type",c);break;case"xmlBase":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:base",c);break;case"xmlLang":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",c);break;case"xmlSpace":Rr(r,"http://www.w3.org/XML/1998/namespace","xml:space",c);break;case"is":Nu(r,"is",c);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Xv.get(l)||l,Nu(r,l,c))}}function ah(r,i,l,c,m,p){switch(l){case"style":mp(r,c,p);break;case"dangerouslySetInnerHTML":if(c!=null){if(typeof c!="object"||!("__html"in c))throw Error(a(61));if(l=c.__html,l!=null){if(m.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof c=="string"?ji(r,c):(typeof c=="number"||typeof c=="bigint")&&ji(r,""+c);break;case"onScroll":c!=null&&We("scroll",r);break;case"onScrollEnd":c!=null&&We("scrollend",r);break;case"onClick":c!=null&&(r.onclick=Or);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ip.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),i=l.slice(2,m?l.length-7:void 0),p=r[_n]||null,p=p!=null?p[l]:null,typeof p=="function"&&r.removeEventListener(i,p,m),typeof c=="function")){typeof p!="function"&&p!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,c,m);break e}l in r?r[l]=c:c===!0?r.setAttribute(l,""):Nu(r,l,c)}}}function sn(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",r),We("load",r);var c=!1,m=!1,p;for(p in l)if(l.hasOwnProperty(p)){var _=l[p];if(_!=null)switch(p){case"src":c=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:yt(r,i,p,_,l,null)}}m&&yt(r,i,"srcSet",l.srcSet,l,null),c&&yt(r,i,"src",l.src,l,null);return;case"input":We("invalid",r);var k=p=_=m=null,H=null,X=null;for(c in l)if(l.hasOwnProperty(c)){var te=l[c];if(te!=null)switch(c){case"name":m=te;break;case"type":_=te;break;case"checked":H=te;break;case"defaultChecked":X=te;break;case"value":p=te;break;case"defaultValue":k=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(a(137,i));break;default:yt(r,i,c,te,l,null)}}cp(r,p,k,H,X,_,m,!1);return;case"select":We("invalid",r),c=_=p=null;for(m in l)if(l.hasOwnProperty(m)&&(k=l[m],k!=null))switch(m){case"value":p=k;break;case"defaultValue":_=k;break;case"multiple":c=k;default:yt(r,i,m,k,l,null)}i=p,l=_,r.multiple=!!c,i!=null?Pi(r,!!c,i,!1):l!=null&&Pi(r,!!c,l,!0);return;case"textarea":We("invalid",r),p=m=c=null;for(_ in l)if(l.hasOwnProperty(_)&&(k=l[_],k!=null))switch(_){case"value":c=k;break;case"defaultValue":m=k;break;case"children":p=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(a(91));break;default:yt(r,i,_,k,l,null)}dp(r,c,m,p);return;case"option":for(H in l)if(l.hasOwnProperty(H)&&(c=l[H],c!=null))switch(H){case"selected":r.selected=c&&typeof c!="function"&&typeof c!="symbol";break;default:yt(r,i,H,c,l,null)}return;case"dialog":We("beforetoggle",r),We("toggle",r),We("cancel",r),We("close",r);break;case"iframe":case"object":We("load",r);break;case"video":case"audio":for(c=0;c<Ss.length;c++)We(Ss[c],r);break;case"image":We("error",r),We("load",r);break;case"details":We("toggle",r);break;case"embed":case"source":case"link":We("error",r),We("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(c=l[X],c!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:yt(r,i,X,c,l,null)}return;default:if(yf(i)){for(te in l)l.hasOwnProperty(te)&&(c=l[te],c!==void 0&&ah(r,i,te,c,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(c=l[k],c!=null&&yt(r,i,k,c,l,null))}function _S(r,i,l,c){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,p=null,_=null,k=null,H=null,X=null,te=null;for(W in l){var ue=l[W];if(l.hasOwnProperty(W)&&ue!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":H=ue;default:c.hasOwnProperty(W)||yt(r,i,W,null,c,ue)}}for(var Z in c){var W=c[Z];if(ue=l[Z],c.hasOwnProperty(Z)&&(W!=null||ue!=null))switch(Z){case"type":p=W;break;case"name":m=W;break;case"checked":X=W;break;case"defaultChecked":te=W;break;case"value":_=W;break;case"defaultValue":k=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,i));break;default:W!==ue&&yt(r,i,Z,W,c,ue)}}gf(r,_,k,H,X,te,p,m);return;case"select":W=_=k=Z=null;for(p in l)if(H=l[p],l.hasOwnProperty(p)&&H!=null)switch(p){case"value":break;case"multiple":W=H;default:c.hasOwnProperty(p)||yt(r,i,p,null,c,H)}for(m in c)if(p=c[m],H=l[m],c.hasOwnProperty(m)&&(p!=null||H!=null))switch(m){case"value":Z=p;break;case"defaultValue":k=p;break;case"multiple":_=p;default:p!==H&&yt(r,i,m,p,c,H)}i=k,l=_,c=W,Z!=null?Pi(r,!!l,Z,!1):!!c!=!!l&&(i!=null?Pi(r,!!l,i,!0):Pi(r,!!l,l?[]:"",!1));return;case"textarea":W=Z=null;for(k in l)if(m=l[k],l.hasOwnProperty(k)&&m!=null&&!c.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:yt(r,i,k,null,c,m)}for(_ in c)if(m=c[_],p=l[_],c.hasOwnProperty(_)&&(m!=null||p!=null))switch(_){case"value":Z=m;break;case"defaultValue":W=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==p&&yt(r,i,_,m,c,p)}fp(r,Z,W);return;case"option":for(var Ae in l)if(Z=l[Ae],l.hasOwnProperty(Ae)&&Z!=null&&!c.hasOwnProperty(Ae))switch(Ae){case"selected":r.selected=!1;break;default:yt(r,i,Ae,null,c,Z)}for(H in c)if(Z=c[H],W=l[H],c.hasOwnProperty(H)&&Z!==W&&(Z!=null||W!=null))switch(H){case"selected":r.selected=Z&&typeof Z!="function"&&typeof Z!="symbol";break;default:yt(r,i,H,Z,c,W)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ie in l)Z=l[Ie],l.hasOwnProperty(Ie)&&Z!=null&&!c.hasOwnProperty(Ie)&&yt(r,i,Ie,null,c,Z);for(X in c)if(Z=c[X],W=l[X],c.hasOwnProperty(X)&&Z!==W&&(Z!=null||W!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,i));break;default:yt(r,i,X,Z,c,W)}return;default:if(yf(i)){for(var Et in l)Z=l[Et],l.hasOwnProperty(Et)&&Z!==void 0&&!c.hasOwnProperty(Et)&&ah(r,i,Et,void 0,c,Z);for(te in c)Z=c[te],W=l[te],!c.hasOwnProperty(te)||Z===W||Z===void 0&&W===void 0||ah(r,i,te,Z,c,W);return}}for(var Y in l)Z=l[Y],l.hasOwnProperty(Y)&&Z!=null&&!c.hasOwnProperty(Y)&&yt(r,i,Y,null,c,Z);for(ue in c)Z=c[ue],W=l[ue],!c.hasOwnProperty(ue)||Z===W||Z==null&&W==null||yt(r,i,ue,Z,c,W)}function pb(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function vS(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),c=0;c<l.length;c++){var m=l[c],p=m.transferSize,_=m.initiatorType,k=m.duration;if(p&&k&&pb(_)){for(_=0,k=m.responseEnd,c+=1;c<l.length;c++){var H=l[c],X=H.startTime;if(X>k)break;var te=H.transferSize,ue=H.initiatorType;te&&pb(ue)&&(H=H.responseEnd,_+=te*(H<k?1:(k-X)/(H-X)))}if(--c,i+=8*(p+_)/(m.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var ih=null,lh=null;function Co(r){return r.nodeType===9?r:r.ownerDocument}function gb(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function bb(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function sh(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var uh=null;function SS(){var r=window.event;return r&&r.type==="popstate"?r===uh?!1:(uh=r,!0):(uh=null,!1)}var yb=typeof setTimeout=="function"?setTimeout:void 0,kS=typeof clearTimeout=="function"?clearTimeout:void 0,Eb=typeof Promise=="function"?Promise:void 0,AS=typeof queueMicrotask=="function"?queueMicrotask:typeof Eb<"u"?function(r){return Eb.resolve(null).then(r).catch(CS)}:yb;function CS(r){setTimeout(function(){throw r})}function va(r){return r==="head"}function xb(r,i){var l=i,c=0;do{var m=l.nextSibling;if(r.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"||l==="/&"){if(c===0){r.removeChild(m),yl(i);return}c--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")c++;else if(l==="html")As(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,As(l);for(var p=l.firstChild;p;){var _=p.nextSibling,k=p.nodeName;p[Yl]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&p.rel.toLowerCase()==="stylesheet"||l.removeChild(p),p=_}}else l==="body"&&As(r.ownerDocument.body);l=m}while(l);yl(i)}function Tb(r,i){var l=r;r=0;do{var c=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),c&&c.nodeType===8)if(l=c.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=c}while(l)}function oh(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":oh(l),mf(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function NS(r,i,l,c){for(;r.nodeType===1;){var m=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!c&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(c){if(!r[Yl])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(p=r.getAttribute("rel"),p==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(p!==m.rel||r.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||r.getAttribute("title")!==(m.title==null?null:m.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(p=r.getAttribute("src"),(p!==(m.src==null?null:m.src)||r.getAttribute("type")!==(m.type==null?null:m.type)||r.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&p&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var p=m.name==null?null:""+m.name;if(m.type==="hidden"&&r.getAttribute("name")===p)return r}else return r;if(r=er(r.nextSibling),r===null)break}return null}function wS(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=er(r.nextSibling),r===null))return null;return r}function _b(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=er(r.nextSibling),r===null))return null;return r}function ch(r){return r.data==="$?"||r.data==="$~"}function fh(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function RS(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var c=function(){i(),l.removeEventListener("DOMContentLoaded",c)};l.addEventListener("DOMContentLoaded",c),r._reactRetry=c}}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==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var dh=null;function vb(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return er(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function Sb(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function kb(r,i,l){switch(i=Co(l),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function As(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);mf(r)}var tr=new Map,Ab=new Set;function No(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Gr=ne.d;ne.d={f:OS,r:LS,D:DS,C:IS,L:MS,m:BS,X:HS,S:zS,M:US};function OS(){var r=Gr.f(),i=Eo();return r||i}function LS(r){var i=zi(r);i!==null&&i.tag===5&&i.type==="form"?q1(i):Gr.r(r)}var pl=typeof document>"u"?null:document;function Cb(r,i,l){var c=pl;if(c&&typeof i=="string"&&i){var m=Gn(i);m='link[rel="'+r+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),Ab.has(m)||(Ab.add(m),r={rel:r,crossOrigin:l,href:i},c.querySelector(m)===null&&(i=c.createElement("link"),sn(i,"link",r),Wt(i),c.head.appendChild(i)))}}function DS(r){Gr.D(r),Cb("dns-prefetch",r,null)}function IS(r,i){Gr.C(r,i),Cb("preconnect",r,i)}function MS(r,i,l){Gr.L(r,i,l);var c=pl;if(c&&r&&i){var m='link[rel="preload"][as="'+Gn(i)+'"]';i==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+Gn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+Gn(l.imageSizes)+'"]')):m+='[href="'+Gn(r)+'"]';var p=m;switch(i){case"style":p=gl(r);break;case"script":p=bl(r)}tr.has(p)||(r=g({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),tr.set(p,r),c.querySelector(m)!==null||i==="style"&&c.querySelector(Cs(p))||i==="script"&&c.querySelector(Ns(p))||(i=c.createElement("link"),sn(i,"link",r),Wt(i),c.head.appendChild(i)))}}function BS(r,i){Gr.m(r,i);var l=pl;if(l&&r){var c=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+Gn(c)+'"][href="'+Gn(r)+'"]',p=m;switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":p=bl(r)}if(!tr.has(p)&&(r=g({rel:"modulepreload",href:r},i),tr.set(p,r),l.querySelector(m)===null)){switch(c){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Ns(p)))return}c=l.createElement("link"),sn(c,"link",r),Wt(c),l.head.appendChild(c)}}}function zS(r,i,l){Gr.S(r,i,l);var c=pl;if(c&&r){var m=Hi(c).hoistableStyles,p=gl(r);i=i||"default";var _=m.get(p);if(!_){var k={loading:0,preload:null};if(_=c.querySelector(Cs(p)))k.loading=5;else{r=g({rel:"stylesheet",href:r,"data-precedence":i},l),(l=tr.get(p))&&hh(r,l);var H=_=c.createElement("link");Wt(H),sn(H,"link",r),H._p=new Promise(function(X,te){H.onload=X,H.onerror=te}),H.addEventListener("load",function(){k.loading|=1}),H.addEventListener("error",function(){k.loading|=2}),k.loading|=4,wo(_,i,c)}_={type:"stylesheet",instance:_,count:1,state:k},m.set(p,_)}}}function HS(r,i){Gr.X(r,i);var l=pl;if(l&&r){var c=Hi(l).hoistableScripts,m=bl(r),p=c.get(m);p||(p=l.querySelector(Ns(m)),p||(r=g({src:r,async:!0},i),(i=tr.get(m))&&mh(r,i),p=l.createElement("script"),Wt(p),sn(p,"link",r),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(m,p))}}function US(r,i){Gr.M(r,i);var l=pl;if(l&&r){var c=Hi(l).hoistableScripts,m=bl(r),p=c.get(m);p||(p=l.querySelector(Ns(m)),p||(r=g({src:r,async:!0,type:"module"},i),(i=tr.get(m))&&mh(r,i),p=l.createElement("script"),Wt(p),sn(p,"link",r),l.head.appendChild(p)),p={type:"script",instance:p,count:1,state:null},c.set(m,p))}}function Nb(r,i,l,c){var m=(m=ie.current)?No(m):null;if(!m)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=gl(l.href),l=Hi(m).hoistableStyles,c=l.get(i),c||(c={type:"style",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=gl(l.href);var p=Hi(m).hoistableStyles,_=p.get(r);if(_||(m=m.ownerDocument||m,_={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},p.set(r,_),(p=m.querySelector(Cs(r)))&&!p._p&&(_.instance=p,_.state.loading=5),tr.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},tr.set(r,l),p||PS(m,r,l,_.state))),i&&c===null)throw Error(a(528,""));return _}if(i&&c!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=bl(l),l=Hi(m).hoistableScripts,c=l.get(i),c||(c={type:"script",instance:null,count:0,state:null},l.set(i,c)),c):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function gl(r){return'href="'+Gn(r)+'"'}function Cs(r){return'link[rel="stylesheet"]['+r+"]"}function wb(r){return g({},r,{"data-precedence":r.precedence,precedence:null})}function PS(r,i,l,c){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?c.loading=1:(i=r.createElement("link"),c.preload=i,i.addEventListener("load",function(){return c.loading|=1}),i.addEventListener("error",function(){return c.loading|=2}),sn(i,"link",l),Wt(i),r.head.appendChild(i))}function bl(r){return'[src="'+Gn(r)+'"]'}function Ns(r){return"script[async]"+r}function Rb(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var c=r.querySelector('style[data-href~="'+Gn(l.href)+'"]');if(c)return i.instance=c,Wt(c),c;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return c=(r.ownerDocument||r).createElement("style"),Wt(c),sn(c,"style",m),wo(c,l.precedence,r),i.instance=c;case"stylesheet":m=gl(l.href);var p=r.querySelector(Cs(m));if(p)return i.state.loading|=4,i.instance=p,Wt(p),p;c=wb(l),(m=tr.get(m))&&hh(c,m),p=(r.ownerDocument||r).createElement("link"),Wt(p);var _=p;return _._p=new Promise(function(k,H){_.onload=k,_.onerror=H}),sn(p,"link",c),i.state.loading|=4,wo(p,l.precedence,r),i.instance=p;case"script":return p=bl(l.src),(m=r.querySelector(Ns(p)))?(i.instance=m,Wt(m),m):(c=l,(m=tr.get(p))&&(c=g({},l),mh(c,m)),r=r.ownerDocument||r,m=r.createElement("script"),Wt(m),sn(m,"link",c),r.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(c=i.instance,i.state.loading|=4,wo(c,l.precedence,r));return i.instance}function wo(r,i,l){for(var c=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=c.length?c[c.length-1]:null,p=m,_=0;_<c.length;_++){var k=c[_];if(k.dataset.precedence===i)p=k;else if(p!==m)break}p?p.parentNode.insertBefore(r,p.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function hh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function mh(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Ro=null;function Ob(r,i,l){if(Ro===null){var c=new Map,m=Ro=new Map;m.set(l,c)}else m=Ro,c=m.get(l),c||(c=new Map,m.set(l,c));if(c.has(r))return c;for(c.set(r,null),l=l.getElementsByTagName(r),m=0;m<l.length;m++){var p=l[m];if(!(p[Yl]||p[nn]||r==="link"&&p.getAttribute("rel")==="stylesheet")&&p.namespaceURI!=="http://www.w3.org/2000/svg"){var _=p.getAttribute(i)||"";_=r+_;var k=c.get(_);k?k.push(p):c.set(_,[p])}}return c}function Lb(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function jS(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Db(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function FS(r,i,l,c){if(l.type==="stylesheet"&&(typeof c.media!="string"||matchMedia(c.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var m=gl(c.href),p=i.querySelector(Cs(m));if(p){i=p._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Oo.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=p,Wt(p);return}p=i.ownerDocument||i,c=wb(c),(m=tr.get(m))&&hh(c,m),p=p.createElement("link"),Wt(p);var _=p;_._p=new Promise(function(k,H){_.onload=k,_.onerror=H}),sn(p,"link",c),l.instance=p}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Oo.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var ph=0;function qS(r,i){return r.stylesheets&&r.count===0&&Do(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var c=setTimeout(function(){if(r.stylesheets&&Do(r,r.stylesheets),r.unsuspend){var p=r.unsuspend;r.unsuspend=null,p()}},6e4+i);0<r.imgBytes&&ph===0&&(ph=62500*vS());var m=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Do(r,r.stylesheets),r.unsuspend)){var p=r.unsuspend;r.unsuspend=null,p()}},(r.imgBytes>ph?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(c),clearTimeout(m)}}:null}function Oo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Do(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Lo=null;function Do(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Lo=new Map,i.forEach(YS,r),Lo=null,Oo.call(r))}function YS(r,i){if(!(i.state.loading&4)){var l=Lo.get(r);if(l)var c=l.get(null);else{l=new Map,Lo.set(r,l);for(var m=r.querySelectorAll("link[data-precedence],style[data-precedence]"),p=0;p<m.length;p++){var _=m[p];(_.nodeName==="LINK"||_.getAttribute("media")!=="not all")&&(l.set(_.dataset.precedence,_),c=_)}c&&l.set(null,c)}m=i.instance,_=m.getAttribute("data-precedence"),p=l.get(_)||c,p===c&&l.set(null,m),l.set(_,m),this.count++,c=Oo.bind(this),m.addEventListener("load",c),m.addEventListener("error",c),p?p.parentNode.insertBefore(m,p.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(m,r.firstChild)),i.state.loading|=4}}var ws={$$typeof:U,Provider:null,Consumer:null,_currentValue:xe,_currentValue2:xe,_threadCount:0};function $S(r,i,l,c,m,p,_,k,H){this.tag=1,this.containerInfo=r,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=cf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cf(0),this.hiddenUpdates=cf(null),this.identifierPrefix=c,this.onUncaughtError=m,this.onCaughtError=p,this.onRecoverableError=_,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=H,this.incompleteTransitions=new Map}function Ib(r,i,l,c,m,p,_,k,H,X,te,ue){return r=new $S(r,i,l,_,H,X,te,ue,k),i=1,p===!0&&(i|=24),p=In(3,null,null,i),r.current=p,p.stateNode=r,i=Qf(),i.refCount++,r.pooledCache=i,i.refCount++,p.memoizedState={element:c,isDehydrated:l,cache:i},Wf(p),r}function Mb(r){return r?(r=Qi,r):Qi}function Bb(r,i,l,c,m,p){m=Mb(m),c.context===null?c.context=m:c.pendingContext=m,c=da(i),c.payload={element:l},p=p===void 0?null:p,p!==null&&(c.callback=p),l=ha(r,c,i),l!==null&&(Nn(l,r,i),ss(l,r,i))}function zb(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function gh(r,i){zb(r,i),(r=r.alternate)&&zb(r,i)}function Hb(r){if(r.tag===13||r.tag===31){var i=Wa(r,67108864);i!==null&&Nn(i,r,67108864),gh(r,67108864)}}function Ub(r){if(r.tag===13||r.tag===31){var i=Un();i=ff(i);var l=Wa(r,i);l!==null&&Nn(l,r,i),gh(r,i)}}var Io=!0;function VS(r,i,l,c){var m=P.T;P.T=null;var p=ne.p;try{ne.p=2,bh(r,i,l,c)}finally{ne.p=p,P.T=m}}function GS(r,i,l,c){var m=P.T;P.T=null;var p=ne.p;try{ne.p=8,bh(r,i,l,c)}finally{ne.p=p,P.T=m}}function bh(r,i,l,c){if(Io){var m=yh(c);if(m===null)rh(r,i,c,Mo,l),jb(r,c);else if(XS(m,r,i,l,c))c.stopPropagation();else if(jb(r,c),i&4&&-1<QS.indexOf(r)){for(;m!==null;){var p=zi(m);if(p!==null)switch(p.tag){case 3:if(p=p.stateNode,p.current.memoizedState.isDehydrated){var _=Ga(p.pendingLanes);if(_!==0){var k=p;for(k.pendingLanes|=2,k.entangledLanes|=2;_;){var H=1<<31-vt(_);k.entanglements[1]|=H,_&=~H}xr(p),(dt&6)===0&&(bo=mn()+500,vs(0))}}break;case 31:case 13:k=Wa(p,2),k!==null&&Nn(k,p,2),Eo(),gh(p,2)}if(p=yh(c),p===null&&rh(r,i,c,Mo,l),p===m)break;m=p}m!==null&&c.stopPropagation()}else rh(r,i,c,null,l)}}function yh(r){return r=xf(r),Eh(r)}var Mo=null;function Eh(r){if(Mo=null,r=Bi(r),r!==null){var i=u(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=o(i),r!==null)return r;r=null}else if(l===31){if(r=f(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Mo=r,null}function Pb(r){switch(r){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(of()){case re:return 2;case ye:return 8;case Me:case Ze:return 32;case ht:return 268435456;default:return 32}default:return 32}}var xh=!1,Sa=null,ka=null,Aa=null,Rs=new Map,Os=new Map,Ca=[],QS="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".split(" ");function jb(r,i){switch(r){case"focusin":case"focusout":Sa=null;break;case"dragenter":case"dragleave":ka=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":Rs.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Os.delete(i.pointerId)}}function Ls(r,i,l,c,m,p){return r===null||r.nativeEvent!==p?(r={blockedOn:i,domEventName:l,eventSystemFlags:c,nativeEvent:p,targetContainers:[m]},i!==null&&(i=zi(i),i!==null&&Hb(i)),r):(r.eventSystemFlags|=c,i=r.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),r)}function XS(r,i,l,c,m){switch(i){case"focusin":return Sa=Ls(Sa,r,i,l,c,m),!0;case"dragenter":return ka=Ls(ka,r,i,l,c,m),!0;case"mouseover":return Aa=Ls(Aa,r,i,l,c,m),!0;case"pointerover":var p=m.pointerId;return Rs.set(p,Ls(Rs.get(p)||null,r,i,l,c,m)),!0;case"gotpointercapture":return p=m.pointerId,Os.set(p,Ls(Os.get(p)||null,r,i,l,c,m)),!0}return!1}function Fb(r){var i=Bi(r.target);if(i!==null){var l=u(i);if(l!==null){if(i=l.tag,i===13){if(i=o(l),i!==null){r.blockedOn=i,np(r.priority,function(){Ub(l)});return}}else if(i===31){if(i=f(l),i!==null){r.blockedOn=i,np(r.priority,function(){Ub(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Bo(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=yh(r.nativeEvent);if(l===null){l=r.nativeEvent;var c=new l.constructor(l.type,l);Ef=c,l.target.dispatchEvent(c),Ef=null}else return i=zi(l),i!==null&&Hb(i),r.blockedOn=l,!1;i.shift()}return!0}function qb(r,i,l){Bo(r)&&l.delete(i)}function ZS(){xh=!1,Sa!==null&&Bo(Sa)&&(Sa=null),ka!==null&&Bo(ka)&&(ka=null),Aa!==null&&Bo(Aa)&&(Aa=null),Rs.forEach(qb),Os.forEach(qb)}function zo(r,i){r.blockedOn===i&&(r.blockedOn=null,xh||(xh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,ZS)))}var Ho=null;function Yb(r){Ho!==r&&(Ho=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Ho===r&&(Ho=null);for(var i=0;i<r.length;i+=3){var l=r[i],c=r[i+1],m=r[i+2];if(typeof c!="function"){if(Eh(c||l)===null)continue;break}var p=zi(l);p!==null&&(r.splice(i,3),i-=3,yd(p,{pending:!0,data:m,method:l.method,action:c},c,m))}}))}function yl(r){function i(H){return zo(H,r)}Sa!==null&&zo(Sa,r),ka!==null&&zo(ka,r),Aa!==null&&zo(Aa,r),Rs.forEach(i),Os.forEach(i);for(var l=0;l<Ca.length;l++){var c=Ca[l];c.blockedOn===r&&(c.blockedOn=null)}for(;0<Ca.length&&(l=Ca[0],l.blockedOn===null);)Fb(l),l.blockedOn===null&&Ca.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(c=0;c<l.length;c+=3){var m=l[c],p=l[c+1],_=m[_n]||null;if(typeof p=="function")_||Yb(l);else if(_){var k=null;if(p&&p.hasAttribute("formAction")){if(m=p,_=p[_n]||null)k=_.formAction;else if(Eh(m)!==null)continue}else k=_.action;typeof k=="function"?l[c+1]=k:(l.splice(c,3),c-=3),Yb(l)}}}function $b(){function r(p){p.canIntercept&&p.info==="react-transition"&&p.intercept({handler:function(){return new Promise(function(_){return m=_})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),c||setTimeout(l,20)}function l(){if(!c&&!navigation.transition){var p=navigation.currentEntry;p&&p.url!=null&&navigation.navigate(p.url,{state:p.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var c=!1,m=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){c=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function Th(r){this._internalRoot=r}Uo.prototype.render=Th.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,c=Un();Bb(l,c,r,i,null,null)},Uo.prototype.unmount=Th.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;Bb(r.current,2,null,r,null,null),Eo(),i[Mi]=null}};function Uo(r){this._internalRoot=r}Uo.prototype.unstable_scheduleHydration=function(r){if(r){var i=tp();r={blockedOn:null,target:r,priority:i};for(var l=0;l<Ca.length&&i!==0&&i<Ca[l].priority;l++);Ca.splice(l,0,r),l===0&&Fb(r)}};var Vb=t.version;if(Vb!=="19.2.7")throw Error(a(527,Vb,"19.2.7"));ne.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=h(i),r=r!==null?b(r):null,r=r===null?null:r.stateNode,r};var KS={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:P,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Po=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Po.isDisabled&&Po.supportsFiber)try{pn=Po.inject(KS),Xt=Po}catch{}}return Is.createRoot=function(r,i){if(!s(r))throw Error(a(299));var l=!1,c="",m=J1,p=eg,_=tg;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(p=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError)),i=Ib(r,1,!1,null,null,l,c,null,m,p,_,$b),r[Mi]=i.current,nh(r),new Th(i)},Is.hydrateRoot=function(r,i,l){if(!s(r))throw Error(a(299));var c=!1,m="",p=J1,_=eg,k=tg,H=null;return l!=null&&(l.unstable_strictMode===!0&&(c=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(p=l.onUncaughtError),l.onCaughtError!==void 0&&(_=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(H=l.formState)),i=Ib(r,1,!0,i,l??null,c,m,H,p,_,k,$b),i.context=Mb(null),l=i.current,c=Un(),c=ff(c),m=da(c),m.callback=null,ha(l,m,c),l=c,i.current.lanes=l,ql(i,l),xr(i),r[Mi]=i.current,nh(r),new Uo(i)},Is.version="19.2.7",Is}var ny;function ck(){if(ny)return Sh.exports;ny=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(),Sh.exports=ok(),Sh.exports}var fk=ck(),ut;(function(e){e.assertEqual=s=>{};function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const u={};for(const o of s)u[o]=o;return u},e.getValidEnumValues=s=>{const u=e.objectKeys(s).filter(f=>typeof s[s[f]]!="number"),o={};for(const f of u)o[f]=s[f];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(u){return s[u]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const u=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&u.push(o);return u},e.find=(s,u)=>{for(const o of s)if(u(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function a(s,u=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(u)}e.joinValues=a,e.jsonStringifyReplacer=(s,u)=>typeof u=="bigint"?u.toString():u})(ut||(ut={}));var ry;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(ry||(ry={}));const Ce=ut.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Da=e=>{switch(typeof e){case"undefined":return Ce.undefined;case"string":return Ce.string;case"number":return Number.isNaN(e)?Ce.nan:Ce.number;case"boolean":return Ce.boolean;case"function":return Ce.function;case"bigint":return Ce.bigint;case"symbol":return Ce.symbol;case"object":return Array.isArray(e)?Ce.array:e===null?Ce.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Ce.promise:typeof Map<"u"&&e instanceof Map?Ce.map:typeof Set<"u"&&e instanceof Set?Ce.set:typeof Date<"u"&&e instanceof Date?Ce.date:Ce.object;default:return Ce.unknown}},be=ut.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class Jr extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(u){return u.message},a={_errors:[]},s=u=>{for(const o of u.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)a._errors.push(n(o));else{let f=a,d=0;for(;d<o.path.length;){const h=o.path[d];d===o.path.length-1?(f[h]=f[h]||{_errors:[]},f[h]._errors.push(n(o))):f[h]=f[h]||{_errors:[]},f=f[h],d++}}};return s(this),a}static assert(t){if(!(t instanceof Jr))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,ut.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},a=[];for(const s of this.issues)if(s.path.length>0){const u=s.path[0];n[u]=n[u]||[],n[u].push(t(s))}else a.push(t(s));return{formErrors:a,fieldErrors:n}}get formErrors(){return this.flatten()}}Jr.create=e=>new Jr(e);const fm=(e,t)=>{let n;switch(e.code){case be.invalid_type:e.received===Ce.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case be.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,ut.jsonStringifyReplacer)}`;break;case be.unrecognized_keys:n=`Unrecognized key(s) in object: ${ut.joinValues(e.keys,", ")}`;break;case be.invalid_union:n="Invalid input";break;case be.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${ut.joinValues(e.options)}`;break;case be.invalid_enum_value:n=`Invalid enum value. Expected ${ut.joinValues(e.options)}, received '${e.received}'`;break;case be.invalid_arguments:n="Invalid function arguments";break;case be.invalid_return_type:n="Invalid function return type";break;case be.invalid_date:n="Invalid date";break;case be.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:ut.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case be.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="bigint"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case be.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case be.custom:n="Invalid input";break;case be.invalid_intersection_types:n="Intersection results could not be merged";break;case be.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case be.not_finite:n="Number must be finite";break;default:n=t.defaultError,ut.assertNever(e)}return{message:n}};let dk=fm;function hk(){return dk}const mk=e=>{const{data:t,path:n,errorMaps:a,issueData:s}=e,u=[...n,...s.path||[]],o={...s,path:u};if(s.message!==void 0)return{...s,path:u,message:s.message};let f="";const d=a.filter(h=>!!h).slice().reverse();for(const h of d)f=h(o,{data:t,defaultError:f}).message;return{...s,path:u,message:f}};function ve(e,t){const n=hk(),a=mk({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===fm?void 0:fm].filter(s=>!!s)});e.common.issues.push(a)}class qn{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const a=[];for(const s of n){if(s.status==="aborted")return Be;s.status==="dirty"&&t.dirty(),a.push(s.value)}return{status:t.value,value:a}}static async mergeObjectAsync(t,n){const a=[];for(const s of n){const u=await s.key,o=await s.value;a.push({key:u,value:o})}return qn.mergeObjectSync(t,a)}static mergeObjectSync(t,n){const a={};for(const s of n){const{key:u,value:o}=s;if(u.status==="aborted"||o.status==="aborted")return Be;u.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),u.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(a[u.value]=o.value)}return{status:t.value,value:a}}}const Be=Object.freeze({status:"aborted"}),$s=e=>({status:"dirty",value:e}),ir=e=>({status:"valid",value:e}),ay=e=>e.status==="aborted",iy=e=>e.status==="dirty",wl=e=>e.status==="valid",ic=e=>typeof Promise<"u"&&e instanceof Promise;var Re;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(Re||(Re={}));class Ua{constructor(t,n,a,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const ly=(e,t)=>{if(wl(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Jr(e.common.issues);return this._error=n,this._error}}};function Ge(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:a,description:s}=e;if(t&&(n||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,f)=>{const{message:d}=e;return o.code==="invalid_enum_value"?{message:d??f.defaultError}:typeof f.data>"u"?{message:d??a??f.defaultError}:o.code!=="invalid_type"?{message:f.defaultError}:{message:d??n??f.defaultError}},description:s}}class lt{get description(){return this._def.description}_getType(t){return Da(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Da(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new qn,ctx:{common:t.parent.common,data:t.data,parsedType:Da(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(ic(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const a=this.safeParse(t,n);if(a.success)return a.data;throw a.error}safeParse(t,n){const a={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)},s=this._parseSync({data:t,path:a.path,parent:a});return ly(a,s)}"~validate"(t){var a,s;const n={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)};if(!this["~standard"].async)try{const u=this._parseSync({data:t,path:[],parent:n});return wl(u)?{value:u.value}:{issues:n.common.issues}}catch(u){(s=(a=u==null?void 0:u.message)==null?void 0:a.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:n}).then(u=>wl(u)?{value:u.value}:{issues:n.common.issues})}async parseAsync(t,n){const a=await this.safeParseAsync(t,n);if(a.success)return a.data;throw a.error}async safeParseAsync(t,n){const a={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Da(t)},s=this._parse({data:t,path:a.path,parent:a}),u=await(ic(s)?s:Promise.resolve(s));return ly(a,u)}refine(t,n){const a=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,u)=>{const o=t(s),f=()=>u.addIssue({code:be.custom,...a(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(d=>d?!0:(f(),!1)):o?!0:(f(),!1)})}refinement(t,n){return this._refinement((a,s)=>t(a)?!0:(s.addIssue(typeof n=="function"?n(a,s):n),!1))}_refinement(t){return new Si({schema:this,typeName:He.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:n=>this["~validate"](n)}}optional(){return Wr.create(this,this._def)}nullable(){return ki.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return kr.create(this)}promise(){return cc.create(this,this._def)}or(t){return sc.create([this,t],this._def)}and(t){return uc.create(this,t,this._def)}transform(t){return new Si({...Ge(this._def),schema:this,typeName:He.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new fc({...Ge(this._def),innerType:this,defaultValue:n,typeName:He.ZodDefault})}brand(){return new Bx({typeName:He.ZodBranded,type:this,...Ge(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new dc({...Ge(this._def),innerType:this,catchValue:n,typeName:He.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Km.create(this,t)}readonly(){return hc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const pk=/^c[^\s-]{8,}$/i,gk=/^[0-9a-z]+$/,bk=/^[0-9A-HJKMNP-TV-Z]{26}$/i,yk=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ek=/^[a-z0-9_-]{21}$/i,xk=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Tk=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,_k=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,vk="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let Nh;const Sk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,kk=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Ak=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ck=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Nk=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,wk=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Dx="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Rk=new RegExp(`^${Dx}$`);function Ix(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`);const n=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Ok(e){return new RegExp(`^${Ix(e)}$`)}function Lk(e){let t=`${Dx}T${Ix(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function Dk(e,t){return!!((t==="v4"||!t)&&Sk.test(e)||(t==="v6"||!t)&&Ak.test(e))}function Ik(e,t){if(!xk.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const a=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(a));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||t&&s.alg!==t)}catch{return!1}}function Mk(e,t){return!!((t==="v4"||!t)&&kk.test(e)||(t==="v6"||!t)&&Ck.test(e))}class za extends lt{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Ce.string){const u=this._getOrReturnCtx(t);return ve(u,{code:be.invalid_type,expected:Ce.string,received:u.parsedType}),Be}const a=new qn;let s;for(const u of this._def.checks)if(u.kind==="min")t.data.length<u.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:be.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),a.dirty());else if(u.kind==="max")t.data.length>u.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:be.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),a.dirty());else if(u.kind==="length"){const o=t.data.length>u.value,f=t.data.length<u.value;(o||f)&&(s=this._getOrReturnCtx(t,s),o?ve(s,{code:be.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}):f&&ve(s,{code:be.too_small,minimum:u.value,type:"string",inclusive:!0,exact:!0,message:u.message}),a.dirty())}else if(u.kind==="email")_k.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"email",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="emoji")Nh||(Nh=new RegExp(vk,"u")),Nh.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"emoji",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="uuid")yk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"uuid",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="nanoid")Ek.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"nanoid",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="cuid")pk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="cuid2")gk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cuid2",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="ulid")bk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ulid",code:be.invalid_string,message:u.message}),a.dirty());else if(u.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),ve(s,{validation:"url",code:be.invalid_string,message:u.message}),a.dirty()}else u.kind==="regex"?(u.regex.lastIndex=0,u.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"regex",code:be.invalid_string,message:u.message}),a.dirty())):u.kind==="trim"?t.data=t.data.trim():u.kind==="includes"?t.data.includes(u.value,u.position)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:{includes:u.value,position:u.position},message:u.message}),a.dirty()):u.kind==="toLowerCase"?t.data=t.data.toLowerCase():u.kind==="toUpperCase"?t.data=t.data.toUpperCase():u.kind==="startsWith"?t.data.startsWith(u.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:{startsWith:u.value},message:u.message}),a.dirty()):u.kind==="endsWith"?t.data.endsWith(u.value)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:{endsWith:u.value},message:u.message}),a.dirty()):u.kind==="datetime"?Lk(u).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:"datetime",message:u.message}),a.dirty()):u.kind==="date"?Rk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:"date",message:u.message}),a.dirty()):u.kind==="time"?Ok(u).test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{code:be.invalid_string,validation:"time",message:u.message}),a.dirty()):u.kind==="duration"?Tk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"duration",code:be.invalid_string,message:u.message}),a.dirty()):u.kind==="ip"?Dk(t.data,u.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"ip",code:be.invalid_string,message:u.message}),a.dirty()):u.kind==="jwt"?Ik(t.data,u.alg)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"jwt",code:be.invalid_string,message:u.message}),a.dirty()):u.kind==="cidr"?Mk(t.data,u.version)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"cidr",code:be.invalid_string,message:u.message}),a.dirty()):u.kind==="base64"?Nk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64",code:be.invalid_string,message:u.message}),a.dirty()):u.kind==="base64url"?wk.test(t.data)||(s=this._getOrReturnCtx(t,s),ve(s,{validation:"base64url",code:be.invalid_string,message:u.message}),a.dirty()):ut.assertNever(u);return{status:a.value,value:t.data}}_regex(t,n,a){return this.refinement(s=>t.test(s),{validation:n,code:be.invalid_string,...Re.errToObj(a)})}_addCheck(t){return new za({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...Re.errToObj(t)})}url(t){return this._addCheck({kind:"url",...Re.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...Re.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...Re.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...Re.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...Re.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...Re.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...Re.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...Re.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...Re.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...Re.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...Re.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...Re.errToObj(t)})}datetime(t){return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(t==null?void 0:t.offset)??!1,local:(t==null?void 0:t.local)??!1,...Re.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...Re.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...Re.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...Re.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...Re.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...Re.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...Re.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...Re.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...Re.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...Re.errToObj(n)})}nonempty(t){return this.min(1,Re.errToObj(t))}trim(){return new za({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new za({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}za.create=e=>new za({checks:[],typeName:He.ZodString,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});function Bk(e,t){const n=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=n>a?n:a,u=Number.parseInt(e.toFixed(s).replace(".","")),o=Number.parseInt(t.toFixed(s).replace(".",""));return u%o/10**s}class Rl extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Ce.number){const u=this._getOrReturnCtx(t);return ve(u,{code:be.invalid_type,expected:Ce.number,received:u.parsedType}),Be}let a;const s=new qn;for(const u of this._def.checks)u.kind==="int"?ut.isInteger(t.data)||(a=this._getOrReturnCtx(t,a),ve(a,{code:be.invalid_type,expected:"integer",received:"float",message:u.message}),s.dirty()):u.kind==="min"?(u.inclusive?t.data<u.value:t.data<=u.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.too_small,minimum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),s.dirty()):u.kind==="max"?(u.inclusive?t.data>u.value:t.data>=u.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.too_big,maximum:u.value,type:"number",inclusive:u.inclusive,exact:!1,message:u.message}),s.dirty()):u.kind==="multipleOf"?Bk(t.data,u.value)!==0&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.not_multiple_of,multipleOf:u.value,message:u.message}),s.dirty()):u.kind==="finite"?Number.isFinite(t.data)||(a=this._getOrReturnCtx(t,a),ve(a,{code:be.not_finite,message:u.message}),s.dirty()):ut.assertNever(u);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,a,s){return new Rl({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Re.toString(s)}]})}_addCheck(t){return new Rl({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:Re.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:Re.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&ut.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(n===null||a.value>n)&&(n=a.value):a.kind==="max"&&(t===null||a.value<t)&&(t=a.value)}return Number.isFinite(n)&&Number.isFinite(t)}}Rl.create=e=>new Rl({checks:[],typeName:He.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class uu extends lt{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Ce.bigint)return this._getInvalidInput(t);let a;const s=new qn;for(const u of this._def.checks)u.kind==="min"?(u.inclusive?t.data<u.value:t.data<=u.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.too_small,type:"bigint",minimum:u.value,inclusive:u.inclusive,message:u.message}),s.dirty()):u.kind==="max"?(u.inclusive?t.data>u.value:t.data>=u.value)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.too_big,type:"bigint",maximum:u.value,inclusive:u.inclusive,message:u.message}),s.dirty()):u.kind==="multipleOf"?t.data%u.value!==BigInt(0)&&(a=this._getOrReturnCtx(t,a),ve(a,{code:be.not_multiple_of,multipleOf:u.value,message:u.message}),s.dirty()):ut.assertNever(u);return{status:s.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return ve(n,{code:be.invalid_type,expected:Ce.bigint,received:n.parsedType}),Be}gte(t,n){return this.setLimit("min",t,!0,Re.toString(n))}gt(t,n){return this.setLimit("min",t,!1,Re.toString(n))}lte(t,n){return this.setLimit("max",t,!0,Re.toString(n))}lt(t,n){return this.setLimit("max",t,!1,Re.toString(n))}setLimit(t,n,a,s){return new uu({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:a,message:Re.toString(s)}]})}_addCheck(t){return new uu({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:Re.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}uu.create=e=>new uu({checks:[],typeName:He.ZodBigInt,coerce:(e==null?void 0:e.coerce)??!1,...Ge(e)});class dm extends lt{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Ce.boolean){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.boolean,received:a.parsedType}),Be}return ir(t.data)}}dm.create=e=>new dm({typeName:He.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Ge(e)});class lc extends lt{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Ce.date){const u=this._getOrReturnCtx(t);return ve(u,{code:be.invalid_type,expected:Ce.date,received:u.parsedType}),Be}if(Number.isNaN(t.data.getTime())){const u=this._getOrReturnCtx(t);return ve(u,{code:be.invalid_date}),Be}const a=new qn;let s;for(const u of this._def.checks)u.kind==="min"?t.data.getTime()<u.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:be.too_small,message:u.message,inclusive:!0,exact:!1,minimum:u.value,type:"date"}),a.dirty()):u.kind==="max"?t.data.getTime()>u.value&&(s=this._getOrReturnCtx(t,s),ve(s,{code:be.too_big,message:u.message,inclusive:!0,exact:!1,maximum:u.value,type:"date"}),a.dirty()):ut.assertNever(u);return{status:a.value,value:new Date(t.data.getTime())}}_addCheck(t){return new lc({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:Re.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:Re.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}lc.create=e=>new lc({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:He.ZodDate,...Ge(e)});class sy extends lt{_parse(t){if(this._getType(t)!==Ce.symbol){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.symbol,received:a.parsedType}),Be}return ir(t.data)}}sy.create=e=>new sy({typeName:He.ZodSymbol,...Ge(e)});class hm extends lt{_parse(t){if(this._getType(t)!==Ce.undefined){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.undefined,received:a.parsedType}),Be}return ir(t.data)}}hm.create=e=>new hm({typeName:He.ZodUndefined,...Ge(e)});class mm extends lt{_parse(t){if(this._getType(t)!==Ce.null){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.null,received:a.parsedType}),Be}return ir(t.data)}}mm.create=e=>new mm({typeName:He.ZodNull,...Ge(e)});class uy extends lt{constructor(){super(...arguments),this._any=!0}_parse(t){return ir(t.data)}}uy.create=e=>new uy({typeName:He.ZodAny,...Ge(e)});class pm extends lt{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ir(t.data)}}pm.create=e=>new pm({typeName:He.ZodUnknown,...Ge(e)});class Pa extends lt{_parse(t){const n=this._getOrReturnCtx(t);return ve(n,{code:be.invalid_type,expected:Ce.never,received:n.parsedType}),Be}}Pa.create=e=>new Pa({typeName:He.ZodNever,...Ge(e)});class oy extends lt{_parse(t){if(this._getType(t)!==Ce.undefined){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.void,received:a.parsedType}),Be}return ir(t.data)}}oy.create=e=>new oy({typeName:He.ZodVoid,...Ge(e)});class kr extends lt{_parse(t){const{ctx:n,status:a}=this._processInputParams(t),s=this._def;if(n.parsedType!==Ce.array)return ve(n,{code:be.invalid_type,expected:Ce.array,received:n.parsedType}),Be;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,f=n.data.length<s.exactLength.value;(o||f)&&(ve(n,{code:o?be.too_big:be.too_small,minimum:f?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(ve(n,{code:be.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(ve(n,{code:be.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),n.common.async)return Promise.all([...n.data].map((o,f)=>s.type._parseAsync(new Ua(n,o,n.path,f)))).then(o=>qn.mergeArray(a,o));const u=[...n.data].map((o,f)=>s.type._parseSync(new Ua(n,o,n.path,f)));return qn.mergeArray(a,u)}get element(){return this._def.type}min(t,n){return new kr({...this._def,minLength:{value:t,message:Re.toString(n)}})}max(t,n){return new kr({...this._def,maxLength:{value:t,message:Re.toString(n)}})}length(t,n){return new kr({...this._def,exactLength:{value:t,message:Re.toString(n)}})}nonempty(t){return this.min(1,t)}}kr.create=(e,t)=>new kr({type:e,minLength:null,maxLength:null,exactLength:null,typeName:He.ZodArray,...Ge(t)});function Tl(e){if(e instanceof Qt){const t={};for(const n in e.shape){const a=e.shape[n];t[n]=Wr.create(Tl(a))}return new Qt({...e._def,shape:()=>t})}else return e instanceof kr?new kr({...e._def,type:Tl(e.element)}):e instanceof Wr?Wr.create(Tl(e.unwrap())):e instanceof ki?ki.create(Tl(e.unwrap())):e instanceof _i?_i.create(e.items.map(t=>Tl(t))):e}class Qt extends lt{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=ut.objectKeys(t);return this._cached={shape:t,keys:n},this._cached}_parse(t){if(this._getType(t)!==Ce.object){const h=this._getOrReturnCtx(t);return ve(h,{code:be.invalid_type,expected:Ce.object,received:h.parsedType}),Be}const{status:a,ctx:s}=this._processInputParams(t),{shape:u,keys:o}=this._getCached(),f=[];if(!(this._def.catchall instanceof Pa&&this._def.unknownKeys==="strip"))for(const h in s.data)o.includes(h)||f.push(h);const d=[];for(const h of o){const b=u[h],g=s.data[h];d.push({key:{status:"valid",value:h},value:b._parse(new Ua(s,g,s.path,h)),alwaysSet:h in s.data})}if(this._def.catchall instanceof Pa){const h=this._def.unknownKeys;if(h==="passthrough")for(const b of f)d.push({key:{status:"valid",value:b},value:{status:"valid",value:s.data[b]}});else if(h==="strict")f.length>0&&(ve(s,{code:be.unrecognized_keys,keys:f}),a.dirty());else if(h!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const h=this._def.catchall;for(const b of f){const g=s.data[b];d.push({key:{status:"valid",value:b},value:h._parse(new Ua(s,g,s.path,b)),alwaysSet:b in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const h=[];for(const b of d){const g=await b.key,E=await b.value;h.push({key:g,value:E,alwaysSet:b.alwaysSet})}return h}).then(h=>qn.mergeObjectSync(a,h)):qn.mergeObjectSync(a,d)}get shape(){return this._def.shape()}strict(t){return Re.errToObj,new Qt({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,a)=>{var u,o;const s=((o=(u=this._def).errorMap)==null?void 0:o.call(u,n,a).message)??a.defaultError;return n.code==="unrecognized_keys"?{message:Re.errToObj(t).message??s}:{message:s}}}:{}})}strip(){return new Qt({...this._def,unknownKeys:"strip"})}passthrough(){return new Qt({...this._def,unknownKeys:"passthrough"})}extend(t){return new Qt({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Qt({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:He.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Qt({...this._def,catchall:t})}pick(t){const n={};for(const a of ut.objectKeys(t))t[a]&&this.shape[a]&&(n[a]=this.shape[a]);return new Qt({...this._def,shape:()=>n})}omit(t){const n={};for(const a of ut.objectKeys(this.shape))t[a]||(n[a]=this.shape[a]);return new Qt({...this._def,shape:()=>n})}deepPartial(){return Tl(this)}partial(t){const n={};for(const a of ut.objectKeys(this.shape)){const s=this.shape[a];t&&!t[a]?n[a]=s:n[a]=s.optional()}return new Qt({...this._def,shape:()=>n})}required(t){const n={};for(const a of ut.objectKeys(this.shape))if(t&&!t[a])n[a]=this.shape[a];else{let u=this.shape[a];for(;u instanceof Wr;)u=u._def.innerType;n[a]=u}return new Qt({...this._def,shape:()=>n})}keyof(){return Mx(ut.objectKeys(this.shape))}}Qt.create=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strip",catchall:Pa.create(),typeName:He.ZodObject,...Ge(t)});Qt.strictCreate=(e,t)=>new Qt({shape:()=>e,unknownKeys:"strict",catchall:Pa.create(),typeName:He.ZodObject,...Ge(t)});Qt.lazycreate=(e,t)=>new Qt({shape:e,unknownKeys:"strip",catchall:Pa.create(),typeName:He.ZodObject,...Ge(t)});class sc extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=this._def.options;function s(u){for(const f of u)if(f.result.status==="valid")return f.result;for(const f of u)if(f.result.status==="dirty")return n.common.issues.push(...f.ctx.common.issues),f.result;const o=u.map(f=>new Jr(f.ctx.common.issues));return ve(n,{code:be.invalid_union,unionErrors:o}),Be}if(n.common.async)return Promise.all(a.map(async u=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await u._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let u;const o=[];for(const d of a){const h={...n,common:{...n.common,issues:[]},parent:null},b=d._parseSync({data:n.data,path:n.path,parent:h});if(b.status==="valid")return b;b.status==="dirty"&&!u&&(u={result:b,ctx:h}),h.common.issues.length&&o.push(h.common.issues)}if(u)return n.common.issues.push(...u.ctx.common.issues),u.result;const f=o.map(d=>new Jr(d));return ve(n,{code:be.invalid_union,unionErrors:f}),Be}}get options(){return this._def.options}}sc.create=(e,t)=>new sc({options:e,typeName:He.ZodUnion,...Ge(t)});const Xr=e=>e instanceof bm?Xr(e.schema):e instanceof Si?Xr(e.innerType()):e instanceof oc?[e.value]:e instanceof vi?e.options:e instanceof ym?ut.objectValues(e.enum):e instanceof fc?Xr(e._def.innerType):e instanceof hm?[void 0]:e instanceof mm?[null]:e instanceof Wr?[void 0,...Xr(e.unwrap())]:e instanceof ki?[null,...Xr(e.unwrap())]:e instanceof Bx||e instanceof hc?Xr(e.unwrap()):e instanceof dc?Xr(e._def.innerType):[];class Zm extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.object)return ve(n,{code:be.invalid_type,expected:Ce.object,received:n.parsedType}),Be;const a=this.discriminator,s=n.data[a],u=this.optionsMap.get(s);return u?n.common.async?u._parseAsync({data:n.data,path:n.path,parent:n}):u._parseSync({data:n.data,path:n.path,parent:n}):(ve(n,{code:be.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),Be)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,a){const s=new Map;for(const u of n){const o=Xr(u.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const f of o){if(s.has(f))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(f)}`);s.set(f,u)}}return new Zm({typeName:He.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...Ge(a)})}}function gm(e,t){const n=Da(e),a=Da(t);if(e===t)return{valid:!0,data:e};if(n===Ce.object&&a===Ce.object){const s=ut.objectKeys(t),u=ut.objectKeys(e).filter(f=>s.indexOf(f)!==-1),o={...e,...t};for(const f of u){const d=gm(e[f],t[f]);if(!d.valid)return{valid:!1};o[f]=d.data}return{valid:!0,data:o}}else if(n===Ce.array&&a===Ce.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let u=0;u<e.length;u++){const o=e[u],f=t[u],d=gm(o,f);if(!d.valid)return{valid:!1};s.push(d.data)}return{valid:!0,data:s}}else return n===Ce.date&&a===Ce.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class uc extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=(u,o)=>{if(ay(u)||ay(o))return Be;const f=gm(u.value,o.value);return f.valid?((iy(u)||iy(o))&&n.dirty(),{status:n.value,value:f.data}):(ve(a,{code:be.invalid_intersection_types}),Be)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([u,o])=>s(u,o)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}uc.create=(e,t,n)=>new uc({left:e,right:t,typeName:He.ZodIntersection,...Ge(n)});class _i extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.array)return ve(a,{code:be.invalid_type,expected:Ce.array,received:a.parsedType}),Be;if(a.data.length<this._def.items.length)return ve(a,{code:be.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Be;!this._def.rest&&a.data.length>this._def.items.length&&(ve(a,{code:be.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const u=[...a.data].map((o,f)=>{const d=this._def.items[f]||this._def.rest;return d?d._parse(new Ua(a,o,a.path,f)):null}).filter(o=>!!o);return a.common.async?Promise.all(u).then(o=>qn.mergeArray(n,o)):qn.mergeArray(n,u)}get items(){return this._def.items}rest(t){return new _i({...this._def,rest:t})}}_i.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new _i({items:e,typeName:He.ZodTuple,rest:null,...Ge(t)})};class cy extends lt{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.map)return ve(a,{code:be.invalid_type,expected:Ce.map,received:a.parsedType}),Be;const s=this._def.keyType,u=this._def.valueType,o=[...a.data.entries()].map(([f,d],h)=>({key:s._parse(new Ua(a,f,a.path,[h,"key"])),value:u._parse(new Ua(a,d,a.path,[h,"value"]))}));if(a.common.async){const f=new Map;return Promise.resolve().then(async()=>{for(const d of o){const h=await d.key,b=await d.value;if(h.status==="aborted"||b.status==="aborted")return Be;(h.status==="dirty"||b.status==="dirty")&&n.dirty(),f.set(h.value,b.value)}return{status:n.value,value:f}})}else{const f=new Map;for(const d of o){const h=d.key,b=d.value;if(h.status==="aborted"||b.status==="aborted")return Be;(h.status==="dirty"||b.status==="dirty")&&n.dirty(),f.set(h.value,b.value)}return{status:n.value,value:f}}}}cy.create=(e,t,n)=>new cy({valueType:t,keyType:e,typeName:He.ZodMap,...Ge(n)});class ou extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.parsedType!==Ce.set)return ve(a,{code:be.invalid_type,expected:Ce.set,received:a.parsedType}),Be;const s=this._def;s.minSize!==null&&a.data.size<s.minSize.value&&(ve(a,{code:be.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&a.data.size>s.maxSize.value&&(ve(a,{code:be.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const u=this._def.valueType;function o(d){const h=new Set;for(const b of d){if(b.status==="aborted")return Be;b.status==="dirty"&&n.dirty(),h.add(b.value)}return{status:n.value,value:h}}const f=[...a.data.values()].map((d,h)=>u._parse(new Ua(a,d,a.path,h)));return a.common.async?Promise.all(f).then(d=>o(d)):o(f)}min(t,n){return new ou({...this._def,minSize:{value:t,message:Re.toString(n)}})}max(t,n){return new ou({...this._def,maxSize:{value:t,message:Re.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}ou.create=(e,t)=>new ou({valueType:e,minSize:null,maxSize:null,typeName:He.ZodSet,...Ge(t)});class bm extends lt{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}bm.create=(e,t)=>new bm({getter:e,typeName:He.ZodLazy,...Ge(t)});class oc extends lt{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return ve(n,{received:n.data,code:be.invalid_literal,expected:this._def.value}),Be}return{status:"valid",value:t.data}}get value(){return this._def.value}}oc.create=(e,t)=>new oc({value:e,typeName:He.ZodLiteral,...Ge(t)});function Mx(e,t){return new vi({values:e,typeName:He.ZodEnum,...Ge(t)})}class vi extends lt{_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),a=this._def.values;return ve(n,{expected:ut.joinValues(a),received:n.parsedType,code:be.invalid_type}),Be}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(t.data)){const n=this._getOrReturnCtx(t),a=this._def.values;return ve(n,{received:n.data,code:be.invalid_enum_value,options:a}),Be}return ir(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return vi.create(t,{...this._def,...n})}exclude(t,n=this._def){return vi.create(this.options.filter(a=>!t.includes(a)),{...this._def,...n})}}vi.create=Mx;class ym extends lt{_parse(t){const n=ut.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(t);if(a.parsedType!==Ce.string&&a.parsedType!==Ce.number){const s=ut.objectValues(n);return ve(a,{expected:ut.joinValues(s),received:a.parsedType,code:be.invalid_type}),Be}if(this._cache||(this._cache=new Set(ut.getValidEnumValues(this._def.values))),!this._cache.has(t.data)){const s=ut.objectValues(n);return ve(a,{received:a.data,code:be.invalid_enum_value,options:s}),Be}return ir(t.data)}get enum(){return this._def.values}}ym.create=(e,t)=>new ym({values:e,typeName:He.ZodNativeEnum,...Ge(t)});class cc extends lt{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Ce.promise&&n.common.async===!1)return ve(n,{code:be.invalid_type,expected:Ce.promise,received:n.parsedType}),Be;const a=n.parsedType===Ce.promise?n.data:Promise.resolve(n.data);return ir(a.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}cc.create=(e,t)=>new cc({type:e,typeName:He.ZodPromise,...Ge(t)});class Si extends lt{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===He.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:a}=this._processInputParams(t),s=this._def.effect||null,u={addIssue:o=>{ve(a,o),o.fatal?n.abort():n.dirty()},get path(){return a.path}};if(u.addIssue=u.addIssue.bind(u),s.type==="preprocess"){const o=s.transform(a.data,u);if(a.common.async)return Promise.resolve(o).then(async f=>{if(n.value==="aborted")return Be;const d=await this._def.schema._parseAsync({data:f,path:a.path,parent:a});return d.status==="aborted"?Be:d.status==="dirty"||n.value==="dirty"?$s(d.value):d});{if(n.value==="aborted")return Be;const f=this._def.schema._parseSync({data:o,path:a.path,parent:a});return f.status==="aborted"?Be:f.status==="dirty"||n.value==="dirty"?$s(f.value):f}}if(s.type==="refinement"){const o=f=>{const d=s.refinement(f,u);if(a.common.async)return Promise.resolve(d);if(d instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return f};if(a.common.async===!1){const f=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return f.status==="aborted"?Be:(f.status==="dirty"&&n.dirty(),o(f.value),{status:n.value,value:f.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(f=>f.status==="aborted"?Be:(f.status==="dirty"&&n.dirty(),o(f.value).then(()=>({status:n.value,value:f.value}))))}if(s.type==="transform")if(a.common.async===!1){const o=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!wl(o))return Be;const f=s.transform(o.value,u);if(f instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:f}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(o=>wl(o)?Promise.resolve(s.transform(o.value,u)).then(f=>({status:n.value,value:f})):Be);ut.assertNever(s)}}Si.create=(e,t,n)=>new Si({schema:e,typeName:He.ZodEffects,effect:t,...Ge(n)});Si.createWithPreprocess=(e,t,n)=>new Si({schema:t,effect:{type:"preprocess",transform:e},typeName:He.ZodEffects,...Ge(n)});class Wr extends lt{_parse(t){return this._getType(t)===Ce.undefined?ir(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Wr.create=(e,t)=>new Wr({innerType:e,typeName:He.ZodOptional,...Ge(t)});class ki extends lt{_parse(t){return this._getType(t)===Ce.null?ir(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}ki.create=(e,t)=>new ki({innerType:e,typeName:He.ZodNullable,...Ge(t)});class fc extends lt{_parse(t){const{ctx:n}=this._processInputParams(t);let a=n.data;return n.parsedType===Ce.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}fc.create=(e,t)=>new fc({innerType:e,typeName:He.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Ge(t)});class dc extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return ic(s)?s.then(u=>({status:"valid",value:u.status==="valid"?u.value:this._def.catchValue({get error(){return new Jr(a.common.issues)},input:a.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Jr(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}dc.create=(e,t)=>new dc({innerType:e,typeName:He.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Ge(t)});class fy extends lt{_parse(t){if(this._getType(t)!==Ce.nan){const a=this._getOrReturnCtx(t);return ve(a,{code:be.invalid_type,expected:Ce.nan,received:a.parsedType}),Be}return{status:"valid",value:t.data}}}fy.create=e=>new fy({typeName:He.ZodNaN,...Ge(e)});class Bx extends lt{_parse(t){const{ctx:n}=this._processInputParams(t),a=n.data;return this._def.type._parse({data:a,path:n.path,parent:n})}unwrap(){return this._def.type}}class Km extends lt{_parse(t){const{status:n,ctx:a}=this._processInputParams(t);if(a.common.async)return(async()=>{const u=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return u.status==="aborted"?Be:u.status==="dirty"?(n.dirty(),$s(u.value)):this._def.out._parseAsync({data:u.value,path:a.path,parent:a})})();{const s=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return s.status==="aborted"?Be:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:a.path,parent:a})}}static create(t,n){return new Km({in:t,out:n,typeName:He.ZodPipeline})}}class hc extends lt{_parse(t){const n=this._def.innerType._parse(t),a=s=>(wl(s)&&(s.value=Object.freeze(s.value)),s);return ic(n)?n.then(s=>a(s)):a(n)}unwrap(){return this._def.innerType}}hc.create=(e,t)=>new hc({innerType:e,typeName:He.ZodReadonly,...Ge(t)});var He;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(He||(He={}));const Ue=za.create,ea=Rl.create,Rc=dm.create,zk=pm.create;Pa.create;const ta=kr.create,Ve=Qt.create;sc.create;const Hk=Zm.create;uc.create;_i.create;const Ms=oc.create,qa=vi.create;cc.create;Wr.create;ki.create;const Oc=qa(["everyday","spec"]),Uk=qa(["active","ended"]),Ws=Ve({id:Ue().min(1),kind:Oc.optional(),title:Ue().optional(),status:Uk,createdAt:Ue().datetime(),updatedAt:Ue().datetime()}),Lc=Ve({id:Ue().min(1),name:Ue().min(1),relPath:Ue().min(1),contentType:Ue().min(1),size:ea().int().nonnegative()});Ve({text:Ue().min(1).optional(),attachments:ta(Lc).optional()}).refine(e=>{var t,n;return(((t=e.text)==null?void 0:t.length)??0)>0||(((n=e.attachments)==null?void 0:n.length)??0)>0},{message:"a message needs text or at least one attachment"});const Pk=qa(["session-created","user-moved-away","session-ended","kind-chosen"]);Ve({reason:Pk,to:Ue().min(1).optional(),kind:Oc.optional()});const jk="annotation-batch",Fk=Ve({file:Ue().min(1),line:ea().int().positive().optional(),column:ea().int().positive().optional()}),qk=Ve({name:Ue().min(1),source:Fk.optional()}),Wm=Ve({selector:Ue().min(1),pageUrl:Ue().min(1),viewport:Ve({width:ea().int().positive(),height:ea().int().positive()}),label:Ue().optional(),component:qk.optional()}),Yk=Ve({note:Ue().min(1).optional(),target:Wm,screenshot:Lc.optional()}),$k=Ve({items:ta(Yk).min(1)}),Vk=qa(["user","agent","system"]),Dc=Ve({id:Ue().uuid(),seq:ea().int().nonnegative(),sessionId:Ue().min(1),ts:Ue().datetime(),type:Ue().min(1),source:Vk,payload:zk()}),mc=qa(["listening","working","away"]),zx="question-card",Gk="decision",Hx="artifact",Qk=Ve({label:Ue().min(1),description:Ue().min(1),recommended:Rc().optional()}),Xk=Ve({cardId:Ue().uuid(),question:Ue().min(1),options:ta(Qk).min(2).max(6),stopHint:Ue().min(1).optional()}),Zk=qa(["confirmed","assumed"]),Kk=Ve({summary:Ue().min(1),status:Zk,detail:Ue().min(1).optional()}),Ux=qa(["draft","mock","diagram"]),Px=Ve({kind:Ux,name:Ue().min(1),relPath:Ue().min(1),contentType:Ue().min(1),size:ea().int().nonnegative()}),Wk=Ve({artifact:Px}),Ic=ea().int().nonnegative();Ve({kind:Oc.optional(),title:Ue().min(1).optional()});Ve({kind:Oc});Ve({text:Ue().min(1).optional(),attachmentIds:ta(Ue().min(1)).optional()}).refine(e=>{var t,n;return(((t=e.text)==null?void 0:t.length)??0)>0||(((n=e.attachmentIds)==null?void 0:n.length)??0)>0},{message:"a message needs text or at least one attachment"});const Jk=Ve({note:Ue().min(1).optional(),target:Wm,screenshotAttachmentId:Ue().min(1).optional()});Ve({items:ta(Jk).min(1)});Ve({to:Ue().min(1).optional()});Ve({kind:Ux,name:Ue().min(1),content:Ue().min(1)});const eA=Ve({attachment:Lc});Ve({event:Dc});const tA=Ve({events:ta(Dc),cursor:Ic,ended:Rc().optional()}),nA=Ve({hasMore:Rc(),earliestLoadedSeq:Ic,hint:Ue()});Ve({meta:Ws,presence:mc,tail:ta(Dc),cursor:Ic,fetchMore:nA});const jx=Ve({meta:Ws,presence:mc}),rA=Ve({sessions:ta(jx)}),Mc=Ve({session:jx});Ve({ok:Rc(),sessions:Ic,home:Ue().min(1).optional(),port:ea().int().positive().optional(),version:Ue().min(1).optional()});const wh="chamba-annotate/1",aA=qa(["bug","feature"]);Ve({type:aA,text:Ue().min(1),screenshotAttachmentIds:ta(Ue().min(1)).optional()});const iA=Ve({id:Ue().min(1),path:Ue().min(1)}),lA=Hk("t",[Ve({t:Ms("hello"),meta:Ws,presence:mc}),Ve({t:Ms("append"),event:Dc}),Ve({t:Ms("presence"),state:mc}),Ve({t:Ms("kind"),meta:Ws}),Ve({t:Ms("ended"),meta:Ws})]);function dy(){const e=new URLSearchParams(window.location.search).get("s");return e&&e.length>0?e:null}async function sA(e,t=0){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/events?since=${t}`);if(!n.ok)throw new Error(await lr(n,"could not load history"));return tA.parse(await n.json())}async function uA(e){const t=await fetch(`/api/sessions/${encodeURIComponent(e)}`);if(!t.ok)throw new Error(await lr(t,"could not load session"));return Mc.parse(await t.json()).session}async function Bc(){const e=await fetch("/api/sessions");if(!e.ok)throw new Error(await lr(e,"could not list sessions"));return rA.parse(await e.json()).sessions}async function oA(e){const t=await fetch("/api/sessions",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(await lr(t,"could not create session"));return Mc.parse(await t.json()).session}async function cA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/messages`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await lr(n,"could not send message"))}async function fA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/annotations`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await lr(n,"could not send annotations"))}function Em(){return`${window.location.origin}/inject/annotate.js`}async function Jm(e,t){const n=new FormData;n.append("file",t,t.name);const a=await fetch(`/api/sessions/${encodeURIComponent(e)}/attachments`,{method:"POST",body:n});if(!a.ok)throw new Error(await lr(a,"could not upload file"));return eA.parse(await a.json()).attachment}async function dA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/issues`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!n.ok)throw new Error(await lr(n,"could not file issue"));return iA.parse(await n.json())}async function e0(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/move-away`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({to:t})});if(!n.ok)throw new Error(await lr(n,"could not hand off"))}async function hA(e,t){const n=await fetch(`/api/sessions/${encodeURIComponent(e)}/kind`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!n.ok)throw new Error(await lr(n,"could not set session kind"));return Mc.parse(await n.json()).session}async function mA(e){const t=await fetch(`/api/sessions/${encodeURIComponent(e)}/end`,{method:"POST"});if(!t.ok)throw new Error(await lr(t,"could not end session"));return Mc.parse(await t.json()).session}function Fx(e,t){return`/api/sessions/${encodeURIComponent(e)}/attachments/${encodeURIComponent(t)}`}function qx(e,t){return`/api/sessions/${encodeURIComponent(e)}/artifacts/${encodeURIComponent(t)}`}function pA(e,t){return`${qx(e,t)}?raw=1`}async function gA(e,t){const n=await fetch(pA(e,t));if(!n.ok)throw new Error(await lr(n,"could not load artifact"));return n.text()}function bA(e){return`${window.location.protocol==="https:"?"wss":"ws"}://${window.location.host}/ws?s=${encodeURIComponent(e)}`}async function lr(e,t){try{const n=await e.json();if(typeof n.error=="string")return n.error}catch{}return`${t} (${e.status})`}/**
50
- * @license lucide-react v1.23.0 - ISC
51
- *
52
- * This source code is licensed under the ISC license.
53
- * See the LICENSE file in the root directory of this source tree.
54
- */const Yx=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim();/**
55
- * @license lucide-react v1.23.0 - ISC
56
- *
57
- * This source code is licensed under the ISC license.
58
- * See the LICENSE file in the root directory of this source tree.
59
- */const yA=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
60
- * @license lucide-react v1.23.0 - ISC
61
- *
62
- * This source code is licensed under the ISC license.
63
- * See the LICENSE file in the root directory of this source tree.
64
- */const EA=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase());/**
65
- * @license lucide-react v1.23.0 - ISC
66
- *
67
- * This source code is licensed under the ISC license.
68
- * See the LICENSE file in the root directory of this source tree.
69
- */const hy=e=>{const t=EA(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
70
- * @license lucide-react v1.23.0 - ISC
71
- *
72
- * This source code is licensed under the ISC license.
73
- * See the LICENSE file in the root directory of this source tree.
74
- */var Rh={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
75
- * @license lucide-react v1.23.0 - ISC
76
- *
77
- * This source code is licensed under the ISC license.
78
- * See the LICENSE file in the root directory of this source tree.
79
- */const xA=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},TA=S.createContext({}),_A=()=>S.useContext(TA),vA=S.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:s="",children:u,iconNode:o,...f},d)=>{const{size:h=24,strokeWidth:b=2,absoluteStrokeWidth:g=!1,color:E="currentColor",className:x=""}=_A()??{},v=a??g?Number(n??b)*24/Number(t??h):n??b;return S.createElement("svg",{ref:d,...Rh,width:t??h??Rh.width,height:t??h??Rh.height,stroke:e??E,strokeWidth:v,className:Yx("lucide",x,s),...!u&&!xA(f)&&{"aria-hidden":"true"},...f},[...o.map(([N,w])=>S.createElement(N,w)),...Array.isArray(u)?u:[u]])});/**
80
- * @license lucide-react v1.23.0 - ISC
81
- *
82
- * This source code is licensed under the ISC license.
83
- * See the LICENSE file in the root directory of this source tree.
84
- */const Lt=(e,t)=>{const n=S.forwardRef(({className:a,...s},u)=>S.createElement(vA,{ref:u,iconNode:t,className:Yx(`lucide-${yA(hy(e))}`,`lucide-${e}`,a),...s}));return n.displayName=hy(e),n};/**
85
- * @license lucide-react v1.23.0 - ISC
86
- *
87
- * This source code is licensed under the ISC license.
88
- * See the LICENSE file in the root directory of this source tree.
89
- */const SA=[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]],kA=Lt("app-window",SA);/**
90
- * @license lucide-react v1.23.0 - ISC
91
- *
92
- * This source code is licensed under the ISC license.
93
- * See the LICENSE file in the root directory of this source tree.
94
- */const AA=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],CA=Lt("arrow-down",AA);/**
95
- * @license lucide-react v1.23.0 - ISC
96
- *
97
- * This source code is licensed under the ISC license.
98
- * See the LICENSE file in the root directory of this source tree.
99
- */const NA=[["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z",key:"uouzyp"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M21 21a4 4 0 0 0-3.81-4",key:"1b0z45"}],["path",{d:"M21 5a4 4 0 0 1-3.55 3.97",key:"5cxbf6"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M3 21a4 4 0 0 1 3.81-4",key:"1fjd4g"}],["path",{d:"M3 5a4 4 0 0 0 3.55 3.97",key:"1d7oge"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M9 7.13V6a3 3 0 1 1 6 0v1.13",key:"1vgav8"}]],wA=Lt("bug",NA);/**
100
- * @license lucide-react v1.23.0 - ISC
101
- *
102
- * This source code is licensed under the ISC license.
103
- * See the LICENSE file in the root directory of this source tree.
104
- */const RA=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],zc=Lt("check",RA);/**
105
- * @license lucide-react v1.23.0 - ISC
106
- *
107
- * This source code is licensed under the ISC license.
108
- * See the LICENSE file in the root directory of this source tree.
109
- */const OA=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],LA=Lt("chevrons-up-down",OA);/**
110
- * @license lucide-react v1.23.0 - ISC
111
- *
112
- * This source code is licensed under the ISC license.
113
- * See the LICENSE file in the root directory of this source tree.
114
- */const DA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],IA=Lt("circle-check",DA);/**
115
- * @license lucide-react v1.23.0 - ISC
116
- *
117
- * This source code is licensed under the ISC license.
118
- * See the LICENSE file in the root directory of this source tree.
119
- */const MA=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],BA=Lt("circle-question-mark",MA);/**
120
- * @license lucide-react v1.23.0 - ISC
121
- *
122
- * This source code is licensed under the ISC license.
123
- * See the LICENSE file in the root directory of this source tree.
124
- */const zA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],HA=Lt("columns-2",zA);/**
125
- * @license lucide-react v1.23.0 - ISC
126
- *
127
- * This source code is licensed under the ISC license.
128
- * See the LICENSE file in the root directory of this source tree.
129
- */const UA=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],t0=Lt("copy",UA);/**
130
- * @license lucide-react v1.23.0 - ISC
131
- *
132
- * This source code is licensed under the ISC license.
133
- * See the LICENSE file in the root directory of this source tree.
134
- */const PA=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],jA=Lt("grip-vertical",PA);/**
135
- * @license lucide-react v1.23.0 - ISC
136
- *
137
- * This source code is licensed under the ISC license.
138
- * See the LICENSE file in the root directory of this source tree.
139
- */const FA=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5",key:"1gvzjb"}],["path",{d:"M9 18h6",key:"x1upvd"}],["path",{d:"M10 22h4",key:"ceow96"}]],qA=Lt("lightbulb",FA);/**
140
- * @license lucide-react v1.23.0 - ISC
141
- *
142
- * This source code is licensed under the ISC license.
143
- * See the LICENSE file in the root directory of this source tree.
144
- */const YA=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],$A=Lt("message-square",YA);/**
145
- * @license lucide-react v1.23.0 - ISC
146
- *
147
- * This source code is licensed under the ISC license.
148
- * See the LICENSE file in the root directory of this source tree.
149
- */const VA=[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]],GA=Lt("messages-square",VA);/**
150
- * @license lucide-react v1.23.0 - ISC
151
- *
152
- * This source code is licensed under the ISC license.
153
- * See the LICENSE file in the root directory of this source tree.
154
- */const QA=[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]],Hc=Lt("mic",QA);/**
155
- * @license lucide-react v1.23.0 - ISC
156
- *
157
- * This source code is licensed under the ISC license.
158
- * See the LICENSE file in the root directory of this source tree.
159
- */const XA=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],ZA=Lt("moon",XA);/**
160
- * @license lucide-react v1.23.0 - ISC
161
- *
162
- * This source code is licensed under the ISC license.
163
- * See the LICENSE file in the root directory of this source tree.
164
- */const KA=[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]],WA=Lt("mouse-pointer-click",KA);/**
165
- * @license lucide-react v1.23.0 - ISC
166
- *
167
- * This source code is licensed under the ISC license.
168
- * See the LICENSE file in the root directory of this source tree.
169
- */const JA=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],n0=Lt("paperclip",JA);/**
170
- * @license lucide-react v1.23.0 - ISC
171
- *
172
- * This source code is licensed under the ISC license.
173
- * See the LICENSE file in the root directory of this source tree.
174
- */const eC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],tC=Lt("plus",eC);/**
175
- * @license lucide-react v1.23.0 - ISC
176
- *
177
- * This source code is licensed under the ISC license.
178
- * See the LICENSE file in the root directory of this source tree.
179
- */const nC=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],rC=Lt("rotate-cw",nC);/**
180
- * @license lucide-react v1.23.0 - ISC
181
- *
182
- * This source code is licensed under the ISC license.
183
- * See the LICENSE file in the root directory of this source tree.
184
- */const aC=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]],iC=Lt("scan",aC);/**
185
- * @license lucide-react v1.23.0 - ISC
186
- *
187
- * This source code is licensed under the ISC license.
188
- * See the LICENSE file in the root directory of this source tree.
189
- */const lC=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],r0=Lt("send",lC);/**
190
- * @license lucide-react v1.23.0 - ISC
191
- *
192
- * This source code is licensed under the ISC license.
193
- * See the LICENSE file in the root directory of this source tree.
194
- */const sC=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],uC=Lt("sun",sC);/**
195
- * @license lucide-react v1.23.0 - ISC
196
- *
197
- * This source code is licensed under the ISC license.
198
- * See the LICENSE file in the root directory of this source tree.
199
- */const oC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pc=Lt("x",oC);function $x(e){var t,n,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=$x(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function Uc(){for(var e,t,n=0,a="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=$x(e))&&(a&&(a+=" "),a+=t);return a}const cC=(e,t)=>{const n=new Array(e.length+t.length);for(let a=0;a<e.length;a++)n[a]=e[a];for(let a=0;a<t.length;a++)n[e.length+a]=t[a];return n},fC=(e,t)=>({classGroupId:e,validator:t}),Vx=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),gc="-",my=[],dC="arbitrary..",hC=e=>{const t=pC(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:a}=e;return{getClassGroupId:o=>{if(o.startsWith("[")&&o.endsWith("]"))return mC(o);const f=o.split(gc),d=f[0]===""&&f.length>1?1:0;return Gx(f,d,t)},getConflictingClassGroupIds:(o,f)=>{if(f){const d=a[o],h=n[o];return d?h?cC(h,d):d:h||my}return n[o]||my}}},Gx=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const s=e[t],u=n.nextPart.get(s);if(u){const h=Gx(e,t+1,u);if(h)return h}const o=n.validators;if(o===null)return;const f=t===0?e.join(gc):e.slice(t).join(gc),d=o.length;for(let h=0;h<d;h++){const b=o[h];if(b.validator(f))return b.classGroupId}},mC=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),a=t.slice(0,n);return a?dC+a:void 0})(),pC=e=>{const{theme:t,classGroups:n}=e;return gC(n,t)},gC=(e,t)=>{const n=Vx();for(const a in e){const s=e[a];a0(s,n,a,t)}return n},a0=(e,t,n,a)=>{const s=e.length;for(let u=0;u<s;u++){const o=e[u];bC(o,t,n,a)}},bC=(e,t,n,a)=>{if(typeof e=="string"){yC(e,t,n);return}if(typeof e=="function"){EC(e,t,n,a);return}xC(e,t,n,a)},yC=(e,t,n)=>{const a=e===""?t:Qx(t,e);a.classGroupId=n},EC=(e,t,n,a)=>{if(TC(e)){a0(e(a),t,n,a);return}t.validators===null&&(t.validators=[]),t.validators.push(fC(n,e))},xC=(e,t,n,a)=>{const s=Object.entries(e),u=s.length;for(let o=0;o<u;o++){const[f,d]=s[o];a0(d,Qx(t,f),n,a)}},Qx=(e,t)=>{let n=e;const a=t.split(gc),s=a.length;for(let u=0;u<s;u++){const o=a[u];let f=n.nextPart.get(o);f||(f=Vx(),n.nextPart.set(o,f)),n=f}return n},TC=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,_C=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),a=Object.create(null);const s=(u,o)=>{n[u]=o,t++,t>e&&(t=0,a=n,n=Object.create(null))};return{get(u){let o=n[u];if(o!==void 0)return o;if((o=a[u])!==void 0)return s(u,o),o},set(u,o){u in n?n[u]=o:s(u,o)}}},xm="!",py=":",vC=[],gy=(e,t,n,a,s)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:a,isExternal:s}),SC=e=>{const{prefix:t,experimentalParseClassName:n}=e;let a=s=>{const u=[];let o=0,f=0,d=0,h;const b=s.length;for(let N=0;N<b;N++){const w=s[N];if(o===0&&f===0){if(w===py){u.push(s.slice(d,N)),d=N+1;continue}if(w==="/"){h=N;continue}}w==="["?o++:w==="]"?o--:w==="("?f++:w===")"&&f--}const g=u.length===0?s:s.slice(d);let E=g,x=!1;g.endsWith(xm)?(E=g.slice(0,-1),x=!0):g.startsWith(xm)&&(E=g.slice(1),x=!0);const v=h&&h>d?h-d:void 0;return gy(u,x,E,v)};if(t){const s=t+py,u=a;a=o=>o.startsWith(s)?u(o.slice(s.length)):gy(vC,!1,o,void 0,!0)}if(n){const s=a;a=u=>n({className:u,parseClassName:s})}return a},kC=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,a)=>{t.set(n,1e6+a)}),n=>{const a=[];let s=[];for(let u=0;u<n.length;u++){const o=n[u],f=o[0]==="[",d=t.has(o);f||d?(s.length>0&&(s.sort(),a.push(...s),s=[]),a.push(o)):s.push(o)}return s.length>0&&(s.sort(),a.push(...s)),a}},AC=e=>({cache:_C(e.cacheSize),parseClassName:SC(e),sortModifiers:kC(e),postfixLookupClassGroupIds:CC(e),...hC(e)}),CC=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let a=0;a<n.length;a++)t[n[a]]=!0;return t},NC=/\s+/,wC=(e,t)=>{const{parseClassName:n,getClassGroupId:a,getConflictingClassGroupIds:s,sortModifiers:u,postfixLookupClassGroupIds:o}=t,f=[],d=e.trim().split(NC);let h="";for(let b=d.length-1;b>=0;b-=1){const g=d[b],{isExternal:E,modifiers:x,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:w}=n(g);if(E){h=g+(h.length>0?" "+h:h);continue}let O=!!w,z;if(O){const $=N.substring(0,w);z=a($);const G=z&&o[z]?a(N):void 0;G&&G!==z&&(z=G,O=!1)}else z=a(N);if(!z){if(!O){h=g+(h.length>0?" "+h:h);continue}if(z=a(N),!z){h=g+(h.length>0?" "+h:h);continue}O=!1}const U=x.length===0?"":x.length===1?x[0]:u(x).join(":"),D=v?U+xm:U,q=D+z;if(f.indexOf(q)>-1)continue;f.push(q);const M=s(z,O);for(let $=0;$<M.length;++$){const G=M[$];f.push(D+G)}h=g+(h.length>0?" "+h:h)}return h},RC=(...e)=>{let t=0,n,a,s="";for(;t<e.length;)(n=e[t++])&&(a=Xx(n))&&(s&&(s+=" "),s+=a);return s},Xx=e=>{if(typeof e=="string")return e;let t,n="";for(let a=0;a<e.length;a++)e[a]&&(t=Xx(e[a]))&&(n&&(n+=" "),n+=t);return n},OC=(e,...t)=>{let n,a,s,u;const o=d=>{const h=t.reduce((b,g)=>g(b),e());return n=AC(h),a=n.cache.get,s=n.cache.set,u=f,f(d)},f=d=>{const h=a(d);if(h)return h;const b=wC(d,n);return s(d,b),b};return u=o,(...d)=>u(RC(...d))},LC=[],Kt=e=>{const t=n=>n[e]||LC;return t.isThemeGetter=!0,t},Zx=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Kx=/^\((?:(\w[\w-]*):)?(.+)\)$/i,DC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,IC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,BC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,zC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,HC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wa=e=>DC.test(e),$e=e=>!!e&&!Number.isNaN(Number(e)),Tr=e=>!!e&&Number.isInteger(Number(e)),Oh=e=>e.endsWith("%")&&$e(e.slice(0,-1)),Qr=e=>IC.test(e),Wx=()=>!0,UC=e=>MC.test(e)&&!BC.test(e),i0=()=>!1,PC=e=>zC.test(e),jC=e=>HC.test(e),FC=e=>!Se(e)&&!ke(e),qC=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),YC=e=>Ya(e,t2,i0),Se=e=>Zx.test(e),fi=e=>Ya(e,n2,UC),by=e=>Ya(e,WC,$e),$C=e=>Ya(e,a2,Wx),VC=e=>Ya(e,r2,i0),yy=e=>Ya(e,Jx,i0),GC=e=>Ya(e,e2,jC),jo=e=>Ya(e,i2,PC),ke=e=>Kx.test(e),Bs=e=>Ri(e,n2),QC=e=>Ri(e,r2),Ey=e=>Ri(e,Jx),XC=e=>Ri(e,t2),ZC=e=>Ri(e,e2),Fo=e=>Ri(e,i2,!0),KC=e=>Ri(e,a2,!0),Ya=(e,t,n)=>{const a=Zx.exec(e);return a?a[1]?t(a[1]):n(a[2]):!1},Ri=(e,t,n=!1)=>{const a=Kx.exec(e);return a?a[1]?t(a[1]):n:!1},Jx=e=>e==="position"||e==="percentage",e2=e=>e==="image"||e==="url",t2=e=>e==="length"||e==="size"||e==="bg-size",n2=e=>e==="length",WC=e=>e==="number",r2=e=>e==="family-name",a2=e=>e==="number"||e==="weight",i2=e=>e==="shadow",JC=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),a=Kt("font-weight"),s=Kt("tracking"),u=Kt("leading"),o=Kt("breakpoint"),f=Kt("container"),d=Kt("spacing"),h=Kt("radius"),b=Kt("shadow"),g=Kt("inset-shadow"),E=Kt("text-shadow"),x=Kt("drop-shadow"),v=Kt("blur"),N=Kt("perspective"),w=Kt("aspect"),O=Kt("ease"),z=Kt("animate"),U=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...D(),ke,Se],M=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],G=()=>[ke,Se,d],de=()=>[wa,"full","auto",...G()],F=()=>[Tr,"none","subgrid",ke,Se],oe=()=>["auto",{span:["full",Tr,ke,Se]},Tr,ke,Se],ce=()=>[Tr,"auto",ke,Se],we=()=>["auto","min","max","fr",ke,Se],pe=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ae=()=>["start","end","center","stretch","center-safe","end-safe"],P=()=>["auto",...G()],ne=()=>[wa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],xe=()=>[wa,"screen","full","dvw","lvw","svw","min","max","fit",...G()],Te=()=>[wa,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],C=()=>[e,ke,Se],I=()=>[...D(),Ey,yy,{position:[ke,Se]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",XC,YC,{size:[ke,Se]}],ee=()=>[Oh,Bs,fi],se=()=>["","none","full",h,ke,Se],ie=()=>["",$e,Bs,fi],he=()=>["solid","dashed","dotted","double"],_e=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>[$e,Oh,Ey,yy],Ye=()=>["","none",v,ke,Se],_t=()=>["none",$e,ke,Se],wt=()=>["none",$e,ke,Se],rt=()=>[$e,ke,Se],mt=()=>[wa,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Qr],breakpoint:[Qr],color:[Wx],container:[Qr],"drop-shadow":[Qr],ease:["in","out","in-out"],font:[FC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Qr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Qr],shadow:[Qr],spacing:["px",$e],text:[Qr],"text-shadow":[Qr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",wa,Se,ke,w]}],container:["container"],"container-type":[{"@container":["","normal","size",ke,Se]}],"container-named":[qC],columns:[{columns:[$e,Se,ke,f]}],"break-after":[{"break-after":U()}],"break-before":[{"break-before":U()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:de()}],"inset-x":[{"inset-x":de()}],"inset-y":[{"inset-y":de()}],start:[{"inset-s":de(),start:de()}],end:[{"inset-e":de(),end:de()}],"inset-bs":[{"inset-bs":de()}],"inset-be":[{"inset-be":de()}],top:[{top:de()}],right:[{right:de()}],bottom:[{bottom:de()}],left:[{left:de()}],visibility:["visible","invisible","collapse"],z:[{z:[Tr,"auto",ke,Se]}],basis:[{basis:[wa,"full","auto",f,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[$e,wa,"auto","initial","none",Se]}],grow:[{grow:["",$e,ke,Se]}],shrink:[{shrink:["",$e,ke,Se]}],order:[{order:[Tr,"first","last","none",ke,Se]}],"grid-cols":[{"grid-cols":F()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":F()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":we()}],"auto-rows":[{"auto-rows":we()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...pe(),"normal"]}],"justify-items":[{"justify-items":[...ae(),"normal"]}],"justify-self":[{"justify-self":["auto",...ae()]}],"align-content":[{content:["normal",...pe()]}],"align-items":[{items:[...ae(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ae(),{baseline:["","last"]}]}],"place-content":[{"place-content":pe()}],"place-items":[{"place-items":[...ae(),"baseline"]}],"place-self":[{"place-self":["auto",...ae()]}],p:[{p:G()}],px:[{px:G()}],py:[{py:G()}],ps:[{ps:G()}],pe:[{pe:G()}],pbs:[{pbs:G()}],pbe:[{pbe:G()}],pt:[{pt:G()}],pr:[{pr:G()}],pb:[{pb:G()}],pl:[{pl:G()}],m:[{m:P()}],mx:[{mx:P()}],my:[{my:P()}],ms:[{ms:P()}],me:[{me:P()}],mbs:[{mbs:P()}],mbe:[{mbe:P()}],mt:[{mt:P()}],mr:[{mr:P()}],mb:[{mb:P()}],ml:[{ml:P()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...xe()]}],"min-inline-size":[{"min-inline":["auto",...xe()]}],"max-inline-size":[{"max-inline":["none",...xe()]}],"block-size":[{block:["auto",...Te()]}],"min-block-size":[{"min-block":["auto",...Te()]}],"max-block-size":[{"max-block":["none",...Te()]}],w:[{w:[f,"screen",...ne()]}],"min-w":[{"min-w":[f,"screen","none",...ne()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[o]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",n,Bs,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[a,KC,$C]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Oh,Se]}],"font-family":[{font:[QC,VC,t]}],"font-features":[{"font-features":[Se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,ke,Se]}],"line-clamp":[{"line-clamp":[$e,"none",ke,by]}],leading:[{leading:[u,...G()]}],"list-image":[{"list-image":["none",ke,Se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ke,Se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:[$e,"from-font","auto",ke,fi]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[$e,"auto",ke,Se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:G()}],"tab-size":[{tab:[Tr,ke,Se]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ke,Se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ke,Se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:I()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tr,ke,Se],radial:["",ke,Se],conic:[Tr,ke,Se]},ZC,GC]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:ee()}],"gradient-via-pos":[{via:ee()}],"gradient-to-pos":[{to:ee()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:se()}],"rounded-s":[{"rounded-s":se()}],"rounded-e":[{"rounded-e":se()}],"rounded-t":[{"rounded-t":se()}],"rounded-r":[{"rounded-r":se()}],"rounded-b":[{"rounded-b":se()}],"rounded-l":[{"rounded-l":se()}],"rounded-ss":[{"rounded-ss":se()}],"rounded-se":[{"rounded-se":se()}],"rounded-ee":[{"rounded-ee":se()}],"rounded-es":[{"rounded-es":se()}],"rounded-tl":[{"rounded-tl":se()}],"rounded-tr":[{"rounded-tr":se()}],"rounded-br":[{"rounded-br":se()}],"rounded-bl":[{"rounded-bl":se()}],"border-w":[{border:ie()}],"border-w-x":[{"border-x":ie()}],"border-w-y":[{"border-y":ie()}],"border-w-s":[{"border-s":ie()}],"border-w-e":[{"border-e":ie()}],"border-w-bs":[{"border-bs":ie()}],"border-w-be":[{"border-be":ie()}],"border-w-t":[{"border-t":ie()}],"border-w-r":[{"border-r":ie()}],"border-w-b":[{"border-b":ie()}],"border-w-l":[{"border-l":ie()}],"divide-x":[{"divide-x":ie()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ie()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...he(),"hidden","none"]}],"divide-style":[{divide:[...he(),"hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-bs":[{"border-bs":C()}],"border-color-be":[{"border-be":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:[...he(),"none","hidden"]}],"outline-offset":[{"outline-offset":[$e,ke,Se]}],"outline-w":[{outline:["",$e,Bs,fi]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",b,Fo,jo]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",g,Fo,jo]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[$e,fi]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":ie()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",E,Fo,jo]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[$e,ke,Se]}],"mix-blend":[{"mix-blend":[..._e(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":_e()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[$e]}],"mask-image-linear-from-pos":[{"mask-linear-from":Ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":Ee()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":Ee()}],"mask-image-t-to-pos":[{"mask-t-to":Ee()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":Ee()}],"mask-image-r-to-pos":[{"mask-r-to":Ee()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":Ee()}],"mask-image-b-to-pos":[{"mask-b-to":Ee()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":Ee()}],"mask-image-l-to-pos":[{"mask-l-to":Ee()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":Ee()}],"mask-image-x-to-pos":[{"mask-x-to":Ee()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":Ee()}],"mask-image-y-to-pos":[{"mask-y-to":Ee()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ke,Se]}],"mask-image-radial-from-pos":[{"mask-radial-from":Ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":Ee()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":D()}],"mask-image-conic-pos":[{"mask-conic":[$e]}],"mask-image-conic-from-pos":[{"mask-conic-from":Ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":Ee()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:I()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ke,Se]}],filter:[{filter:["","none",ke,Se]}],blur:[{blur:Ye()}],brightness:[{brightness:[$e,ke,Se]}],contrast:[{contrast:[$e,ke,Se]}],"drop-shadow":[{"drop-shadow":["","none",x,Fo,jo]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",$e,ke,Se]}],"hue-rotate":[{"hue-rotate":[$e,ke,Se]}],invert:[{invert:["",$e,ke,Se]}],saturate:[{saturate:[$e,ke,Se]}],sepia:[{sepia:["",$e,ke,Se]}],"backdrop-filter":[{"backdrop-filter":["","none",ke,Se]}],"backdrop-blur":[{"backdrop-blur":Ye()}],"backdrop-brightness":[{"backdrop-brightness":[$e,ke,Se]}],"backdrop-contrast":[{"backdrop-contrast":[$e,ke,Se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",$e,ke,Se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$e,ke,Se]}],"backdrop-invert":[{"backdrop-invert":["",$e,ke,Se]}],"backdrop-opacity":[{"backdrop-opacity":[$e,ke,Se]}],"backdrop-saturate":[{"backdrop-saturate":[$e,ke,Se]}],"backdrop-sepia":[{"backdrop-sepia":["",$e,ke,Se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":G()}],"border-spacing-x":[{"border-spacing-x":G()}],"border-spacing-y":[{"border-spacing-y":G()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ke,Se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[$e,"initial",ke,Se]}],ease:[{ease:["linear","initial",O,ke,Se]}],delay:[{delay:[$e,ke,Se]}],animate:[{animate:["none",z,ke,Se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,ke,Se]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:_t()}],"rotate-x":[{"rotate-x":_t()}],"rotate-y":[{"rotate-y":_t()}],"rotate-z":[{"rotate-z":_t()}],scale:[{scale:wt()}],"scale-x":[{"scale-x":wt()}],"scale-y":[{"scale-y":wt()}],"scale-z":[{"scale-z":wt()}],"scale-3d":["scale-3d"],skew:[{skew:rt()}],"skew-x":[{"skew-x":rt()}],"skew-y":[{"skew-y":rt()}],transform:[{transform:[ke,Se,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:mt()}],"translate-x":[{"translate-x":mt()}],"translate-y":[{"translate-y":mt()}],"translate-z":[{"translate-z":mt()}],"translate-none":["translate-none"],zoom:[{zoom:[Tr,ke,Se]}],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ke,Se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":C()}],"scrollbar-track-color":[{"scrollbar-track":C()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mbs":[{"scroll-mbs":G()}],"scroll-mbe":[{"scroll-mbe":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pbs":[{"scroll-pbs":G()}],"scroll-pbe":[{"scroll-pbe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ke,Se]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[$e,Bs,fi,by]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},l0=OC(JC);function Bt(...e){return l0(Uc(e))}function eN(e){const[t,n]=S.useState(!1),[a,s]=S.useState(null);return{start:S.useCallback(async(o,f)=>{n(!0),s(null);try{const h=(await oA({kind:o,title:(f==null?void 0:f.trim())||void 0})).meta.id;try{const g=(await Bc()).find(E=>E.presence==="listening"&&E.meta.id!==h);g&&await e0(g.meta.id,h)}catch{}return e(h),h}catch(d){return s(d.message),n(!1),null}},[e]),starting:t,error:a}}function xy(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function tN(...e){return t=>{let n=!1;const a=e.map(s=>{const u=xy(s,t);return!n&&typeof u=="function"&&(n=!0),u});if(n)return()=>{for(let s=0;s<a.length;s++){const u=a[s];typeof u=="function"?u():xy(e[s],null)}}}}function nN(...e){return S.useCallback(tN(...e),e)}function rN(e){const t=S.forwardRef((n,a)=>{let{children:s,...u}=n,o=null,f=!1;const d=[];Ty(s)&&typeof qo=="function"&&(s=qo(s._payload)),S.Children.forEach(s,E=>{var x;if(oN(E)){f=!0;const v=E;let N="child"in v.props?v.props.child:v.props.children;Ty(N)&&typeof qo=="function"&&(N=qo(N._payload)),o=lN(v,N),d.push((x=o==null?void 0:o.props)==null?void 0:x.children)}else d.push(E)}),o?o=S.cloneElement(o,void 0,d):!f&&S.Children.count(s)===1&&S.isValidElement(s)&&(o=s);const h=o?uN(o):void 0,b=nN(a,h);if(!o){if(s||s===0)throw new Error(f?hN(e):dN(e));return s}const g=sN(u,o.props??{});return o.type!==S.Fragment&&(g.ref=a?b:h),S.cloneElement(o,g)});return t.displayName=`${e}.Slot`,t}var aN=rN("Slot"),iN=Symbol.for("radix.slottable"),lN=(e,t)=>{if("child"in e.props){const n=e.props.child;return S.isValidElement(n)?S.cloneElement(n,void 0,e.props.children(n.props.children)):null}return S.isValidElement(t)?t:null};function sN(e,t){const n={...t};for(const a in t){const s=e[a],u=t[a];/^on[A-Z]/.test(a)?s&&u?n[a]=(...f)=>{const d=u(...f);return s(...f),d}:s&&(n[a]=s):a==="style"?n[a]={...s,...u}:a==="className"&&(n[a]=[s,u].filter(Boolean).join(" "))}return{...e,...n}}function uN(e){var a,s;let t=(a=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function oN(e){return S.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===iN}var cN=Symbol.for("react.lazy");function Ty(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===cN&&"_payload"in e&&fN(e._payload)}function fN(e){return typeof e=="object"&&e!==null&&"then"in e}var dN=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,hN=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,qo=Ox[" use ".trim().toString()];const _y=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,vy=Uc,mN=(e,t)=>n=>{var a;if((t==null?void 0:t.variants)==null)return vy(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:s,defaultVariants:u}=t,o=Object.keys(s).map(h=>{const b=n==null?void 0:n[h],g=u==null?void 0:u[h];if(b===null)return null;const E=_y(b)||_y(g);return s[h][E]}),f=n&&Object.entries(n).reduce((h,b)=>{let[g,E]=b;return E===void 0||(h[g]=E),h},{}),d=t==null||(a=t.compoundVariants)===null||a===void 0?void 0:a.reduce((h,b)=>{let{class:g,className:E,...x}=b;return Object.entries(x).every(v=>{let[N,w]=v;return Array.isArray(w)?w.includes({...u,...f}[N]):{...u,...f}[N]===w})?[...h,g,E]:h},[]);return vy(e,o,d,n==null?void 0:n.class,n==null?void 0:n.className)},pN=mN("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input bg-background shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9","icon-sm":"h-8 w-8"}},defaultVariants:{variant:"default",size:"default"}}),ft=S.forwardRef(({className:e,variant:t,size:n,asChild:a=!1,...s},u)=>{const o=a?aN:"button";return T.jsx(o,{className:Bt(pN({variant:t,size:n,className:e})),ref:u,...s})});ft.displayName="Button";const l2=[{value:"spec",label:"Spec",hint:"Structured interview into a spec package"},{value:"everyday",label:"Everyday",hint:"Open conversation beside your app"}];function s2({onOpen:e}){const[t,n]=S.useState(!1),[a,s]=S.useState("spec"),[u,o]=S.useState(""),{start:f,starting:d,error:h}=eN(e);return t?T.jsxs("div",{className:"flex flex-col gap-3 rounded-md border p-3","data-testid":"new-session-form",children:[T.jsx("div",{className:"flex gap-2",children:l2.map(b=>T.jsxs("button",{type:"button","aria-pressed":a===b.value,"data-testid":`new-session-kind-${b.value}`,onClick:()=>s(b.value),className:Bt("flex-1 rounded-md border px-3 py-2 text-left transition-colors",a===b.value?"border-primary bg-accent":"hover:bg-accent/50"),children:[T.jsx("span",{className:"block font-medium text-sm",children:b.label}),T.jsx("span",{className:"block text-muted-foreground text-xs",children:b.hint})]},b.value))}),T.jsx("input",{type:"text",value:u,onChange:b=>o(b.target.value),placeholder:"Title (optional)","aria-label":"Session title","data-testid":"new-session-title",className:"rounded-md border bg-background px-2.5 py-1.5 text-sm outline-none focus-visible:ring-2 focus-visible:ring-ring"}),h?T.jsx("span",{className:"text-destructive text-xs","data-testid":"new-session-error",children:h}):null,T.jsxs("div",{className:"flex items-center justify-end gap-2",children:[T.jsx(ft,{type:"button",variant:"ghost",size:"sm",disabled:d,onClick:()=>n(!1),children:"Cancel"}),T.jsx(ft,{type:"button",size:"sm",disabled:d,"data-testid":"new-session-start",onClick:()=>void f(a,u),children:d?"Starting…":"Start session"})]})]}):T.jsxs(ft,{type:"button",variant:"outline",size:"sm","data-testid":"new-session-trigger",onClick:()=>n(!0),children:[T.jsx(tC,{className:"size-3.5"}),"New session"]})}const u2="chamba:theme";function o2(){try{const e=localStorage.getItem(u2);return e==="light"||e==="dark"?e:null}catch{return null}}function c2(){var e;return(e=window.matchMedia)!=null&&e.call(window,"(prefers-color-scheme: dark)").matches?"dark":"light"}function gN(){return o2()??c2()}function s0(e){document.documentElement.classList.toggle("dark",e==="dark")}let Ol=gN();s0(Ol);const bc=new Set;function bN(e){if(e!==Ol){Ol=e;try{localStorage.setItem(u2,e)}catch{}s0(e);for(const t of[...bc])t()}}function Sy(){return Ol}var Cx;const Lh=(Cx=window.matchMedia)==null?void 0:Cx.call(window,"(prefers-color-scheme: dark)");Lh==null||Lh.addEventListener("change",()=>{if(o2()!==null)return;const e=c2();if(e!==Ol){Ol=e,s0(e);for(const t of[...bc])t()}});function yN(e){return bc.add(e),()=>bc.delete(e)}function f2(){return[S.useSyncExternalStore(yN,Sy,Sy),bN]}function d2(){const[e,t]=f2(),n=e==="dark"?"light":"dark";return T.jsx(ft,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Switch to ${n} theme`,title:`Switch to ${n} theme`,onClick:()=>t(n),children:e==="dark"?T.jsx(uC,{}):T.jsx(ZA,{})})}function EN({onOpen:e}){const[t,n]=S.useState(null),[a,s]=S.useState(null);return S.useEffect(()=>{Bc().then(n).catch(u=>s(u.message))},[]),T.jsxs("main",{className:"mx-auto flex h-full w-full max-w-lg flex-col gap-4 p-8",children:[T.jsx("div",{className:"flex justify-end",children:T.jsx(d2,{})}),T.jsxs("div",{className:"space-y-1 text-center",children:[T.jsx("h1",{className:"font-semibold text-xl",children:"chamba"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:"Start a new session, or reopen one below."})]}),T.jsx("div",{className:"flex justify-center",children:T.jsx(s2,{onOpen:e})}),T.jsx("div",{className:"min-h-0 flex-1 overflow-auto rounded-lg border",children:a?T.jsx("div",{className:"p-4 text-destructive text-sm",children:a}):t===null?T.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"Loading sessions…"}):t.length===0?T.jsx("div",{className:"p-4 text-muted-foreground text-sm",children:"No sessions yet - start one above."}):T.jsx("ul",{className:"divide-y",children:t.map(({meta:u,presence:o})=>T.jsx("li",{children:T.jsxs("button",{type:"button",onClick:()=>e(u.id),className:"flex w-full flex-col items-start gap-0.5 px-4 py-3 text-left hover:bg-accent hover:text-accent-foreground",children:[T.jsx("span",{className:"w-full truncate font-medium text-sm",children:u.title??u.id}),T.jsxs("span",{className:"text-muted-foreground text-xs",children:[u.kind??"choosing…",u.status==="ended"?" · read-only":` · agent ${o}`]})]})},u.id))})})]})}function ky(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const e=crypto.getRandomValues(new Uint8Array(16));let t="";for(let n=0;n<16;n++){let a=e[n]??0;n===6&&(a=a&15|64),n===8&&(a=a&63|128),t+=a.toString(16).padStart(2,"0"),(n===3||n===5||n===7||n===9)&&(t+="-")}return t}function xN(e,t){const[n,a]=S.useState("connecting"),s=S.useRef(t);return s.current=t,S.useEffect(()=>{if(!e)return;let u=!1,o=null,f,d=0;const h=()=>{if(u)return;a("connecting");const b=new WebSocket(bA(e));o=b,b.onopen=()=>{d=0,a("open")},b.onmessage=g=>{const E=lA.safeParse(TN(g.data));E.success&&s.current(E.data)},b.onerror=()=>b.close(),b.onclose=()=>{u||(a("closed"),d+=1,f=setTimeout(h,Math.min(1e3*2**(d-1),1e4)))}};return h(),()=>{u=!0,f&&clearTimeout(f),o==null||o.close()}},[e]),n}function TN(e){if(typeof e!="string")return null;try{return JSON.parse(e)}catch{return null}}function _N(e){const[t,n]=S.useState([]),[a,s]=S.useState(null),[u,o]=S.useState("away"),[f,d]=S.useState(null),h=S.useRef([]);h.current=t;const b=S.useCallback(N=>{n(w=>SN(w,N))},[]),g=S.useCallback(N=>{sA(N,vN(h.current)).then(w=>b(w.events)).catch(w=>d(w.message))},[b]),E=S.useCallback(N=>{switch(N.t){case"hello":s(N.meta),o(N.presence),g(e);break;case"append":b([N.event]);break;case"presence":o(N.state);break;case"kind":s(N.meta);break;case"ended":s(N.meta);break}},[e,b,g]),x=xN(e,E);S.useEffect(()=>{uA(e).then(N=>{s(N.meta),o(N.presence)}).catch(()=>{}),g(e)},[e,g]);const v=S.useCallback(N=>cA(e,N),[e]);return{events:t,meta:a,presence:u,status:x,loadError:f,ended:(a==null?void 0:a.status)==="ended",send:v}}function vN(e){let t=0;for(const n of e){if(n.seq!==t)break;t++}return t}function SN(e,t){if(t.length===0)return e;const n=new Map(e.map(s=>[s.seq,s]));let a=!1;for(const s of t)n.has(s.seq)||(n.set(s.seq,s),a=!0);return a?[...n.values()].sort((s,u)=>s.seq-u.seq):e}function Pc(e){const[t,n]=S.useState(!1),a=S.useRef(null),s=S.useRef(e);s.current=e;const u=kN(),o=u!==null;S.useEffect(()=>()=>{var d;return(d=a.current)==null?void 0:d.stop()},[]);const f=S.useCallback(()=>{if(!u)return;if(a.current){a.current.stop();return}const d=new u;d.lang=navigator.language,d.interimResults=!1,d.continuous=!0,d.onresult=b=>{var E;let g="";for(let x=b.resultIndex;x<b.results.length;x++){const v=b.results[x];v!=null&&v.isFinal&&(g+=((E=v[0])==null?void 0:E.transcript)??"")}g&&s.current(g)};const h=()=>{a.current=null,n(!1)};d.onerror=h,d.onend=h,a.current=d,d.start(),n(!0)},[u]);return{supported:o,listening:t,toggle:f}}function kN(){const e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}function h2({target:e}){var n;const t=(n=e.component)==null?void 0:n.source;return T.jsxs("div",{className:"flex flex-wrap gap-1 text-[11px]",children:[e.component?T.jsxs(Dh,{accent:!0,title:"React component",testId:"chip-component",children:[e.component.name,t?` ${AN(t.file)}${t.line?`:${t.line}`:""}`:""]}):null,T.jsx(Dh,{title:e.selector,testId:"chip-selector",children:CN(e.selector,44)}),T.jsxs(Dh,{title:"viewport",testId:"chip-viewport",children:[e.viewport.width,"×",e.viewport.height]})]})}function Dh({children:e,title:t,accent:n,testId:a}){return T.jsx("span",{title:t,"data-testid":a,className:n?"rounded-full border border-sky-500/40 bg-sky-500/10 px-2 py-0.5 font-medium text-sky-700 dark:text-sky-300":"rounded-full border bg-muted px-2 py-0.5 text-muted-foreground",children:e})}function AN(e){const t=e.split(/[\\/]/);return t[t.length-1]||e}function CN(e,t){return e.length>t?`…${e.slice(e.length-t+1)}`:e}function NN({queue:e,disabled:t,sending:n,error:a,onNoteChange:s,onDiscard:u,onDiscardAll:o,onSend:f}){return e.length===0?null:T.jsxs("div",{className:"border-t bg-muted/40","data-testid":"annotation-queue",children:[a?T.jsx("div",{className:"px-3 pt-2 text-destructive text-xs",children:a}):null,T.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5",children:[T.jsxs("span",{className:"font-medium text-muted-foreground text-xs",children:[e.length," annotation",e.length===1?"":"s"," queued"]}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("button",{type:"button",onClick:o,disabled:n,className:"text-muted-foreground text-xs hover:text-foreground disabled:opacity-50",children:"Discard all"}),T.jsxs(ft,{type:"button",size:"sm","data-testid":"annotation-send",disabled:t||n,onClick:f,children:[T.jsx(r0,{}),n?"Sending…":`Send ${e.length}`]})]})]}),T.jsx("div",{className:"max-h-56 space-y-2 overflow-y-auto px-3 pb-2",children:e.map(d=>T.jsx(wN,{item:d,disabled:n,onNoteChange:s,onDiscard:u},d.id))})]})}function wN({item:e,disabled:t,onNoteChange:n,onDiscard:a}){const s=Pc(u=>n(e.id,e.note?`${e.note} ${u}`:u));return T.jsxs("div",{className:"chamba-fly-in flex gap-2 rounded-lg border bg-card p-2 shadow-sm","data-testid":"annotation-card",children:[e.previewUrl?T.jsx("img",{src:e.previewUrl,alt:e.target.label??"annotated element",className:"size-16 shrink-0 rounded-md border object-cover"}):null,T.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[T.jsxs("div",{className:"flex items-start gap-1",children:[T.jsx("textarea",{value:e.note,onChange:u=>n(e.id,u.target.value),placeholder:"Comment on this element…",rows:2,disabled:t,className:"min-h-[2rem] flex-1 resize-none rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50"}),s.supported?T.jsx(ft,{type:"button",size:"icon-sm",variant:s.listening?"default":"ghost","aria-label":s.listening?"Stop dictation":"Dictate comment","aria-pressed":s.listening,onClick:s.toggle,children:T.jsx(Hc,{})}):null,T.jsx(ft,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Discard annotation",disabled:t,onClick:()=>a(e.id),children:T.jsx(pc,{})})]}),T.jsx(h2,{target:e.target})]})]})}/*!---------------------------------------------------------------------------------------------
200
- * Copyright (c) StackBlitz. All rights reserved.
201
- * Licensed under the MIT License. See License.txt in the project root for license information.
202
- *--------------------------------------------------------------------------------------------*/const RN={damping:.7,stiffness:.05,mass:1.25},ON=70,LN=1e3/60,DN=350;let jc=!1;var Nx;(Nx=globalThis.document)==null||Nx.addEventListener("mousedown",()=>{jc=!0});var wx;(wx=globalThis.document)==null||wx.addEventListener("mouseup",()=>{jc=!1});var Rx;(Rx=globalThis.document)==null||Rx.addEventListener("click",()=>{jc=!1});const IN=(e={})=>{const[t,n]=S.useState(!1),[a,s]=S.useState(e.initial!==!1),[u,o]=S.useState(!1),f=S.useRef(null);f.current=e;const d=S.useCallback(()=>{var D;if(!jc)return!1;const z=window.getSelection();if(!z||!z.rangeCount)return!1;const U=z.getRangeAt(0);return U.commonAncestorContainer.contains(w.current)||((D=w.current)==null?void 0:D.contains(U.commonAncestorContainer))},[]),h=S.useCallback(z=>{g.isAtBottom=z,s(z)},[]),b=S.useCallback(z=>{g.escapedFromLock=z,n(z)},[]),g=S.useMemo(()=>{let z;return{escapedFromLock:t,isAtBottom:a,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){var U;return((U=w.current)==null?void 0:U.scrollTop)??0},set scrollTop(U){if(w.current){const{scrollBehavior:D}=getComputedStyle(w.current);D!=="auto"&&(w.current.style.scrollBehavior="auto"),w.current.scrollTop=U,g.ignoreScrollToTop=w.current.scrollTop,D!=="auto"&&(w.current.style.scrollBehavior=D)}},get targetScrollTop(){return!w.current||!O.current?0:w.current.scrollHeight-1-w.current.clientHeight},get calculatedTargetScrollTop(){if(!w.current||!O.current)return 0;const{targetScrollTop:U}=this;if(!e.targetScrollTop)return U;if((z==null?void 0:z.targetScrollTop)===U)return z.calculatedScrollTop;const D=Math.max(Math.min(e.targetScrollTop(U,{scrollElement:w.current,contentElement:O.current}),U),0);return z={targetScrollTop:U,calculatedScrollTop:D},requestAnimationFrame(()=>{z=void 0}),D},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=ON}}},[]),E=S.useCallback((z={})=>{var de;typeof z=="string"&&(z={animation:z}),z.preserveScrollPosition||h(!0);const U=Date.now()+(Number(z.wait)||0),D=Mh(f.current,z.animation),{ignoreEscapes:q=!1}=z;let M,$=g.calculatedTargetScrollTop;z.duration instanceof Promise?z.duration.finally(()=>{M=Date.now()}):M=U+(z.duration??0);const G=async()=>{const F=new Promise(requestAnimationFrame).then(()=>{var pe;if(!g.isAtBottom)return g.animation=void 0,!1;const{scrollTop:oe}=g,ce=performance.now(),we=(ce-(g.lastTick??ce))/LN;if(g.animation||(g.animation={behavior:D,promise:F,ignoreEscapes:q}),g.animation.behavior===D&&(g.lastTick=ce),d()||U>Date.now())return G();if(oe<Math.min($,g.calculatedTargetScrollTop)){if(((pe=g.animation)==null?void 0:pe.behavior)===D){if(D==="instant")return g.scrollTop=g.calculatedTargetScrollTop,G();g.velocity=(D.damping*g.velocity+D.stiffness*g.scrollDifference)/D.mass,g.accumulated+=g.velocity*we,g.scrollTop+=g.accumulated,g.scrollTop!==oe&&(g.accumulated=0)}return G()}return M>Date.now()?($=g.calculatedTargetScrollTop,G()):(g.animation=void 0,g.scrollTop<g.calculatedTargetScrollTop?E({animation:Mh(f.current,f.current.resize),ignoreEscapes:q,duration:Math.max(0,M-Date.now())||void 0}):g.isAtBottom)});return F.then(oe=>(requestAnimationFrame(()=>{g.animation||(g.lastTick=void 0,g.velocity=0)}),oe))};return z.wait!==!0&&(g.animation=void 0),((de=g.animation)==null?void 0:de.behavior)===D?g.animation.promise:G()},[h,d,g]),x=S.useCallback(()=>{b(!0),h(!1)},[b,h]),v=S.useCallback(({target:z})=>{if(z!==w.current)return;const{scrollTop:U,ignoreScrollToTop:D}=g;let{lastScrollTop:q=U}=g;g.lastScrollTop=U,g.ignoreScrollToTop=void 0,D&&D>U&&(q=D),o(g.isNearBottom),setTimeout(()=>{var G;if(g.resizeDifference||U===D)return;if(d()){b(!0),h(!1);return}const M=U>q,$=U<q;if((G=g.animation)!=null&&G.ignoreEscapes){g.scrollTop=q;return}$&&(b(!0),h(!1)),M&&b(!1),!g.escapedFromLock&&g.isNearBottom&&h(!0)},1)},[b,h,d,g]),N=S.useCallback(({target:z,deltaY:U})=>{var q;let D=z;for(;!["scroll","auto"].includes(getComputedStyle(D).overflow);){if(!D.parentElement)return;D=D.parentElement}D===w.current&&U<0&&w.current.scrollHeight>w.current.clientHeight&&!((q=g.animation)!=null&&q.ignoreEscapes)&&(b(!0),h(!1))},[b,h,g]),w=Ay(z=>{var U,D;(U=w.current)==null||U.removeEventListener("scroll",v),(D=w.current)==null||D.removeEventListener("wheel",N),z==null||z.addEventListener("scroll",v,{passive:!0}),z==null||z.addEventListener("wheel",N,{passive:!0})},[]),O=Ay(z=>{var D,q;if((D=g.resizeObserver)==null||D.disconnect(),g.resizeObserver=void 0,!z)return;let U;g.resizeObserver=new ResizeObserver(([M])=>{const{height:$}=M.contentRect,G=$-(U??$);if(g.resizeDifference=G,g.scrollTop>g.targetScrollTop&&(g.scrollTop=g.targetScrollTop),o(g.isNearBottom),G>=0){const de=Mh(f.current,U?f.current.resize:f.current.initial);E({animation:de,wait:!0,preserveScrollPosition:!0,duration:de==="instant"?void 0:DN})}else g.isNearBottom&&(b(!1),h(!0));U=$,requestAnimationFrame(()=>{setTimeout(()=>{g.resizeDifference===G&&(g.resizeDifference=0)},1)})}),(q=g.resizeObserver)==null||q.observe(z)},[]);return{contentRef:O,scrollRef:w,scrollToBottom:E,stopScroll:x,isAtBottom:a||u,isNearBottom:u,escapedFromLock:t,state:g}};function Ay(e,t){const n=S.useCallback(a=>(n.current=a,e(a)),t);return n}const Ih=new Map;function Mh(...e){const t={...RN};let n=!1;for(const s of e){if(s==="instant"){n=!0;continue}typeof s=="object"&&(n=!1,t.damping=s.damping??t.damping,t.stiffness=s.stiffness??t.stiffness,t.mass=s.mass??t.mass)}const a=JSON.stringify(t);return Ih.has(a)||Ih.set(a,Object.freeze(t)),n?"instant":Ih.get(a)}/*!---------------------------------------------------------------------------------------------
203
- * Copyright (c) StackBlitz. All rights reserved.
204
- * Licensed under the MIT License. See License.txt in the project root for license information.
205
- *--------------------------------------------------------------------------------------------*/const m2=S.createContext(null),MN=typeof window<"u"?S.useLayoutEffect:S.useEffect;function yc({instance:e,children:t,resize:n,initial:a,mass:s,damping:u,stiffness:o,targetScrollTop:f,contextRef:d,...h}){const b=S.useRef(null),g=S.useCallback((q,M)=>{const $=(D==null?void 0:D.targetScrollTop)??f;return($==null?void 0:$(q,M))??q},[f]),E=IN({mass:s,damping:u,stiffness:o,resize:n,initial:a,targetScrollTop:g}),{scrollRef:x,contentRef:v,scrollToBottom:N,stopScroll:w,isAtBottom:O,escapedFromLock:z,state:U}=e??E,D=S.useMemo(()=>({scrollToBottom:N,stopScroll:w,scrollRef:x,isAtBottom:O,escapedFromLock:z,contentRef:v,state:U,get targetScrollTop(){return b.current},set targetScrollTop(q){b.current=q}}),[N,O,v,x,w,z,U]);return S.useImperativeHandle(d,()=>D,[D]),MN(()=>{x.current&&getComputedStyle(x.current).overflow==="visible"&&(x.current.style.overflow="auto")},[]),S.createElement(m2.Provider,{value:D},S.createElement("div",{...h},typeof t=="function"?t(D):t))}(function(e){function t({children:n,scrollClassName:a,...s}){const u=p2();return S.createElement("div",{ref:u.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:a},S.createElement("div",{...s,ref:u.contentRef},typeof n=="function"?n(u):n))}e.Content=t})(yc||(yc={}));function p2(){const e=S.useContext(m2);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const BN=({className:e,...t})=>T.jsx(yc,{className:Bt("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),zN=({className:e,...t})=>T.jsx(yc.Content,{className:Bt("flex flex-col gap-6 p-4",e),...t}),HN=({className:e,title:t="No messages yet",description:n="Start a conversation to see messages here",icon:a,children:s,...u})=>T.jsx("div",{className:Bt("flex size-full flex-col items-center justify-center gap-3 p-8 text-center",e),...u,children:s??T.jsxs(T.Fragment,{children:[a&&T.jsx("div",{className:"text-muted-foreground",children:a}),T.jsxs("div",{className:"space-y-1",children:[T.jsx("h3",{className:"font-medium text-sm",children:t}),n&&T.jsx("p",{className:"text-muted-foreground text-sm",children:n})]})]})}),UN=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:a}=p2(),s=S.useCallback(()=>{a()},[a]);return!n&&T.jsx(ft,{className:Bt("-translate-x-1/2 absolute bottom-4 left-[50%] rounded-full",e),onClick:s,size:"icon",type:"button",variant:"outline",...t,children:T.jsx(CA,{className:"size-4"})})},PN=S.forwardRef(function({sessionId:t,disabled:n,onSend:a},s){const[u,o]=S.useState(""),[f,d]=S.useState([]),[h,b]=S.useState(!1),[g,E]=S.useState(null),x=S.useRef(null),v=Pc(D=>{o(q=>q?`${q} ${D}`:D)}),N=S.useCallback(async D=>{const q=Array.from(D);if(!(q.length===0||n)){b(!0),E(null);try{for(const M of q){const $=await Jm(t,M);d(G=>[...G,$])}}catch(M){E(M.message)}finally{b(!1)}}},[t,n]);S.useImperativeHandle(s,()=>({addFiles:D=>void N(D)}),[N]);const w=async()=>{const D=u.trim();if(!(!D&&f.length===0||h||n)){b(!0),E(null);try{await a({...D?{text:D}:{},...f.length>0?{attachmentIds:f.map(q=>q.id)}:{}}),o(""),d([])}catch(q){E(q.message)}finally{b(!1)}}},O=D=>{D.key==="Enter"&&!D.shiftKey&&(D.preventDefault(),w())},z=D=>{const q=D.clipboardData.files;q.length>0&&(D.preventDefault(),N(q))},U=D=>{D.preventDefault(),D.dataTransfer.files.length>0&&N(D.dataTransfer.files)};return T.jsxs("div",{className:"border-t p-3",onDrop:U,onDragOver:D=>D.preventDefault(),children:[g?T.jsx("div",{className:"mb-2 text-destructive text-sm",children:g}):null,f.length>0?T.jsx("div",{className:"mb-2 flex flex-wrap gap-2",children:f.map(D=>T.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border bg-muted px-2 py-1 text-xs",children:[D.name,T.jsx("button",{type:"button","aria-label":`Remove ${D.name}`,onClick:()=>d(q=>q.filter(M=>M.id!==D.id)),className:"text-muted-foreground hover:text-foreground",children:T.jsx(pc,{className:"size-3"})})]},D.id))}):null,T.jsxs("div",{className:"flex items-end gap-2",children:[T.jsx("input",{ref:x,type:"file",multiple:!0,className:"hidden",onChange:D=>{D.target.files&&N(D.target.files),D.target.value=""}}),T.jsx(ft,{type:"button",variant:"ghost",size:"icon",disabled:n||h,"aria-label":"Attach files",onClick:()=>{var D;return(D=x.current)==null?void 0:D.click()},children:T.jsx(n0,{})}),v.supported?T.jsx(ft,{type:"button",variant:v.listening?"default":"ghost",size:"icon",disabled:n,"aria-label":v.listening?"Stop dictation":"Start dictation","aria-pressed":v.listening,onClick:v.toggle,children:T.jsx(Hc,{})}):null,T.jsx("textarea",{value:u,onChange:D=>o(D.target.value),onKeyDown:O,onPaste:z,placeholder:n?"This session has ended.":"Message the agent…",disabled:n,rows:2,className:"min-h-[2.5rem] flex-1 resize-none rounded-md border bg-background px-3 py-2 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:opacity-50"}),T.jsx(ft,{type:"button",size:"icon",disabled:n||h,"aria-label":"Send message",onClick:()=>void w(),children:T.jsx(r0,{})})]})]})}),jN=Lc.array();function FN(e){const t=e.payload;if(t&&typeof t=="object"){const n=t;if(typeof n.text=="string")return n.text}return""}function qN(e){if(!e.payload||typeof e.payload!="object")return[];const t=jN.safeParse(e.payload.attachments);return t.success?t.data:[]}function YN(e){const t=e.payload??{},n=typeof t.reason=="string"?t.reason:"",a=typeof t.to=="string"?t.to:"",s=typeof t.kind=="string"?t.kind:"";switch(n){case"session-created":return"Session started";case"session-ended":return"Session ended";case"user-moved-away":return a?`You moved to another session (${a})`:"You moved to another session";case"kind-chosen":return s==="spec"?"Spec session ready - describe what you want to spec (paste text, screenshots, or links) and the agent will lead from there.":s==="everyday"?"Everyday session ready - start the conversation whenever you like.":"Session kind chosen";default:return n.replace(/-/g," ")}}function $N(e){return e.contentType.startsWith("image/")}function VN({event:e,sessionId:t}){const n=$k.safeParse(e.payload);if(!n.success)return null;const{items:a}=n.data;return T.jsxs("div",{className:"ml-auto max-w-[85%] space-y-2","data-testid":"annotation-batch",children:[T.jsxs("div",{className:"text-right text-muted-foreground text-xs",children:[a.length," annotation",a.length===1?"":"s"," sent"]}),a.map((s,u)=>T.jsxs("div",{className:"space-y-1.5 rounded-lg border bg-card p-2 shadow-sm",children:[s.screenshot?T.jsx("img",{src:Fx(t,s.screenshot.id),alt:s.target.label??"annotated element",className:"max-h-40 w-full rounded-md border object-contain"}):null,s.note?T.jsx("p",{className:"text-sm",children:s.note}):null,T.jsx(h2,{target:s.target})]},`${e.id}:${u}`))]})}function GN({sessionId:e,attachments:t}){return t.length===0?null:T.jsx("div",{className:"flex flex-wrap gap-2",children:t.map(n=>{const a=Fx(e,n.id);return $N(n)?T.jsx("a",{href:a,target:"_blank",rel:"noreferrer",children:T.jsx("img",{src:a,alt:n.name,className:"max-h-64 max-w-full rounded-lg border object-contain"})},n.id):T.jsxs("a",{href:a,download:n.name,className:"inline-flex items-center gap-2 rounded-md border bg-muted px-3 py-2 text-sm hover:bg-accent",children:[T.jsx(n0,{className:"size-4 shrink-0"}),n.name]},n.id)})})}const QN="modulepreload",XN=function(e){return"/"+e},Cy={},u0=function(t,n,a){let s=Promise.resolve();if(n&&n.length>0){let o=function(h){return Promise.all(h.map(b=>Promise.resolve(b).then(g=>({status:"fulfilled",value:g}),g=>({status:"rejected",reason:g}))))};document.getElementsByTagName("link");const f=document.querySelector("meta[property=csp-nonce]"),d=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));s=o(n.map(h=>{if(h=XN(h),h in Cy)return;Cy[h]=!0;const b=h.endsWith(".css"),g=b?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${g}`))return;const E=document.createElement("link");if(E.rel=b?"stylesheet":QN,b||(E.as="script"),E.crossOrigin="",E.href=h,d&&E.setAttribute("nonce",d),document.head.appendChild(E),b)return new Promise((x,v)=>{E.addEventListener("load",x),E.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${h}`)))})}))}function u(o){const f=new Event("vite:preloadError",{cancelable:!0});if(f.payload=o,window.dispatchEvent(f),!f.defaultPrevented)throw o}return s.then(o=>{for(const f of o||[])f.status==="rejected"&&u(f.reason);return t().catch(u)})},Fc=(function(e){if(e==null)return JN;if(typeof e=="function")return qc(e);if(typeof e=="object")return Array.isArray(e)?ZN(e):KN(e);if(typeof e=="string")return WN(e);throw new Error("Expected function, string, or object as test")});function ZN(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Fc(e[n]);return qc(a);function a(...s){let u=-1;for(;++u<t.length;)if(t[u].apply(this,s))return!0;return!1}}function KN(e){const t=e;return qc(n);function n(a){const s=a;let u;for(u in e)if(s[u]!==t[u])return!1;return!0}}function WN(e){return qc(t);function t(n){return n&&n.type===e}}function qc(e){return t;function t(n,a,s){return!!(e6(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function JN(){return!0}function e6(e){return e!==null&&typeof e=="object"&&"type"in e}const g2=[],Vs=!0,Tm=!1,Sl="skip";function o0(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const u=Fc(s),o=a?-1:1;f(e,void 0,[])();function f(d,h,b){const g=d&&typeof d=="object"?d:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(d.type+(x?"<"+x+">":""))+")"})}return E;function E(){let x=g2,v,N,w;if((!t||u(d,h,b[b.length-1]||void 0))&&(x=t6(n(d,b)),x[0]===Tm))return x;if("children"in d&&d.children){const O=d;if(O.children&&x[0]!==Sl)for(N=(a?O.children.length:-1)+o,w=b.concat(O);N>-1&&N<O.children.length;){const z=O.children[N];if(v=f(z,N,w)(),v[0]===Tm)return v;N=typeof v[1]=="number"?v[1]:N+o}}return x}}}function t6(e){return Array.isArray(e)?e:typeof e=="number"?[Vs,e]:e==null?g2:[e]}function Ar(e,t,n,a){let s,u,o;typeof t=="function"&&typeof n!="function"?(u=void 0,o=t,s=n):(u=t,o=n,s=a),o0(e,u,f,s);function f(d,h){const b=h[h.length-1],g=b?b.children.indexOf(d):void 0;return o(d,g,b)}}const Ll={indicator:"indicator",textOnly:"text-only",remove:"remove"};function n6({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:a=!1,allowedProtocols:s=[],blockedImageClass:u="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:o="text-gray-500",linkBlockPolicy:f=Ll.indicator,imageBlockPolicy:d=Ll.indicator}){const h=t.length&&!t.every(g=>g==="*"),b=n.length&&!n.every(g=>g==="*");if(!e&&(h||b))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return g=>{const E=u6(e,t,n,a,s,u,o,f,d);b2(g),Ar(g,E)}}function Ny(e,t){if(typeof e!="string")return null;try{return new URL(e)}catch{if(t)try{return new URL(e,t)}catch{return null}if(e.startsWith("/")||e.startsWith("./")||e.startsWith("../"))try{return new URL(e,"http://example.com")}catch{return null}return null}}function r6(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const a6=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),i6=new Set(["javascript:","data:","file:","vbscript:"]);function wy(e,t,n,a=!1,s=!1,u=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!s)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return s&&a&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const b=e.substring(5);if(b&&b.length>0&&b!=="invalid")return e}}catch{return null}return null}const o=Ny(e,n);if(!o||i6.has(o.protocol)||!(a6.has(o.protocol)||u.includes(o.protocol)||u.includes("*")))return null;if(o.protocol==="mailto:"||!o.protocol.match(/^https?:$/))return o.href;const d=r6(e);return o&&t.some(h=>{const b=Ny(h,n);return!b||b.origin!==o.origin?!1:o.href.startsWith(b.href)})?d?o.pathname+o.search+o.hash:o.href:t.includes("*")?o.protocol!=="https:"&&o.protocol!=="http:"?null:d?o.pathname+o.search+o.hash:o.href:null}function b2(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)b2(t)}}const Bh=Symbol("node-seen");function l6(e,t,n){return t===Ll.remove?{type:"remove"}:t===Ll.textOnly?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[...e.children]}}:{type:"replace",element:{type:"element",tagName:"span",properties:{title:"Blocked URL: "+String(e.properties.href),class:n},children:[...e.children,{type:"text",value:" [blocked]"}]}}}function s6(e,t,n){if(t===Ll.remove)return{type:"remove"};if(t===Ll.textOnly){const a=String(e.properties.alt||"");return a?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:a}]}}:{type:"remove"}}return{type:"replace",element:{type:"element",tagName:"span",properties:{class:n},children:[{type:"text",value:"[Image blocked: "+String(e.properties.alt||"No description")+"]"}]}}}const u6=(e,t,n,a,s,u,o,f,d)=>{const h=(b,g,E)=>{if(b.type!=="element"||b[Bh])return Vs;if(b.tagName==="a"){const x=wy(b.properties.href,t,e,!1,!1,s);if(x===null){if(b[Bh]=!0,Ar(b,h),E&&typeof g=="number"){const v=l6(b,f,o);if(v.type==="remove")return E.children.splice(g,1),[Sl,g];E.children[g]=v.element}return Sl}else return b.properties.href=x,b.properties.target="_blank",b.properties.rel="noopener noreferrer",Vs}if(b.tagName==="img"){const x=wy(b.properties.src,n,e,a,!0,s);if(x===null){if(b[Bh]=!0,Ar(b,h),E&&typeof g=="number"){const v=s6(b,d,u);if(v.type==="remove")return E.children.splice(g,1),[Sl,g];E.children[g]=v.element}return Sl}else return b.properties.src=x,Vs}return Vs};return h},y2=-1,Yc=0,Js=1,Ec=2,c0=3,f0=4,d0=5,h0=6,E2=7,x2=8,o6=typeof self=="object"?self:globalThis,Ry=(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 o6[e](t)},c6=(e,t)=>{const n=(s,u)=>(e.set(u,s),s),a=s=>{if(e.has(s))return e.get(s);const[u,o]=t[s];switch(u){case Yc:case y2:return n(o,s);case Js:{const f=n([],s);for(const d of o)f.push(a(d));return f}case Ec:{const f=n({},s);for(const[d,h]of o)f[a(d)]=a(h);return f}case c0:return n(new Date(o),s);case f0:{const{source:f,flags:d}=o;return n(new RegExp(f,d),s)}case d0:{const f=n(new Map,s);for(const[d,h]of o)f.set(a(d),a(h));return f}case h0:{const f=n(new Set,s);for(const d of o)f.add(a(d));return f}case E2:{const{name:f,message:d}=o;return n(Ry(f,d),s)}case x2:return n(BigInt(o),s);case"BigInt":return n(Object(BigInt(o)),s);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:f}=new Uint8Array(o);return n(new DataView(f),o)}}return n(Ry(u,o),s)};return a},Oy=e=>c6(new Map,e)(0),pi="",{toString:f6}={},{keys:d6}=Object,zs=e=>{const t=typeof e;if(t!=="object"||!e)return[Yc,t];const n=f6.call(e).slice(8,-1);switch(n){case"Array":return[Js,pi];case"Object":return[Ec,pi];case"Date":return[c0,pi];case"RegExp":return[f0,pi];case"Map":return[d0,pi];case"Set":return[h0,pi];case"DataView":return[Js,n]}return n.includes("Array")?[Js,n]:n.includes("Error")?[E2,n]:[Ec,n]},Yo=([e,t])=>e===Yc&&(t==="function"||t==="symbol"),h6=(e,t,n,a)=>{const s=(o,f)=>{const d=a.push(o)-1;return n.set(f,d),d},u=o=>{if(n.has(o))return n.get(o);let[f,d]=zs(o);switch(f){case Yc:{let b=o;switch(d){case"bigint":f=x2,b=o.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);b=null;break;case"undefined":return s([y2],o)}return s([f,b],o)}case Js:{if(d){let E=o;return d==="DataView"?E=new Uint8Array(o.buffer):d==="ArrayBuffer"&&(E=new Uint8Array(o)),s([d,[...E]],o)}const b=[],g=s([f,b],o);for(const E of o)b.push(u(E));return g}case Ec:{if(d)switch(d){case"BigInt":return s([d,o.toString()],o);case"Boolean":case"Number":case"String":return s([d,o.valueOf()],o)}if(t&&"toJSON"in o)return u(o.toJSON());const b=[],g=s([f,b],o);for(const E of d6(o))(e||!Yo(zs(o[E])))&&b.push([u(E),u(o[E])]);return g}case c0:return s([f,isNaN(o.getTime())?pi:o.toISOString()],o);case f0:{const{source:b,flags:g}=o;return s([f,{source:b,flags:g}],o)}case d0:{const b=[],g=s([f,b],o);for(const[E,x]of o)(e||!(Yo(zs(E))||Yo(zs(x))))&&b.push([u(E),u(x)]);return g}case h0:{const b=[],g=s([f,b],o);for(const E of o)(e||!Yo(zs(E)))&&b.push(u(E));return g}}const{message:h}=o;return s([f,{name:d,message:h}],o)};return u},Ly=(e,{json:t,lossy:n}={})=>{const a=[];return h6(!(t||n),!!t,new Map,a)(e),a},Ai=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Oy(Ly(e,t)):structuredClone(e):(e,t)=>Oy(Ly(e,t));class gu{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}gu.prototype.normal={};gu.prototype.property={};gu.prototype.space=void 0;function T2(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new gu(n,a,t)}function cu(e){return e.toLowerCase()}class On{constructor(t,n){this.attribute=n,this.property=t}}On.prototype.attribute="";On.prototype.booleanish=!1;On.prototype.boolean=!1;On.prototype.commaOrSpaceSeparated=!1;On.prototype.commaSeparated=!1;On.prototype.defined=!1;On.prototype.mustUseProperty=!1;On.prototype.number=!1;On.prototype.overloadedBoolean=!1;On.prototype.property="";On.prototype.spaceSeparated=!1;On.prototype.space=void 0;let m6=0;const ze=Oi(),Gt=Oi(),_m=Oi(),ge=Oi(),kt=Oi(),Ei=Oi(),Pn=Oi();function Oi(){return 2**++m6}const vm=Object.freeze(Object.defineProperty({__proto__:null,boolean:ze,booleanish:Gt,commaOrSpaceSeparated:Pn,commaSeparated:Ei,number:ge,overloadedBoolean:_m,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),zh=Object.keys(vm);class m0 extends On{constructor(t,n,a,s){let u=-1;if(super(t,n),Dy(this,"space",s),typeof a=="number")for(;++u<zh.length;){const o=zh[u];Dy(this,zh[u],(a&vm[o])===vm[o])}}}m0.prototype.defined=!0;function Dy(e,t,n){n&&(e[t]=n)}function Ml(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const u=new m0(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(u.mustUseProperty=!0),t[a]=u,n[cu(a)]=a,n[cu(u.attribute)]=a}return new gu(t,n,e.space)}const _2=Ml({properties:{ariaActiveDescendant:null,ariaAtomic:Gt,ariaAutoComplete:null,ariaBusy:Gt,ariaChecked:Gt,ariaColCount:ge,ariaColIndex:ge,ariaColSpan:ge,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Gt,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Gt,ariaFlowTo:kt,ariaGrabbed:Gt,ariaHasPopup:null,ariaHidden:Gt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:ge,ariaLive:null,ariaModal:Gt,ariaMultiLine:Gt,ariaMultiSelectable:Gt,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:ge,ariaPressed:Gt,ariaReadOnly:Gt,ariaRelevant:null,ariaRequired:Gt,ariaRoleDescription:kt,ariaRowCount:ge,ariaRowIndex:ge,ariaRowSpan:ge,ariaSelected:Gt,ariaSetSize:ge,ariaSort:null,ariaValueMax:ge,ariaValueMin:ge,ariaValueNow:ge,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function v2(e,t){return t in e?e[t]:t}function S2(e,t){return v2(e,t.toLowerCase())}const p6=Ml({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ei,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:ze,allowPaymentRequest:ze,allowUserMedia:ze,alpha:ze,alt:null,as:null,async:ze,autoCapitalize:null,autoComplete:kt,autoFocus:ze,autoPlay:ze,blocking:kt,capture:null,charSet:null,checked:ze,cite:null,className:kt,closedBy:null,colorSpace:null,cols:ge,colSpan:ge,command:null,commandFor:null,content:null,contentEditable:Gt,controls:ze,controlsList:kt,coords:ge|Ei,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ze,defer:ze,dir:null,dirName:null,disabled:ze,download:_m,draggable:Gt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ze,formTarget:null,headers:kt,height:ge,hidden:_m,high:ge,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:ze,inputMode:null,integrity:null,is:null,isMap:ze,itemId:null,itemProp:kt,itemRef:kt,itemScope:ze,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ze,low:ge,manifest:null,max:null,maxLength:ge,media:null,method:null,min:null,minLength:ge,multiple:ze,muted:ze,name:null,nonce:null,noModule:ze,noValidate:ze,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:ze,optimum:ge,pattern:null,ping:kt,placeholder:null,playsInline:ze,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ze,referrerPolicy:null,rel:kt,required:ze,reversed:ze,rows:ge,rowSpan:ge,sandbox:kt,scope:null,scoped:ze,seamless:ze,selected:ze,shadowRootClonable:ze,shadowRootCustomElementRegistry:ze,shadowRootDelegatesFocus:ze,shadowRootMode:null,shadowRootSerializable:ze,shape:null,size:ge,sizes:null,slot:null,span:ge,spellCheck:Gt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ge,step:null,style:null,tabIndex:ge,target:null,title:null,translate:null,type:null,typeMustMatch:ze,useMap:null,value:Gt,width:ge,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:ge,borderColor:null,bottomMargin:ge,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ze,declare:ze,event:null,face:null,frame:null,frameBorder:null,hSpace:ge,leftMargin:ge,link:null,longDesc:null,lowSrc:null,marginHeight:ge,marginWidth:ge,noResize:ze,noHref:ze,noShade:ze,noWrap:ze,object:null,profile:null,prompt:null,rev:null,rightMargin:ge,rules:null,scheme:null,scrolling:Gt,standby:null,summary:null,text:null,topMargin:ge,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ge,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ze,disablePictureInPicture:ze,disableRemotePlayback:ze,exportParts:Ei,part:kt,prefix:null,property:null,results:ge,security:null,unselectable:null},space:"html",transform:S2}),g6=Ml({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:Pn,accentHeight:ge,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ge,amplitude:ge,arabicForm:null,ascent:ge,attributeName:null,attributeType:null,azimuth:ge,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ge,by:null,calcMode:null,capHeight:ge,className:kt,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:ge,diffuseConstant:ge,direction:null,display:null,dur:null,divisor:ge,dominantBaseline:null,download:ze,dx:null,dy:null,edgeMode:null,editable:null,elevation:ge,enableBackground:null,end:null,event:null,exponent:ge,externalResourcesRequired:null,fill:null,fillOpacity:ge,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:Ei,g2:Ei,glyphName:Ei,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ge,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ge,horizOriginX:ge,horizOriginY:ge,id:null,ideographic:ge,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ge,k:ge,k1:ge,k2:ge,k3:ge,k4:ge,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ge,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:ge,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:ge,overlineThickness:ge,paintOrder:null,panose1:null,path:null,pathLength:ge,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ge,pointsAtY:ge,pointsAtZ:ge,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:ge,specularExponent:ge,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ge,strikethroughThickness:ge,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ge,strokeOpacity:ge,strokeWidth:null,style:null,surfaceScale:ge,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:ge,tableValues:null,target:null,targetX:ge,targetY:ge,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ge,underlineThickness:ge,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ge,values:null,vAlphabetic:ge,vMathematical:ge,vectorEffect:null,vHanging:ge,vIdeographic:ge,version:null,vertAdvY:ge,vertOriginX:ge,vertOriginY:ge,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ge,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:v2}),k2=Ml({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()}}),A2=Ml({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:S2}),C2=Ml({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),b6={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"},y6=/[A-Z]/g,Iy=/-[a-z]/g,E6=/^data[-\w.:]+$/i;function $c(e,t){const n=cu(t);let a=t,s=On;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&E6.test(t)){if(t.charAt(4)==="-"){const u=t.slice(5).replace(Iy,T6);a="data"+u.charAt(0).toUpperCase()+u.slice(1)}else{const u=t.slice(4);if(!Iy.test(u)){let o=u.replace(y6,x6);o.charAt(0)!=="-"&&(o="-"+o),t="data"+o}}s=m0}return new s(a,t)}function x6(e){return"-"+e.toLowerCase()}function T6(e){return e.charAt(1).toUpperCase()}const bu=T2([_2,p6,k2,A2,C2],"html"),$a=T2([_2,g6,k2,A2,C2],"svg");function My(e){const t=[],n=String(e||"");let a=n.indexOf(","),s=0,u=!1;for(;!u;){a===-1&&(a=n.length,u=!0);const o=n.slice(s,a).trim();(o||!u)&&t.push(o),s=a+1,a=n.indexOf(",",s)}return t}function N2(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const By=/[#.]/g;function _6(e,t){const n=e||"",a={};let s=0,u,o;for(;s<n.length;){By.lastIndex=s;const f=By.exec(n),d=n.slice(s,f?f.index:n.length);d&&(u?u==="#"?a.id=d:Array.isArray(a.className)?a.className.push(d):a.className=[d]:o=d,s+=d.length),f&&(u=f[0],s++)}return{type:"element",tagName:o||t||"div",properties:a,children:[]}}function zy(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function w2(e){return e.join(" ").trim()}function R2(e,t,n){const a=n?A6(n):void 0;function s(u,o,...f){let d;if(u==null){d={type:"root",children:[]};const h=o;f.unshift(h)}else{d=_6(u,t);const h=d.tagName.toLowerCase(),b=a?a.get(h):void 0;if(d.tagName=b||h,v6(o))f.unshift(o);else for(const[g,E]of Object.entries(o))S6(e,d.properties,g,E)}for(const h of f)Sm(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function v6(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 a of n){const s=t[a];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const u=s;for(const o of u)if(typeof o!="number"&&typeof o!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function S6(e,t,n,a){const s=$c(e,n);let u;if(a!=null){if(typeof a=="number"){if(Number.isNaN(a))return;u=a}else typeof a=="boolean"?u=a:typeof a=="string"?s.spaceSeparated?u=zy(a):s.commaSeparated?u=My(a):s.commaOrSpaceSeparated?u=zy(My(a).join(" ")):u=Hy(s,s.property,a):Array.isArray(a)?u=[...a]:u=s.property==="style"?k6(a):String(a);if(Array.isArray(u)){const o=[];for(const f of u)o.push(Hy(s,s.property,f));u=o}s.property==="className"&&Array.isArray(t.className)&&(u=t.className.concat(u)),t[s.property]=u}}function Sm(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)Sm(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Sm(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Hy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||cu(n)===cu(t)))return!0}return n}function k6(e){const t=[];for(const[n,a]of Object.entries(e))t.push([n,a].join(": "));return t.join("; ")}function A6(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const C6=["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"],N6=R2(bu,"div"),w6=R2($a,"g",C6);function R6(e){const t=String(e),n=[];return{toOffset:s,toPoint:a};function a(u){if(typeof u=="number"&&u>-1&&u<=t.length){let o=0;for(;;){let f=n[o];if(f===void 0){const d=Uy(t,n[o-1]);f=d===-1?t.length+1:d+1,n[o]=f}if(f>u)return{line:o+1,column:u-(o>0?n[o-1]:0)+1,offset:u};o++}}}function s(u){if(u&&typeof u.line=="number"&&typeof u.column=="number"&&!Number.isNaN(u.line)&&!Number.isNaN(u.column)){for(;n.length<u.line;){const f=n[n.length-1],d=Uy(t,f),h=d===-1?t.length+1:d+1;if(f===h)break;n.push(h)}const o=(u.line>1?n[u.line-2]:0)+u.column-1;if(o<n[u.line-1])return o}}}function Uy(e,t){const n=e.indexOf("\r",t),a=e.indexOf(`
206
- `,t);return a===-1?n:n===-1||n+1===a?a:n<a?n:a}const yi={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/"},O2={}.hasOwnProperty,O6=Object.prototype;function L6(e,t){const n=t||{};return p0({file:n.file||void 0,location:!1,schema:n.space==="svg"?$a:bu,verbose:n.verbose||!1},e)}function p0(e,t){let n;switch(t.nodeName){case"#comment":{const a=t;return n={type:"comment",value:a.data},ec(e,a,n),n}case"#document":case"#document-fragment":{const a=t,s="mode"in a?a.mode==="quirks"||a.mode==="limited-quirks":!1;if(n={type:"root",children:L2(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const u=String(e.file),o=R6(u),f=o.toPoint(0),d=o.toPoint(u.length);n.position={start:f,end:d}}return n}case"#documentType":{const a=t;return n={type:"doctype"},ec(e,a,n),n}case"#text":{const a=t;return n={type:"text",value:a.value},ec(e,a,n),n}default:return n=D6(e,t),n}}function L2(e,t){let n=-1;const a=[];for(;++n<t.length;){const s=p0(e,t[n]);a.push(s)}return a}function D6(e,t){const n=e.schema;e.schema=t.namespaceURI===yi.svg?$a:bu;let a=-1;const s={};for(;++a<t.attrs.length;){const f=t.attrs[a],d=(f.prefix?f.prefix+":":"")+f.name;O2.call(O6,d)||(s[d]=f.value)}const o=(e.schema.space==="svg"?w6:N6)(t.tagName,s,L2(e,t.childNodes));if(ec(e,t,o),o.tagName==="template"){const f=t,d=f.sourceCodeLocation,h=d&&d.startTag&&kl(d.startTag),b=d&&d.endTag&&kl(d.endTag),g=p0(e,f.content);h&&b&&e.file&&(g.position={start:h.end,end:b.start}),o.content=g}return e.schema=n,o}function ec(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const a=I6(e,n,t.sourceCodeLocation);a&&(e.location=!0,n.position=a)}}function I6(e,t,n){const a=kl(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(a&&!n.endTag&&s&&s.position&&s.position.end&&(a.end=Object.assign({},s.position.end)),e.verbose){const u={};let o;if(n.attrs)for(o in n.attrs)O2.call(n.attrs,o)&&(u[$c(e.schema,o).property]=kl(n.attrs[o]));n.startTag;const f=kl(n.startTag),d=n.endTag?kl(n.endTag):void 0,h={opening:f};d&&(h.closing=d),h.properties=u,t.data={position:h}}}return a}function kl(e){const t=Py({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Py({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Py(e){return e.line&&e.column?e:void 0}const jy={}.hasOwnProperty;function D2(e,t){const n=t||{};function a(s,...u){let o=a.invalid;const f=a.handlers;if(s&&jy.call(s,e)){const d=String(s[e]);o=jy.call(f,d)?f[d]:a.unknown}if(o)return o.call(this,s,...u)}return a.handlers=n.handlers||{},a.invalid=n.invalid,a.unknown=n.unknown,a}const M6={},B6={}.hasOwnProperty,I2=D2("type",{handlers:{root:H6,element:q6,text:j6,comment:F6,doctype:P6}});function z6(e,t){const a=(t||M6).space;return I2(e,a==="svg"?$a:bu)}function H6(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=g0(e.children,n,t),Bl(e,n),n}function U6(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=g0(e.children,n,t),Bl(e,n),n}function P6(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Bl(e,t),t}function j6(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Bl(e,t),t}function F6(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Bl(e,t),t}function q6(e,t){const n=t;let a=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(a=$a);const s=[];let u;if(e.properties){for(u in e.properties)if(u!=="children"&&B6.call(e.properties,u)){const d=Y6(a,u,e.properties[u]);d&&s.push(d)}}const o=a.space,f={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:yi[o],childNodes:[],parentNode:null};return f.childNodes=g0(e.children,f,a),Bl(e,f),e.tagName==="template"&&e.content&&(f.content=U6(e.content,a)),f}function Y6(e,t,n){const a=$c(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&a.boolean)return;Array.isArray(n)&&(n=a.commaSeparated?N2(n):w2(n));const s={name:a.attribute,value:n===!0?"":String(n)};if(a.space&&a.space!=="html"&&a.space!=="svg"){const u=s.name.indexOf(":");u<0?s.prefix="":(s.name=s.name.slice(u+1),s.prefix=a.attribute.slice(0,u)),s.namespace=yi[a.space]}return s}function g0(e,t,n){let a=-1;const s=[];if(e)for(;++a<e.length;){const u=I2(e[a],n);u.parentNode=t,s.push(u)}return s}function Bl(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 $6=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],V6=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]),Ot="�";var R;(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"})(R||(R={}));const wn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function M2(e){return e>=55296&&e<=57343}function G6(e){return e>=56320&&e<=57343}function Q6(e,t){return(e-55296)*1024+9216+t}function B2(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function z2(e){return e>=64976&&e<=65007||V6.has(e)}var J;(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"})(J||(J={}));const X6=65536;class Z6{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=X6,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:a,col:s,offset:u}=this,o=s+n,f=u+n;return{code:t,startLine:a,endLine:a,startCol:o,endCol:o,startOffset:f,endOffset:f}}_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(G6(n))return this.pos++,this._addGap(),Q6(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,R.EOF;return this._err(J.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 a=0;a<t.length;a++)if((this.html.charCodeAt(this.pos+a)|32)!==t.charCodeAt(a))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,R.EOF;const a=this.html.charCodeAt(n);return a===R.CARRIAGE_RETURN?R.LINE_FEED:a}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,R.EOF;let t=this.html.charCodeAt(this.pos);return t===R.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,R.LINE_FEED):t===R.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,M2(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===R.LINE_FEED||t===R.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){B2(t)?this._err(J.controlCharacterInInputStream):z2(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Qe;(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"})(Qe||(Qe={}));function H2(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 K6=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))),W6=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 J6(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=W6.get(e))!==null&&t!==void 0?t:e}var tn;(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"})(tn||(tn={}));const e4=32;var Ha;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ha||(Ha={}));function km(e){return e>=tn.ZERO&&e<=tn.NINE}function t4(e){return e>=tn.UPPER_A&&e<=tn.UPPER_F||e>=tn.LOWER_A&&e<=tn.LOWER_F}function n4(e){return e>=tn.UPPER_A&&e<=tn.UPPER_Z||e>=tn.LOWER_A&&e<=tn.LOWER_Z||km(e)}function r4(e){return e===tn.EQUALS||n4(e)}var en;(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"})(en||(en={}));var Zr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Zr||(Zr={}));class a4{constructor(t,n,a){this.decodeTree=t,this.emitCodePoint=n,this.errors=a,this.state=en.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Zr.Strict}startEntity(t){this.decodeMode=t,this.state=en.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case en.EntityStart:return t.charCodeAt(n)===tn.NUM?(this.state=en.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=en.NamedEntity,this.stateNamedEntity(t,n));case en.NumericStart:return this.stateNumericStart(t,n);case en.NumericDecimal:return this.stateNumericDecimal(t,n);case en.NumericHex:return this.stateNumericHex(t,n);case en.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|e4)===tn.LOWER_X?(this.state=en.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=en.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,a,s){if(n!==a){const u=a-n;this.result=this.result*Math.pow(s,u)+Number.parseInt(t.substr(n,u),s),this.consumed+=u}}stateNumericHex(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(km(s)||t4(s))n+=1;else return this.addToNumericResult(t,a,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,a,n,16),-1}stateNumericDecimal(t,n){const a=n;for(;n<t.length;){const s=t.charCodeAt(n);if(km(s))n+=1;else return this.addToNumericResult(t,a,n,10),this.emitNumericEntity(s,2)}return this.addToNumericResult(t,a,n,10),-1}emitNumericEntity(t,n){var a;if(this.consumed<=n)return(a=this.errors)===null||a===void 0||a.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===tn.SEMI)this.consumed+=1;else if(this.decodeMode===Zr.Strict)return 0;return this.emitCodePoint(J6(this.result),this.consumed),this.errors&&(t!==tn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:a}=this;let s=a[this.treeIndex],u=(s&Ha.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const o=t.charCodeAt(n);if(this.treeIndex=i4(a,s,this.treeIndex+Math.max(1,u),o),this.treeIndex<0)return this.result===0||this.decodeMode===Zr.Attribute&&(u===0||r4(o))?0:this.emitNotTerminatedNamedEntity();if(s=a[this.treeIndex],u=(s&Ha.VALUE_LENGTH)>>14,u!==0){if(o===tn.SEMI)return this.emitNamedEntityData(this.treeIndex,u,this.consumed+this.excess);this.decodeMode!==Zr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:a}=this,s=(a[n]&Ha.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,a){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~Ha.VALUE_LENGTH:s[t+1],a),n===3&&this.emitCodePoint(s[t+2],a),a}end(){var t;switch(this.state){case en.NamedEntity:return this.result!==0&&(this.decodeMode!==Zr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case en.NumericDecimal:return this.emitNumericEntity(0,2);case en.NumericHex:return this.emitNumericEntity(0,3);case en.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case en.EntityStart:return 0}}}function i4(e,t,n,a){const s=(t&Ha.BRANCH_LENGTH)>>7,u=t&Ha.JUMP_TABLE;if(s===0)return u!==0&&a===u?n:-1;if(u){const d=a-u;return d<0||d>=s?-1:e[n+d]-1}let o=n,f=o+s-1;for(;o<=f;){const d=o+f>>>1,h=e[d];if(h<a)o=d+1;else if(h>a)f=d-1;else return e[d+s]}return-1}var fe;(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/"})(fe||(fe={}));var xi;(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"})(xi||(xi={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var V;(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"})(V||(V={}));var y;(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"})(y||(y={}));const l4=new Map([[V.A,y.A],[V.ADDRESS,y.ADDRESS],[V.ANNOTATION_XML,y.ANNOTATION_XML],[V.APPLET,y.APPLET],[V.AREA,y.AREA],[V.ARTICLE,y.ARTICLE],[V.ASIDE,y.ASIDE],[V.B,y.B],[V.BASE,y.BASE],[V.BASEFONT,y.BASEFONT],[V.BGSOUND,y.BGSOUND],[V.BIG,y.BIG],[V.BLOCKQUOTE,y.BLOCKQUOTE],[V.BODY,y.BODY],[V.BR,y.BR],[V.BUTTON,y.BUTTON],[V.CAPTION,y.CAPTION],[V.CENTER,y.CENTER],[V.CODE,y.CODE],[V.COL,y.COL],[V.COLGROUP,y.COLGROUP],[V.DD,y.DD],[V.DESC,y.DESC],[V.DETAILS,y.DETAILS],[V.DIALOG,y.DIALOG],[V.DIR,y.DIR],[V.DIV,y.DIV],[V.DL,y.DL],[V.DT,y.DT],[V.EM,y.EM],[V.EMBED,y.EMBED],[V.FIELDSET,y.FIELDSET],[V.FIGCAPTION,y.FIGCAPTION],[V.FIGURE,y.FIGURE],[V.FONT,y.FONT],[V.FOOTER,y.FOOTER],[V.FOREIGN_OBJECT,y.FOREIGN_OBJECT],[V.FORM,y.FORM],[V.FRAME,y.FRAME],[V.FRAMESET,y.FRAMESET],[V.H1,y.H1],[V.H2,y.H2],[V.H3,y.H3],[V.H4,y.H4],[V.H5,y.H5],[V.H6,y.H6],[V.HEAD,y.HEAD],[V.HEADER,y.HEADER],[V.HGROUP,y.HGROUP],[V.HR,y.HR],[V.HTML,y.HTML],[V.I,y.I],[V.IMG,y.IMG],[V.IMAGE,y.IMAGE],[V.INPUT,y.INPUT],[V.IFRAME,y.IFRAME],[V.KEYGEN,y.KEYGEN],[V.LABEL,y.LABEL],[V.LI,y.LI],[V.LINK,y.LINK],[V.LISTING,y.LISTING],[V.MAIN,y.MAIN],[V.MALIGNMARK,y.MALIGNMARK],[V.MARQUEE,y.MARQUEE],[V.MATH,y.MATH],[V.MENU,y.MENU],[V.META,y.META],[V.MGLYPH,y.MGLYPH],[V.MI,y.MI],[V.MO,y.MO],[V.MN,y.MN],[V.MS,y.MS],[V.MTEXT,y.MTEXT],[V.NAV,y.NAV],[V.NOBR,y.NOBR],[V.NOFRAMES,y.NOFRAMES],[V.NOEMBED,y.NOEMBED],[V.NOSCRIPT,y.NOSCRIPT],[V.OBJECT,y.OBJECT],[V.OL,y.OL],[V.OPTGROUP,y.OPTGROUP],[V.OPTION,y.OPTION],[V.P,y.P],[V.PARAM,y.PARAM],[V.PLAINTEXT,y.PLAINTEXT],[V.PRE,y.PRE],[V.RB,y.RB],[V.RP,y.RP],[V.RT,y.RT],[V.RTC,y.RTC],[V.RUBY,y.RUBY],[V.S,y.S],[V.SCRIPT,y.SCRIPT],[V.SEARCH,y.SEARCH],[V.SECTION,y.SECTION],[V.SELECT,y.SELECT],[V.SOURCE,y.SOURCE],[V.SMALL,y.SMALL],[V.SPAN,y.SPAN],[V.STRIKE,y.STRIKE],[V.STRONG,y.STRONG],[V.STYLE,y.STYLE],[V.SUB,y.SUB],[V.SUMMARY,y.SUMMARY],[V.SUP,y.SUP],[V.TABLE,y.TABLE],[V.TBODY,y.TBODY],[V.TEMPLATE,y.TEMPLATE],[V.TEXTAREA,y.TEXTAREA],[V.TFOOT,y.TFOOT],[V.TD,y.TD],[V.TH,y.TH],[V.THEAD,y.THEAD],[V.TITLE,y.TITLE],[V.TR,y.TR],[V.TRACK,y.TRACK],[V.TT,y.TT],[V.U,y.U],[V.UL,y.UL],[V.SVG,y.SVG],[V.VAR,y.VAR],[V.WBR,y.WBR],[V.XMP,y.XMP]]);function zl(e){var t;return(t=l4.get(e))!==null&&t!==void 0?t:y.UNKNOWN}const me=y,s4={[fe.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[fe.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[fe.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[fe.XLINK]:new Set,[fe.XML]:new Set,[fe.XMLNS]:new Set},Am=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);V.STYLE,V.SCRIPT,V.XMP,V.IFRAME,V.NOEMBED,V.NOFRAMES,V.PLAINTEXT;var L;(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"})(L||(L={}));const Pt={DATA:L.DATA,RCDATA:L.RCDATA,RAWTEXT:L.RAWTEXT,SCRIPT_DATA:L.SCRIPT_DATA,PLAINTEXT:L.PLAINTEXT,CDATA_SECTION:L.CDATA_SECTION};function u4(e){return e>=R.DIGIT_0&&e<=R.DIGIT_9}function Gs(e){return e>=R.LATIN_CAPITAL_A&&e<=R.LATIN_CAPITAL_Z}function o4(e){return e>=R.LATIN_SMALL_A&&e<=R.LATIN_SMALL_Z}function Oa(e){return o4(e)||Gs(e)}function Fy(e){return Oa(e)||u4(e)}function $o(e){return e+32}function U2(e){return e===R.SPACE||e===R.LINE_FEED||e===R.TABULATION||e===R.FORM_FEED}function qy(e){return U2(e)||e===R.SOLIDUS||e===R.GREATER_THAN_SIGN}function c4(e){return e===R.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:M2(e)?J.surrogateCharacterReference:z2(e)?J.noncharacterCharacterReference:B2(e)||e===R.CARRIAGE_RETURN?J.controlCharacterReference:null}class f4{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=L.DATA,this.returnState=L.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Z6(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new a4(K6,(a,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(a)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:a=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+a)},validateNumericCharacterReference:a=>{const s=c4(a);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var a,s;(s=(a=this.handler).onParseError)===null||s===void 0||s.call(a,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,a){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||a==null||a()}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:Qe.START_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Qe.END_TAG,tagName:"",tagID:y.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Qe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Qe.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 a=this.currentToken;if(H2(a,this.currentAttr.name)===null){if(a.attrs.push(this.currentAttr),a.location&&this.currentLocation){const s=(t=(n=a.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(J.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=zl(t.tagName),t.type===Qe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.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 Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.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:Qe.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=U2(t)?Qe.WHITESPACE_CHARACTER:t===R.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=L.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Zr.Attribute:Zr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===L.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===L.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case L.DATA:{this._stateData(t);break}case L.RCDATA:{this._stateRcdata(t);break}case L.RAWTEXT:{this._stateRawtext(t);break}case L.SCRIPT_DATA:{this._stateScriptData(t);break}case L.PLAINTEXT:{this._statePlaintext(t);break}case L.TAG_OPEN:{this._stateTagOpen(t);break}case L.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case L.TAG_NAME:{this._stateTagName(t);break}case L.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case L.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case L.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case L.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case L.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case L.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case L.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case L.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case L.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case L.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case L.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case L.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case L.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case L.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case L.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case L.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case L.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case L.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case L.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case L.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case L.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case L.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case L.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case L.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case L.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case L.BOGUS_COMMENT:{this._stateBogusComment(t);break}case L.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case L.COMMENT_START:{this._stateCommentStart(t);break}case L.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case L.COMMENT:{this._stateComment(t);break}case L.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case L.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case L.COMMENT_END:{this._stateCommentEnd(t);break}case L.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case L.DOCTYPE:{this._stateDoctype(t);break}case L.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case L.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case L.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case L.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case L.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case L.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case L.CDATA_SECTION:{this._stateCdataSection(t);break}case L.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case L.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case L.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case L.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case R.LESS_THAN_SIGN:{this.state=L.TAG_OPEN;break}case R.AMPERSAND:{this._startCharacterReference();break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case R.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case R.AMPERSAND:{this._startCharacterReference();break}case R.LESS_THAN_SIGN:{this.state=L.RCDATA_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case R.LESS_THAN_SIGN:{this.state=L.RAWTEXT_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Oa(t))this._createStartTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case R.EXCLAMATION_MARK:{this.state=L.MARKUP_DECLARATION_OPEN;break}case R.SOLIDUS:{this.state=L.END_TAG_OPEN;break}case R.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t);break}case R.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=L.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Oa(t))this._createEndTagToken(),this.state=L.TAG_NAME,this._stateTagName(t);else switch(t){case R.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=L.DATA;break}case R.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.BEFORE_ATTRIBUTE_NAME;break}case R.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=Ot;break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Gs(t)?$o(t):t)}}_stateRcdataLessThanSign(t){t===R.SOLIDUS?this.state=L.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Oa(t)?(this.state=L.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=L.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 R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=L.BEFORE_ATTRIBUTE_NAME,!1;case R.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=L.SELF_CLOSING_START_TAG,!1;case R.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=L.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===R.SOLIDUS?this.state=L.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Oa(t)?(this.state=L.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case R.SOLIDUS:{this.state=L.SCRIPT_DATA_END_TAG_OPEN;break}case R.EXCLAMATION_MARK:{this.state=L.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=L.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Oa(t)?(this.state=L.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===R.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===R.HYPHEN_MINUS?(this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=L.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case R.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case R.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case R.HYPHEN_MINUS:{this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case R.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_ESCAPED,this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===R.SOLIDUS?this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Oa(t)?(this._emitChars("<"),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Oa(t)?(this.state=L.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qy(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case R.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case R.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case R.HYPHEN_MINUS:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case R.HYPHEN_MINUS:{this._emitChars("-");break}case R.LESS_THAN_SIGN:{this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case R.GREATER_THAN_SIGN:{this.state=L.SCRIPT_DATA,this._emitChars(">");break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Ot);break}case R.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===R.SOLIDUS?(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(wn.SCRIPT,!1)&&qy(this.preprocessor.peek(wn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<wn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=L.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=L.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:{this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case R.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=L.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:case R.SOLIDUS:case R.GREATER_THAN_SIGN:case R.EOF:{this._leaveAttrName(),this.state=L.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case R.EQUALS_SIGN:{this._leaveAttrName(),this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=Ot;break}default:this.currentAttr.name+=String.fromCodePoint(Gs(t)?$o(t):t)}}_stateAfterAttributeName(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.SOLIDUS:{this.state=L.SELF_CLOSING_START_TAG;break}case R.EQUALS_SIGN:{this.state=L.BEFORE_ATTRIBUTE_VALUE;break}case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentTagToken();break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=L.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:{this.state=L.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case R.APOSTROPHE:{this.state=L.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case R.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=L.DATA,this.emitCurrentTagToken();break}default:this.state=L.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case R.QUOTATION_MARK:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case R.AMPERSAND:{this._startCharacterReference();break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case R.APOSTROPHE:{this.state=L.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case R.AMPERSAND:{this._startCharacterReference();break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case R.AMPERSAND:{this._startCharacterReference();break}case R.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case R.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Ot;break}case R.QUOTATION_MARK:case R.APOSTROPHE:case R.LESS_THAN_SIGN:case R.EQUALS_SIGN:case R.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this._leaveAttrValue(),this.state=L.BEFORE_ATTRIBUTE_NAME;break}case R.SOLIDUS:{this._leaveAttrValue(),this.state=L.SELF_CLOSING_START_TAG;break}case R.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=L.DATA,this.emitCurrentTagToken();break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case R.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=L.DATA,this.emitCurrentTagToken();break}case R.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=L.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case R.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ot;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(wn.DASH_DASH,!0)?(this._createCommentToken(wn.DASH_DASH.length+1),this.state=L.COMMENT_START):this._consumeSequenceIfMatch(wn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(wn.DOCTYPE.length+1),this.state=L.DOCTYPE):this._consumeSequenceIfMatch(wn.CDATA_START,!0)?this.inForeignNode?this.state=L.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(wn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=L.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=L.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case R.HYPHEN_MINUS:{this.state=L.COMMENT_START_DASH;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=L.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case R.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=L.DATA,this.emitCurrentComment(n);break}case R.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case R.HYPHEN_MINUS:{this.state=L.COMMENT_END_DASH;break}case R.LESS_THAN_SIGN:{n.data+="<",this.state=L.COMMENT_LESS_THAN_SIGN;break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Ot;break}case R.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case R.EXCLAMATION_MARK:{n.data+="!",this.state=L.COMMENT_LESS_THAN_SIGN_BANG;break}case R.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=L.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===R.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=L.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===R.HYPHEN_MINUS?this.state=L.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=L.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==R.GREATER_THAN_SIGN&&t!==R.EOF&&this._err(J.nestedComment),this.state=L.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case R.HYPHEN_MINUS:{this.state=L.COMMENT_END;break}case R.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentComment(n);break}case R.EXCLAMATION_MARK:{this.state=L.COMMENT_END_BANG;break}case R.HYPHEN_MINUS:{n.data+="-";break}case R.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=L.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case R.HYPHEN_MINUS:{n.data+="--!",this.state=L.COMMENT_END_DASH;break}case R.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=L.DATA,this.emitCurrentComment(n);break}case R.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=L.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_NAME;break}case R.GREATER_THAN_SIGN:{this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case R.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=L.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Gs(t))this._createDoctypeToken(String.fromCharCode($o(t))),this.state=L.DOCTYPE_NAME;else switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(Ot),this.state=L.DOCTYPE_NAME;break}case R.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.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=L.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.AFTER_DOCTYPE_NAME;break}case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.name+=Ot;break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Gs(t)?$o(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(wn.PUBLIC,!1)?this.state=L.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(wn.SYSTEM,!1)?this.state=L.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case R.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case R.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{n.publicId="",this.state=L.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case R.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case R.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ot;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.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 R.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Ot;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.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 R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case R.GREATER_THAN_SIGN:{this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:{this.state=L.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case R.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case R.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.QUOTATION_MARK:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case R.APOSTROPHE:{n.systemId="",this.state=L.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case R.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.DATA,this.emitCurrentDoctype(n);break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case R.QUOTATION_MARK:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ot;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.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 R.APOSTROPHE:{this.state=L.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case R.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Ot;break}case R.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.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 R.SPACE:case R.LINE_FEED:case R.TABULATION:case R.FORM_FEED:break;case R.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=L.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case R.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=L.DATA;break}case R.NULL:{this._err(J.unexpectedNullCharacter);break}case R.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case R.RIGHT_SQUARE_BRACKET:{this.state=L.CDATA_SECTION_BRACKET;break}case R.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===R.RIGHT_SQUARE_BRACKET?this.state=L.CDATA_SECTION_END:(this._emitChars("]"),this.state=L.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case R.GREATER_THAN_SIGN:{this.state=L.DATA;break}case R.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=L.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(R.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Fy(this.preprocessor.peek(1))?L.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Fy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===R.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const P2=new Set([y.DD,y.DT,y.LI,y.OPTGROUP,y.OPTION,y.P,y.RB,y.RP,y.RT,y.RTC]),Yy=new Set([...P2,y.CAPTION,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]),xc=new Set([y.APPLET,y.CAPTION,y.HTML,y.MARQUEE,y.OBJECT,y.TABLE,y.TD,y.TEMPLATE,y.TH]),d4=new Set([...xc,y.OL,y.UL]),h4=new Set([...xc,y.BUTTON]),$y=new Set([y.ANNOTATION_XML,y.MI,y.MN,y.MO,y.MS,y.MTEXT]),Vy=new Set([y.DESC,y.FOREIGN_OBJECT,y.TITLE]),m4=new Set([y.TR,y.TEMPLATE,y.HTML]),p4=new Set([y.TBODY,y.TFOOT,y.THEAD,y.TEMPLATE,y.HTML]),g4=new Set([y.TABLE,y.TEMPLATE,y.HTML]),b4=new Set([y.TD,y.TH]);class y4{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,a){this.treeAdapter=n,this.handler=a,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=y.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===y.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===fe.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 a=this._indexOf(t);this.items[a]=n,a===this.stackTop&&(this.current=n)}insertAfter(t,n,a){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,a),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===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])!==fe.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 a=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(a,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Am,fe.HTML)}popUntilTableCellPopped(){this.popUntilPopped(b4,fe.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let a=this.stackTop;a>=0;a--)if(t.has(this.tagIDs[a])&&this.treeAdapter.getNamespaceURI(this.items[a])===n)return a;return-1}clearBackTo(t,n){const a=this._indexOfTagNames(t,n);this.shortenToLength(a+1)}clearBackToTableContext(){this.clearBackTo(g4,fe.HTML)}clearBackToTableBodyContext(){this.clearBackTo(p4,fe.HTML)}clearBackToTableRowContext(){this.clearBackTo(m4,fe.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]===y.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]===y.HTML}hasInDynamicScope(t,n){for(let a=this.stackTop;a>=0;a--){const s=this.tagIDs[a];switch(this.treeAdapter.getNamespaceURI(this.items[a])){case fe.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case fe.SVG:{if(Vy.has(s))return!1;break}case fe.MATHML:{if($y.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,xc)}hasInListItemScope(t){return this.hasInDynamicScope(t,d4)}hasInButtonScope(t){return this.hasInDynamicScope(t,h4)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case fe.HTML:{if(Am.has(n))return!0;if(xc.has(n))return!1;break}case fe.SVG:{if(Vy.has(n))return!1;break}case fe.MATHML:{if($y.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===fe.HTML)switch(this.tagIDs[n]){case t:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===fe.HTML)switch(this.tagIDs[t]){case y.TBODY:case y.THEAD:case y.TFOOT:return!0;case y.TABLE:case y.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===fe.HTML)switch(this.tagIDs[n]){case t:return!0;case y.OPTION:case y.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&P2.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Yy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Yy.has(this.currentTagId);)this.pop()}}const Hh=3;var Sr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Sr||(Sr={}));const Gy={type:Sr.Marker};class E4{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const a=[],s=n.length,u=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let f=0;f<this.entries.length;f++){const d=this.entries[f];if(d.type===Sr.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===u&&this.treeAdapter.getNamespaceURI(h)===o){const b=this.treeAdapter.getAttrList(h);b.length===s&&a.push({idx:f,attrs:b})}}return a}_ensureNoahArkCondition(t){if(this.entries.length<Hh)return;const n=this.treeAdapter.getAttrList(t),a=this._getNoahArkConditionCandidates(t,n);if(a.length<Hh)return;const s=new Map(n.map(o=>[o.name,o.value]));let u=0;for(let o=0;o<a.length;o++){const f=a[o];f.attrs.every(d=>s.get(d.name)===d.value)&&(u+=1,u>=Hh&&this.entries.splice(f.idx,1))}}insertMarker(){this.entries.unshift(Gy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Sr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const a=this.entries.indexOf(this.bookmark);this.entries.splice(a,0,{type:Sr.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(Gy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(a=>a.type===Sr.Marker||this.treeAdapter.getTagName(a.element)===t);return n&&n.type===Sr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Sr.Element&&n.element===t)}}const La={createDocument(){return{nodeName:"#document",mode:nr.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 a=e.childNodes.indexOf(n);e.childNodes.splice(a,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,a){const s=e.childNodes.find(u=>u.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=a;else{const u={nodeName:"#documentType",name:t,publicId:n,systemId:a,parentNode:null};La.appendChild(e,u)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(La.isTextNode(n)){n.value+=t;return}}La.appendChild(e,La.createTextNode(t))},insertTextBefore(e,t,n){const a=e.childNodes[e.childNodes.indexOf(n)-1];a&&La.isTextNode(a)?a.value+=t:La.insertBefore(e,La.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(a=>a.name));for(let a=0;a<t.length;a++)n.has(t[a].name)||e.attrs.push(t[a])},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}}},j2="html",x4="about:legacy-compat",T4="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",F2=["+//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//"],_4=[...F2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],v4=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),q2=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],S4=[...q2,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Qy(e,t){return t.some(n=>e.startsWith(n))}function k4(e){return e.name===j2&&e.publicId===null&&(e.systemId===null||e.systemId===x4)}function A4(e){if(e.name!==j2)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===T4)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),v4.has(n))return nr.QUIRKS;let a=t===null?_4:F2;if(Qy(n,a))return nr.QUIRKS;if(a=t===null?q2:S4,Qy(n,a))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const Xy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},C4="definitionurl",N4="definitionURL",w4=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])),R4=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:fe.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:fe.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:fe.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:fe.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:fe.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:fe.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:fe.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:fe.XML}],["xml:space",{prefix:"xml",name:"space",namespace:fe.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:fe.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:fe.XMLNS}]]),O4=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])),L4=new Set([y.B,y.BIG,y.BLOCKQUOTE,y.BODY,y.BR,y.CENTER,y.CODE,y.DD,y.DIV,y.DL,y.DT,y.EM,y.EMBED,y.H1,y.H2,y.H3,y.H4,y.H5,y.H6,y.HEAD,y.HR,y.I,y.IMG,y.LI,y.LISTING,y.MENU,y.META,y.NOBR,y.OL,y.P,y.PRE,y.RUBY,y.S,y.SMALL,y.SPAN,y.STRONG,y.STRIKE,y.SUB,y.SUP,y.TABLE,y.TT,y.U,y.UL,y.VAR]);function D4(e){const t=e.tagID;return t===y.FONT&&e.attrs.some(({name:a})=>a===xi.COLOR||a===xi.SIZE||a===xi.FACE)||L4.has(t)}function Y2(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===C4){e.attrs[t].name=N4;break}}function $2(e){for(let t=0;t<e.attrs.length;t++){const n=w4.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function b0(e){for(let t=0;t<e.attrs.length;t++){const n=R4.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 I4(e){const t=O4.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=zl(e.tagName))}function M4(e,t){return t===fe.MATHML&&(e===y.MI||e===y.MO||e===y.MN||e===y.MS||e===y.MTEXT)}function B4(e,t,n){if(t===fe.MATHML&&e===y.ANNOTATION_XML){for(let a=0;a<n.length;a++)if(n[a].name===xi.ENCODING){const s=n[a].value.toLowerCase();return s===Xy.TEXT_HTML||s===Xy.APPLICATION_XML}}return t===fe.SVG&&(e===y.FOREIGN_OBJECT||e===y.DESC||e===y.TITLE)}function z4(e,t,n,a){return(!a||a===fe.HTML)&&B4(e,t,n)||(!a||a===fe.MATHML)&&M4(e,t)}const H4="hidden",U4=8,P4=3;var B;(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"})(B||(B={}));const j4={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},V2=new Set([y.TABLE,y.TBODY,y.TFOOT,y.THEAD,y.TR]),Zy={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:La,onParseError:null};class Ky{constructor(t,n,a=null,s=null){this.fragmentContext=a,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.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={...Zy,...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 f4(this.options,this),this.activeFormattingElements=new E4(this.treeAdapter),this.fragmentContextID=a?zl(this.treeAdapter.getTagName(a)):y.UNKNOWN,this._setContextModes(a??this.document,this.fragmentContextID),this.openElements=new y4(this.document,this.treeAdapter,this)}static parse(t,n){const a=new this(n);return a.tokenizer.write(t,!0),a.document}static getFragmentParser(t,n){const a={...Zy,...n};t??(t=a.treeAdapter.createElement(V.TEMPLATE,fe.HTML,[]));const s=a.treeAdapter.createElement("documentmock",fe.HTML,[]),u=new this(a,s,t);return u.fragmentContextID===y.TEMPLATE&&u.tmplInsertionModeStack.unshift(B.IN_TEMPLATE),u._initTokenizerForFragmentParsing(),u._insertFakeRootElement(),u._resetInsertionMode(),u._findFormInFragmentContext(),u}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,a){var s;if(!this.onParseError)return;const u=(s=t.location)!==null&&s!==void 0?s:j4,o={code:n,startLine:u.startLine,startCol:u.startCol,startOffset:u.startOffset,endLine:a?u.startLine:u.endLine,endCol:a?u.startCol:u.endCol,endOffset:a?u.startOffset:u.endOffset};this.onParseError(o)}onItemPush(t,n,a){var s,u;(u=(s=this.treeAdapter).onItemPush)===null||u===void 0||u.call(s,t),a&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var a,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(a=this.treeAdapter).onItemPop)===null||s===void 0||s.call(a,t,this.openElements.current),n){let u,o;this.openElements.stackTop===0&&this.fragmentContext?(u=this.fragmentContext,o=this.fragmentContextID):{current:u,currentTagId:o}=this.openElements,this._setContextModes(u,o)}}_setContextModes(t,n){const a=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===fe.HTML;this.currentNotInHTML=!a,this.tokenizer.inForeignNode=!a&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,fe.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=Pt.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)===V.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==fe.HTML))switch(this.fragmentContextID){case y.TITLE:case y.TEXTAREA:{this.tokenizer.state=Pt.RCDATA;break}case y.STYLE:case y.XMP:case y.IFRAME:case y.NOEMBED:case y.NOFRAMES:case y.NOSCRIPT:{this.tokenizer.state=Pt.RAWTEXT;break}case y.SCRIPT:{this.tokenizer.state=Pt.SCRIPT_DATA;break}case y.PLAINTEXT:{this.tokenizer.state=Pt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",a=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,a,s),t.location){const o=this.treeAdapter.getChildNodes(this.document).find(f=>this.treeAdapter.isDocumentTypeNode(f));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const a=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,a)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const a=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(a??this.document,t)}}_appendElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location)}_insertElement(t,n){const a=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(a,t.location),this.openElements.push(a,t.tagID)}_insertFakeElement(t,n){const a=this.treeAdapter.createElement(t,fe.HTML,[]);this._attachElementToTree(a,null),this.openElements.push(a,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,fe.HTML,t.attrs),a=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,a),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(V.HTML,fe.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,y.HTML)}_appendCommentNode(t,n){const a=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,a),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_insertCharacters(t){let n,a;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:a}=this._findFosterParentingLocation(),a?this.treeAdapter.insertTextBefore(n,t.chars,a):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),u=a?s.lastIndexOf(a):s.length,o=s[u-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){const{endLine:d,endCol:h,endOffset:b}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:d,endCol:h,endOffset:b})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,n){for(let a=this.treeAdapter.getFirstChild(t);a;a=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(a),this.treeAdapter.appendChild(n,a)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const a=n.location,s=this.treeAdapter.getTagName(t),u=n.type===Qe.END_TAG&&s===n.tagName?{endTag:{...a},endLine:a.endLine,endCol:a.endCol,endOffset:a.endOffset}:{endLine:a.startLine,endCol:a.startCol,endOffset:a.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,u)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,a;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,a=this.fragmentContextID):{current:n,currentTagId:a}=this.openElements,t.tagID===y.SVG&&this.treeAdapter.getTagName(n)===V.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===fe.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===y.MGLYPH||t.tagID===y.MALIGNMARK)&&a!==void 0&&!this._isIntegrationPoint(a,n,fe.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,a){const s=this.treeAdapter.getNamespaceURI(n),u=this.treeAdapter.getAttrList(n);return z4(t,s,u,a)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Sr.Marker||this.openElements.contains(s.element)),a=n===-1?t-1:n-1;for(let s=a;s>=0;s--){const u=this.activeFormattingElements.entries[s];this._insertElement(u.token,this.treeAdapter.getNamespaceURI(u.element)),u.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(y.P),this.openElements.popUntilTagNamePopped(y.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case y.TR:{this.insertionMode=B.IN_ROW;return}case y.TBODY:case y.THEAD:case y.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case y.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case y.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case y.TABLE:{this.insertionMode=B.IN_TABLE;return}case y.BODY:{this.insertionMode=B.IN_BODY;return}case y.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case y.SELECT:{this._resetInsertionModeForSelect(t);return}case y.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case y.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case y.TD:case y.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case y.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const a=this.openElements.tagIDs[n];if(a===y.TEMPLATE)break;if(a===y.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return V2.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 y.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===fe.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case y.TABLE:{const a=this.treeAdapter.getParentNode(n);return a?{parent:a,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 a=this.treeAdapter.getNamespaceURI(t);return s4[a].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){b5(this,t);return}switch(this.insertionMode){case B.INITIAL:{Hs(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{au(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{Q2(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Uh(this,t);break}case B.IN_TABLE_TEXT:{eT(this,t);break}case B.IN_COLUMN_GROUP:{Tc(this,t);break}case B.AFTER_BODY:{_c(this,t);break}case B.AFTER_AFTER_BODY:{tc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){g5(this,t);return}switch(this.insertionMode){case B.INITIAL:{Hs(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{au(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Uh(this,t);break}case B.IN_COLUMN_GROUP:{Tc(this,t);break}case B.AFTER_BODY:{_c(this,t);break}case B.AFTER_AFTER_BODY:{tc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Cm(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{Cm(this,t);break}case B.IN_TABLE_TEXT:{Us(this,t);break}case B.AFTER_BODY:{Q4(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{X4(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{Z4(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case B.IN_TABLE_TEXT:{Us(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?y5(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Hs(this,t);break}case B.BEFORE_HTML:{K4(this,t);break}case B.BEFORE_HEAD:{J4(this,t);break}case B.IN_HEAD:{mr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{nw(this,t);break}case B.AFTER_HEAD:{aw(this,t);break}case B.IN_BODY:{cn(this,t);break}case B.IN_TABLE:{Dl(this,t);break}case B.IN_TABLE_TEXT:{Us(this,t);break}case B.IN_CAPTION:{e5(this,t);break}case B.IN_COLUMN_GROUP:{x0(this,t);break}case B.IN_TABLE_BODY:{Qc(this,t);break}case B.IN_ROW:{Xc(this,t);break}case B.IN_CELL:{r5(this,t);break}case B.IN_SELECT:{rT(this,t);break}case B.IN_SELECT_IN_TABLE:{i5(this,t);break}case B.IN_TEMPLATE:{s5(this,t);break}case B.AFTER_BODY:{o5(this,t);break}case B.IN_FRAMESET:{c5(this,t);break}case B.AFTER_FRAMESET:{d5(this,t);break}case B.AFTER_AFTER_BODY:{m5(this,t);break}case B.AFTER_AFTER_FRAMESET:{p5(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?E5(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Hs(this,t);break}case B.BEFORE_HTML:{W4(this,t);break}case B.BEFORE_HEAD:{ew(this,t);break}case B.IN_HEAD:{tw(this,t);break}case B.IN_HEAD_NO_SCRIPT:{rw(this,t);break}case B.AFTER_HEAD:{iw(this,t);break}case B.IN_BODY:{Gc(this,t);break}case B.TEXT:{Yw(this,t);break}case B.IN_TABLE:{fu(this,t);break}case B.IN_TABLE_TEXT:{Us(this,t);break}case B.IN_CAPTION:{t5(this,t);break}case B.IN_COLUMN_GROUP:{n5(this,t);break}case B.IN_TABLE_BODY:{Nm(this,t);break}case B.IN_ROW:{nT(this,t);break}case B.IN_CELL:{a5(this,t);break}case B.IN_SELECT:{aT(this,t);break}case B.IN_SELECT_IN_TABLE:{l5(this,t);break}case B.IN_TEMPLATE:{u5(this,t);break}case B.AFTER_BODY:{lT(this,t);break}case B.IN_FRAMESET:{f5(this,t);break}case B.AFTER_FRAMESET:{h5(this,t);break}case B.AFTER_AFTER_BODY:{tc(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{Hs(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{au(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{W2(this,t);break}case B.TEXT:{$w(this,t);break}case B.IN_TABLE_TEXT:{Us(this,t);break}case B.IN_TEMPLATE:{iT(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{E0(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===R.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 B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{G2(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{Uh(this,t);break}case B.IN_TABLE_TEXT:{J2(this,t);break}}}}function F4(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):K2(e,t),n}function q4(e,t){let n=null,a=e.openElements.stackTop;for(;a>=0;a--){const s=e.openElements.items[a];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[a])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(a,0)),e.activeFormattingElements.removeEntry(t)),n}function Y4(e,t,n){let a=t,s=e.openElements.getCommonAncestor(t);for(let u=0,o=s;o!==n;u++,o=s){s=e.openElements.getCommonAncestor(o);const f=e.activeFormattingElements.getElementEntry(o),d=f&&u>=P4;!f||d?(d&&e.activeFormattingElements.removeEntry(f),e.openElements.remove(o)):(o=$4(e,f),a===t&&(e.activeFormattingElements.bookmark=f),e.treeAdapter.detachNode(a),e.treeAdapter.appendChild(o,a),a=o)}return a}function $4(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),a=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,a),t.element=a,a}function V4(e,t,n){const a=e.treeAdapter.getTagName(t),s=zl(a);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const u=e.treeAdapter.getNamespaceURI(t);s===y.TEMPLATE&&u===fe.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function G4(e,t,n){const a=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,u=e.treeAdapter.createElement(s.tagName,a,s.attrs);e._adoptNodes(t,u),e.treeAdapter.appendChild(t,u),e.activeFormattingElements.insertElementAfterBookmark(u,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,u,s.tagID)}function y0(e,t){for(let n=0;n<U4;n++){const a=F4(e,t);if(!a)break;const s=q4(e,a);if(!s)break;e.activeFormattingElements.bookmark=a;const u=Y4(e,s,a.element),o=e.openElements.getCommonAncestor(a.element);e.treeAdapter.detachNode(u),o&&V4(e,o,u),G4(e,s,a)}}function Cm(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function Q4(e,t){e._appendCommentNode(t,e.openElements.items[0])}function X4(e,t){e._appendCommentNode(t,e.document)}function E0(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let a=e.openElements.stackTop;a>=n;a--)e._setEndLocation(e.openElements.items[a],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const a=e.openElements.items[0],s=e.treeAdapter.getNodeSourceCodeLocation(a);if(s&&!s.endTag&&(e._setEndLocation(a,t),e.openElements.stackTop>=1)){const u=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(u);o&&!o.endTag&&e._setEndLocation(u,t)}}}}function Z4(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:A4(t);k4(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function Hs(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function K4(e,t){t.tagID===y.HTML?(e._insertElement(t,fe.HTML),e.insertionMode=B.BEFORE_HEAD):eu(e,t)}function W4(e,t){const n=t.tagID;(n===y.HTML||n===y.HEAD||n===y.BODY||n===y.BR)&&eu(e,t)}function eu(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function J4(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.HEAD:{e._insertElement(t,fe.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:tu(e,t)}}function ew(e,t){const n=t.tagID;n===y.HEAD||n===y.BODY||n===y.HTML||n===y.BR?tu(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function tu(e,t){e._insertFakeElement(V.HEAD,y.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case y.TITLE:{e._switchToTextParsing(t,Pt.RCDATA);break}case y.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Pt.RAWTEXT):(e._insertElement(t,fe.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case y.NOFRAMES:case y.STYLE:{e._switchToTextParsing(t,Pt.RAWTEXT);break}case y.SCRIPT:{e._switchToTextParsing(t,Pt.SCRIPT_DATA);break}case y.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case y.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:nu(e,t)}}function tw(e,t){switch(t.tagID){case y.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case y.BODY:case y.BR:case y.HTML:{nu(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Li(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==y.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function nu(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function nw(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BASEFONT:case y.BGSOUND:case y.HEAD:case y.LINK:case y.META:case y.NOFRAMES:case y.STYLE:{mr(e,t);break}case y.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:ru(e,t)}}function rw(e,t){switch(t.tagID){case y.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case y.BR:{ru(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function ru(e,t){const n=t.type===Qe.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function aw(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.BODY:{e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case y.FRAMESET:{e._insertElement(t,fe.HTML),e.insertionMode=B.IN_FRAMESET;break}case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,y.HEAD),mr(e,t),e.openElements.remove(e.headElement);break}case y.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:au(e,t)}}function iw(e,t){switch(t.tagID){case y.BODY:case y.HTML:case y.BR:{au(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function au(e,t){e._insertFakeElement(V.BODY,y.BODY),e.insertionMode=B.IN_BODY,Vc(e,t)}function Vc(e,t){switch(t.type){case Qe.CHARACTER:{Q2(e,t);break}case Qe.WHITESPACE_CHARACTER:{G2(e,t);break}case Qe.COMMENT:{Cm(e,t);break}case Qe.START_TAG:{cn(e,t);break}case Qe.END_TAG:{Gc(e,t);break}case Qe.EOF:{W2(e,t);break}}}function G2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Q2(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function lw(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function sw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function uw(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_FRAMESET)}function ow(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML)}function cw(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Am.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,fe.HTML)}function fw(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function dw(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML),n||(e.formElement=e.openElements.current))}function hw(e,t){e.framesetOk=!1;const n=t.tagID;for(let a=e.openElements.stackTop;a>=0;a--){const s=e.openElements.tagIDs[a];if(n===y.LI&&s===y.LI||(n===y.DD||n===y.DT)&&(s===y.DD||s===y.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==y.ADDRESS&&s!==y.DIV&&s!==y.P&&e._isSpecialElement(e.openElements.items[a],s))break}e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML)}function mw(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.tokenizer.state=Pt.PLAINTEXT}function pw(e,t){e.openElements.hasInScope(y.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.framesetOk=!1}function gw(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(V.A);n&&(y0(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function bw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yw(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(y.NOBR)&&(y0(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,fe.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Ew(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function xw(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function X2(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,fe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Z2(e){const t=H2(e,xi.TYPE);return t!=null&&t.toLowerCase()===H4}function Tw(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,fe.HTML),Z2(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function _w(e,t){e._appendElement(t,fe.HTML),t.ackSelfClosing=!0}function vw(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._appendElement(t,fe.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Sw(e,t){t.tagName=V.IMG,t.tagID=y.IMG,X2(e,t)}function kw(e,t){e._insertElement(t,fe.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Pt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function Aw(e,t){e.openElements.hasInButtonScope(y.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function Cw(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Pt.RAWTEXT)}function Wy(e,t){e._switchToTextParsing(t,Pt.RAWTEXT)}function Nw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function ww(e,t){e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML)}function Rw(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,fe.HTML)}function Ow(e,t){e.openElements.hasInScope(y.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(y.RTC),e._insertElement(t,fe.HTML)}function Lw(e,t){e._reconstructActiveFormattingElements(),Y2(t),b0(t),t.selfClosing?e._appendElement(t,fe.MATHML):e._insertElement(t,fe.MATHML),t.ackSelfClosing=!0}function Dw(e,t){e._reconstructActiveFormattingElements(),$2(t),b0(t),t.selfClosing?e._appendElement(t,fe.SVG):e._insertElement(t,fe.SVG),t.ackSelfClosing=!0}function Jy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,fe.HTML)}function cn(e,t){switch(t.tagID){case y.I:case y.S:case y.B:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.SMALL:case y.STRIKE:case y.STRONG:{bw(e,t);break}case y.A:{gw(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{cw(e,t);break}case y.P:case y.DL:case y.OL:case y.UL:case y.DIV:case y.DIR:case y.NAV:case y.MAIN:case y.MENU:case y.ASIDE:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.DETAILS:case y.ADDRESS:case y.ARTICLE:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{ow(e,t);break}case y.LI:case y.DD:case y.DT:{hw(e,t);break}case y.BR:case y.IMG:case y.WBR:case y.AREA:case y.EMBED:case y.KEYGEN:{X2(e,t);break}case y.HR:{vw(e,t);break}case y.RB:case y.RTC:{Rw(e,t);break}case y.RT:case y.RP:{Ow(e,t);break}case y.PRE:case y.LISTING:{fw(e,t);break}case y.XMP:{Aw(e,t);break}case y.SVG:{Dw(e,t);break}case y.HTML:{lw(e,t);break}case y.BASE:case y.LINK:case y.META:case y.STYLE:case y.TITLE:case y.SCRIPT:case y.BGSOUND:case y.BASEFONT:case y.TEMPLATE:{mr(e,t);break}case y.BODY:{sw(e,t);break}case y.FORM:{dw(e,t);break}case y.NOBR:{yw(e,t);break}case y.MATH:{Lw(e,t);break}case y.TABLE:{xw(e,t);break}case y.INPUT:{Tw(e,t);break}case y.PARAM:case y.TRACK:case y.SOURCE:{_w(e,t);break}case y.IMAGE:{Sw(e,t);break}case y.BUTTON:{pw(e,t);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{Ew(e,t);break}case y.IFRAME:{Cw(e,t);break}case y.SELECT:{Nw(e,t);break}case y.OPTION:case y.OPTGROUP:{ww(e,t);break}case y.NOEMBED:case y.NOFRAMES:{Wy(e,t);break}case y.FRAMESET:{uw(e,t);break}case y.TEXTAREA:{kw(e,t);break}case y.NOSCRIPT:{e.options.scriptingEnabled?Wy(e,t):Jy(e,t);break}case y.PLAINTEXT:{mw(e,t);break}case y.COL:case y.TH:case y.TD:case y.TR:case y.HEAD:case y.FRAME:case y.TBODY:case y.TFOOT:case y.THEAD:case y.CAPTION:case y.COLGROUP:break;default:Jy(e,t)}}function Iw(e,t){if(e.openElements.hasInScope(y.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function Mw(e,t){e.openElements.hasInScope(y.BODY)&&(e.insertionMode=B.AFTER_BODY,lT(e,t))}function Bw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function zw(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(y.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(y.FORM):n&&e.openElements.remove(n))}function Hw(e){e.openElements.hasInButtonScope(y.P)||e._insertFakeElement(V.P,y.P),e._closePElement()}function Uw(e){e.openElements.hasInListItemScope(y.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(y.LI),e.openElements.popUntilTagNamePopped(y.LI))}function Pw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function jw(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function Fw(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function qw(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(V.BR,y.BR),e.openElements.pop(),e.framesetOk=!1}function K2(e,t){const n=t.tagName,a=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const u=e.openElements.items[s],o=e.openElements.tagIDs[s];if(a===o&&(a!==y.UNKNOWN||e.treeAdapter.getTagName(u)===n)){e.openElements.generateImpliedEndTagsWithExclusion(a),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(u,o))break}}function Gc(e,t){switch(t.tagID){case y.A:case y.B:case y.I:case y.S:case y.U:case y.EM:case y.TT:case y.BIG:case y.CODE:case y.FONT:case y.NOBR:case y.SMALL:case y.STRIKE:case y.STRONG:{y0(e,t);break}case y.P:{Hw(e);break}case y.DL:case y.UL:case y.OL:case y.DIR:case y.DIV:case y.NAV:case y.PRE:case y.MAIN:case y.MENU:case y.ASIDE:case y.BUTTON:case y.CENTER:case y.FIGURE:case y.FOOTER:case y.HEADER:case y.HGROUP:case y.DIALOG:case y.ADDRESS:case y.ARTICLE:case y.DETAILS:case y.SEARCH:case y.SECTION:case y.SUMMARY:case y.LISTING:case y.FIELDSET:case y.BLOCKQUOTE:case y.FIGCAPTION:{Bw(e,t);break}case y.LI:{Uw(e);break}case y.DD:case y.DT:{Pw(e,t);break}case y.H1:case y.H2:case y.H3:case y.H4:case y.H5:case y.H6:{jw(e);break}case y.BR:{qw(e);break}case y.BODY:{Iw(e,t);break}case y.HTML:{Mw(e,t);break}case y.FORM:{zw(e);break}case y.APPLET:case y.OBJECT:case y.MARQUEE:{Fw(e,t);break}case y.TEMPLATE:{Li(e,t);break}default:K2(e,t)}}function W2(e,t){e.tmplInsertionModeStack.length>0?iT(e,t):E0(e,t)}function Yw(e,t){var n;t.tagID===y.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function $w(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Uh(e,t){if(e.openElements.currentTagId!==void 0&&V2.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{eT(e,t);break}case Qe.WHITESPACE_CHARACTER:{J2(e,t);break}}else yu(e,t)}function Vw(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_CAPTION}function Gw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function Qw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.COLGROUP,y.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,x0(e,t)}function Xw(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_TABLE_BODY}function Zw(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(V.TBODY,y.TBODY),e.insertionMode=B.IN_TABLE_BODY,Qc(e,t)}function Kw(e,t){e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function Ww(e,t){Z2(t)?e._appendElement(t,fe.HTML):yu(e,t),t.ackSelfClosing=!0}function Jw(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,fe.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Dl(e,t){switch(t.tagID){case y.TD:case y.TH:case y.TR:{Zw(e,t);break}case y.STYLE:case y.SCRIPT:case y.TEMPLATE:{mr(e,t);break}case y.COL:{Qw(e,t);break}case y.FORM:{Jw(e,t);break}case y.TABLE:{Kw(e,t);break}case y.TBODY:case y.TFOOT:case y.THEAD:{Xw(e,t);break}case y.INPUT:{Ww(e,t);break}case y.CAPTION:{Vw(e,t);break}case y.COLGROUP:{Gw(e,t);break}default:yu(e,t)}}function fu(e,t){switch(t.tagID){case y.TABLE:{e.openElements.hasInTableScope(y.TABLE)&&(e.openElements.popUntilTagNamePopped(y.TABLE),e._resetInsertionMode());break}case y.TEMPLATE:{Li(e,t);break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:yu(e,t)}}function yu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Vc(e,t),e.fosterParentingEnabled=n}function J2(e,t){e.pendingCharacterTokens.push(t)}function eT(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Us(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)yu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const tT=new Set([y.CAPTION,y.COL,y.COLGROUP,y.TBODY,y.TD,y.TFOOT,y.TH,y.THEAD,y.TR]);function e5(e,t){const n=t.tagID;tT.has(n)?e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,Dl(e,t)):cn(e,t)}function t5(e,t){const n=t.tagID;switch(n){case y.CAPTION:case y.TABLE:{e.openElements.hasInTableScope(y.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(y.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===y.TABLE&&fu(e,t));break}case y.BODY:case y.COL:case y.COLGROUP:case y.HTML:case y.TBODY:case y.TD:case y.TFOOT:case y.TH:case y.THEAD:case y.TR:break;default:Gc(e,t)}}function x0(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.COL:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case y.TEMPLATE:{mr(e,t);break}default:Tc(e,t)}}function n5(e,t){switch(t.tagID){case y.COLGROUP:{e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case y.TEMPLATE:{Li(e,t);break}case y.COL:break;default:Tc(e,t)}}function Tc(e,t){e.openElements.currentTagId===y.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function Qc(e,t){switch(t.tagID){case y.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_ROW;break}case y.TH:case y.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(V.TR,y.TR),e.insertionMode=B.IN_ROW,Xc(e,t);break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,Dl(e,t));break}default:Dl(e,t)}}function Nm(e,t){const n=t.tagID;switch(t.tagID){case y.TBODY:case y.TFOOT:case y.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case y.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,fu(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:case y.TR:break;default:fu(e,t)}}function Xc(e,t){switch(t.tagID){case y.TH:case y.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,fe.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case y.CAPTION:case y.COL:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,Qc(e,t));break}default:Dl(e,t)}}function nT(e,t){switch(t.tagID){case y.TR:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case y.TABLE:{e.openElements.hasInTableScope(y.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,Nm(e,t));break}case y.TBODY:case y.TFOOT:case y.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(y.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,Nm(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:case y.TD:case y.TH:break;default:fu(e,t)}}function r5(e,t){const n=t.tagID;tT.has(n)?(e.openElements.hasInTableScope(y.TD)||e.openElements.hasInTableScope(y.TH))&&(e._closeTableCell(),Xc(e,t)):cn(e,t)}function a5(e,t){const n=t.tagID;switch(n){case y.TD:case y.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case y.TABLE:case y.TBODY:case y.TFOOT:case y.THEAD:case y.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),nT(e,t));break}case y.BODY:case y.CAPTION:case y.COL:case y.COLGROUP:case y.HTML:break;default:Gc(e,t)}}function rT(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e._insertElement(t,fe.HTML);break}case y.OPTGROUP:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._insertElement(t,fe.HTML);break}case y.HR:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop(),e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case y.INPUT:case y.KEYGEN:case y.TEXTAREA:case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),t.tagID!==y.SELECT&&e._processStartTag(t));break}case y.SCRIPT:case y.TEMPLATE:{mr(e,t);break}}}function aT(e,t){switch(t.tagID){case y.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===y.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===y.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===y.OPTGROUP&&e.openElements.pop();break}case y.OPTION:{e.openElements.currentTagId===y.OPTION&&e.openElements.pop();break}case y.SELECT:{e.openElements.hasInSelectScope(y.SELECT)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode());break}case y.TEMPLATE:{Li(e,t);break}}}function i5(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e._processStartTag(t)):rT(e,t)}function l5(e,t){const n=t.tagID;n===y.CAPTION||n===y.TABLE||n===y.TBODY||n===y.TFOOT||n===y.THEAD||n===y.TR||n===y.TD||n===y.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(y.SELECT),e._resetInsertionMode(),e.onEndTag(t)):aT(e,t)}function s5(e,t){switch(t.tagID){case y.BASE:case y.BASEFONT:case y.BGSOUND:case y.LINK:case y.META:case y.NOFRAMES:case y.SCRIPT:case y.STYLE:case y.TEMPLATE:case y.TITLE:{mr(e,t);break}case y.CAPTION:case y.COLGROUP:case y.TBODY:case y.TFOOT:case y.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,Dl(e,t);break}case y.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,x0(e,t);break}case y.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,Qc(e,t);break}case y.TD:case y.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,Xc(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,cn(e,t)}}function u5(e,t){t.tagID===y.TEMPLATE&&Li(e,t)}function iT(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(y.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):E0(e,t)}function o5(e,t){t.tagID===y.HTML?cn(e,t):_c(e,t)}function lT(e,t){var n;if(t.tagID===y.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===y.HTML){e._setEndLocation(e.openElements.items[0],t);const a=e.openElements.items[1];a&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(a))===null||n===void 0)&&n.endTag)&&e._setEndLocation(a,t)}}else _c(e,t)}function _c(e,t){e.insertionMode=B.IN_BODY,Vc(e,t)}function c5(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.FRAMESET:{e._insertElement(t,fe.HTML);break}case y.FRAME:{e._appendElement(t,fe.HTML),t.ackSelfClosing=!0;break}case y.NOFRAMES:{mr(e,t);break}}}function f5(e,t){t.tagID===y.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==y.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function d5(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{mr(e,t);break}}}function h5(e,t){t.tagID===y.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function m5(e,t){t.tagID===y.HTML?cn(e,t):tc(e,t)}function tc(e,t){e.insertionMode=B.IN_BODY,Vc(e,t)}function p5(e,t){switch(t.tagID){case y.HTML:{cn(e,t);break}case y.NOFRAMES:{mr(e,t);break}}}function g5(e,t){t.chars=Ot,e._insertCharacters(t)}function b5(e,t){e._insertCharacters(t),e.framesetOk=!1}function sT(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==fe.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function y5(e,t){if(D4(t))sT(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),a=e.treeAdapter.getNamespaceURI(n);a===fe.MATHML?Y2(t):a===fe.SVG&&(I4(t),$2(t)),b0(t),t.selfClosing?e._appendElement(t,a):e._insertElement(t,a),t.ackSelfClosing=!0}}function E5(e,t){if(t.tagID===y.P||t.tagID===y.BR){sT(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const a=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(a)===fe.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(a);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}V.AREA,V.BASE,V.BASEFONT,V.BGSOUND,V.BR,V.COL,V.EMBED,V.FRAME,V.HR,V.IMG,V.INPUT,V.KEYGEN,V.LINK,V.META,V.PARAM,V.SOURCE,V.TRACK,V.WBR;const Zc=uT("end"),Cr=uT("start");function uT(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function oT(e){const t=Cr(e),n=Zc(e);if(t&&n)return{start:t,end:n}}const x5=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,T5=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),eE={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function cT(e,t){const n=O5(e),a=D2("type",{handlers:{root:_5,element:v5,text:S5,comment:dT,doctype:k5,raw:C5},unknown:N5}),s={parser:n?new Ky(eE):Ky.getFragmentParser(void 0,eE),handle(f){a(f,s)},stitches:!1,options:t||{}};a(e,s),Hl(s,Cr());const u=n?s.parser.document:s.parser.getFragment(),o=L6(u,{file:s.options.file});return s.stitches&&Ar(o,"comment",function(f,d,h){const b=f;if(b.value.stitch&&h&&d!==void 0){const g=h.children;return g[d]=b.value.stitch,d}}),o.type==="root"&&o.children.length===1&&o.children[0].type===e.type?o.children[0]:o}function fT(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function _5(e,t){fT(e.children,t)}function v5(e,t){w5(e,t),fT(e.children,t),R5(e,t)}function S5(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Qe.CHARACTER,chars:e.value,location:Eu(e)};Hl(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function k5(e,t){const n={type:Qe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Eu(e)};Hl(t,Cr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function A5(e,t){t.stitches=!0;const n=L5(e);if("children"in e&&"children"in n){const a=cT({type:"root",children:e.children},t.options);n.children=a.children}dT({type:"comment",value:{stitch:n}},t)}function dT(e,t){const n=e.value,a={type:Qe.COMMENT,data:n,location:Eu(e)};Hl(t,Cr(e)),t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken)}function C5(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,hT(t,Cr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(x5,"&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 N5(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))A5(n,t);else{let a="";throw T5.has(n.type)&&(a=". 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"+a)}}function Hl(e,t){hT(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=Pt.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 hT(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 w5(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Pt.PLAINTEXT)return;Hl(t,Cr(e));const a=t.parser.openElements.current;let s="namespaceURI"in a?a.namespaceURI:yi.html;s===yi.html&&n==="svg"&&(s=yi.svg);const u=z6({...e,children:[]},{space:s===yi.svg?"svg":"html"}),o={type:Qe.START_TAG,tagName:n,tagID:zl(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in u?u.attrs:[],location:Eu(e)};t.parser.currentToken=o,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function R5(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&$6.includes(n)||t.parser.tokenizer.state===Pt.PLAINTEXT)return;Hl(t,Zc(e));const a={type:Qe.END_TAG,tagName:n,tagID:zl(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Eu(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Pt.RCDATA||t.parser.tokenizer.state===Pt.RAWTEXT||t.parser.tokenizer.state===Pt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Pt.DATA)}function O5(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Eu(e){const t=Cr(e)||{line:void 0,column:void 0,offset:void 0},n=Zc(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 L5(e){return"children"in e?Ai({...e,children:[]}):Ai(e)}function wm(e){return function(t,n){return cT(t,{...e,file:n})}}const di=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],gi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...di,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...di],h2:[["className","sr-only"]],img:[...di,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...di,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...di],table:[...di],ul:[...di,["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"]},Ia={}.hasOwnProperty;function D5(e,t){let n={type:"root",children:[]};const a={schema:t?{...gi,...t}:gi,stack:[]},s=mT(a,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function mT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return I5(e,n);case"doctype":return M5(e,n);case"element":return B5(e,n);case"root":return z5(e,n);case"text":return H5(e,n)}}}function I5(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",a=n.indexOf("-->"),u={type:"comment",value:a<0?n:n.slice(0,a)};return xu(u,t),u}}function M5(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return xu(n,t),n}}function B5(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const a=pT(e,t.children),s=U5(e,t.properties);e.stack.pop();let u=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(u=!0,e.schema.ancestors&&Ia.call(e.schema.ancestors,n))){const f=e.schema.ancestors[n];let d=-1;for(u=!1;++d<f.length;)e.stack.includes(f[d])&&(u=!0)}if(!u)return e.schema.strip&&!e.schema.strip.includes(n)?a:void 0;const o={type:"element",tagName:n,properties:s,children:a};return xu(o,t),o}function z5(e,t){const a={type:"root",children:pT(e,t.children)};return xu(a,t),a}function H5(e,t){const a={type:"text",value:typeof t.value=="string"?t.value:""};return xu(a,t),a}function pT(e,t){const n=[];if(Array.isArray(t)){const a=t;let s=-1;for(;++s<a.length;){const u=mT(e,a[s]);u&&(Array.isArray(u)?n.push(...u):n.push(u))}}return n}function U5(e,t){const n=e.stack[e.stack.length-1],a=e.schema.attributes,s=e.schema.required,u=a&&Ia.call(a,n)?a[n]:void 0,o=a&&Ia.call(a,"*")?a["*"]:void 0,f=t&&typeof t=="object"?t:{},d={};let h;for(h in f)if(Ia.call(f,h)){const b=f[h];let g=tE(e,nE(u,h),h,b);g==null&&(g=tE(e,nE(o,h),h,b)),g!=null&&(d[h]=g)}if(s&&Ia.call(s,n)){const b=s[n];for(h in b)Ia.call(b,h)&&!Ia.call(d,h)&&(d[h]=b[h])}return d}function tE(e,t,n,a){return t?Array.isArray(a)?P5(e,t,n,a):gT(e,t,n,a):void 0}function P5(e,t,n,a){let s=-1;const u=[];for(;++s<a.length;){const o=gT(e,t,n,a[s]);(typeof o=="number"||typeof o=="string")&&u.push(o)}return u}function gT(e,t,n,a){if(!(typeof a!="boolean"&&typeof a!="number"&&typeof a!="string")&&j5(e,n,a)){if(typeof t=="object"&&t.length>1){let s=!1,u=0;for(;++u<t.length;){const o=t[u];if(o&&typeof o=="object"&&"flags"in o){if(o.test(String(a))){s=!0;break}}else if(o===a){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+a:a}}function j5(e,t,n){const a=e.schema.protocols&&Ia.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!a||a.length===0)return!0;const s=String(n),u=s.indexOf(":"),o=s.indexOf("?"),f=s.indexOf("#"),d=s.indexOf("/");if(u<0||d>-1&&u>d||o>-1&&u>o||f>-1&&u>f)return!0;let h=-1;for(;++h<a.length;){const b=a[h];if(u===b.length&&s.slice(0,b.length)===b)return!0}return!1}function xu(e,t){const n=oT(t);t.data&&(e.data=Ai(t.data)),n&&(e.position=n)}function nE(e,t){let n,a=-1;if(e)for(;++a<e.length;){const s=e[a],u=typeof s=="string"?s:s[0];if(u===t)return s;u==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function bT(e){return function(t){return D5(t,e)}}function rE(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}const yn=Va(/[A-Za-z]/),on=Va(/[\dA-Za-z]/),F5=Va(/[#-'*+\--9=?A-Z^-~]/);function vc(e){return e!==null&&(e<32||e===127)}const Rm=Va(/\d/),q5=Va(/[\dA-Fa-f]/),Y5=Va(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function At(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const Kc=Va(new RegExp("\\p{P}|\\p{S}","u")),Ci=Va(/\s/);function Va(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function $5(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function V5(e,t,n){const s=Fc((n||{}).ignore||[]),u=G5(t);let o=-1;for(;++o<u.length;)o0(e,"text",f);function f(h,b){let g=-1,E;for(;++g<b.length;){const x=b[g],v=E?E.children:void 0;if(s(x,v?v.indexOf(x):void 0,E))return;E=x}if(E)return d(h,b)}function d(h,b){const g=b[b.length-1],E=u[o][0],x=u[o][1];let v=0;const w=g.children.indexOf(h);let O=!1,z=[];E.lastIndex=0;let U=E.exec(h.value);for(;U;){const D=U.index,q={index:U.index,input:U.input,stack:[...b,h]};let M=x(...U,q);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?E.lastIndex=D+1:(v!==D&&z.push({type:"text",value:h.value.slice(v,D)}),Array.isArray(M)?z.push(...M):M&&z.push(M),v=D+U[0].length,O=!0),!E.global)break;U=E.exec(h.value)}return O?(v<h.value.length&&z.push({type:"text",value:h.value.slice(v)}),g.children.splice(w,1,...z)):z=[h],w+z.length}}function G5(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 a=-1;for(;++a<n.length;){const s=n[a];t.push([Q5(s[0]),X5(s[1])])}return t}function Q5(e){return typeof e=="string"?new RegExp($5(e),"g"):e}function X5(e){return typeof e=="function"?e:function(){return e}}const Ph="phrasing",jh=["autolink","link","image","label"];function Z5(){return{transforms:[rR],enter:{literalAutolink:W5,literalAutolinkEmail:Fh,literalAutolinkHttp:Fh,literalAutolinkWww:Fh},exit:{literalAutolink:nR,literalAutolinkEmail:tR,literalAutolinkHttp:J5,literalAutolinkWww:eR}}}function K5(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ph,notInConstruct:jh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ph,notInConstruct:jh},{character:":",before:"[ps]",after:"\\/",inConstruct:Ph,notInConstruct:jh}]}}function W5(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fh(e){this.config.enter.autolinkProtocol.call(this,e)}function J5(e){this.config.exit.autolinkProtocol.call(this,e)}function eR(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 tR(e){this.config.exit.autolinkEmail.call(this,e)}function nR(e){this.exit(e)}function rR(e){V5(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,aR],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),iR]],{ignore:["link","linkReference"]})}function aR(e,t,n,a,s){let u="";if(!yT(s)||(/^w/i.test(t)&&(n=t+n,t="",u="http://"),!lR(n)))return!1;const o=sR(n+a);if(!o[0])return!1;const f={type:"link",title:null,url:u+t+o[0],children:[{type:"text",value:t+o[0]}]};return o[1]?[f,{type:"text",value:o[1]}]:f}function iR(e,t,n,a){return!yT(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lR(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 sR(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=rE(e,"(");let u=rE(e,")");for(;a!==-1&&s>u;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),u++;return[e,n]}function yT(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ci(n)||Kc(n))&&(!t||n!==47)}function dr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}ET.peek=gR;function uR(){this.buffer()}function oR(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function cR(){this.buffer()}function fR(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function hR(e){this.exit(e)}function mR(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=dr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pR(e){this.exit(e)}function gR(){return"["}function ET(e,t,n,a){const s=n.createTracker(a);let u=s.move("[^");const o=n.enter("footnoteReference"),f=n.enter("reference");return u+=s.move(n.safe(n.associationId(e),{after:"]",before:u})),f(),o(),u+=s.move("]"),u}function bR(){return{enter:{gfmFootnoteCallString:uR,gfmFootnoteCall:oR,gfmFootnoteDefinitionLabelString:cR,gfmFootnoteDefinition:fR},exit:{gfmFootnoteCallString:dR,gfmFootnoteCall:hR,gfmFootnoteDefinitionLabelString:mR,gfmFootnoteDefinition:pR}}}function yR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ET},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,u,o){const f=u.createTracker(o);let d=f.move("[^");const h=u.enter("footnoteDefinition"),b=u.enter("label");return d+=f.move(u.safe(u.associationId(a),{before:d,after:"]"})),b(),d+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),d+=f.move((t?`
207
- `:" ")+u.indentLines(u.containerFlow(a,f.current()),t?xT:ER))),h(),d}}function ER(e,t,n){return t===0?e:xT(e,t,n)}function xT(e,t,n){return(n?"":" ")+e}const xR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];TT.peek=kR;function TR(){return{canContainEols:["delete"],enter:{strikethrough:vR},exit:{strikethrough:SR}}}function _R(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:xR}],handlers:{delete:TT}}}function vR(e){this.enter({type:"delete",children:[]},e)}function SR(e){this.exit(e)}function TT(e,t,n,a){const s=n.createTracker(a),u=n.enter("strikethrough");let o=s.move("~~");return o+=n.containerPhrasing(e,{...s.current(),before:o,after:"~"}),o+=s.move("~~"),u(),o}function kR(){return"~"}function AR(e){return e.length}function CR(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||AR,u=[],o=[],f=[],d=[];let h=0,b=-1;for(;++b<e.length;){const N=[],w=[];let O=-1;for(e[b].length>h&&(h=e[b].length);++O<e[b].length;){const z=NR(e[b][O]);if(n.alignDelimiters!==!1){const U=s(z);w[O]=U,(d[O]===void 0||U>d[O])&&(d[O]=U)}N.push(z)}o[b]=N,f[b]=w}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)u[g]=aE(a[g]);else{const N=aE(a);for(;++g<h;)u[g]=N}g=-1;const E=[],x=[];for(;++g<h;){const N=u[g];let w="",O="";N===99?(w=":",O=":"):N===108?w=":":N===114&&(O=":");let z=n.alignDelimiters===!1?1:Math.max(1,d[g]-w.length-O.length);const U=w+"-".repeat(z)+O;n.alignDelimiters!==!1&&(z=w.length+z+O.length,z>d[g]&&(d[g]=z),x[g]=z),E[g]=U}o.splice(1,0,E),f.splice(1,0,x),b=-1;const v=[];for(;++b<o.length;){const N=o[b],w=f[b];g=-1;const O=[];for(;++g<h;){const z=N[g]||"";let U="",D="";if(n.alignDelimiters!==!1){const q=d[g]-(w[g]||0),M=u[g];M===114?U=" ".repeat(q):M===99?q%2?(U=" ".repeat(q/2+.5),D=" ".repeat(q/2-.5)):(U=" ".repeat(q/2),D=U):D=" ".repeat(q)}n.delimiterStart!==!1&&!g&&O.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&z==="")&&(n.delimiterStart!==!1||g)&&O.push(" "),n.alignDelimiters!==!1&&O.push(U),O.push(z),n.alignDelimiters!==!1&&O.push(D),n.padding!==!1&&O.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&O.push("|")}v.push(n.delimiterEnd===!1?O.join("").replace(/ +$/,""):O.join(""))}return v.join(`
208
- `)}function NR(e){return e==null?"":String(e)}function aE(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}function wR(e,t,n,a){const s=n.enter("blockquote"),u=n.createTracker(a);u.move("> "),u.shift(2);const o=n.indentLines(n.containerFlow(e,u.current()),RR);return s(),o}function RR(e,t,n){return">"+(n?"":" ")+e}function OR(e,t){return iE(e,t.inConstruct,!0)&&!iE(e,t.notInConstruct,!1)}function iE(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function lE(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
209
- `&&OR(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
210
- `}function LR(e,t){const n=String(e);let a=n.indexOf(t),s=a,u=0,o=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++u>o&&(o=u):u=1,s=a+t.length,a=n.indexOf(t,s);return o}function DR(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 IR(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 MR(e,t,n,a){const s=IR(n),u=e.value||"",o=s==="`"?"GraveAccent":"Tilde";if(DR(e,n)){const g=n.enter("codeIndented"),E=n.indentLines(u,BR);return g(),E}const f=n.createTracker(a),d=s.repeat(Math.max(LR(u,s)+1,3)),h=n.enter("codeFenced");let b=f.move(d);if(e.lang){const g=n.enter(`codeFencedLang${o}`);b+=f.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${o}`);b+=f.move(" "),b+=f.move(n.safe(e.meta,{before:b,after:`
211
- `,encode:["`"],...f.current()})),g()}return b+=f.move(`
212
- `),u&&(b+=f.move(u+`
213
- `)),b+=f.move(d),h(),b}function BR(e,t,n){return(n?"":" ")+e}function T0(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 zR(e,t,n,a){const s=T0(n),u=s==='"'?"Quote":"Apostrophe",o=n.enter("definition");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":`
214
- `,...d.current()}))),f(),e.title&&(f=n.enter(`title${u}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),o(),h}function HR(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 du(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Il(e){if(e===null||At(e)||Ci(e))return 1;if(Kc(e))return 2}function Sc(e,t,n){const a=Il(e),s=Il(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}_T.peek=UR;function _T(e,t,n,a){const s=HR(n),u=n.enter("emphasis"),o=n.createTracker(a),f=o.move(s);let d=o.move(n.containerPhrasing(e,{after:s,before:f,...o.current()}));const h=d.charCodeAt(0),b=Sc(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(d=du(h)+d.slice(1));const g=d.charCodeAt(d.length-1),E=Sc(a.after.charCodeAt(0),g,s);E.inside&&(d=d.slice(0,-1)+du(g));const x=o.move(s);return u(),n.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},f+d+x}function UR(e,t,n){return n.options.emphasis||"*"}const PR={};function _0(e,t){const n=PR,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return vT(e,a,s)}function vT(e,t,n){if(jR(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 sE(e.children,t,n)}return Array.isArray(e)?sE(e,t,n):""}function sE(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=vT(e[s],t,n);return a.join("")}function jR(e){return!!(e&&typeof e=="object")}function FR(e,t){let n=!1;return Ar(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Tm}),!!((!e.depth||e.depth<3)&&_0(e)&&(t.options.setext||n))}function qR(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),u=n.createTracker(a);if(FR(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),E=n.containerPhrasing(e,{...u.current(),before:`
215
- `,after:`
216
- `});return g(),b(),E+`
217
- `+(s===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
218
- `))+1))}const o="#".repeat(s),f=n.enter("headingAtx"),d=n.enter("phrasing");u.move(o+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
219
- `,...u.current()});return/^[\t ]/.test(h)&&(h=du(h.charCodeAt(0))+h.slice(1)),h=h?o+" "+h:o,n.options.closeAtx&&(h+=" "+o),d(),f(),h}ST.peek=YR;function ST(e){return e.value||""}function YR(){return"<"}kT.peek=$R;function kT(e,t,n,a){const s=T0(n),u=s==='"'?"Quote":"Apostrophe",o=n.enter("image");let f=n.enter("label");const d=n.createTracker(a);let h=d.move("![");return h+=d.move(n.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=n.enter(`title${u}`),h+=d.move(" "+s),h+=d.move(n.safe(e.title,{before:h,after:s,...d.current()})),h+=d.move(s),f()),h+=d.move(")"),o(),h}function $R(){return"!"}AT.peek=VR;function AT(e,t,n,a){const s=e.referenceType,u=n.enter("imageReference");let o=n.enter("label");const f=n.createTracker(a);let d=f.move("![");const h=n.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),o();const b=n.stack;n.stack=[],o=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return o(),n.stack=b,u(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function VR(){return"!"}CT.peek=GR;function CT(e,t,n){let a=e.value||"",s="`",u=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++u<n.unsafe.length;){const o=n.unsafe[u],f=n.compilePattern(o);let d;if(o.atBreak)for(;d=f.exec(a);){let h=d.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(d.index+1)}}return s+a+s}function GR(){return"`"}function NT(e,t){const n=_0(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))}wT.peek=QR;function wT(e,t,n,a){const s=T0(n),u=s==='"'?"Quote":"Apostrophe",o=n.createTracker(a);let f,d;if(NT(e,n)){const b=n.stack;n.stack=[],f=n.enter("autolink");let g=o.move("<");return g+=o.move(n.containerPhrasing(e,{before:g,after:">",...o.current()})),g+=o.move(">"),f(),n.stack=b,g}f=n.enter("link"),d=n.enter("label");let h=o.move("[");return h+=o.move(n.containerPhrasing(e,{before:h,after:"](",...o.current()})),h+=o.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=o.move("<"),h+=o.move(n.safe(e.url,{before:h,after:">",...o.current()})),h+=o.move(">")):(d=n.enter("destinationRaw"),h+=o.move(n.safe(e.url,{before:h,after:e.title?" ":")",...o.current()}))),d(),e.title&&(d=n.enter(`title${u}`),h+=o.move(" "+s),h+=o.move(n.safe(e.title,{before:h,after:s,...o.current()})),h+=o.move(s),d()),h+=o.move(")"),f(),h}function QR(e,t,n){return NT(e,n)?"<":"["}RT.peek=XR;function RT(e,t,n,a){const s=e.referenceType,u=n.enter("linkReference");let o=n.enter("label");const f=n.createTracker(a);let d=f.move("[");const h=n.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),o();const b=n.stack;n.stack=[],o=n.enter("reference");const g=n.safe(n.associationId(e),{before:d,after:"]",...f.current()});return o(),n.stack=b,u(),s==="full"||!h||h!==g?d+=f.move(g+"]"):s==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function XR(){return"["}function v0(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 ZR(e){const t=v0(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 KR(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 OT(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 WR(e,t,n,a){const s=n.enter("list"),u=n.bulletCurrent;let o=e.ordered?KR(n):v0(n);const f=e.ordered?o==="."?")":".":ZR(n);let d=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((o==="*"||o==="-")&&b&&(!b.children||!b.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&&(d=!0),OT(n)===o&&b){let g=-1;for(;++g<e.children.length;){const E=e.children[g];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(o=f),n.bulletCurrent=o;const h=n.containerFlow(e,a);return n.bulletLastUsed=o,n.bulletCurrent=u,s(),h}function JR(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 eO(e,t,n,a){const s=JR(n);let u=n.bulletCurrent||v0(n);t&&t.type==="list"&&t.ordered&&(u=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+u);let o=u.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);const f=n.createTracker(a);f.move(u+" ".repeat(o-u.length)),f.shift(o);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,f.current()),b);return d(),h;function b(g,E,x){return E?(x?"":" ".repeat(o))+g:(x?u:u+" ".repeat(o-u.length))+g}}function tO(e,t,n,a){const s=n.enter("paragraph"),u=n.enter("phrasing"),o=n.containerPhrasing(e,a);return u(),s(),o}const nO=Fc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rO(e,t,n,a){return(e.children.some(function(o){return nO(o)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function aO(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}LT.peek=iO;function LT(e,t,n,a){const s=aO(n),u=n.enter("strong"),o=n.createTracker(a),f=o.move(s+s);let d=o.move(n.containerPhrasing(e,{after:s,before:f,...o.current()}));const h=d.charCodeAt(0),b=Sc(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(d=du(h)+d.slice(1));const g=d.charCodeAt(d.length-1),E=Sc(a.after.charCodeAt(0),g,s);E.inside&&(d=d.slice(0,-1)+du(g));const x=o.move(s+s);return u(),n.attentionEncodeSurroundingInfo={after:E.outside,before:b.outside},f+d+x}function iO(e,t,n){return n.options.strong||"*"}function lO(e,t,n,a){return n.safe(e.value,a)}function sO(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 uO(e,t,n){const a=(OT(n)+(n.options.ruleSpaces?" ":"")).repeat(sO(n));return n.options.ruleSpaces?a.slice(0,-1):a}const DT={blockquote:wR,break:lE,code:MR,definition:zR,emphasis:_T,hardBreak:lE,heading:qR,html:ST,image:kT,imageReference:AT,inlineCode:CT,link:wT,linkReference:RT,list:WR,listItem:eO,paragraph:tO,root:rO,strong:LT,text:lO,thematicBreak:uO},uE=document.createElement("i");function S0(e){const t="&"+e+";";uE.innerHTML=t;const n=uE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function IT(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)}const oO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function cO(e){return e.replace(oO,fO)}function fO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),u=s===120||s===88;return IT(n.slice(u?2:1),u?16:10)}return S0(n)||e}function dO(){return{enter:{table:hO,tableData:oE,tableHeader:oE,tableRow:pO},exit:{codeText:gO,table:mO,tableData:qh,tableHeader:qh,tableRow:qh}}}function hO(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 mO(e){this.exit(e),this.data.inTable=void 0}function pO(e){this.enter({type:"tableRow",children:[]},e)}function qh(e){this.exit(e)}function oE(e){this.enter({type:"tableCell",children:[]},e)}function gO(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,bO));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function bO(e,t){return t==="|"?t:e}function yO(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,u=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
220
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:o,tableCell:d,tableRow:f}};function o(x,v,N,w){return h(b(x,N,w),x.align)}function f(x,v,N,w){const O=g(x,N,w),z=h([O]);return z.slice(0,z.indexOf(`
221
- `))}function d(x,v,N,w){const O=N.enter("tableCell"),z=N.enter("phrasing"),U=N.containerPhrasing(x,{...w,before:u,after:u});return z(),O(),U}function h(x,v){return CR(x,{align:v,alignDelimiters:a,padding:n,stringLength:s})}function b(x,v,N){const w=x.children;let O=-1;const z=[],U=v.enter("table");for(;++O<w.length;)z[O]=g(w[O],v,N);return U(),z}function g(x,v,N){const w=x.children;let O=-1;const z=[],U=v.enter("tableRow");for(;++O<w.length;)z[O]=d(w[O],x,v,N);return U(),z}function E(x,v,N){let w=DT.inlineCode(x,v,N);return N.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function EO(){return{exit:{taskListCheckValueChecked:cE,taskListCheckValueUnchecked:cE,paragraph:TO}}}function xO(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_O}}}function cE(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function TO(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 a=n.children[0];if(a&&a.type==="text"){const s=t.children;let u=-1,o;for(;++u<s.length;){const f=s[u];if(f.type==="paragraph"){o=f;break}}o===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function _O(e,t,n,a){const s=e.children[0],u=typeof e.checked=="boolean"&&s&&s.type==="paragraph",o="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);u&&f.move(o);let d=DT.listItem(e,t,n,{...a,...f.current()});return u&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(b){return b+o}}function vO(){return[Z5(),bR(),TR(),dO(),EO()]}function SO(e){return{extensions:[K5(),yR(e),_R(),yO(e),xO()]}}function Fn(e,t,n,a){const s=e.length;let u=0,o;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)o=Array.from(a),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);u<a.length;)o=a.slice(u,u+1e4),o.unshift(t,0),e.splice(...o),u+=1e4,t+=1e4}function rr(e,t){return e.length>0?(Fn(e,e.length,0,t),e):t}const fE={}.hasOwnProperty;function MT(e){const t={};let n=-1;for(;++n<e.length;)kO(t,e[n]);return t}function kO(e,t){let n;for(n in t){const s=(fE.call(e,n)?e[n]:void 0)||(e[n]={}),u=t[n];let o;if(u)for(o in u){fE.call(s,o)||(s[o]=[]);const f=u[o];AO(s[o],Array.isArray(f)?f:f?[f]:[])}}}function AO(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Fn(e,0,0,a)}const CO={tokenize:DO,partial:!0},BT={tokenize:IO,partial:!0},zT={tokenize:MO,partial:!0},HT={tokenize:BO,partial:!0},NO={tokenize:zO,partial:!0},UT={name:"wwwAutolink",tokenize:OO,previous:jT},PT={name:"protocolAutolink",tokenize:LO,previous:FT},na={name:"emailAutolink",tokenize:RO,previous:qT},Nr={};function wO(){return{text:Nr}}let hi=48;for(;hi<123;)Nr[hi]=na,hi++,hi===58?hi=65:hi===91&&(hi=97);Nr[43]=na;Nr[45]=na;Nr[46]=na;Nr[95]=na;Nr[72]=[na,PT];Nr[104]=[na,PT];Nr[87]=[na,UT];Nr[119]=[na,UT];function RO(e,t,n){const a=this;let s,u;return o;function o(g){return!Om(g)||!qT.call(a,a.previous)||k0(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Om(g)?(e.consume(g),f):g===64?(e.consume(g),d):n(g)}function d(g){return g===46?e.check(NO,b,h)(g):g===45||g===95||on(g)?(u=!0,e.consume(g),d):b(g)}function h(g){return e.consume(g),s=!0,d}function b(g){return u&&s&&yn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function OO(e,t,n){const a=this;return s;function s(o){return o!==87&&o!==119||!jT.call(a,a.previous)||k0(a.events)?n(o):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(CO,e.attempt(BT,e.attempt(zT,u),n),n)(o))}function u(o){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(o)}}function LO(e,t,n){const a=this;let s="",u=!1;return o;function o(g){return(g===72||g===104)&&FT.call(a,a.previous)&&!k0(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(yn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const E=s.toLowerCase();if(E==="http"||E==="https")return e.consume(g),d}return n(g)}function d(g){return g===47?(e.consume(g),u?h:(u=!0,d)):n(g)}function h(g){return g===null||vc(g)||At(g)||Ci(g)||Kc(g)?n(g):e.attempt(BT,e.attempt(zT,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function DO(e,t,n){let a=0;return s;function s(o){return(o===87||o===119)&&a<3?(a++,e.consume(o),s):o===46&&a===3?(e.consume(o),u):n(o)}function u(o){return o===null?n(o):t(o)}}function IO(e,t,n){let a,s,u;return o;function o(h){return h===46||h===95?e.check(HT,d,f)(h):h===null||At(h)||Ci(h)||h!==45&&Kc(h)?d(h):(u=!0,e.consume(h),o)}function f(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),o}function d(h){return s||a||!u?n(h):t(h)}}function MO(e,t){let n=0,a=0;return s;function s(o){return o===40?(n++,e.consume(o),s):o===41&&a<n?u(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(HT,t,u)(o):o===null||At(o)||Ci(o)?t(o):(e.consume(o),s)}function u(o){return o===41&&a++,e.consume(o),s}}function BO(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),u):f===93?(e.consume(f),s):f===60||f===null||At(f)||Ci(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||At(f)||Ci(f)?t(f):a(f)}function u(f){return yn(f)?o(f):n(f)}function o(f){return f===59?(e.consume(f),a):yn(f)?(e.consume(f),o):n(f)}}function zO(e,t,n){return a;function a(u){return e.consume(u),s}function s(u){return on(u)?n(u):t(u)}}function jT(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||At(e)}function FT(e){return!yn(e)}function qT(e){return!(e===47||Om(e))}function Om(e){return e===43||e===45||e===46||e===95||on(e)}function k0(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function Ul(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const u=e.charCodeAt(n);let o="";if(u===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))s=2;else if(u<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(u))||(o=String.fromCharCode(u));else if(u>55295&&u<57344){const f=e.charCodeAt(n+1);u<56320&&f>56319&&f<57344?(o=String.fromCharCode(u,f),s=1):o="�"}else o=String.fromCharCode(u);o&&(t.push(e.slice(a,n),encodeURIComponent(o)),a=n+s+1,o=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function Wc(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const u=e[s].resolveAll;u&&!a.includes(u)&&(t=u(t,n),a.push(u))}return t}const Lm={name:"attention",resolveAll:HO,tokenize:UO};function HO(e,t){let n=-1,a,s,u,o,f,d,h,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},E={...e[n][1].start};dE(g,-d),dE(E,d),o={type:d>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:E},u={type:d>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:d>1?"strong":"emphasis",start:{...o.start},end:{...f.end}},e[a][1].end={...o.start},e[n][1].start={...f.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=rr(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=rr(h,[["enter",s,t],["enter",o,t],["exit",o,t],["enter",u,t]]),h=rr(h,Wc(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=rr(h,[["exit",u,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,h=rr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,Fn(e,a-1,n-a+3,h),n=a+h.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function UO(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Il(a);let u;return o;function o(d){return u=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===u)return e.consume(d),f;const h=e.exit("attentionSequence"),b=Il(d),g=!b||b===2&&s||n.includes(d),E=!s||s===2&&b||n.includes(a);return h._open=!!(u===42?g:g&&(s||!E)),h._close=!!(u===42?E:E&&(b||!g)),t(d)}}function dE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const PO={name:"autolink",tokenize:jO};function jO(e,t,n){let a=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),u}function u(x){return yn(x)?(e.consume(x),o):x===64?n(x):h(x)}function o(x){return x===43||x===45||x===46||on(x)?(a=1,f(x)):h(x)}function f(x){return x===58?(e.consume(x),a=0,d):(x===43||x===45||x===46||on(x))&&a++<32?(e.consume(x),f):(a=0,h(x))}function d(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||vc(x)?n(x):(e.consume(x),d)}function h(x){return x===64?(e.consume(x),b):F5(x)?(e.consume(x),h):n(x)}function b(x){return on(x)?g(x):n(x)}function g(x){return x===46?(e.consume(x),a=0,b):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):E(x)}function E(x){if((x===45||on(x))&&a++<63){const v=x===45?E:g;return e.consume(x),v}return n(x)}}function at(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let u=0;return o;function o(d){return Je(d)?(e.enter(n),f(d)):t(d)}function f(d){return Je(d)&&u++<s?(e.consume(d),f):(e.exit(n),t(d))}}const Tu={partial:!0,tokenize:FO};function FO(e,t,n){return a;function a(u){return Je(u)?at(e,s,"linePrefix")(u):s(u)}function s(u){return u===null||De(u)?t(u):n(u)}}const YT={continuation:{tokenize:YO},exit:$O,name:"blockQuote",tokenize:qO};function qO(e,t,n){const a=this;return s;function s(o){if(o===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(o),e.exit("blockQuoteMarker"),u}return n(o)}function u(o){return Je(o)?(e.enter("blockQuotePrefixWhitespace"),e.consume(o),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(o))}}function YO(e,t,n){const a=this;return s;function s(o){return Je(o)?at(e,u,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):u(o)}function u(o){return e.attempt(YT,t,n)(o)}}function $O(e){e.exit("blockQuote")}const $T={name:"characterEscape",tokenize:VO};function VO(e,t,n){return a;function a(u){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(u),e.exit("escapeMarker"),s}function s(u){return Y5(u)?(e.enter("characterEscapeValue"),e.consume(u),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(u)}}const VT={name:"characterReference",tokenize:GO};function GO(e,t,n){const a=this;let s=0,u,o;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),d}function d(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),u=31,o=on,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),u=6,o=q5,b):(e.enter("characterReferenceValue"),u=7,o=Rm,b(g))}function b(g){if(g===59&&s){const E=e.exit("characterReferenceValue");return o===on&&!S0(a.sliceSerialize(E))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return o(g)&&s++<u?(e.consume(g),b):n(g)}}const hE={partial:!0,tokenize:XO},mE={concrete:!0,name:"codeFenced",tokenize:QO};function QO(e,t,n){const a=this,s={partial:!0,tokenize:q};let u=0,o=0,f;return d;function d(M){return h(M)}function h(M){const $=a.events[a.events.length-1];return u=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===f?(o++,e.consume(M),b):o<3?n(M):(e.exit("codeFencedFenceSequence"),Je(M)?at(e,g,"whitespace")(M):g(M))}function g(M){return M===null||De(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(hE,N,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Je(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,x,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),E)}function x(M){return M===null||De(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),v)}function N(M){return e.attempt(s,D,w)(M)}function w(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),O}function O(M){return u>0&&Je(M)?at(e,z,"linePrefix",u+1)(M):z(M)}function z(M){return M===null||De(M)?e.check(hE,N,D)(M):(e.enter("codeFlowValue"),U(M))}function U(M){return M===null||De(M)?(e.exit("codeFlowValue"),z(M)):(e.consume(M),U)}function D(M){return e.exit("codeFenced"),t(M)}function q(M,$,G){let de=0;return F;function F(ae){return M.enter("lineEnding"),M.consume(ae),M.exit("lineEnding"),oe}function oe(ae){return M.enter("codeFencedFence"),Je(ae)?at(M,ce,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):ce(ae)}function ce(ae){return ae===f?(M.enter("codeFencedFenceSequence"),we(ae)):G(ae)}function we(ae){return ae===f?(de++,M.consume(ae),we):de>=o?(M.exit("codeFencedFenceSequence"),Je(ae)?at(M,pe,"whitespace")(ae):pe(ae)):G(ae)}function pe(ae){return ae===null||De(ae)?(M.exit("codeFencedFence"),$(ae)):G(ae)}}}function XO(e,t,n){const a=this;return s;function s(o){return o===null?n(o):(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),u)}function u(o){return a.parser.lazy[a.now().line]?n(o):t(o)}}const Yh={name:"codeIndented",tokenize:KO},ZO={partial:!0,tokenize:WO};function KO(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),at(e,u,"linePrefix",5)(h)}function u(h){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?o(h):n(h)}function o(h){return h===null?d(h):De(h)?e.attempt(ZO,o,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||De(h)?(e.exit("codeFlowValue"),o(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),t(h)}}function WO(e,t,n){const a=this;return s;function s(o){return a.parser.lazy[a.now().line]?n(o):De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),s):at(e,u,"linePrefix",5)(o)}function u(o){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(o):De(o)?s(o):n(o)}}const JO={name:"codeText",previous:tL,resolve:eL,tokenize:nL};function eL(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function tL(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function nL(e,t,n){let a=0,s,u;return o;function o(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),d(g))}function d(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),d):g===96?(u=e.enter("codeTextSequence"),s=0,b(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),d(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(u.type="codeTextData",h(g))}}class rL{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 a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const u=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Ps(this.left,a),u.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ps(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ps(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);Ps(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ps(this.left,n.reverse())}}}function Ps(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 GT(e){const t={};let n=-1,a,s,u,o,f,d,h;const b=new rL(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(d=a[1]._tokenizer.events,u=0,u<d.length&&d[u][1].type==="lineEndingBlank"&&(u+=2),u<d.length&&d[u][1].type==="content"))for(;++u<d.length&&d[u][1].type!=="content";)d[u][1].type==="chunkText"&&(d[u][1]._isInFirstContentOfListItem=!0,u++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,aL(b,n)),n=t[n],h=!0);else if(a[1]._container){for(u=n,s=void 0;u--;)if(o=b.get(u),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),o[1].type="lineEnding",s=u);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},f=b.slice(s,n),f.unshift(a),b.splice(s,n-s+1,f))}}return Fn(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function aL(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const u=[];let o=n._tokenizer;o||(o=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const f=o.events,d=[],h={};let b,g,E=-1,x=n,v=0,N=0;const w=[N];for(;x;){for(;e.get(++s)[1]!==x;);u.push(s),x._tokenizer||(b=a.sliceStream(x),x.next||b.push(null),g&&o.defineSkip(x.start),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(b),x._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=n;++E<f.length;)f[E][0]==="exit"&&f[E-1][0]==="enter"&&f[E][1].type===f[E-1][1].type&&f[E][1].start.line!==f[E][1].end.line&&(N=E+1,w.push(N),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(o.events=[],x?(x._tokenizer=void 0,x.previous=void 0):w.pop(),E=w.length;E--;){const O=f.slice(w[E],w[E+1]),z=u.pop();d.push([z,z+O.length-1]),e.splice(z,2,O)}for(d.reverse(),E=-1;++E<d.length;)h[v+d[E][0]]=v+d[E][1],v+=d[E][1]-d[E][0]-1;return h}const iL={resolve:sL,tokenize:uL},lL={partial:!0,tokenize:oL};function sL(e){return GT(e),e}function uL(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?u(f):De(f)?e.check(lL,o,u)(f):(e.consume(f),s)}function u(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function o(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function oL(e,t,n){const a=this;return s;function s(o){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),at(e,u,"linePrefix")}function u(o){if(o===null||De(o))return n(o);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(o):e.interrupt(a.parser.constructs.flow,n,t)(o)}}function QT(e,t,n,a,s,u,o,f,d){const h=d||Number.POSITIVE_INFINITY;let b=0;return g;function g(O){return O===60?(e.enter(a),e.enter(s),e.enter(u),e.consume(O),e.exit(u),E):O===null||O===32||O===41||vc(O)?n(O):(e.enter(a),e.enter(o),e.enter(f),e.enter("chunkString",{contentType:"string"}),N(O))}function E(O){return O===62?(e.enter(u),e.consume(O),e.exit(u),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(O))}function x(O){return O===62?(e.exit("chunkString"),e.exit(f),E(O)):O===null||O===60||De(O)?n(O):(e.consume(O),O===92?v:x)}function v(O){return O===60||O===62||O===92?(e.consume(O),x):x(O)}function N(O){return!b&&(O===null||O===41||At(O))?(e.exit("chunkString"),e.exit(f),e.exit(o),e.exit(a),t(O)):b<h&&O===40?(e.consume(O),b++,N):O===41?(e.consume(O),b--,N):O===null||O===32||O===40||vc(O)?n(O):(e.consume(O),O===92?w:N)}function w(O){return O===40||O===41||O===92?(e.consume(O),N):N(O)}}function XT(e,t,n,a,s,u){const o=this;let f=0,d;return h;function h(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(u),b}function b(x){return f>999||x===null||x===91||x===93&&!d||x===94&&!f&&"_hiddenFootnoteSupport"in o.parser.constructs?n(x):x===93?(e.exit(u),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):De(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||De(x)||f++>999?(e.exit("chunkString"),b(x)):(e.consume(x),d||(d=!Je(x)),x===92?E:g)}function E(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function ZT(e,t,n,a,s,u){let o;return f;function f(E){return E===34||E===39||E===40?(e.enter(a),e.enter(s),e.consume(E),e.exit(s),o=E===40?41:E,d):n(E)}function d(E){return E===o?(e.enter(s),e.consume(E),e.exit(s),e.exit(a),t):(e.enter(u),h(E))}function h(E){return E===o?(e.exit(u),d(o)):E===null?n(E):De(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),at(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===o||E===null||De(E)?(e.exit("chunkString"),h(E)):(e.consume(E),E===92?g:b)}function g(E){return E===o||E===92?(e.consume(E),b):b(E)}}function iu(e,t){let n;return a;function a(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Je(s)?at(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const cL={name:"definition",tokenize:dL},fL={partial:!0,tokenize:hL};function dL(e,t,n){const a=this;let s;return u;function u(x){return e.enter("definition"),o(x)}function o(x){return XT.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=dr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),d):n(x)}function d(x){return At(x)?iu(e,h)(x):h(x)}function h(x){return QT(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(fL,g,g)(x)}function g(x){return Je(x)?at(e,E,"whitespace")(x):E(x)}function E(x){return x===null||De(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function hL(e,t,n){return a;function a(f){return At(f)?iu(e,s)(f):n(f)}function s(f){return ZT(e,u,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function u(f){return Je(f)?at(e,o,"whitespace")(f):o(f)}function o(f){return f===null||De(f)?t(f):n(f)}}const mL={name:"hardBreakEscape",tokenize:pL};function pL(e,t,n){return a;function a(u){return e.enter("hardBreakEscape"),e.consume(u),s}function s(u){return De(u)?(e.exit("hardBreakEscape"),t(u)):n(u)}}const gL={name:"headingAtx",resolve:bL,tokenize:yL};function bL(e,t){let n=e.length-2,a=3,s,u;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},u={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Fn(e,a,n-a+1,[["enter",s,t],["enter",u,t],["exit",u,t],["exit",s,t]])),e}function yL(e,t,n){let a=0;return s;function s(b){return e.enter("atxHeading"),u(b)}function u(b){return e.enter("atxHeadingSequence"),o(b)}function o(b){return b===35&&a++<6?(e.consume(b),o):b===null||At(b)?(e.exit("atxHeadingSequence"),f(b)):n(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),d(b)):b===null||De(b)?(e.exit("atxHeading"),t(b)):Je(b)?at(e,f,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function d(b){return b===35?(e.consume(b),d):(e.exit("atxHeadingSequence"),f(b))}function h(b){return b===null||b===35||At(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),h)}}const EL=["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"],pE=["pre","script","style","textarea"],xL={concrete:!0,name:"htmlFlow",resolveTo:vL,tokenize:SL},TL={partial:!0,tokenize:AL},_L={partial:!0,tokenize:kL};function vL(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 SL(e,t,n){const a=this;let s,u,o,f,d;return h;function h(A){return b(A)}function b(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),g}function g(A){return A===33?(e.consume(A),E):A===47?(e.consume(A),u=!0,N):A===63?(e.consume(A),s=3,a.interrupt?t:C):yn(A)?(e.consume(A),o=String.fromCharCode(A),w):n(A)}function E(A){return A===45?(e.consume(A),s=2,x):A===91?(e.consume(A),s=5,f=0,v):yn(A)?(e.consume(A),s=4,a.interrupt?t:C):n(A)}function x(A){return A===45?(e.consume(A),a.interrupt?t:C):n(A)}function v(A){const ee="CDATA[";return A===ee.charCodeAt(f++)?(e.consume(A),f===ee.length?a.interrupt?t:ce:v):n(A)}function N(A){return yn(A)?(e.consume(A),o=String.fromCharCode(A),w):n(A)}function w(A){if(A===null||A===47||A===62||At(A)){const ee=A===47,se=o.toLowerCase();return!ee&&!u&&pE.includes(se)?(s=1,a.interrupt?t(A):ce(A)):EL.includes(o.toLowerCase())?(s=6,ee?(e.consume(A),O):a.interrupt?t(A):ce(A)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(A):u?z(A):U(A))}return A===45||on(A)?(e.consume(A),o+=String.fromCharCode(A),w):n(A)}function O(A){return A===62?(e.consume(A),a.interrupt?t:ce):n(A)}function z(A){return Je(A)?(e.consume(A),z):F(A)}function U(A){return A===47?(e.consume(A),F):A===58||A===95||yn(A)?(e.consume(A),D):Je(A)?(e.consume(A),U):F(A)}function D(A){return A===45||A===46||A===58||A===95||on(A)?(e.consume(A),D):q(A)}function q(A){return A===61?(e.consume(A),M):Je(A)?(e.consume(A),q):U(A)}function M(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),d=A,$):Je(A)?(e.consume(A),M):G(A)}function $(A){return A===d?(e.consume(A),d=null,de):A===null||De(A)?n(A):(e.consume(A),$)}function G(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||At(A)?q(A):(e.consume(A),G)}function de(A){return A===47||A===62||Je(A)?U(A):n(A)}function F(A){return A===62?(e.consume(A),oe):n(A)}function oe(A){return A===null||De(A)?ce(A):Je(A)?(e.consume(A),oe):n(A)}function ce(A){return A===45&&s===2?(e.consume(A),P):A===60&&s===1?(e.consume(A),ne):A===62&&s===4?(e.consume(A),I):A===63&&s===3?(e.consume(A),C):A===93&&s===5?(e.consume(A),Te):De(A)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(TL,K,we)(A)):A===null||De(A)?(e.exit("htmlFlowData"),we(A)):(e.consume(A),ce)}function we(A){return e.check(_L,pe,K)(A)}function pe(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),ae}function ae(A){return A===null||De(A)?we(A):(e.enter("htmlFlowData"),ce(A))}function P(A){return A===45?(e.consume(A),C):ce(A)}function ne(A){return A===47?(e.consume(A),o="",xe):ce(A)}function xe(A){if(A===62){const ee=o.toLowerCase();return pE.includes(ee)?(e.consume(A),I):ce(A)}return yn(A)&&o.length<8?(e.consume(A),o+=String.fromCharCode(A),xe):ce(A)}function Te(A){return A===93?(e.consume(A),C):ce(A)}function C(A){return A===62?(e.consume(A),I):A===45&&s===2?(e.consume(A),C):ce(A)}function I(A){return A===null||De(A)?(e.exit("htmlFlowData"),K(A)):(e.consume(A),I)}function K(A){return e.exit("htmlFlow"),t(A)}}function kL(e,t,n){const a=this;return s;function s(o){return De(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),u):n(o)}function u(o){return a.parser.lazy[a.now().line]?n(o):t(o)}}function AL(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Tu,t,n)}}const CL={name:"htmlText",tokenize:NL};function NL(e,t,n){const a=this;let s,u,o;return f;function f(C){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(C),d}function d(C){return C===33?(e.consume(C),h):C===47?(e.consume(C),q):C===63?(e.consume(C),U):yn(C)?(e.consume(C),G):n(C)}function h(C){return C===45?(e.consume(C),b):C===91?(e.consume(C),u=0,v):yn(C)?(e.consume(C),z):n(C)}function b(C){return C===45?(e.consume(C),x):n(C)}function g(C){return C===null?n(C):C===45?(e.consume(C),E):De(C)?(o=g,ne(C)):(e.consume(C),g)}function E(C){return C===45?(e.consume(C),x):g(C)}function x(C){return C===62?P(C):C===45?E(C):g(C)}function v(C){const I="CDATA[";return C===I.charCodeAt(u++)?(e.consume(C),u===I.length?N:v):n(C)}function N(C){return C===null?n(C):C===93?(e.consume(C),w):De(C)?(o=N,ne(C)):(e.consume(C),N)}function w(C){return C===93?(e.consume(C),O):N(C)}function O(C){return C===62?P(C):C===93?(e.consume(C),O):N(C)}function z(C){return C===null||C===62?P(C):De(C)?(o=z,ne(C)):(e.consume(C),z)}function U(C){return C===null?n(C):C===63?(e.consume(C),D):De(C)?(o=U,ne(C)):(e.consume(C),U)}function D(C){return C===62?P(C):U(C)}function q(C){return yn(C)?(e.consume(C),M):n(C)}function M(C){return C===45||on(C)?(e.consume(C),M):$(C)}function $(C){return De(C)?(o=$,ne(C)):Je(C)?(e.consume(C),$):P(C)}function G(C){return C===45||on(C)?(e.consume(C),G):C===47||C===62||At(C)?de(C):n(C)}function de(C){return C===47?(e.consume(C),P):C===58||C===95||yn(C)?(e.consume(C),F):De(C)?(o=de,ne(C)):Je(C)?(e.consume(C),de):P(C)}function F(C){return C===45||C===46||C===58||C===95||on(C)?(e.consume(C),F):oe(C)}function oe(C){return C===61?(e.consume(C),ce):De(C)?(o=oe,ne(C)):Je(C)?(e.consume(C),oe):de(C)}function ce(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),s=C,we):De(C)?(o=ce,ne(C)):Je(C)?(e.consume(C),ce):(e.consume(C),pe)}function we(C){return C===s?(e.consume(C),s=void 0,ae):C===null?n(C):De(C)?(o=we,ne(C)):(e.consume(C),we)}function pe(C){return C===null||C===34||C===39||C===60||C===61||C===96?n(C):C===47||C===62||At(C)?de(C):(e.consume(C),pe)}function ae(C){return C===47||C===62||At(C)?de(C):n(C)}function P(C){return C===62?(e.consume(C),e.exit("htmlTextData"),e.exit("htmlText"),t):n(C)}function ne(C){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),xe}function xe(C){return Je(C)?at(e,Te,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):Te(C)}function Te(C){return e.enter("htmlTextData"),o(C)}}const A0={name:"labelEnd",resolveAll:LL,resolveTo:DL,tokenize:IL},wL={tokenize:ML},RL={tokenize:BL},OL={tokenize:zL};function LL(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&Fn(e,0,e.length,n),e}function DL(e,t){let n=e.length,a=0,s,u,o,f;for(;n--;)if(s=e[n][1],u){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(o){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(u=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(o=n);const d={type:e[u][1].type==="labelLink"?"link":"image",start:{...e[u][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[u][1].start},end:{...e[o][1].end}},b={type:"labelText",start:{...e[u+a+2][1].end},end:{...e[o-2][1].start}};return f=[["enter",d,t],["enter",h,t]],f=rr(f,e.slice(u+1,u+a+3)),f=rr(f,[["enter",b,t]]),f=rr(f,Wc(t.parser.constructs.insideSpan.null,e.slice(u+a+4,o-3),t)),f=rr(f,[["exit",b,t],e[o-2],e[o-1],["exit",h,t]]),f=rr(f,e.slice(o+1)),f=rr(f,[["exit",d,t]]),Fn(e,u,e.length,f),e}function IL(e,t,n){const a=this;let s=a.events.length,u,o;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){u=a.events[s][1];break}return f;function f(E){return u?u._inactive?g(E):(o=a.parser.defined.includes(dr(a.sliceSerialize({start:u.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),d):n(E)}function d(E){return E===40?e.attempt(wL,b,o?b:g)(E):E===91?e.attempt(RL,b,o?h:g)(E):o?b(E):g(E)}function h(E){return e.attempt(OL,b,g)(E)}function b(E){return t(E)}function g(E){return u._balanced=!0,n(E)}}function ML(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return At(g)?iu(e,u)(g):u(g)}function u(g){return g===41?b(g):QT(e,o,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function o(g){return At(g)?iu(e,d)(g):b(g)}function f(g){return n(g)}function d(g){return g===34||g===39||g===40?ZT(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return At(g)?iu(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function BL(e,t,n){const a=this;return s;function s(f){return XT.call(a,e,u,o,"reference","referenceMarker","referenceString")(f)}function u(f){return a.parser.defined.includes(dr(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function o(f){return n(f)}}function zL(e,t,n){return a;function a(u){return e.enter("reference"),e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),s}function s(u){return u===93?(e.enter("referenceMarker"),e.consume(u),e.exit("referenceMarker"),e.exit("reference"),t):n(u)}}const HL={name:"labelStartImage",resolveAll:A0.resolveAll,tokenize:UL};function UL(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),u}function u(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),o):n(f)}function o(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const PL={name:"labelStartLink",resolveAll:A0.resolveAll,tokenize:jL};function jL(e,t,n){const a=this;return s;function s(o){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelLink"),u}function u(o){return o===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(o):t(o)}}const $h={name:"lineEnding",tokenize:FL};function FL(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),at(e,t,"linePrefix")}}const nc={name:"thematicBreak",tokenize:qL};function qL(e,t,n){let a=0,s;return u;function u(h){return e.enter("thematicBreak"),o(h)}function o(h){return s=h,f(h)}function f(h){return h===s?(e.enter("thematicBreakSequence"),d(h)):a>=3&&(h===null||De(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===s?(e.consume(h),a++,d):(e.exit("thematicBreakSequence"),Je(h)?at(e,f,"whitespace")(h):f(h))}}const Rn={continuation:{tokenize:GL},exit:XL,name:"list",tokenize:VL},YL={partial:!0,tokenize:ZL},$L={partial:!0,tokenize:QL};function VL(e,t,n){const a=this,s=a.events[a.events.length-1];let u=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,o=0;return f;function f(x){const v=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(v==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Rm(x)){if(a.containerState.type||(a.containerState.type=v,e.enter(v,{_container:!0})),v==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(nc,n,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(x)}return n(x)}function d(x){return Rm(x)&&++o<10?(e.consume(x),d):(!a.interrupt||o<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Tu,a.interrupt?n:b,e.attempt(YL,E,g))}function b(x){return a.containerState.initialBlankLine=!0,u++,E(x)}function g(x){return Je(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),E):n(x)}function E(x){return a.containerState.size=u+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function GL(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Tu,s,u);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,at(e,t,"listItemIndent",a.containerState.size+1)(f)}function u(f){return a.containerState.furtherBlankLines||!Je(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,o(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt($L,t,o)(f))}function o(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,at(e,e.attempt(Rn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function QL(e,t,n){const a=this;return at(e,s,"listItemIndent",a.containerState.size+1);function s(u){const o=a.events[a.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===a.containerState.size?t(u):n(u)}}function XL(e){e.exit(this.containerState.type)}function ZL(e,t,n){const a=this;return at(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(u){const o=a.events[a.events.length-1];return!Je(u)&&o&&o[1].type==="listItemPrefixWhitespace"?t(u):n(u)}}const gE={name:"setextUnderline",resolveTo:KL,tokenize:WL};function KL(e,t){let n=e.length,a,s,u;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!u&&e[n][1].type==="definition"&&(u=n);const o={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",u?(e.splice(s,0,["enter",o,t]),e.splice(u+1,0,["exit",e[a][1],t]),e[a][1].end={...e[u][1].end}):e[a][1]=o,e.push(["exit",o,t]),e}function WL(e,t,n){const a=this;let s;return u;function u(h){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=h,o(h)):n(h)}function o(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===s?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Je(h)?at(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||De(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const JL={tokenize:sD,partial:!0};function eD(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:aD,continuation:{tokenize:iD},exit:lD}},text:{91:{name:"gfmFootnoteCall",tokenize:rD},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tD,resolveTo:nD}}}}function tD(e,t,n){const a=this;let s=a.events.length;const u=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o;for(;s--;){const d=a.events[s][1];if(d.type==="labelImage"){o=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!o||!o._balanced)return n(d);const h=dr(a.sliceSerialize({start:o.end,end:a.now()}));return h.codePointAt(0)!==94||!u.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function nD(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 a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const u={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},u.start),end:Object.assign({},u.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",u,t],["enter",o,t],["exit",o,t],["exit",u,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function rD(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u=0,o;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),d}function d(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(u>999||g===93&&!o||g===null||g===91||At(g))return n(g);if(g===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return s.includes(dr(a.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return At(g)||(o=!0),u++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),u++,h):h(g)}}function aD(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let u,o=0,f;return d;function d(v){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(v){return v===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(v)}function b(v){if(o>999||v===93&&!f||v===null||v===91||At(v))return n(v);if(v===93){e.exit("chunkString");const N=e.exit("gfmFootnoteDefinitionLabelString");return u=dr(a.sliceSerialize(N)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(v),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return At(v)||(f=!0),o++,e.consume(v),v===92?g:b}function g(v){return v===91||v===92||v===93?(e.consume(v),o++,b):b(v)}function E(v){return v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),s.includes(u)||s.push(u),at(e,x,"gfmFootnoteDefinitionWhitespace")):n(v)}function x(v){return t(v)}}function iD(e,t,n){return e.check(Tu,t,e.attempt(JL,t,n))}function lD(e){e.exit("gfmFootnoteDefinition")}function sD(e,t,n){const a=this;return at(e,s,"gfmFootnoteDefinitionIndent",5);function s(u){const o=a.events[a.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?t(u):n(u)}}function uD(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:u,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(o,f){let d=-1;for(;++d<o.length;)if(o[d][0]==="enter"&&o[d][1].type==="strikethroughSequenceTemporary"&&o[d][1]._close){let h=d;for(;h--;)if(o[h][0]==="exit"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._open&&o[d][1].end.offset-o[d][1].start.offset===o[h][1].end.offset-o[h][1].start.offset){o[d][1].type="strikethroughSequence",o[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},o[h][1].start),end:Object.assign({},o[d][1].end)},g={type:"strikethroughText",start:Object.assign({},o[h][1].end),end:Object.assign({},o[d][1].start)},E=[["enter",b,f],["enter",o[h][1],f],["exit",o[h][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&Fn(E,E.length,0,Wc(x,o.slice(h+1,d),f)),Fn(E,E.length,0,[["exit",g,f],["enter",o[d][1],f],["exit",o[d][1],f],["exit",b,f]]),Fn(o,h-1,d-h+3,E),d=h+E.length-2;break}}for(d=-1;++d<o.length;)o[d][1].type==="strikethroughSequenceTemporary"&&(o[d][1].type="data");return o}function u(o,f,d){const h=this.previous,b=this.events;let g=0;return E;function E(v){return h===126&&b[b.length-1][1].type!=="characterEscape"?d(v):(o.enter("strikethroughSequenceTemporary"),x(v))}function x(v){const N=Il(h);if(v===126)return g>1?d(v):(o.consume(v),g++,x);if(g<2&&!n)return d(v);const w=o.exit("strikethroughSequenceTemporary"),O=Il(v);return w._open=!O||O===2&&!!N,w._close=!N||N===2&&!!O,f(v)}}}class oD{constructor(){this.map=[]}add(t,n,a){cD(this,t,n,a)}consume(t){if(this.map.sort(function(u,o){return u[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const u of s)t.push(u);s=a.pop()}this.map.length=0}}function cD(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function fD(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const u=a.length-1;a[u]=a[u]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function dD(){return{flow:{null:{name:"table",tokenize:hD,resolveAll:mD}}}}function hD(e,t,n){const a=this;let s=0,u=0,o;return f;function f(F){let oe=a.events.length-1;for(;oe>-1;){const pe=a.events[oe][1].type;if(pe==="lineEnding"||pe==="linePrefix")oe--;else break}const ce=oe>-1?a.events[oe][1].type:null,we=ce==="tableHead"||ce==="tableRow"?M:d;return we===M&&a.parser.lazy[a.now().line]?n(F):we(F)}function d(F){return e.enter("tableHead"),e.enter("tableRow"),h(F)}function h(F){return F===124||(o=!0,u+=1),b(F)}function b(F){return F===null?n(F):De(F)?u>1?(u=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),x):n(F):Je(F)?at(e,b,"whitespace")(F):(u+=1,o&&(o=!1,s+=1),F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),o=!0,b):(e.enter("data"),g(F)))}function g(F){return F===null||F===124||At(F)?(e.exit("data"),b(F)):(e.consume(F),F===92?E:g)}function E(F){return F===92||F===124?(e.consume(F),g):g(F)}function x(F){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(F):(e.enter("tableDelimiterRow"),o=!1,Je(F)?at(e,v,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):v(F))}function v(F){return F===45||F===58?w(F):F===124?(o=!0,e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),N):q(F)}function N(F){return Je(F)?at(e,w,"whitespace")(F):w(F)}function w(F){return F===58?(u+=1,o=!0,e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),O):F===45?(u+=1,O(F)):F===null||De(F)?D(F):q(F)}function O(F){return F===45?(e.enter("tableDelimiterFiller"),z(F)):q(F)}function z(F){return F===45?(e.consume(F),z):F===58?(o=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(F),e.exit("tableDelimiterMarker"),U):(e.exit("tableDelimiterFiller"),U(F))}function U(F){return Je(F)?at(e,D,"whitespace")(F):D(F)}function D(F){return F===124?v(F):F===null||De(F)?!o||s!==u?q(F):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(F)):q(F)}function q(F){return n(F)}function M(F){return e.enter("tableRow"),$(F)}function $(F){return F===124?(e.enter("tableCellDivider"),e.consume(F),e.exit("tableCellDivider"),$):F===null||De(F)?(e.exit("tableRow"),t(F)):Je(F)?at(e,$,"whitespace")(F):(e.enter("data"),G(F))}function G(F){return F===null||F===124||At(F)?(e.exit("data"),$(F)):(e.consume(F),F===92?de:G)}function de(F){return F===92||F===124?(e.consume(F),G):G(F)}}function mD(e,t){let n=-1,a=!0,s=0,u=[0,0,0,0],o=[0,0,0,0],f=!1,d=0,h,b,g;const E=new oD;for(;++n<e.length;){const x=e[n],v=x[1];x[0]==="enter"?v.type==="tableHead"?(f=!1,d!==0&&(bE(E,t,d,h,b),b=void 0,d=0),h={type:"table",start:Object.assign({},v.start),end:Object.assign({},v.end)},E.add(n,0,[["enter",h,t]])):v.type==="tableRow"||v.type==="tableDelimiterRow"?(a=!0,g=void 0,u=[0,0,0,0],o=[0,n+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},v.start),end:Object.assign({},v.end)},E.add(n,0,[["enter",b,t]])),s=v.type==="tableDelimiterRow"?2:b?3:1):s&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")?(a=!1,o[2]===0&&(u[1]!==0&&(o[0]=o[1],g=Vo(E,t,u,s,void 0,g),u=[0,0,0,0]),o[2]=n)):v.type==="tableCellDivider"&&(a?a=!1:(u[1]!==0&&(o[0]=o[1],g=Vo(E,t,u,s,void 0,g)),u=o,o=[u[1],n,0,0])):v.type==="tableHead"?(f=!0,d=n):v.type==="tableRow"||v.type==="tableDelimiterRow"?(d=n,u[1]!==0?(o[0]=o[1],g=Vo(E,t,u,s,n,g)):o[1]!==0&&(g=Vo(E,t,o,s,n,g)),s=0):s&&(v.type==="data"||v.type==="tableDelimiterMarker"||v.type==="tableDelimiterFiller")&&(o[3]=n)}for(d!==0&&bE(E,t,d,h,b),E.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=fD(t.events,n))}return e}function Vo(e,t,n,a,s,u){const o=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(u.end=Object.assign({},_l(t.events,n[0])),e.add(n[0],0,[["exit",u,t]]));const d=_l(t.events,n[1]);if(u={type:o,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",u,t]]),n[2]!==0){const h=_l(t.events,n[2]),b=_l(t.events,n[3]),g={type:f,start:Object.assign({},h),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const E=t.events[n[2]],x=t.events[n[3]];if(E[1].end=Object.assign({},x[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const v=n[2]+1,N=n[3]-n[2]-1;e.add(v,N,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(u.end=Object.assign({},_l(t.events,s)),e.add(s,0,[["exit",u,t]]),u=void 0),u}function bE(e,t,n,a,s){const u=[],o=_l(t.events,n);s&&(s.end=Object.assign({},o),u.push(["exit",s,t])),a.end=Object.assign({},o),u.push(["exit",a,t]),e.add(n+1,0,u)}function _l(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const pD={name:"tasklistCheck",tokenize:bD};function gD(){return{text:{91:pD}}}function bD(e,t,n){const a=this;return s;function s(d){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),u)}function u(d){return At(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),o):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),o):n(d)}function o(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(d)}function f(d){return De(d)?t(d):Je(d)?e.check({tokenize:yD},t,n)(d):n(d)}}function yD(e,t,n){return at(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function ED(e){return MT([wO(),eD(),uD(e),dD(),gD()])}const xD={};function TD(e){const t=this,n=e||xD,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),u=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),o=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(ED(n)),u.push(vO()),o.push(SO(n))}var _D=Object.defineProperty,vD=Object.defineProperties,SD=Object.getOwnPropertyDescriptors,yE=Object.getOwnPropertySymbols,kD=Object.prototype.hasOwnProperty,AD=Object.prototype.propertyIsEnumerable,EE=(e,t,n)=>t in e?_D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,KT=(e,t)=>{for(var n in t||(t={}))kD.call(t,n)&&EE(e,n,t[n]);if(yE)for(var n of yE(t))AD.call(t,n)&&EE(e,n,t[n]);return e},WT=(e,t)=>vD(e,SD(t)),xn=(e,t)=>{let n=!1,a=!1;for(let s=0;s<t;s+=1){if(e[s]==="\\"&&s+1<e.length&&e[s+1]==="`"){s+=1;continue}if(e.substring(s,s+3)==="```"){a=!a,s+=2;continue}!a&&e[s]==="`"&&(n=!n)}return n||a},CD=(e,t)=>{let n=e.substring(t,t+3)==="```",a=t>0&&e.substring(t-1,t+2)==="```",s=t>1&&e.substring(t-2,t+1)==="```";return n||a||s},ND=e=>{let t=0;for(let n=0;n<e.length;n+=1){if(e[n]==="\\"&&n+1<e.length&&e[n+1]==="`"){n+=1;continue}e[n]==="`"&&!CD(e,n)&&(t+=1)}return t},ja=(e,t)=>{let n=!1,a=!1,s=-1;for(let u=0;u<e.length;u+=1){if(e[u]==="\\"&&u+1<e.length&&e[u+1]==="`"){u+=1;continue}if(e.substring(u,u+3)==="```"){a=!a,u+=2;continue}if(!a&&e[u]==="`")if(n){if(s<t&&t<u)return!0;n=!1,s=-1}else n=!0,s=u}return!1},wD=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,RD=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(wD,(t,n,a,s)=>xn(e,s)?t:`${n}\\>${a}`),OD=/(\*\*)([^*]*\*?)$/,LD=/(__)([^_]*?)$/,DD=/(\*\*\*)([^*]*?)$/,ID=/(\*)([^*]*?)$/,MD=/(_)([^_]*?)$/,BD=/(`)([^`]*?)$/,zD=/(~~)([^~]*?)$/,Di=/^[\s_~*`]*$/,JT=/^[\s]*[-*+][\s]+$/,HD=/[\p{L}\p{N}_]/u,UD=/^```[^`\n]*```?$/,PD=/^\*{4,}$/,jD=/(__)([^_]+)_$/,FD=/(~~)([^~]+)~$/,xE=/~~/g,Fa=e=>{if(!e)return!1;let t=e.charCodeAt(0);return t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||t===95?!0:HD.test(e)},qD=(e,t)=>{let n=1;for(let a=t-1;a>=0;a-=1)if(e[a]==="]")n+=1;else if(e[a]==="["&&(n-=1,n===0))return a;return-1},e_=(e,t)=>{let n=1;for(let a=t+1;a<e.length;a+=1)if(e[a]==="[")n+=1;else if(e[a]==="]"&&(n-=1,n===0))return a;return-1},Jc=(e,t)=>{let n=!1,a=!1;for(let s=0;s<e.length&&s<t;s+=1){if(e[s]==="\\"&&e[s+1]==="$"){s+=1;continue}e[s]==="$"&&(e[s+1]==="$"?(a=!a,s+=1,n=!1):a||(n=!n))}return n||a},YD=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
222
- `)return!1}return!1},t_=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?YD(e,t):!1;if(e[n]===`
223
- `)return!1}return!1},$D=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let a=n+1<e.length?e[n+1]:"";return a>="a"&&a<="z"||a>="A"&&a<="Z"||a==="/"}if(e[n]===`
224
- `)return!1}return!1},C0=(e,t,n)=>{let a=0;for(let d=t-1;d>=0;d-=1)if(e[d]===`
225
- `){a=d+1;break}let s=e.length;for(let d=t;d<e.length;d+=1)if(e[d]===`
226
- `){s=d;break}let u=e.substring(a,s),o=0,f=!1;for(let d of u)if(d===n)o+=1;else if(d!==" "&&d!==" "){f=!0;break}return o>=3&&!f},VD=(e,t,n,a)=>n==="\\"||e.includes("$")&&Jc(e,t)?!0:n!=="*"&&a==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&a&&Fa(n)&&Fa(a)||(!n||n===" "||n===" "||n===`
227
- `)&&(!a||a===" "||a===" "||a===`
228
- `)),n_=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="*")continue;let u=s>0?e[s-1]:"",o=s<a-1?e[s+1]:"";VD(e,s,u,o)||(t+=1)}return t},GD=(e,t,n,a)=>!!(n==="\\"||e.includes("$")&&Jc(e,t)||t_(e,t)||$D(e,t)||n==="_"||a==="_"||n&&a&&Fa(n)&&Fa(a)),QD=e=>{let t=0,n=!1,a=e.length;for(let s=0;s<a;s+=1){if(e[s]==="`"&&s+2<a&&e[s+1]==="`"&&e[s+2]==="`"){n=!n,s+=2;continue}if(n||e[s]!=="_")continue;let u=s>0?e[s-1]:"",o=s<a-1?e[s+1]:"";GD(e,s,u,o)||(t+=1)}return t},XD=e=>{let t=0,n=0,a=!1;for(let s=0;s<e.length;s+=1){if(e[s]==="`"&&s+2<e.length&&e[s+1]==="`"&&e[s+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,a=!a,s+=2;continue}a||(e[s]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},N0=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="*"&&a+1<e.length&&e[a+1]==="*"&&(t+=1,a+=1)}return t},TE=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="`"&&a+2<e.length&&e[a+1]==="`"&&e[a+2]==="`"){n=!n,a+=2;continue}n||e[a]==="_"&&a+1<e.length&&e[a+1]==="_"&&(t+=1,a+=1)}return t},ZD=(e,t,n)=>{if(!t||Di.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
229
- `),s=a===-1?0:a+1,u=e.substring(s,n);return JT.test(u)&&t.includes(`
230
- `)?!0:C0(e,n,"*")},KD=e=>{let t=e.match(OD);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return xn(e,a)||ja(e,a)||ZD(e,n,a)?e:N0(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},WD=(e,t,n)=>{if(!t||Di.test(t))return!0;let a=e.substring(0,n).lastIndexOf(`
231
- `),s=a===-1?0:a+1,u=e.substring(s,n);return JT.test(u)&&t.includes(`
232
- `)?!0:C0(e,n,"_")},JD=e=>{let t=e.match(LD);if(!t){let s=e.match(jD);if(s){let u=e.lastIndexOf(s[1]);if(!(xn(e,u)||ja(e,u))&&TE(e)%2===1)return`${e}_`}return e}let n=t[2],a=e.lastIndexOf(t[1]);return xn(e,a)||ja(e,a)||WD(e,n,a)?e:TE(e)%2===1?`${e}__`:e},e8=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="*"&&e[n-1]!=="*"&&e[n+1]!=="*"&&e[n-1]!=="\\"&&!Jc(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if((!a||a===" "||a===" "||a===`
233
- `)&&(!s||s===" "||s===" "||s===`
234
- `)||a&&s&&Fa(a)&&Fa(s))continue;return n}}return-1},t8=e=>{if(!e.match(ID))return e;let t=e8(e);if(t===-1||xn(e,t)||ja(e,t))return e;let n=e.substring(t+1);return!n||Di.test(n)?e:n_(e)%2===1?`${e}*`:e},r_=e=>{let t=!1;for(let n=0;n<e.length;n+=1){if(e[n]==="`"&&n+2<e.length&&e[n+1]==="`"&&e[n+2]==="`"){t=!t,n+=2;continue}if(!t&&e[n]==="_"&&e[n-1]!=="_"&&e[n+1]!=="_"&&e[n-1]!=="\\"&&!Jc(e,n)&&!t_(e,n)){let a=n>0?e[n-1]:"",s=n<e.length-1?e[n+1]:"";if(a&&s&&Fa(a)&&Fa(s))continue;return n}}return-1},n8=e=>{let t=e.length;for(;t>0&&e[t-1]===`
235
- `;)t-=1;if(t<e.length){let n=e.slice(0,t),a=e.slice(t);return`${n}_${a}`}return`${e}_`},r8=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(N0(t)%2!==1)return null;let n=t.indexOf("**"),a=r_(t);return n!==-1&&a!==-1&&n<a?`${t}_**`:null},a8=e=>{if(!e.match(MD))return e;let t=r_(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||Di.test(n)||xn(e,t)||ja(e,t))return e;if(QD(e)%2===1){let a=r8(e);return a!==null?a:n8(e)}return e},i8=e=>{let t=N0(e),n=n_(e);return t%2===0&&n%2===0},l8=(e,t,n)=>!t||Di.test(t)||xn(e,n)||ja(e,n)?!0:C0(e,n,"*"),s8=e=>{if(PD.test(e))return e;let t=e.match(DD);if(!t)return e;let n=t[2],a=e.lastIndexOf(t[1]);return l8(e,n,a)?e:XD(e)%2===1?i8(e)?e:`${e}***`:e},u8=/<[a-zA-Z/][^>]*$/,o8=e=>{let t=e.match(u8);return!t||t.index===void 0||xn(e,t.index)?e:e.substring(0,t.index).trimEnd()},c8=e=>!e.match(UD)||e.includes(`
236
- `)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,f8=e=>(e.match(/```/g)||[]).length%2===1,d8=e=>{let t=c8(e);if(t!==null)return t;let n=e.match(BD);if(n&&!f8(e)){let a=n[2];if(!a||Di.test(a))return e;if(ND(e)%2===1)return`${e}\``}return e},a_=(e,t)=>t>=2&&e.substring(t-2,t+1)==="```"||t>=1&&e.substring(t-1,t+2)==="```"||t<=e.length-3&&e.substring(t,t+3)==="```",h8=e=>{let t=0,n=!1;for(let a=0;a<e.length-1;a+=1)e[a]==="`"&&!a_(e,a)&&(n=!n),!n&&e[a]==="$"&&e[a+1]==="$"&&(t+=1,a+=1);return t},m8=e=>{let t=0,n=!1;for(let a=0;a<e.length;a+=1){if(e[a]==="\\"){a+=1;continue}if(e[a]==="`"&&!a_(e,a)){n=!n;continue}!n&&e[a]==="$"&&(a+1<e.length&&e[a+1]==="$"?a+=1:t+=1)}return t},p8=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
237
- `,t)!==-1&&!e.endsWith(`
238
- `)?`${e}
239
- $$`:`${e}$$`},g8=e=>h8(e)%2===0?e:p8(e),b8=e=>m8(e)%2===1?`${e}$`:e,y8=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let a=qD(e,t);if(a===-1||xn(e,a))return null;let s=a>0&&e[a-1]==="!",u=s?a-1:a,o=e.substring(0,u);if(s)return o;let f=e.substring(a+1,t);return n==="text-only"?`${o}${f}`:`${o}[${f}](streamdown:incomplete-link)`},_E=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!xn(e,n)){if(n>0&&e[n-1]==="!")continue;let a=e_(e,n);if(a===-1)return n;if(a+1<e.length&&e[a+1]==="("){let s=e.indexOf(")",a+2);s!==-1&&(n=s)}}return t},E8=(e,t,n)=>{let a=t>0&&e[t-1]==="!",s=a?t-1:t;if(!e.substring(t+1).includes("]")){let u=e.substring(0,s);if(a)return u;if(n==="text-only"){let o=_E(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}if(e_(e,t)===-1){let u=e.substring(0,s);if(a)return u;if(n==="text-only"){let o=_E(e,t);return e.substring(0,o)+e.substring(o+1)}return`${e}](streamdown:incomplete-link)`}return null},i_=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!xn(e,n)){let a=y8(e,n,t);if(a!==null)return a}for(let a=e.length-1;a>=0;a-=1)if(e[a]==="["&&!xn(e,a)){let s=E8(e,a,t);if(s!==null)return s}return e},x8=/^-{1,2}$/,T8=/^[\s]*-{1,2}[\s]+$/,_8=/^={1,2}$/,v8=/^[\s]*={1,2}[\s]+$/,S8=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
240
- `);if(t===-1)return e;let n=e.substring(t+1),a=e.substring(0,t),s=n.trim();if(x8.test(s)&&!n.match(T8)){let u=a.split(`
241
- `).at(-1);if(u&&u.trim().length>0)return`${e}​`}if(_8.test(s)&&!n.match(v8)){let u=a.split(`
242
- `).at(-1);if(u&&u.trim().length>0)return`${e}​`}return e},k8=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),A8=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(k8,(t,n)=>xn(e,n)?t:"\\~"),C8=e=>{var t,n;let a=e.match(zD);if(a){let s=a[2];if(!s||Di.test(s))return e;let u=e.lastIndexOf(a[1]);if(xn(e,u)||ja(e,u))return e;if(((t=e.match(xE))==null?void 0:t.length)%2===1)return`${e}~~`}else{let s=e.match(FD);if(s){let u=e.lastIndexOf(s[0].slice(0,2));if(xn(e,u)||ja(e,u))return e;if(((n=e.match(xE))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Vh=e=>e!==!1,N8=e=>e===!0,bn={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},w8=[{handler:{name:"singleTilde",handle:A8,priority:bn.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:RD,priority:bn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:o8,priority:bn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:S8,priority:bn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:i_,priority:bn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:s8,priority:bn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:KD,priority:bn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:JD,priority:bn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:t8,priority:bn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:a8,priority:bn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:d8,priority:bn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:C8,priority:bn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:g8,priority:bn.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:b8,priority:bn.INLINE_KATEX},optionKey:"inlineKatex"}],R8=e=>{var t;let n=(t=e==null?void 0:e.linkMode)!=null?t:"protocol";return w8.filter(({handler:a,optionKey:s})=>a.name==="links"?Vh(e==null?void 0:e.links)||Vh(e==null?void 0:e.images):a.name==="inlineKatex"?N8(e==null?void 0:e.inlineKatex):Vh(e==null?void 0:e[s])).map(({handler:a,earlyReturn:s})=>a.name==="links"?{handler:WT(KT({},a),{handle:u=>i_(u,n)}),earlyReturn:n==="protocol"?s:void 0}:{handler:a,earlyReturn:s})},O8=(e,t)=>{var n;if(!e||typeof e!="string")return e;let a=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,s=R8(t),u=((n=t==null?void 0:t.handlers)!=null?n:[]).map(f=>{var d;return{handler:WT(KT({},f),{priority:(d=f.priority)!=null?d:bn.DEFAULT}),earlyReturn:void 0}}),o=[...s,...u].sort((f,d)=>{var h,b;return((h=f.handler.priority)!=null?h:0)-((b=d.handler.priority)!=null?b:0)});for(let{handler:f,earlyReturn:d}of o)if(a=f.handle(a),d!=null&&d(a))return a;return a},L8=O8,l_=Lx();const D8=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,I8=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M8={};function vE(e,t){return(M8.jsx?I8:D8).test(e)}const B8=/[ \t\n\f\r]/g;function z8(e){return typeof e=="object"?e.type==="text"?SE(e.value):!1:SE(e)}function SE(e){return e.replace(B8,"")===""}var El={},Gh,kE;function H8(){if(kE)return Gh;kE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,u=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
243
- `,h="/",b="*",g="",E="comment",x="declaration";function v(w,O){if(typeof w!="string")throw new TypeError("First argument must be a string");if(!w)return[];O=O||{};var z=1,U=1;function D(pe){var ae=pe.match(t);ae&&(z+=ae.length);var P=pe.lastIndexOf(d);U=~P?pe.length-P:U+pe.length}function q(){var pe={line:z,column:U};return function(ae){return ae.position=new M(pe),de(),ae}}function M(pe){this.start=pe,this.end={line:z,column:U},this.source=O.source}M.prototype.content=w;function $(pe){var ae=new Error(O.source+":"+z+":"+U+": "+pe);if(ae.reason=pe,ae.filename=O.source,ae.line=z,ae.column=U,ae.source=w,!O.silent)throw ae}function G(pe){var ae=pe.exec(w);if(ae){var P=ae[0];return D(P),w=w.slice(P.length),ae}}function de(){G(n)}function F(pe){var ae;for(pe=pe||[];ae=oe();)ae!==!1&&pe.push(ae);return pe}function oe(){var pe=q();if(!(h!=w.charAt(0)||b!=w.charAt(1))){for(var ae=2;g!=w.charAt(ae)&&(b!=w.charAt(ae)||h!=w.charAt(ae+1));)++ae;if(ae+=2,g===w.charAt(ae-1))return $("End of comment missing");var P=w.slice(2,ae-2);return U+=2,D(P),w=w.slice(ae),U+=2,pe({type:E,comment:P})}}function ce(){var pe=q(),ae=G(a);if(ae){if(oe(),!G(s))return $("property missing ':'");var P=G(u),ne=pe({type:x,property:N(ae[0].replace(e,g)),value:P?N(P[0].replace(e,g)):g});return G(o),ne}}function we(){var pe=[];F(pe);for(var ae;ae=ce();)ae!==!1&&(pe.push(ae),F(pe));return pe}return de(),we()}function N(w){return w?w.replace(f,g):g}return Gh=v,Gh}var AE;function U8(){if(AE)return El;AE=1;var e=El&&El.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(El,"__esModule",{value:!0}),El.default=n;const t=e(H8());function n(a,s){let u=null;if(!a||typeof a!="string")return u;const o=(0,t.default)(a),f=typeof s=="function";return o.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:b}=d;f?s(h,b,d):b&&(u=u||{},u[h]=b)}),u}return El}var js={},CE;function P8(){if(CE)return js;CE=1,Object.defineProperty(js,"__esModule",{value:!0}),js.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,u=function(h){return!h||n.test(h)||e.test(h)},o=function(h,b){return b.toUpperCase()},f=function(h,b){return"".concat(b,"-")},d=function(h,b){return b===void 0&&(b={}),u(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(s,f):h=h.replace(a,f),h.replace(t,o))};return js.camelCase=d,js}var Fs,NE;function j8(){if(NE)return Fs;NE=1;var e=Fs&&Fs.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(U8()),n=P8();function a(s,u){var o={};return!s||typeof s!="string"||(0,t.default)(s,function(f,d){f&&d&&(o[(0,n.camelCase)(f,u)]=d)}),o}return a.default=a,Fs=a,Fs}var F8=j8();const q8=Qm(F8);function lu(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?wE(e.position):"start"in e||"end"in e?wE(e):"line"in e||"column"in e?Dm(e):""}function Dm(e){return RE(e&&e.line)+":"+RE(e&&e.column)}function wE(e){return Dm(e&&e.start)+"-"+Dm(e&&e.end)}function RE(e){return e&&typeof e=="number"?e:1}class fn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",u={},o=!1;if(n&&("line"in n&&"column"in n?u={place:n}:"start"in n&&"end"in n?u={place:n}:"type"in n?u={ancestors:[n],place:n.position}:u={...n}),typeof t=="string"?s=t:!u.cause&&t&&(o=!0,s=t.message,u.cause=t),!u.ruleId&&!u.source&&typeof a=="string"){const d=a.indexOf(":");d===-1?u.ruleId=a:(u.source=a.slice(0,d),u.ruleId=a.slice(d+1))}if(!u.place&&u.ancestors&&u.ancestors){const d=u.ancestors[u.ancestors.length-1];d&&(u.place=d.position)}const f=u.place&&"start"in u.place?u.place.start:u.place;this.ancestors=u.ancestors||void 0,this.cause=u.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=lu(u.place)||"1:1",this.place=u.place||void 0,this.reason=this.message,this.ruleId=u.ruleId||void 0,this.source=u.source||void 0,this.stack=o&&u.cause&&typeof u.cause.stack=="string"?u.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}fn.prototype.file="";fn.prototype.name="";fn.prototype.reason="";fn.prototype.message="";fn.prototype.stack="";fn.prototype.column=void 0;fn.prototype.line=void 0;fn.prototype.ancestors=void 0;fn.prototype.cause=void 0;fn.prototype.fatal=void 0;fn.prototype.place=void 0;fn.prototype.ruleId=void 0;fn.prototype.source=void 0;const w0={}.hasOwnProperty,Y8=new Map,$8=/[A-Z]/g,V8=new Set(["table","tbody","thead","tfoot","tr"]),G8=new Set(["td","th"]),s_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Q8(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=nI(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");a=tI(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,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"?$a:bu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},u=u_(s,e,void 0);return u&&typeof u!="string"?u:s.create(e,s.Fragment,{children:u||void 0},void 0)}function u_(e,t,n){if(t.type==="element")return X8(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Z8(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return W8(e,t,n);if(t.type==="mdxjsEsm")return K8(e,t);if(t.type==="root")return J8(e,t,n);if(t.type==="text")return eI(e,t)}function X8(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=$a,e.schema=s),e.ancestors.push(t);const u=c_(e,t.tagName,!1),o=rI(e,t);let f=O0(e,t);return V8.has(t.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!z8(d):!0})),o_(e,o,u,t),R0(o,f),e.ancestors.pop(),e.schema=a,e.create(t,u,o,n)}function Z8(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}hu(e,t.position)}function K8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);hu(e,t.position)}function W8(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=$a,e.schema=s),e.ancestors.push(t);const u=t.name===null?e.Fragment:c_(e,t.name,!0),o=aI(e,t),f=O0(e,t);return o_(e,o,u,t),R0(o,f),e.ancestors.pop(),e.schema=a,e.create(t,u,o,n)}function J8(e,t,n){const a={};return R0(a,O0(e,t)),e.create(t,e.Fragment,a,n)}function eI(e,t){return t.value}function o_(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function R0(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function tI(e,t,n){return a;function a(s,u,o,f){const h=Array.isArray(o.children)?n:t;return f?h(u,o,f):h(u,o)}}function nI(e,t){return n;function n(a,s,u,o){const f=Array.isArray(u.children),d=Cr(a);return t(s,u,o,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function rI(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&w0.call(t.properties,s)){const u=iI(e,s,t.properties[s]);if(u){const[o,f]=u;e.tableCellAlignToStyle&&o==="align"&&typeof f=="string"&&G8.has(t.tagName)?a=f:n[o]=f}}if(a){const u=n.style||(n.style={});u[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function aI(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const u=a.data.estree.body[0];u.type;const o=u.expression;o.type;const f=o.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else hu(e,t.position);else{const s=a.name;let u;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,u=e.evaluater.evaluateExpression(f.expression)}else hu(e,t.position);else u=a.value===null?!0:a.value;n[s]=u}return n}function O0(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:Y8;for(;++a<t.children.length;){const u=t.children[a];let o;if(e.passKeys){const d=u.type==="element"?u.tagName:u.type==="mdxJsxFlowElement"||u.type==="mdxJsxTextElement"?u.name:void 0;if(d){const h=s.get(d)||0;o=d+"-"+h,s.set(d,h+1)}}const f=u_(e,u,o);f!==void 0&&n.push(f)}return n}function iI(e,t,n){const a=$c(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?N2(n):w2(n)),a.property==="style"){let s=typeof n=="object"?n:lI(e,String(n));return e.stylePropertyNameCase==="css"&&(s=sI(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?b6[a.property]||a.property:a.attribute,n]}}function lI(e,t){try{return q8(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new fn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=s_+"#cannot-parse-style-attribute",s}}function c_(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let u=-1,o;for(;++u<s.length;){const f=vE(s[u])?{type:"Identifier",name:s[u]}:{type:"Literal",value:s[u]};o=o?{type:"MemberExpression",object:o,property:f,computed:!!(u&&f.type==="Literal"),optional:!1}:f}a=o}else a=vE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return w0.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);hu(e)}function hu(e,t){const n=new fn("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=s_+"#cannot-handle-mdx-estrees-without-createevaluater",n}function sI(e){const t={};let n;for(n in e)w0.call(e,n)&&(t[uI(n)]=e[n]);return t}function uI(e){let t=e.replace($8,oI);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function oI(e){return"-"+e.toLowerCase()}const Qh={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"]},cI={tokenize:fI};function fI(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),at(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),u(f)}function u(f){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,o(f)}function o(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return De(f)?(e.consume(f),e.exit("chunkText"),u):(e.consume(f),o)}}const dI={tokenize:hI},OE={tokenize:mI};function hI(e){const t=this,n=[];let a=0,s,u,o;return f;function f(U){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,d,h)(U)}return h(U)}function d(U){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&z();const D=t.events.length;let q=D,M;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){M=t.events[q][1].end;break}O(a);let $=D;for(;$<t.events.length;)t.events[$][1].end={...M},$++;return Fn(t.events,q+1,0,t.events.slice(D)),t.events.length=$,h(U)}return f(U)}function h(U){if(a===n.length){if(!s)return E(U);if(s.currentConstruct&&s.currentConstruct.concrete)return v(U);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(OE,b,g)(U)}function b(U){return s&&z(),O(a),E(U)}function g(U){return t.parser.lazy[t.now().line]=a!==n.length,o=t.now().offset,v(U)}function E(U){return t.containerState={},e.attempt(OE,x,v)(U)}function x(U){return a++,n.push([t.currentConstruct,t.containerState]),E(U)}function v(U){if(U===null){s&&z(),O(0),e.consume(U);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:u}),N(U)}function N(U){if(U===null){w(e.exit("chunkFlow"),!0),O(0),e.consume(U);return}return De(U)?(e.consume(U),w(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(U),N)}function w(U,D){const q=t.sliceStream(U);if(D&&q.push(null),U.previous=u,u&&(u.next=U),u=U,s.defineSkip(U.start),s.write(q),t.parser.lazy[U.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<o&&(!s.events[M][1].end||s.events[M][1].end.offset>o))return;const $=t.events.length;let G=$,de,F;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(de){F=t.events[G][1].end;break}de=!0}for(O(a),M=$;M<t.events.length;)t.events[M][1].end={...F},M++;Fn(t.events,G+1,0,t.events.slice($)),t.events.length=M}}function O(U){let D=n.length;for(;D-- >U;){const q=n[D];t.containerState=q[1],q[0].exit.call(t,e)}n.length=U}function z(){s.write([null]),u=void 0,s=void 0,t.containerState._closeFlow=void 0}}function mI(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const pI={tokenize:gI};function gI(e){const t=this,n=e.attempt(Tu,a,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(iL,s)),"linePrefix")));return n;function a(u){if(u===null){e.consume(u);return}return e.enter("lineEndingBlank"),e.consume(u),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const bI={resolveAll:d_()},yI=f_("string"),EI=f_("text");function f_(e){return{resolveAll:d_(e==="text"?xI:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],u=n.attempt(s,o,f);return o;function o(b){return h(b)?u(b):f(b)}function f(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),d}function d(b){return h(b)?(n.exit("data"),u(b)):(n.consume(b),d)}function h(b){if(b===null)return!0;const g=s[b];let E=-1;if(g)for(;++E<g.length;){const x=g[E];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function d_(e){return t;function t(n,a){let s=-1,u;for(;++s<=n.length;)u===void 0?n[s]&&n[s][1].type==="data"&&(u=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==u+2&&(n[u][1].end=n[s-1][1].end,n.splice(u+2,s-u-2),s=u+2),u=void 0);return e?e(n,a):n}}function xI(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 a=e[n-1][1],s=t.sliceStream(a);let u=s.length,o=-1,f=0,d;for(;u--;){const h=s[u];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)f++,o--;if(o)break;o=-1}else if(h===-2)d=!0,f++;else if(h!==-1){u++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const h={type:n===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:u?o:a.start._bufferIndex+o,_index:a.start._index+u,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const TI={42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:YT},_I={91:cL},vI={[-2]:Yh,[-1]:Yh,32:Yh},SI={35:gL,42:nc,45:[gE,nc],60:xL,61:gE,95:nc,96:mE,126:mE},kI={38:VT,92:$T},AI={[-5]:$h,[-4]:$h,[-3]:$h,33:HL,38:VT,42:Lm,60:[PO,CL],91:PL,92:[mL,$T],93:A0,95:Lm,96:JO},CI={null:[Lm,bI]},NI={null:[42,95]},wI={null:[]},RI=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:NI,contentInitial:_I,disable:wI,document:TI,flow:SI,flowInitial:vI,insideSpan:CI,string:kI,text:AI},Symbol.toStringTag,{value:"Module"}));function OI(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},u=[];let o=[],f=[];const d={attempt:$(q),check:$(M),consume:z,enter:U,exit:D,interrupt:$(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:N,events:[],now:v,parser:e,previous:null,sliceSerialize:E,sliceStream:x,write:g};let b=t.tokenize.call(h,d);return t.resolveAll&&u.push(t),h;function g(oe){return o=rr(o,oe),w(),o[o.length-1]!==null?[]:(G(t,0),h.events=Wc(u,h.events,h),h.events)}function E(oe,ce){return DI(x(oe),ce)}function x(oe){return LI(o,oe)}function v(){const{_bufferIndex:oe,_index:ce,line:we,column:pe,offset:ae}=a;return{_bufferIndex:oe,_index:ce,line:we,column:pe,offset:ae}}function N(oe){s[oe.line]=oe.column,F()}function w(){let oe;for(;a._index<o.length;){const ce=o[a._index];if(typeof ce=="string")for(oe=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===oe&&a._bufferIndex<ce.length;)O(ce.charCodeAt(a._bufferIndex));else O(ce)}}function O(oe){b=b(oe)}function z(oe){De(oe)?(a.line++,a.column=1,a.offset+=oe===-3?2:1,F()):oe!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===o[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=oe}function U(oe,ce){const we=ce||{};return we.type=oe,we.start=v(),h.events.push(["enter",we,h]),f.push(we),we}function D(oe){const ce=f.pop();return ce.end=v(),h.events.push(["exit",ce,h]),ce}function q(oe,ce){G(oe,ce.from)}function M(oe,ce){ce.restore()}function $(oe,ce){return we;function we(pe,ae,P){let ne,xe,Te,C;return Array.isArray(pe)?K(pe):"tokenize"in pe?K([pe]):I(pe);function I(ie){return he;function he(_e){const Ee=_e!==null&&ie[_e],Ye=_e!==null&&ie.null,_t=[...Array.isArray(Ee)?Ee:Ee?[Ee]:[],...Array.isArray(Ye)?Ye:Ye?[Ye]:[]];return K(_t)(_e)}}function K(ie){return ne=ie,xe=0,ie.length===0?P:A(ie[xe])}function A(ie){return he;function he(_e){return C=de(),Te=ie,ie.partial||(h.currentConstruct=ie),ie.name&&h.parser.constructs.disable.null.includes(ie.name)?se():ie.tokenize.call(ce?Object.assign(Object.create(h),ce):h,d,ee,se)(_e)}}function ee(ie){return oe(Te,C),ae}function se(ie){return C.restore(),++xe<ne.length?A(ne[xe]):P}}}function G(oe,ce){oe.resolveAll&&!u.includes(oe)&&u.push(oe),oe.resolve&&Fn(h.events,ce,h.events.length-ce,oe.resolve(h.events.slice(ce),h)),oe.resolveTo&&(h.events=oe.resolveTo(h.events,h))}function de(){const oe=v(),ce=h.previous,we=h.currentConstruct,pe=h.events.length,ae=Array.from(f);return{from:pe,restore:P};function P(){a=oe,h.previous=ce,h.currentConstruct=we,h.events.length=pe,f=ae,F()}}function F(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function LI(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,u=t.end._bufferIndex;let o;if(n===s)o=[e[n].slice(a,u)];else{if(o=e.slice(n,s),a>-1){const f=o[0];typeof f=="string"?o[0]=f.slice(a):o.shift()}u>0&&o.push(e[s].slice(0,u))}return o}function DI(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const u=e[n];let o;if(typeof u=="string")o=u;else switch(u){case-5:{o="\r";break}case-4:{o=`
244
- `;break}case-3:{o=`\r
245
- `;break}case-2:{o=t?" ":" ";break}case-1:{if(!t&&s)continue;o=" ";break}default:o=String.fromCharCode(u)}s=u===-2,a.push(o)}return a.join("")}function II(e){const a={constructs:MT([RI,...(e||{}).extensions||[]]),content:s(cI),defined:[],document:s(dI),flow:s(pI),lazy:{},string:s(yI),text:s(EI)};return a;function s(u){return o;function o(f){return OI(a,u,f)}}}function MI(e){for(;!GT(e););return e}const LE=/[\0\t\n\r]/g;function BI(){let e=1,t="",n=!0,a;return s;function s(u,o,f){const d=[];let h,b,g,E,x;for(u=t+(typeof u=="string"?u.toString():new TextDecoder(o||void 0).decode(u)),g=0,t="",n&&(u.charCodeAt(0)===65279&&g++,n=void 0);g<u.length;){if(LE.lastIndex=g,h=LE.exec(u),E=h&&h.index!==void 0?h.index:u.length,x=u.charCodeAt(E),!h){t=u.slice(g);break}if(x===10&&g===E&&a)d.push(-3),a=void 0;else switch(a&&(d.push(-5),a=void 0),g<E&&(d.push(u.slice(g,E)),e+=E-g),x){case 0:{d.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,d.push(-2);e++<b;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:a=!0,e=1}g=E+1}return f&&(a&&d.push(-5),t&&d.push(t),d.push(null)),d}}const h_={}.hasOwnProperty;function zI(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),HI(n)(MI(II(n).document().write(BI()(e,t,!0))))}function HI(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:u(st),autolinkProtocol:de,autolinkEmail:de,atxHeading:u(dn),blockQuote:u(Ye),characterEscape:de,characterReference:de,codeFenced:u(_t),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:u(_t,o),codeText:u(wt,o),codeTextData:de,data:de,codeFlowValue:de,definition:u(rt),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:u(mt),hardBreakEscape:u(hn),hardBreakTrailing:u(hn),htmlFlow:u(gr,o),htmlFlowData:de,htmlText:u(gr,o),htmlTextData:de,image:u(Le),label:o,link:u(st),listItem:u(Ft),listItemValue:E,listOrdered:u(jt,g),listUnordered:u(jt),paragraph:u($n),reference:A,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:u(dn),strong:u(jl),thematicBreak:u(of)},exit:{atxHeading:d(),atxHeadingSequence:q,autolink:d(),autolinkEmail:Ee,autolinkProtocol:_e,blockQuote:d(),characterEscapeValue:F,characterReferenceMarkerHexadecimal:se,characterReferenceMarkerNumeric:se,characterReferenceValue:ie,characterReference:he,codeFenced:d(w),codeFencedFence:N,codeFencedFenceInfo:x,codeFencedFenceMeta:v,codeFlowValue:F,codeIndented:d(O),codeText:d(ae),codeTextData:F,data:F,definition:d(),definitionDestinationString:D,definitionLabelString:z,definitionTitleString:U,emphasis:d(),hardBreakEscape:d(ce),hardBreakTrailing:d(ce),htmlFlow:d(we),htmlFlowData:F,htmlText:d(pe),htmlTextData:F,image:d(ne),label:Te,labelText:xe,lineEnding:oe,link:d(P),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ee,resourceDestinationString:C,resourceTitleString:I,resource:K,setextHeading:d(G),setextHeadingLineSequence:$,setextHeadingText:M,strong:d(),thematicBreak:d()}};m_(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(re){let ye={type:"root",children:[]};const Me={stack:[ye],tokenStack:[],config:t,enter:f,exit:h,buffer:o,resume:b,data:n},Ze=[];let ht=-1;for(;++ht<re.length;)if(re[ht][1].type==="listOrdered"||re[ht][1].type==="listUnordered")if(re[ht][0]==="enter")Ze.push(ht);else{const Ln=Ze.pop();ht=s(re,Ln,ht)}for(ht=-1;++ht<re.length;){const Ln=t[re[ht][0]];h_.call(Ln,re[ht][1].type)&&Ln[re[ht][1].type].call(Object.assign({sliceSerialize:re[ht][2].sliceSerialize},Me),re[ht][1])}if(Me.tokenStack.length>0){const Ln=Me.tokenStack[Me.tokenStack.length-1];(Ln[1]||DE).call(Me,void 0,Ln[0])}for(ye.position={start:Ra(re.length>0?re[0][1].start:{line:1,column:1,offset:0}),end:Ra(re.length>0?re[re.length-2][1].end:{line:1,column:1,offset:0})},ht=-1;++ht<t.transforms.length;)ye=t.transforms[ht](ye)||ye;return ye}function s(re,ye,Me){let Ze=ye-1,ht=-1,Ln=!1,wr,pn,Xt,Tn;for(;++Ze<=Me;){const vt=re[Ze];switch(vt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{vt[0]==="enter"?ht++:ht--,Tn=void 0;break}case"lineEndingBlank":{vt[0]==="enter"&&(wr&&!Tn&&!ht&&!Xt&&(Xt=Ze),Tn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tn=void 0}if(!ht&&vt[0]==="enter"&&vt[1].type==="listItemPrefix"||ht===-1&&vt[0]==="exit"&&(vt[1].type==="listUnordered"||vt[1].type==="listOrdered")){if(wr){let aa=Ze;for(pn=void 0;aa--;){const sr=re[aa];if(sr[1].type==="lineEnding"||sr[1].type==="lineEndingBlank"){if(sr[0]==="exit")continue;pn&&(re[pn][1].type="lineEndingBlank",Ln=!0),sr[1].type="lineEnding",pn=aa}else if(!(sr[1].type==="linePrefix"||sr[1].type==="blockQuotePrefix"||sr[1].type==="blockQuotePrefixWhitespace"||sr[1].type==="blockQuoteMarker"||sr[1].type==="listItemIndent"))break}Xt&&(!pn||Xt<pn)&&(wr._spread=!0),wr.end=Object.assign({},pn?re[pn][1].start:vt[1].end),re.splice(pn||Ze,0,["exit",wr,vt[2]]),Ze++,Me++}if(vt[1].type==="listItemPrefix"){const aa={type:"listItem",_spread:!1,start:Object.assign({},vt[1].start),end:void 0};wr=aa,re.splice(Ze,0,["enter",aa,vt[2]]),Ze++,Me++,Xt=void 0,Tn=!0}}}return re[ye][1]._spread=Ln,Me}function u(re,ye){return Me;function Me(Ze){f.call(this,re(Ze),Ze),ye&&ye.call(this,Ze)}}function o(){this.stack.push({type:"fragment",children:[]})}function f(re,ye,Me){this.stack[this.stack.length-1].children.push(re),this.stack.push(re),this.tokenStack.push([ye,Me||void 0]),re.position={start:Ra(ye.start),end:void 0}}function d(re){return ye;function ye(Me){re&&re.call(this,Me),h.call(this,Me)}}function h(re,ye){const Me=this.stack.pop(),Ze=this.tokenStack.pop();if(Ze)Ze[0].type!==re.type&&(ye?ye.call(this,re,Ze[0]):(Ze[1]||DE).call(this,re,Ze[0]));else throw new Error("Cannot close `"+re.type+"` ("+lu({start:re.start,end:re.end})+"): it’s not open");Me.position.end=Ra(re.end)}function b(){return _0(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function E(re){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(re),10),this.data.expectingFirstListItemValue=void 0}}function x(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=re}function v(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=re}function N(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.value=re.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function O(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.value=re.replace(/(\r?\n|\r)$/g,"")}function z(re){const ye=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ye,Me.identifier=dr(this.sliceSerialize(re)).toLowerCase()}function U(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.title=re}function D(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.url=re}function q(re){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Me=this.sliceSerialize(re).length;ye.depth=Me}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function $(re){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(re).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function de(re){const Me=this.stack[this.stack.length-1].children;let Ze=Me[Me.length-1];(!Ze||Ze.type!=="text")&&(Ze=mn(),Ze.position={start:Ra(re.start),end:void 0},Me.push(Ze)),this.stack.push(Ze)}function F(re){const ye=this.stack.pop();ye.value+=this.sliceSerialize(re),ye.position.end=Ra(re.end)}function oe(re){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=ye.children[ye.children.length-1];Me.position.end=Ra(re.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ye.type)&&(de.call(this,re),F.call(this,re))}function ce(){this.data.atHardBreak=!0}function we(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.value=re}function pe(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.value=re}function ae(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.value=re}function P(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=ye,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function ne(){const re=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";re.type+="Reference",re.referenceType=ye,delete re.url,delete re.title}else delete re.identifier,delete re.label;this.data.referenceType=void 0}function xe(re){const ye=this.sliceSerialize(re),Me=this.stack[this.stack.length-2];Me.label=cO(ye),Me.identifier=dr(ye).toLowerCase()}function Te(){const re=this.stack[this.stack.length-1],ye=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Ze=re.children;Me.children=Ze}else Me.alt=ye}function C(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.url=re}function I(){const re=this.resume(),ye=this.stack[this.stack.length-1];ye.title=re}function K(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function ee(re){const ye=this.resume(),Me=this.stack[this.stack.length-1];Me.label=ye,Me.identifier=dr(this.sliceSerialize(re)).toLowerCase(),this.data.referenceType="full"}function se(re){this.data.characterReferenceType=re.type}function ie(re){const ye=this.sliceSerialize(re),Me=this.data.characterReferenceType;let Ze;Me?(Ze=IT(ye,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ze=S0(ye);const ht=this.stack[this.stack.length-1];ht.value+=Ze}function he(re){const ye=this.stack.pop();ye.position.end=Ra(re.end)}function _e(re){F.call(this,re);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(re)}function Ee(re){F.call(this,re);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(re)}function Ye(){return{type:"blockquote",children:[]}}function _t(){return{type:"code",lang:null,meta:null,value:""}}function wt(){return{type:"inlineCode",value:""}}function rt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function mt(){return{type:"emphasis",children:[]}}function dn(){return{type:"heading",depth:0,children:[]}}function hn(){return{type:"break"}}function gr(){return{type:"html",value:""}}function Le(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function jt(re){return{type:"list",ordered:re.type==="listOrdered",start:null,spread:re._spread,children:[]}}function Ft(re){return{type:"listItem",spread:re._spread,checked:null,children:[]}}function $n(){return{type:"paragraph",children:[]}}function jl(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function of(){return{type:"thematicBreak"}}}function Ra(e){return{line:e.line,column:e.column,offset:e.offset}}function m_(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?m_(e,a):UI(e,a)}}function UI(e,t){let n;for(n in t)if(h_.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function DE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+lu({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lu({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+lu({start:t.start,end:t.end})+") is still open")}function PI(e){const t=this;t.parser=n;function n(a){return zI(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function jI(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 FI(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
246
- `}]}function qI(e,t){const n=t.value?t.value+`
247
- `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let u={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(u.data={meta:t.meta}),e.patch(t,u),u=e.applyData(t,u),u={type:"element",tagName:"pre",properties:{},children:[u]},e.patch(t,u),u}function YI(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $I(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VI(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Ul(a.toLowerCase()),u=e.footnoteOrder.indexOf(a);let o,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),o=e.footnoteOrder.length):o=u+1,f+=1,e.footnoteCounts.set(a,f);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function GI(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 QI(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function p_(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),u=s[0];u&&u.type==="text"?u.value="["+u.value:s.unshift({type:"text",value:"["});const o=s[s.length-1];return o&&o.type==="text"?o.value+=a:s.push({type:"text",value:a}),s}function XI(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return p_(e,t);const s={src:Ul(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,u),e.applyData(t,u)}function ZI(e,t){const n={src:Ul(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 a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function KI(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function WI(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return p_(e,t);const s={href:Ul(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const u={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,u),e.applyData(t,u)}function JI(e,t){const n={href:Ul(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function e9(e,t,n){const a=e.all(t),s=n?t9(n):g_(t),u={},o=[];if(typeof t.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.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:[]}),u.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const b=a[f];(s||f!==0||b.type!=="element"||b.tagName!=="p")&&o.push({type:"text",value:`
248
- `}),b.type==="element"&&b.tagName==="p"&&!s?o.push(...b.children):o.push(b)}const d=a[a.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
249
- `});const h={type:"element",tagName:"li",properties:u,children:o};return e.patch(t,h),e.applyData(t,h)}function t9(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=g_(n[a])}return t}function g_(e){const t=e.spread;return t??e.children.length>1}function n9(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const o=a[s];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const u={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,u),e.applyData(t,u)}function r9(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a9(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function i9(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l9(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const o={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],o),s.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=Cr(t.children[1]),d=Zc(t.children[t.children.length-1]);f&&d&&(o.position={start:f,end:d}),s.push(o)}const u={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,u),e.applyData(t,u)}function s9(e,t,n){const a=n?n.children:void 0,u=(a?a.indexOf(t):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,f=o?o.length:t.children.length;let d=-1;const h=[];for(;++d<f;){const g=t.children[d],E={},x=o?o[d]:void 0;x&&(E.align=x);let v={type:"element",tagName:u,properties:E,children:[]};g&&(v.children=e.all(g),e.patch(g,v),v=e.applyData(g,v)),h.push(v)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,b),e.applyData(t,b)}function u9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const IE=9,ME=32;function o9(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const u=[];for(;a;)u.push(BE(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return u.push(BE(t.slice(s),s>0,!1)),u.join("")}function BE(e,t,n){let a=0,s=e.length;if(t){let u=e.codePointAt(a);for(;u===IE||u===ME;)a++,u=e.codePointAt(a)}if(n){let u=e.codePointAt(s-1);for(;u===IE||u===ME;)s--,u=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function c9(e,t){const n={type:"text",value:o9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function f9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const d9={blockquote:jI,break:FI,code:qI,delete:YI,emphasis:$I,footnoteReference:VI,heading:GI,html:QI,imageReference:XI,image:ZI,inlineCode:KI,linkReference:WI,link:JI,listItem:e9,list:n9,paragraph:r9,root:a9,strong:i9,table:l9,tableCell:u9,tableRow:s9,text:c9,thematicBreak:f9,toml:Go,yaml:Go,definition:Go,footnoteDefinition:Go};function Go(){}function h9(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 m9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function p9(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||h9,a=e.options.footnoteBackLabel||m9,s=e.options.footnoteLabel||"Footnotes",u=e.options.footnoteLabelTagName||"h2",o=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),E=Ul(g.toLowerCase());let x=0;const v=[],N=e.footnoteCounts.get(g);for(;N!==void 0&&++x<=N;){v.length>0&&v.push({type:"text",value:" "});let z=typeof n=="string"?n:n(d,x);typeof z=="string"&&(z={type:"text",value:z}),v.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(d,x),className:["data-footnote-backref"]},children:Array.isArray(z)?z:[z]})}const w=b[b.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const z=w.children[w.children.length-1];z&&z.type==="text"?z.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(...v)}else b.push(...v);const O={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(b,!0)};e.patch(h,O),f.push(O)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:u,properties:{...Ai(o),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
250
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
251
- `}]}}const Im={}.hasOwnProperty,g9={};function b9(e,t){const n=t||g9,a=new Map,s=new Map,u=new Map,o={...d9,...n.handlers},f={all:h,applyData:E9,definitionById:a,footnoteById:s,footnoteCounts:u,footnoteOrder:[],handlers:o,one:d,options:n,patch:y9,wrap:T9};return Ar(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:s,E=String(b.identifier).toUpperCase();g.has(E)||g.set(E,b)}}),f;function d(b,g){const E=b.type,x=f.handlers[E];if(Im.call(f.handlers,E)&&x)return x(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(E)){if("children"in b){const{children:N,...w}=b,O=Ai(w);return O.children=f.all(b),O}return Ai(b)}return(f.options.unknownHandler||x9)(f,b,g)}function h(b){const g=[];if("children"in b){const E=b.children;let x=-1;for(;++x<E.length;){const v=f.one(E[x],b);if(v){if(x&&E[x-1].type==="break"&&(!Array.isArray(v)&&v.type==="text"&&(v.value=zE(v.value)),!Array.isArray(v)&&v.type==="element")){const N=v.children[0];N&&N.type==="text"&&(N.value=zE(N.value))}Array.isArray(v)?g.push(...v):g.push(v)}}}return g}}function y9(e,t){e.position&&(t.position=oT(e))}function E9(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,u=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const o="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:o}}n.type==="element"&&u&&Object.assign(n.properties,Ai(u)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function x9(e,t){const n=t.data||{},a="value"in t&&!(Im.call(n,"hProperties")||Im.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function T9(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
252
- `});++a<e.length;)a&&n.push({type:"text",value:`
253
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
254
- `}),n}function zE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function HE(e,t){const n=b9(e,t),a=n.one(e,void 0),s=p9(n),u=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&u.children.push({type:"text",value:`
255
- `},s),u}function _9(e,t){return e&&"run"in e?async function(n,a){const s=HE(n,{file:a,...t});await e.run(s,a)}:function(n,a){return HE(n,{file:a,...e||t})}}function UE(e){if(e)throw e}var Xh,PE;function v9(){if(PE)return Xh;PE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},u=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var E;for(E in h);return typeof E>"u"||e.call(h,E)},o=function(h,b){n&&b.name==="__proto__"?n(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},f=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(a)return a(h,b).value}else return;return h[b]};return Xh=function d(){var h,b,g,E,x,v,N=arguments[0],w=1,O=arguments.length,z=!1;for(typeof N=="boolean"&&(z=N,N=arguments[1]||{},w=2),(N==null||typeof N!="object"&&typeof N!="function")&&(N={});w<O;++w)if(h=arguments[w],h!=null)for(b in h)g=f(N,b),E=f(h,b),N!==E&&(z&&E&&(u(E)||(x=s(E)))?(x?(x=!1,v=g&&s(g)?g:[]):v=g&&u(g)?g:{},o(N,{name:b,newValue:d(z,v,E)})):typeof E<"u"&&o(N,{name:b,newValue:E}));return N},Xh}var S9=v9();const Zh=Qm(S9);function Mm(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 k9(){const e=[],t={run:n,use:a};return t;function n(...s){let u=-1;const o=s.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);f(null,...s);function f(d,...h){const b=e[++u];let g=-1;if(d){o(d);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,b?A9(b,f)(...h):o(null,...h)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function A9(e,t){let n;return a;function a(...o){const f=e.length>o.length;let d;f&&o.push(s);try{d=e.apply(this,o)}catch(h){const b=h;if(f&&n)throw b;return s(b)}f||(d&&d.then&&typeof d.then=="function"?d.then(u,s):d instanceof Error?s(d):u(d))}function s(o,...f){n||(n=!0,t(o,...f))}function u(o){s(null,o)}}const vr={basename:C9,dirname:N9,extname:w9,join:R9,sep:"/"};function C9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');_u(e);let n=0,a=-1,s=e.length,u;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(u){n=s+1;break}}else a<0&&(u=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let o=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(u){n=s+1;break}}else o<0&&(u=!0,o=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=o));return n===a?a=o:a<0&&(a=e.length),e.slice(n,a)}function N9(e){if(_u(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function w9(e){_u(e);let t=e.length,n=-1,a=0,s=-1,u=0,o;for(;t--;){const f=e.codePointAt(t);if(f===47){if(o){a=t+1;break}continue}n<0&&(o=!0,n=t+1),f===46?s<0?s=t:u!==1&&(u=1):s>-1&&(u=-1)}return s<0||n<0||u===0||u===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function R9(...e){let t=-1,n;for(;++t<e.length;)_u(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":O9(n)}function O9(e){_u(e);const t=e.codePointAt(0)===47;let n=L9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function L9(e,t){let n="",a=0,s=-1,u=0,o=-1,f,d;for(;++o<=e.length;){if(o<e.length)f=e.codePointAt(o);else{if(f===47)break;f=47}if(f===47){if(!(s===o-1||u===1))if(s!==o-1&&u===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",a=0):(n=n.slice(0,d),a=n.length-1-n.lastIndexOf("/")),s=o,u=0;continue}}else if(n.length>0){n="",a=0,s=o,u=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,o):n=e.slice(s+1,o),a=o-s-1;s=o,u=0}else f===46&&u>-1?u++:u=-1}return n}function _u(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const D9={cwd:I9};function I9(){return"/"}function Bm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function M9(e){if(typeof e=="string")e=new URL(e);else if(!Bm(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 B9(e)}function B9(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Kh=["history","path","basename","stem","extname","dirname"];class z9{constructor(t){let n;t?Bm(t)?n={path:t}:typeof t=="string"||H9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":D9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Kh.length;){const u=Kh[a];u in n&&n[u]!==void 0&&n[u]!==null&&(this[u]=u==="history"?[...n[u]]:n[u])}let s;for(s in n)Kh.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?vr.basename(this.path):void 0}set basename(t){Jh(t,"basename"),Wh(t,"basename"),this.path=vr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?vr.dirname(this.path):void 0}set dirname(t){jE(this.basename,"dirname"),this.path=vr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?vr.extname(this.path):void 0}set extname(t){if(Wh(t,"extname"),jE(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=vr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Bm(t)&&(t=M9(t)),Jh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?vr.basename(this.path,this.extname):void 0}set stem(t){Jh(t,"stem"),Wh(t,"stem"),this.path=vr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new fn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Wh(e,t){if(e&&e.includes(vr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+vr.sep+"`")}function Jh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function jE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function H9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U9=(function(e){const a=this.constructor.prototype,s=a[e],u=function(){return s.apply(u,arguments)};return Object.setPrototypeOf(u,a),u}),P9={}.hasOwnProperty;class L0 extends U9{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=k9()}copy(){const t=new L0;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Zh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(nm("data",this.frozen),this.namespace[t]=n,this):P9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(nm("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,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Qo(t),a=this.parser||this.Parser;return em("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),em("process",this.parser||this.Parser),tm("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(u,o){const f=Qo(t),d=a.parse(f);a.run(d,f,function(b,g,E){if(b||!g||!E)return h(b);const x=g,v=a.stringify(x,E);q9(v)?E.value=v:E.result=v,h(b,E)});function h(b,g){b||!g?o(b):u?u(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),em("processSync",this.parser||this.Parser),tm("processSync",this.compiler||this.Compiler),this.process(t,s),qE("processSync","process",n),a;function s(u,o){n=!0,UE(u),a=o}}run(t,n,a){FE(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?u(void 0,a):new Promise(u);function u(o,f){const d=Qo(n);s.run(t,d,h);function h(b,g,E){const x=g||t;b?f(b):o?o(x):a(void 0,x,E)}}}runSync(t,n){let a=!1,s;return this.run(t,n,u),qE("runSync","run",a),s;function u(o,f){UE(o),s=f,a=!0}}stringify(t,n){this.freeze();const a=Qo(n),s=this.compiler||this.Compiler;return tm("stringify",s),FE(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(nm("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):o(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function u(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;d(b,g)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(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");f(h.plugins),h.settings&&(s.settings=Zh(!0,s.settings,h.settings))}function f(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];u(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,b){let g=-1,E=-1;for(;++g<a.length;)if(a[g][0]===h){E=g;break}if(E===-1)a.push([h,...b]);else if(b.length>0){let[x,...v]=b;const N=a[E][1];Mm(N)&&Mm(x)&&(x=Zh(!0,N,x)),a[E]=[h,x,...v]}}}}const j9=new L0().freeze();function em(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function tm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function nm(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 FE(e){if(!Mm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qo(e){return F9(e)?e:new z9(e)}function F9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function q9(e){return typeof e=="string"||Y9(e)}function Y9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function D0(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ii=D0();function b_(e){Ii=e}var bi={exec:()=>null};function it(e,t=""){let n=typeof e=="string"?e:e.source,a={replace:(s,u)=>{let o=typeof u=="string"?u:u.source;return o=o.replace(En.caret,"$1"),n=n.replace(s,o),a},getRegex:()=>new RegExp(n,t)};return a}var $9=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),En={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},V9=/^(?:[ \t]*(?:\n|$))+/,G9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Q9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,vu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,X9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,I0=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,y_=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,E_=it(y_).replace(/bull/g,I0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Z9=it(y_).replace(/bull/g,I0).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),M0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,K9=/^[^\n]+/,B0=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,W9=it(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",B0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),J9=it(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,I0).getRegex(),ef="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",z0=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,eM=it("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",z0).replace("tag",ef).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),x_=it(M0).replace("hr",vu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ef).getRegex(),tM=it(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",x_).getRegex(),H0={blockquote:tM,code:G9,def:W9,fences:Q9,heading:X9,hr:vu,html:eM,lheading:E_,list:J9,newline:V9,paragraph:x_,table:bi,text:K9},YE=it("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",vu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ef).getRegex(),nM={...H0,lheading:Z9,table:YE,paragraph:it(M0).replace("hr",vu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",YE).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ef).getRegex()},rM={...H0,html:it(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",z0).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:bi,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:it(M0).replace("hr",vu).replace("heading",` *#{1,6} *[^
256
- ]`).replace("lheading",E_).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},aM=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,iM=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,T_=/^( {2,}|\\)\n(?!\s*$)/,lM=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Pl=/[\p{P}\p{S}]/u,tf=/[\s\p{P}\p{S}]/u,U0=/[^\s\p{P}\p{S}]/u,sM=it(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,tf).getRegex(),__=/(?!~)[\p{P}\p{S}]/u,uM=/(?!~)[\s\p{P}\p{S}]/u,oM=/(?:[^\s\p{P}\p{S}]|~)/u,cM=it(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",$9?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),v_=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,fM=it(v_,"u").replace(/punct/g,Pl).getRegex(),dM=it(v_,"u").replace(/punct/g,__).getRegex(),S_="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",hM=it(S_,"gu").replace(/notPunctSpace/g,U0).replace(/punctSpace/g,tf).replace(/punct/g,Pl).getRegex(),mM=it(S_,"gu").replace(/notPunctSpace/g,oM).replace(/punctSpace/g,uM).replace(/punct/g,__).getRegex(),pM=it("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,U0).replace(/punctSpace/g,tf).replace(/punct/g,Pl).getRegex(),gM=it(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,Pl).getRegex(),bM="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",yM=it(bM,"gu").replace(/notPunctSpace/g,U0).replace(/punctSpace/g,tf).replace(/punct/g,Pl).getRegex(),EM=it(/\\(punct)/,"gu").replace(/punct/g,Pl).getRegex(),xM=it(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),TM=it(z0).replace("(?:-->|$)","-->").getRegex(),_M=it("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",TM).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),kc=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,vM=it(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",kc).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),k_=it(/^!?\[(label)\]\[(ref)\]/).replace("label",kc).replace("ref",B0).getRegex(),A_=it(/^!?\[(ref)\](?:\[\])?/).replace("ref",B0).getRegex(),SM=it("reflink|nolink(?!\\()","g").replace("reflink",k_).replace("nolink",A_).getRegex(),$E=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,P0={_backpedal:bi,anyPunctuation:EM,autolink:xM,blockSkip:cM,br:T_,code:iM,del:bi,delLDelim:bi,delRDelim:bi,emStrongLDelim:fM,emStrongRDelimAst:hM,emStrongRDelimUnd:pM,escape:aM,link:vM,nolink:A_,punctuation:sM,reflink:k_,reflinkSearch:SM,tag:_M,text:lM,url:bi},kM={...P0,link:it(/^!?\[(label)\]\((.*?)\)/).replace("label",kc).getRegex(),reflink:it(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",kc).getRegex()},zm={...P0,emStrongRDelimAst:mM,emStrongLDelim:dM,delLDelim:gM,delRDelim:yM,url:it(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",$E).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:it(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",$E).getRegex()},AM={...zm,br:it(T_).replace("{2,}","*").getRegex(),text:it(zm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Xo={normal:H0,gfm:nM,pedantic:rM},qs={normal:P0,gfm:zm,breaks:AM,pedantic:kM},CM={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},VE=e=>CM[e];function _r(e,t){if(t){if(En.escapeTest.test(e))return e.replace(En.escapeReplace,VE)}else if(En.escapeTestNoEncode.test(e))return e.replace(En.escapeReplaceNoEncode,VE);return e}function GE(e){try{e=encodeURI(e).replace(En.percentDecode,"%")}catch{return null}return e}function QE(e,t){var u;let n=e.replace(En.findPipe,(o,f,d)=>{let h=!1,b=f;for(;--b>=0&&d[b]==="\\";)h=!h;return h?"|":" |"}),a=n.split(En.splitPipe),s=0;if(a[0].trim()||a.shift(),a.length>0&&!((u=a.at(-1))!=null&&u.trim())&&a.pop(),t)if(a.length>t)a.splice(t);else for(;a.length<t;)a.push("");for(;s<a.length;s++)a[s]=a[s].trim().replace(En.slashPipe,"|");return a}function Ys(e,t,n){let a=e.length;if(a===0)return"";let s=0;for(;s<a&&e.charAt(a-s-1)===t;)s++;return e.slice(0,a-s)}function NM(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let a=0;a<e.length;a++)if(e[a]==="\\")a++;else if(e[a]===t[0])n++;else if(e[a]===t[1]&&(n--,n<0))return a;return n>0?-2:-1}function wM(e,t=0){let n=t,a="";for(let s of e)if(s===" "){let u=4-n%4;a+=" ".repeat(u),n+=u}else a+=s,n++;return a}function XE(e,t,n,a,s){let u=t.href,o=t.title||null,f=e[1].replace(s.other.outputLinkReplace,"$1");a.state.inLink=!0;let d={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:u,title:o,text:f,tokens:a.inlineTokens(f)};return a.state.inLink=!1,d}function RM(e,t,n){let a=e.match(n.other.indentCodeCompensation);if(a===null)return t;let s=a[1];return t.split(`
257
- `).map(u=>{let o=u.match(n.other.beginningSpace);if(o===null)return u;let[f]=o;return f.length>=s.length?u.slice(s.length):u}).join(`
258
- `)}var Ac=class{constructor(e){xt(this,"options");xt(this,"rules");xt(this,"lexer");this.options=e||Ii}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let n=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?n:Ys(n,`
259
- `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let n=t[0],a=RM(n,t[3]||"",this.rules);return{type:"code",raw:n,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:a}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let n=t[2].trim();if(this.rules.other.endingHash.test(n)){let a=Ys(n,"#");(this.options.pedantic||!a||this.rules.other.endingSpaceChar.test(a))&&(n=a.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:Ys(t[0],`
260
- `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let n=Ys(t[0],`
261
- `).split(`
262
- `),a="",s="",u=[];for(;n.length>0;){let o=!1,f=[],d;for(d=0;d<n.length;d++)if(this.rules.other.blockquoteStart.test(n[d]))f.push(n[d]),o=!0;else if(!o)f.push(n[d]);else break;n=n.slice(d);let h=f.join(`
263
- `),b=h.replace(this.rules.other.blockquoteSetextReplace,`
264
- $1`).replace(this.rules.other.blockquoteSetextReplace2,"");a=a?`${a}
265
- ${h}`:h,s=s?`${s}
266
- ${b}`:b;let g=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(b,u,!0),this.lexer.state.top=g,n.length===0)break;let E=u.at(-1);if((E==null?void 0:E.type)==="code")break;if((E==null?void 0:E.type)==="blockquote"){let x=E,v=x.raw+`
267
- `+n.join(`
268
- `),N=this.blockquote(v);u[u.length-1]=N,a=a.substring(0,a.length-x.raw.length)+N.raw,s=s.substring(0,s.length-x.text.length)+N.text;break}else if((E==null?void 0:E.type)==="list"){let x=E,v=x.raw+`
269
- `+n.join(`
270
- `),N=this.list(v);u[u.length-1]=N,a=a.substring(0,a.length-E.raw.length)+N.raw,s=s.substring(0,s.length-x.raw.length)+N.raw,n=v.substring(u.at(-1).raw.length).split(`
271
- `);continue}}return{type:"blockquote",raw:a,tokens:u,text:s}}}list(e){var n,a;let t=this.rules.block.list.exec(e);if(t){let s=t[1].trim(),u=s.length>1,o={type:"list",raw:"",ordered:u,start:u?+s.slice(0,-1):"",loose:!1,items:[]};s=u?`\\d{1,9}\\${s.slice(-1)}`:`\\${s}`,this.options.pedantic&&(s=u?s:"[*+-]");let f=this.rules.other.listItemRegex(s),d=!1;for(;e;){let b=!1,g="",E="";if(!(t=f.exec(e))||this.rules.block.hr.test(e))break;g=t[0],e=e.substring(g.length);let x=wM(t[2].split(`
272
- `,1)[0],t[1].length),v=e.split(`
273
- `,1)[0],N=!x.trim(),w=0;if(this.options.pedantic?(w=2,E=x.trimStart()):N?w=t[1].length+1:(w=x.search(this.rules.other.nonSpaceChar),w=w>4?1:w,E=x.slice(w),w+=t[1].length),N&&this.rules.other.blankLine.test(v)&&(g+=v+`
274
- `,e=e.substring(v.length+1),b=!0),!b){let O=this.rules.other.nextBulletRegex(w),z=this.rules.other.hrRegex(w),U=this.rules.other.fencesBeginRegex(w),D=this.rules.other.headingBeginRegex(w),q=this.rules.other.htmlBeginRegex(w),M=this.rules.other.blockquoteBeginRegex(w);for(;e;){let $=e.split(`
275
- `,1)[0],G;if(v=$,this.options.pedantic?(v=v.replace(this.rules.other.listReplaceNesting," "),G=v):G=v.replace(this.rules.other.tabCharGlobal," "),U.test(v)||D.test(v)||q.test(v)||M.test(v)||O.test(v)||z.test(v))break;if(G.search(this.rules.other.nonSpaceChar)>=w||!v.trim())E+=`
276
- `+G.slice(w);else{if(N||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||U.test(x)||D.test(x)||z.test(x))break;E+=`
277
- `+v}N=!v.trim(),g+=$+`
278
- `,e=e.substring($.length+1),x=G.slice(w)}}o.loose||(d?o.loose=!0:this.rules.other.doubleBlankLine.test(g)&&(d=!0)),o.items.push({type:"list_item",raw:g,task:!!this.options.gfm&&this.rules.other.listIsTask.test(E),loose:!1,text:E,tokens:[]}),o.raw+=g}let h=o.items.at(-1);if(h)h.raw=h.raw.trimEnd(),h.text=h.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let b of o.items){if(this.lexer.state.top=!1,b.tokens=this.lexer.blockTokens(b.text,[]),b.task){if(b.text=b.text.replace(this.rules.other.listReplaceTask,""),((n=b.tokens[0])==null?void 0:n.type)==="text"||((a=b.tokens[0])==null?void 0:a.type)==="paragraph"){b.tokens[0].raw=b.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),b.tokens[0].text=b.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let E=this.lexer.inlineQueue.length-1;E>=0;E--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[E].src)){this.lexer.inlineQueue[E].src=this.lexer.inlineQueue[E].src.replace(this.rules.other.listReplaceTask,"");break}}let g=this.rules.other.listTaskCheckbox.exec(b.raw);if(g){let E={type:"checkbox",raw:g[0]+" ",checked:g[0]!=="[ ]"};b.checked=E.checked,o.loose?b.tokens[0]&&["paragraph","text"].includes(b.tokens[0].type)&&"tokens"in b.tokens[0]&&b.tokens[0].tokens?(b.tokens[0].raw=E.raw+b.tokens[0].raw,b.tokens[0].text=E.raw+b.tokens[0].text,b.tokens[0].tokens.unshift(E)):b.tokens.unshift({type:"paragraph",raw:E.raw,text:E.raw,tokens:[E]}):b.tokens.unshift(E)}}if(!o.loose){let g=b.tokens.filter(x=>x.type==="space"),E=g.length>0&&g.some(x=>this.rules.other.anyLine.test(x.raw));o.loose=E}}if(o.loose)for(let b of o.items){b.loose=!0;for(let g of b.tokens)g.type==="text"&&(g.type="paragraph")}return o}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let n=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),a=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",s=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:n,raw:t[0],href:a,title:s}}}table(e){var o;let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=QE(t[1]),a=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),s=(o=t[3])!=null&&o.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
279
- `):[],u={type:"table",raw:t[0],header:[],align:[],rows:[]};if(n.length===a.length){for(let f of a)this.rules.other.tableAlignRight.test(f)?u.align.push("right"):this.rules.other.tableAlignCenter.test(f)?u.align.push("center"):this.rules.other.tableAlignLeft.test(f)?u.align.push("left"):u.align.push(null);for(let f=0;f<n.length;f++)u.header.push({text:n[f],tokens:this.lexer.inline(n[f]),header:!0,align:u.align[f]});for(let f of s)u.rows.push(QE(f,u.header.length).map((d,h)=>({text:d,tokens:this.lexer.inline(d),header:!1,align:u.align[h]})));return u}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t){let n=t[1].trim();return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let n=t[1].charAt(t[1].length-1)===`
280
- `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let n=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let u=Ys(n.slice(0,-1),"\\");if((n.length-u.length)%2===0)return}else{let u=NM(t[2],"()");if(u===-2)return;if(u>-1){let o=(t[0].indexOf("!")===0?5:4)+t[1].length+u;t[2]=t[2].substring(0,u),t[0]=t[0].substring(0,o).trim(),t[3]=""}}let a=t[2],s="";if(this.options.pedantic){let u=this.rules.other.pedanticHrefTitle.exec(a);u&&(a=u[1],s=u[3])}else s=t[3]?t[3].slice(1,-1):"";return a=a.trim(),this.rules.other.startAngleBracket.test(a)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?a=a.slice(1):a=a.slice(1,-1)),XE(t,{href:a&&a.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let a=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=t[a.toLowerCase()];if(!s){let u=n[0].charAt(0);return{type:"text",raw:u,text:u}}return XE(n,s,n[0],this.lexer,this.rules)}}emStrong(e,t,n=""){let a=this.rules.inline.emStrongLDelim.exec(e);if(!(!a||!a[1]&&!a[2]&&!a[3]&&!a[4]||a[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(a[1]||a[3])||!n||this.rules.inline.punctuation.exec(n))){let s=[...a[0]].length-1,u,o,f=s,d=0,h=a[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,t=t.slice(-1*e.length+s);(a=h.exec(t))!==null;){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u)continue;if(o=[...u].length,a[3]||a[4]){f+=o;continue}else if((a[5]||a[6])&&s%3&&!((s+o)%3)){d+=o;continue}if(f-=o,f>0)continue;o=Math.min(o,o+f+d);let b=[...a[0]][0].length,g=e.slice(0,s+a.index+b+o);if(Math.min(s,o)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let E=g.slice(2,-2);return{type:"strong",raw:g,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let n=t[2].replace(this.rules.other.newLineCharGlobal," "),a=this.rules.other.nonSpaceChar.test(n),s=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return a&&s&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:t[0],text:n}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,n=""){let a=this.rules.inline.delLDelim.exec(e);if(a&&(!a[1]||!n||this.rules.inline.punctuation.exec(n))){let s=[...a[0]].length-1,u,o,f=s,d=this.rules.inline.delRDelim;for(d.lastIndex=0,t=t.slice(-1*e.length+s);(a=d.exec(t))!==null;){if(u=a[1]||a[2]||a[3]||a[4]||a[5]||a[6],!u||(o=[...u].length,o!==s))continue;if(a[3]||a[4]){f+=o;continue}if(f-=o,f>0)continue;o=Math.min(o,o+f);let h=[...a[0]][0].length,b=e.slice(0,s+a.index+h+o),g=b.slice(s,-s);return{type:"del",raw:b,text:g,tokens:this.lexer.inlineTokens(g)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let n,a;return t[2]==="@"?(n=t[1],a="mailto:"+n):(n=t[1],a=n),{type:"link",raw:t[0],text:n,href:a,tokens:[{type:"text",raw:n,text:n}]}}}url(e){var n;let t;if(t=this.rules.inline.url.exec(e)){let a,s;if(t[2]==="@")a=t[0],s="mailto:"+a;else{let u;do u=t[0],t[0]=((n=this.rules.inline._backpedal.exec(t[0]))==null?void 0:n[0])??"";while(u!==t[0]);a=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:a,href:s,tokens:[{type:"text",raw:a,text:a}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let n=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:n}}}},ar=class Hm{constructor(t){xt(this,"tokens");xt(this,"options");xt(this,"state");xt(this,"inlineQueue");xt(this,"tokenizer");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ii,this.options.tokenizer=this.options.tokenizer||new Ac,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:En,block:Xo.normal,inline:qs.normal};this.options.pedantic?(n.block=Xo.pedantic,n.inline=qs.pedantic):this.options.gfm&&(n.block=Xo.gfm,this.options.breaks?n.inline=qs.breaks:n.inline=qs.gfm),this.tokenizer.rules=n}static get rules(){return{block:Xo,inline:qs}}static lex(t,n){return new Hm(n).lex(t)}static lexInline(t,n){return new Hm(n).inlineTokens(t)}lex(t){t=t.replace(En.carriageReturn,`
281
- `),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let a=this.inlineQueue[n];this.inlineTokens(a.src,a.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],a=!1){var s,u,o;for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(En.tabCharGlobal," ").replace(En.spaceLine,""));t;){let f;if((u=(s=this.options.extensions)==null?void 0:s.block)!=null&&u.some(h=>(f=h.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.space(t)){t=t.substring(f.raw.length);let h=n.at(-1);f.raw.length===1&&h!==void 0?h.raw+=`
282
- `:n.push(f);continue}if(f=this.tokenizer.code(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
283
- `)?"":`
284
- `)+f.raw,h.text+=`
285
- `+f.text,this.inlineQueue.at(-1).src=h.text):n.push(f);continue}if(f=this.tokenizer.fences(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.heading(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.hr(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.blockquote(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.list(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.html(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.def(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
286
- `)?"":`
287
- `)+f.raw,h.text+=`
288
- `+f.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[f.tag]||(this.tokens.links[f.tag]={href:f.href,title:f.title},n.push(f));continue}if(f=this.tokenizer.table(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.lheading(t)){t=t.substring(f.raw.length),n.push(f);continue}let d=t;if((o=this.options.extensions)!=null&&o.startBlock){let h=1/0,b=t.slice(1),g;this.options.extensions.startBlock.forEach(E=>{g=E.call({lexer:this},b),typeof g=="number"&&g>=0&&(h=Math.min(h,g))}),h<1/0&&h>=0&&(d=t.substring(0,h+1))}if(this.state.top&&(f=this.tokenizer.paragraph(d))){let h=n.at(-1);a&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
289
- `)?"":`
290
- `)+f.raw,h.text+=`
291
- `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(f),a=d.length!==t.length,t=t.substring(f.raw.length);continue}if(f=this.tokenizer.text(t)){t=t.substring(f.raw.length);let h=n.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
292
- `)?"":`
293
- `)+f.raw,h.text+=`
294
- `+f.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):n.push(f);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){var d,h,b,g,E;this.tokenizer.lexer=this;let a=t,s=null;if(this.tokens.links){let x=Object.keys(this.tokens.links);if(x.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(a))!==null;)x.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(a=a.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+a.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(a))!==null;)a=a.slice(0,s.index)+"++"+a.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let u;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(a))!==null;)u=s[2]?s[2].length:0,a=a.slice(0,s.index+u)+"["+"a".repeat(s[0].length-u-2)+"]"+a.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);a=((h=(d=this.options.hooks)==null?void 0:d.emStrongMask)==null?void 0:h.call({lexer:this},a))??a;let o=!1,f="";for(;t;){o||(f=""),o=!1;let x;if((g=(b=this.options.extensions)==null?void 0:b.inline)!=null&&g.some(N=>(x=N.call({lexer:this},t,n))?(t=t.substring(x.raw.length),n.push(x),!0):!1))continue;if(x=this.tokenizer.escape(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.tag(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.link(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(x.raw.length);let N=n.at(-1);x.type==="text"&&(N==null?void 0:N.type)==="text"?(N.raw+=x.raw,N.text+=x.text):n.push(x);continue}if(x=this.tokenizer.emStrong(t,a,f)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.codespan(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.br(t)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.del(t,a,f)){t=t.substring(x.raw.length),n.push(x);continue}if(x=this.tokenizer.autolink(t)){t=t.substring(x.raw.length),n.push(x);continue}if(!this.state.inLink&&(x=this.tokenizer.url(t))){t=t.substring(x.raw.length),n.push(x);continue}let v=t;if((E=this.options.extensions)!=null&&E.startInline){let N=1/0,w=t.slice(1),O;this.options.extensions.startInline.forEach(z=>{O=z.call({lexer:this},w),typeof O=="number"&&O>=0&&(N=Math.min(N,O))}),N<1/0&&N>=0&&(v=t.substring(0,N+1))}if(x=this.tokenizer.inlineText(v)){t=t.substring(x.raw.length),x.raw.slice(-1)!=="_"&&(f=x.raw.slice(-1)),o=!0;let N=n.at(-1);(N==null?void 0:N.type)==="text"?(N.raw+=x.raw,N.text+=x.text):n.push(x);continue}if(t){let N="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(N);break}else throw new Error(N)}}return n}},Cc=class{constructor(t){xt(this,"options");xt(this,"parser");this.options=t||Ii}space(t){return""}code({text:t,lang:n,escaped:a}){var o;let s=(o=(n||"").match(En.notSpaceStart))==null?void 0:o[0],u=t.replace(En.endingNewline,"")+`
295
- `;return s?'<pre><code class="language-'+_r(s)+'">'+(a?u:_r(u,!0))+`</code></pre>
296
- `:"<pre><code>"+(a?u:_r(u,!0))+`</code></pre>
297
- `}blockquote({tokens:t}){return`<blockquote>
298
- ${this.parser.parse(t)}</blockquote>
299
- `}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
300
- `}hr(t){return`<hr>
301
- `}list(t){let n=t.ordered,a=t.start,s="";for(let f=0;f<t.items.length;f++){let d=t.items[f];s+=this.listitem(d)}let u=n?"ol":"ul",o=n&&a!==1?' start="'+a+'"':"";return"<"+u+o+`>
302
- `+s+"</"+u+`>
303
- `}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
304
- `}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
305
- `}table(t){let n="",a="";for(let u=0;u<t.header.length;u++)a+=this.tablecell(t.header[u]);n+=this.tablerow({text:a});let s="";for(let u=0;u<t.rows.length;u++){let o=t.rows[u];a="";for(let f=0;f<o.length;f++)a+=this.tablecell(o[f]);s+=this.tablerow({text:a})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
306
- <thead>
307
- `+n+`</thead>
308
- `+s+`</table>
309
- `}tablerow({text:t}){return`<tr>
310
- ${t}</tr>
311
- `}tablecell(t){let n=this.parser.parseInline(t.tokens),a=t.header?"th":"td";return(t.align?`<${a} align="${t.align}">`:`<${a}>`)+n+`</${a}>
312
- `}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${_r(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:a}){let s=this.parser.parseInline(a),u=GE(t);if(u===null)return s;t=u;let o='<a href="'+t+'"';return n&&(o+=' title="'+_r(n)+'"'),o+=">"+s+"</a>",o}image({href:t,title:n,text:a,tokens:s}){s&&(a=this.parser.parseInline(s,this.parser.textRenderer));let u=GE(t);if(u===null)return _r(a);t=u;let o=`<img src="${t}" alt="${_r(a)}"`;return n&&(o+=` title="${_r(n)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:_r(t.text)}},j0=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},fr=class Um{constructor(t){xt(this,"options");xt(this,"renderer");xt(this,"textRenderer");this.options=t||Ii,this.options.renderer=this.options.renderer||new Cc,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new j0}static parse(t,n){return new Um(n).parse(t)}static parseInline(t,n){return new Um(n).parseInline(t)}parse(t){var a,s;this.renderer.parser=this;let n="";for(let u=0;u<t.length;u++){let o=t[u];if((s=(a=this.options.extensions)==null?void 0:a.renderers)!=null&&s[o.type]){let d=o,h=this.options.extensions.renderers[d.type].call({parser:this},d);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(d.type)){n+=h||"";continue}}let f=o;switch(f.type){case"space":{n+=this.renderer.space(f);break}case"hr":{n+=this.renderer.hr(f);break}case"heading":{n+=this.renderer.heading(f);break}case"code":{n+=this.renderer.code(f);break}case"table":{n+=this.renderer.table(f);break}case"blockquote":{n+=this.renderer.blockquote(f);break}case"list":{n+=this.renderer.list(f);break}case"checkbox":{n+=this.renderer.checkbox(f);break}case"html":{n+=this.renderer.html(f);break}case"def":{n+=this.renderer.def(f);break}case"paragraph":{n+=this.renderer.paragraph(f);break}case"text":{n+=this.renderer.text(f);break}default:{let d='Token with "'+f.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return n}parseInline(t,n=this.renderer){var s,u;this.renderer.parser=this;let a="";for(let o=0;o<t.length;o++){let f=t[o];if((u=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&u[f.type]){let h=this.options.extensions.renderers[f.type].call({parser:this},f);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(f.type)){a+=h||"";continue}}let d=f;switch(d.type){case"escape":{a+=n.text(d);break}case"html":{a+=n.html(d);break}case"link":{a+=n.link(d);break}case"image":{a+=n.image(d);break}case"checkbox":{a+=n.checkbox(d);break}case"strong":{a+=n.strong(d);break}case"em":{a+=n.em(d);break}case"codespan":{a+=n.codespan(d);break}case"br":{a+=n.br(d);break}case"del":{a+=n.del(d);break}case"text":{a+=n.text(d);break}default:{let h='Token with "'+d.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return a}},Jo,Qs=(Jo=class{constructor(e){xt(this,"options");xt(this,"block");this.options=e||Ii}preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(e=this.block){return e?ar.lex:ar.lexInline}provideParser(e=this.block){return e?fr.parse:fr.parseInline}},xt(Jo,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),xt(Jo,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Jo),OM=class{constructor(...t){xt(this,"defaults",D0());xt(this,"options",this.setOptions);xt(this,"parse",this.parseMarkdown(!0));xt(this,"parseInline",this.parseMarkdown(!1));xt(this,"Parser",fr);xt(this,"Renderer",Cc);xt(this,"TextRenderer",j0);xt(this,"Lexer",ar);xt(this,"Tokenizer",Ac);xt(this,"Hooks",Qs);this.use(...t)}walkTokens(t,n){var s,u;let a=[];for(let o of t)switch(a=a.concat(n.call(this,o)),o.type){case"table":{let f=o;for(let d of f.header)a=a.concat(this.walkTokens(d.tokens,n));for(let d of f.rows)for(let h of d)a=a.concat(this.walkTokens(h.tokens,n));break}case"list":{let f=o;a=a.concat(this.walkTokens(f.items,n));break}default:{let f=o;(u=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&u[f.type]?this.defaults.extensions.childTokens[f.type].forEach(d=>{let h=f[d].flat(1/0);a=a.concat(this.walkTokens(h,n))}):f.tokens&&(a=a.concat(this.walkTokens(f.tokens,n)))}}return a}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(a=>{let s={...a};if(s.async=this.defaults.async||s.async||!1,a.extensions&&(a.extensions.forEach(u=>{if(!u.name)throw new Error("extension name required");if("renderer"in u){let o=n.renderers[u.name];o?n.renderers[u.name]=function(...f){let d=u.renderer.apply(this,f);return d===!1&&(d=o.apply(this,f)),d}:n.renderers[u.name]=u.renderer}if("tokenizer"in u){if(!u.level||u.level!=="block"&&u.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=n[u.level];o?o.unshift(u.tokenizer):n[u.level]=[u.tokenizer],u.start&&(u.level==="block"?n.startBlock?n.startBlock.push(u.start):n.startBlock=[u.start]:u.level==="inline"&&(n.startInline?n.startInline.push(u.start):n.startInline=[u.start]))}"childTokens"in u&&u.childTokens&&(n.childTokens[u.name]=u.childTokens)}),s.extensions=n),a.renderer){let u=this.defaults.renderer||new Cc(this.defaults);for(let o in a.renderer){if(!(o in u))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let f=o,d=a.renderer[f],h=u[f];u[f]=(...b)=>{let g=d.apply(u,b);return g===!1&&(g=h.apply(u,b)),g||""}}s.renderer=u}if(a.tokenizer){let u=this.defaults.tokenizer||new Ac(this.defaults);for(let o in a.tokenizer){if(!(o in u))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let f=o,d=a.tokenizer[f],h=u[f];u[f]=(...b)=>{let g=d.apply(u,b);return g===!1&&(g=h.apply(u,b)),g}}s.tokenizer=u}if(a.hooks){let u=this.defaults.hooks||new Qs;for(let o in a.hooks){if(!(o in u))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let f=o,d=a.hooks[f],h=u[f];Qs.passThroughHooks.has(o)?u[f]=b=>{if(this.defaults.async&&Qs.passThroughHooksRespectAsync.has(o))return(async()=>{let E=await d.call(u,b);return h.call(u,E)})();let g=d.call(u,b);return h.call(u,g)}:u[f]=(...b)=>{if(this.defaults.async)return(async()=>{let E=await d.apply(u,b);return E===!1&&(E=await h.apply(u,b)),E})();let g=d.apply(u,b);return g===!1&&(g=h.apply(u,b)),g}}s.hooks=u}if(a.walkTokens){let u=this.defaults.walkTokens,o=a.walkTokens;s.walkTokens=function(f){let d=[];return d.push(o.call(this,f)),u&&(d=d.concat(u.call(this,f))),d}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ar.lex(t,n??this.defaults)}parser(t,n){return fr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,a)=>{let s={...a},u={...this.defaults,...s},o=this.onError(!!u.silent,!!u.async);if(this.defaults.async===!0&&s.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(u.hooks&&(u.hooks.options=u,u.hooks.block=t),u.async)return(async()=>{let f=u.hooks?await u.hooks.preprocess(n):n,d=await(u.hooks?await u.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(f,u),h=u.hooks?await u.hooks.processAllTokens(d):d;u.walkTokens&&await Promise.all(this.walkTokens(h,u.walkTokens));let b=await(u.hooks?await u.hooks.provideParser(t):t?fr.parse:fr.parseInline)(h,u);return u.hooks?await u.hooks.postprocess(b):b})().catch(o);try{u.hooks&&(n=u.hooks.preprocess(n));let f=(u.hooks?u.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(n,u);u.hooks&&(f=u.hooks.processAllTokens(f)),u.walkTokens&&this.walkTokens(f,u.walkTokens);let d=(u.hooks?u.hooks.provideParser(t):t?fr.parse:fr.parseInline)(f,u);return u.hooks&&(d=u.hooks.postprocess(d)),d}catch(f){return o(f)}}}onError(t,n){return a=>{if(a.message+=`
313
- Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+_r(a.message+"",!0)+"</pre>";return n?Promise.resolve(s):s}if(n)return Promise.reject(a);throw a}}},Ni=new OM;function Tt(e,t){return Ni.parse(e,t)}Tt.options=Tt.setOptions=function(e){return Ni.setOptions(e),Tt.defaults=Ni.defaults,b_(Tt.defaults),Tt};Tt.getDefaults=D0;Tt.defaults=Ii;Tt.use=function(...e){return Ni.use(...e),Tt.defaults=Ni.defaults,b_(Tt.defaults),Tt};Tt.walkTokens=function(e,t){return Ni.walkTokens(e,t)};Tt.parseInline=Ni.parseInline;Tt.Parser=fr;Tt.parser=fr.parse;Tt.Renderer=Cc;Tt.TextRenderer=j0;Tt.Lexer=ar;Tt.lexer=ar.lex;Tt.Tokenizer=Ac;Tt.Hooks=Qs;Tt.parse=Tt;Tt.options;Tt.setOptions;Tt.use;Tt.walkTokens;Tt.parseInline;fr.parse;ar.lex;var LM=300,DM="300px",IM=500;function MM(e={}){let{immediate:t=!1,debounceDelay:n=LM,rootMargin:a=DM,idleTimeout:s=IM}=e,[u,o]=S.useState(!1),f=S.useRef(null),d=S.useRef(null),h=S.useRef(null),b=S.useMemo(()=>x=>{let v=Date.now();return window.setTimeout(()=>{x({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-v))})},1)},[]),g=S.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(x,v)=>window.requestIdleCallback(x,v):b,[b]),E=S.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?x=>window.cancelIdleCallback(x):x=>{clearTimeout(x)},[]);return S.useEffect(()=>{if(t){o(!0);return}let x=f.current;if(!x)return;d.current&&(clearTimeout(d.current),d.current=null),h.current&&(E(h.current),h.current=null);let v=()=>{d.current&&(clearTimeout(d.current),d.current=null),h.current&&(E(h.current),h.current=null)},N=U=>{h.current=g(D=>{D.timeRemaining()>0||D.didTimeout?(o(!0),U.disconnect()):h.current=g(()=>{o(!0),U.disconnect()},{timeout:s/2})},{timeout:s})},w=U=>{v(),d.current=window.setTimeout(()=>{var D,q;let M=U.takeRecords();(M.length===0||(q=(D=M.at(-1))==null?void 0:D.isIntersecting)!=null&&q)&&N(U)},n)},O=(U,D)=>{U.isIntersecting?w(D):v()},z=new IntersectionObserver(U=>{for(let D of U)O(D,z)},{rootMargin:a,threshold:0});return z.observe(x),()=>{d.current&&clearTimeout(d.current),h.current&&E(h.current),z.disconnect()}},[t,n,a,s,E,g]),{shouldRender:u,containerRef:f}}var C_=/\s/,BM=/^\s+$/,zM=new Set(["code","pre","svg","math","annotation"]),HM=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",UM=e=>e.some(t=>HM(t)&&zM.has(t.tagName)),PM=e=>{let t=[],n="",a=!1;for(let s of e){let u=C_.test(s);u!==a&&n&&(t.push(n),n=""),n+=s,a=u}return n&&t.push(n),t},jM=e=>{let t=[],n="";for(let a of e)C_.test(a)?n+=a:(n&&(t.push(n),n=""),t.push(a));return n&&t.push(n),t},FM=(e,t,n,a,s,u)=>{let o=`--sd-animation:sd-${t};--sd-duration:${s?0:n}ms;--sd-easing:${a}`;return u&&(o+=`;--sd-delay:${u}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:o},children:[{type:"text",value:e}]}},qM=(e,t,n,a,s)=>{let u=t.at(-1);if(!(u&&"children"in u))return;if(UM(t))return Sl;let o=u,f=o.children.indexOf(e);if(f===-1)return;let d=e.value;if(!d.trim()){s.count+=d.length;return}let h=n.sep==="char"?jM(d):PM(d),b=a.prevContentLength,g=h.map(E=>{let x=s.count;if(s.count+=E.length,BM.test(E))return{type:"text",value:E};let v=b>0&&x<b,N=v?0:s.newIndex++*n.stagger;return FM(E,n.animation,n.duration,n.easing,v,N)});return o.children.splice(f,1,...g),f+g.length},YM=0;function Pm(e){var t,n,a,s,u;let o={animation:(t=e==null?void 0:e.animation)!=null?t:"fadeIn",duration:(n=e==null?void 0:e.duration)!=null?n:150,easing:(a=e==null?void 0:e.easing)!=null?a:"ease",sep:(s=e==null?void 0:e.sep)!=null?s:"word",stagger:(u=e==null?void 0:e.stagger)!=null?u:40},f={prevContentLength:0,lastRenderCharCount:0},d=YM++,h=()=>b=>{let g={count:0,newIndex:0};o0(b,"text",(E,x)=>qM(E,x,o,f,g)),f.lastRenderCharCount=g.count,f.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${d}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(b){f.prevContentLength=b},getLastRenderCharCount(){let b=f.lastRenderCharCount;return f.lastRenderCharCount=0,b}}}Pm();var N_=S.createContext(!1),$M=()=>S.useContext(N_),F0=(...e)=>l0(Uc(e)),VM=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(a=>a.startsWith(n)?a:`${e}:${a}`).join(" ")},GM=e=>e?(...t)=>VM(e,l0(Uc(t))):F0,Cl=(e,t,n)=>{let a=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",s=typeof t=="string"?new Blob([a+t],{type:n}):t,u=URL.createObjectURL(s),o=document.createElement("a");o.href=u,o.download=e,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(u)},jm=S.createContext(F0),Xe=()=>S.useContext(jm),QM=F0("block","before:content-[counter(line)]","before:inline-block","before:[counter-increment:line]","before:w-6","before:mr-4","before:text-[13px]","before:text-right","before:text-muted-foreground/50","before:font-mono","before:select-none"),XM=e=>{let t={};for(let n of e.split(";")){let a=n.indexOf(":");if(a>0){let s=n.slice(0,a).trim(),u=n.slice(a+1).trim();s&&u&&(t[s]=u)}}return t},ZM=S.memo(({children:e,result:t,language:n,className:a,startLine:s,lineNumbers:u=!0,...o})=>{let f=Xe(),d=S.useMemo(()=>f(QM),[f]),h=S.useMemo(()=>{let b={};return t.bg&&(b["--sdm-bg"]=t.bg),t.fg&&(b["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(b,XM(t.rootStyle)),b},[t.bg,t.fg,t.rootStyle]);return T.jsx("div",{className:f(a,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...o,children:T.jsx("pre",{className:f(a,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:T.jsx("code",{className:u?f("[counter-increment:line_0] [counter-reset:line]"):void 0,style:u&&s&&s>1?{counterReset:`line ${s-1}`}:void 0,children:t.tokens.map((b,g)=>T.jsx("span",{className:u?d:void 0,children:b.length===0||b.length===1&&b[0].content===""?`
314
- `:b.map((E,x)=>{let v={},N=!!E.bgColor;if(E.color&&(v["--sdm-c"]=E.color),E.bgColor&&(v["--sdm-tbg"]=E.bgColor),E.htmlStyle)for(let[w,O]of Object.entries(E.htmlStyle))w==="color"?v["--sdm-c"]=O:w==="background-color"?(v["--sdm-tbg"]=O,N=!0):v[w]=O;return T.jsx("span",{className:f("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",N&&"bg-[var(--sdm-tbg)]",N&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:v,...E.htmlAttrs,children:E.content},x)})},g))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),KM=({className:e,language:t,style:n,isIncomplete:a,...s})=>{let u=Xe();return T.jsx("div",{className:u("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":a||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...s})},w_=S.createContext({code:""}),R_=()=>S.useContext(w_),WM=({language:e})=>{let t=Xe();return T.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:T.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},JM=e=>{let t=e.length;for(;t>0&&e[t-1]===`
315
- `;)t--;return e.slice(0,t)},e7=S.lazy(()=>u0(()=>import("./highlighted-body-OFNGDK62-Cq7RJZcn.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),t7=({code:e,language:t,className:n,children:a,isIncomplete:s=!1,startLine:u,lineNumbers:o,...f})=>{let d=Xe(),h=S.useMemo(()=>JM(e),[e]),b=S.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
316
- `).map(g=>[{content:g,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return T.jsx(w_.Provider,{value:{code:e},children:T.jsxs(KM,{isIncomplete:s,language:t,children:[T.jsx(WM,{language:t}),a?T.jsx("div",{className:d("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsx("div",{className:d("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:a})}):null,T.jsx(S.Suspense,{fallback:T.jsx(ZM,{className:n,language:t,lineNumbers:o,result:b,startLine:u,...f}),children:T.jsx(e7,{className:n,code:h,language:t,lineNumbers:o,raw:b,startLine:u,...f})})]})})},n7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M15.5607 3.99999L15.0303 4.53032L6.23744 13.3232C5.55403 14.0066 4.44599 14.0066 3.76257 13.3232L4.2929 12.7929L3.76257 13.3232L0.969676 10.5303L0.439346 9.99999L1.50001 8.93933L2.03034 9.46966L4.82323 12.2626C4.92086 12.3602 5.07915 12.3602 5.17678 12.2626L13.9697 3.46966L14.5 2.93933L15.5607 3.99999Z",fill:"currentColor",fillRule:"evenodd"})}),r7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M2.75 0.5C1.7835 0.5 1 1.2835 1 2.25V9.75C1 10.7165 1.7835 11.5 2.75 11.5H3.75H4.5V10H3.75H2.75C2.61193 10 2.5 9.88807 2.5 9.75V2.25C2.5 2.11193 2.61193 2 2.75 2H8.25C8.38807 2 8.5 2.11193 8.5 2.25V3H10V2.25C10 1.2835 9.2165 0.5 8.25 0.5H2.75ZM7.75 4.5C6.7835 4.5 6 5.2835 6 6.25V13.75C6 14.7165 6.7835 15.5 7.75 15.5H13.25C14.2165 15.5 15 14.7165 15 13.75V6.25C15 5.2835 14.2165 4.5 13.25 4.5H7.75ZM7.5 6.25C7.5 6.11193 7.61193 6 7.75 6H13.25C13.3881 6 13.5 6.11193 13.5 6.25V13.75C13.5 13.8881 13.3881 14 13.25 14H7.75C7.61193 14 7.5 13.8881 7.5 13.75V6.25Z",fill:"currentColor",fillRule:"evenodd"})}),a7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M8.75 1V1.75V8.68934L10.7197 6.71967L11.25 6.18934L12.3107 7.25L11.7803 7.78033L8.70711 10.8536C8.31658 11.2441 7.68342 11.2441 7.29289 10.8536L4.21967 7.78033L3.68934 7.25L4.75 6.18934L5.28033 6.71967L7.25 8.68934V1.75V1H8.75ZM13.5 9.25V13.5H2.5V9.25V8.5H1V9.25V14C1 14.5523 1.44771 15 2 15H14C14.5523 15 15 14.5523 15 14V9.25V8.5H13.5V9.25Z",fill:"currentColor",fillRule:"evenodd"})}),i7=e=>T.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[T.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),T.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),l7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1 5.25V6H2.5V5.25V2.5H5.25H6V1H5.25H2C1.44772 1 1 1.44772 1 2V5.25ZM5.25 14.9994H6V13.4994H5.25H2.5V10.7494V9.99939H1V10.7494V13.9994C1 14.5517 1.44772 14.9994 2 14.9994H5.25ZM15 10V10.75V14C15 14.5523 14.5523 15 14 15H10.75H10V13.5H10.75H13.5V10.75V10H15ZM10.75 1H10V2.5H10.75H13.5V5.25V6H15V5.25V2C15 1.44772 14.5523 1 14 1H10.75Z",fill:"currentColor",fillRule:"evenodd"})}),s7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 8C13.5 4.96643 11.0257 2.5 7.96452 2.5C5.42843 2.5 3.29365 4.19393 2.63724 6.5H5.25H6V8H5.25H0.75C0.335787 8 0 7.66421 0 7.25V2.75V2H1.5V2.75V5.23347C2.57851 2.74164 5.06835 1 7.96452 1C11.8461 1 15 4.13001 15 8C15 11.87 11.8461 15 7.96452 15C5.62368 15 3.54872 13.8617 2.27046 12.1122L1.828 11.5066L3.03915 10.6217L3.48161 11.2273C4.48831 12.6051 6.12055 13.5 7.96452 13.5C11.0257 13.5 13.5 11.0336 13.5 8Z",fill:"currentColor",fillRule:"evenodd"})}),u7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M12.4697 13.5303L13 14.0607L14.0607 13L13.5303 12.4697L9.06065 7.99999L13.5303 3.53032L14.0607 2.99999L13 1.93933L12.4697 2.46966L7.99999 6.93933L3.53032 2.46966L2.99999 1.93933L1.93933 2.99999L2.46966 3.53032L6.93933 7.99999L2.46966 12.4697L1.93933 13L2.99999 14.0607L3.53032 13.5303L7.99999 9.06065L12.4697 13.5303Z",fill:"currentColor",fillRule:"evenodd"})}),o7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M13.5 10.25V13.25C13.5 13.3881 13.3881 13.5 13.25 13.5H2.75C2.61193 13.5 2.5 13.3881 2.5 13.25L2.5 2.75C2.5 2.61193 2.61193 2.5 2.75 2.5H5.75H6.5V1H5.75H2.75C1.7835 1 1 1.7835 1 2.75V13.25C1 14.2165 1.7835 15 2.75 15H13.25C14.2165 15 15 14.2165 15 13.25V10.25V9.5H13.5V10.25ZM9 1H9.75H14.2495C14.6637 1 14.9995 1.33579 14.9995 1.75V6.25V7H13.4995V6.25V3.56066L8.53033 8.52978L8 9.06011L6.93934 7.99945L7.46967 7.46912L12.4388 2.5H9.75H9V1Z",fill:"currentColor",fillRule:"evenodd"})}),c7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H5.875V4.75V4.125H7.125V4.75V5.875H8.25H8.875V7.125H8.25H7.125V8.25V8.875H5.875V8.25V7.125H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),f7=e=>T.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:T.jsx("path",{clipRule:"evenodd",d:"M1.5 6.5C1.5 3.73858 3.73858 1.5 6.5 1.5C9.26142 1.5 11.5 3.73858 11.5 6.5C11.5 9.26142 9.26142 11.5 6.5 11.5C3.73858 11.5 1.5 9.26142 1.5 6.5ZM6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.02469 13 9.42677 12.475 10.5353 11.596L13.9697 15.0303L14.5 15.5607L15.5607 14.5L15.0303 13.9697L11.596 10.5353C12.475 9.42677 13 8.02469 13 6.5C13 2.91015 10.0899 0 6.5 0ZM4.125 5.875H4.75H8.25H8.875V7.125H8.25H4.75H4.125V5.875Z",fill:"currentColor",fillRule:"evenodd"})}),Xs={CheckIcon:n7,CopyIcon:r7,DownloadIcon:a7,ExternalLinkIcon:o7,Loader2Icon:i7,Maximize2Icon:l7,RotateCcwIcon:s7,XIcon:u7,ZoomInIcon:c7,ZoomOutIcon:f7},O_=S.createContext(Xs),d7=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),a=Object.keys(t);return n.length!==a.length?!1:n.every(s=>e[s]===t[s])},ZE=({icons:e,children:t})=>{let n=S.useRef(e),a=S.useRef(e?{...Xs,...e}:Xs);d7(n.current,e)||(n.current=e,a.current=e?{...Xs,...e}:Xs);let s=a.current;return T.jsx(O_.Provider,{value:s,children:t})},pr=()=>S.useContext(O_),L_={copyCode:"Copy Code",downloadFile:"Download file",downloadDiagram:"Download diagram",downloadDiagramAsSvg:"Download diagram as SVG",downloadDiagramAsPng:"Download diagram as PNG",downloadDiagramAsMmd:"Download diagram as MMD",viewFullscreen:"View fullscreen",exitFullscreen:"Exit fullscreen",mermaidFormatSvg:"SVG",mermaidFormatPng:"PNG",mermaidFormatMmd:"MMD",copyTable:"Copy table",copyTableAsMarkdown:"Copy table as Markdown",copyTableAsCsv:"Copy table as CSV",copyTableAsTsv:"Copy table as TSV",downloadTable:"Download table",downloadTableAsCsv:"Download table as CSV",downloadTableAsMarkdown:"Download table as Markdown",tableFormatMarkdown:"Markdown",tableFormatCsv:"CSV",tableFormatTsv:"TSV",imageNotAvailable:"Image not available",downloadImage:"Download image",openExternalLink:"Open external link?",externalLinkWarning:"You're about to visit an external website.",close:"Close",copyLink:"Copy link",copied:"Copied",openLink:"Open link"},Fm=S.createContext(L_),ra=()=>S.useContext(Fm),KE=({onCopy:e,onError:t,timeout:n=2e3,children:a,className:s,code:u,...o})=>{let f=Xe(),[d,h]=S.useState(!1),b=S.useRef(0),{code:g}=R_(),{isAnimating:E}=S.useContext(Yn),x=ra(),v=u??g,N=async()=>{var z;if(typeof window>"u"||!((z=navigator==null?void 0:navigator.clipboard)!=null&&z.writeText)){t==null||t(new Error("Clipboard API not available"));return}try{d||(await navigator.clipboard.writeText(v),h(!0),e==null||e(),b.current=window.setTimeout(()=>h(!1),n))}catch(U){t==null||t(U)}};S.useEffect(()=>()=>{window.clearTimeout(b.current)},[]);let w=pr(),O=d?w.CheckIcon:w.CopyIcon;return T.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-copy-button",disabled:E,onClick:N,title:x.copyCode,type:"button",...o,children:a??T.jsx(O,{size:14})})},WE={"1c":"1c","1c-query":"1cq",abap:"abap","actionscript-3":"as",ada:"ada",adoc:"adoc","angular-html":"html","angular-ts":"ts",apache:"conf",apex:"cls",apl:"apl",applescript:"applescript",ara:"ara",asciidoc:"adoc",asm:"asm",astro:"astro",awk:"awk",ballerina:"bal",bash:"sh",bat:"bat",batch:"bat",be:"be",beancount:"beancount",berry:"berry",bibtex:"bib",bicep:"bicep",blade:"blade.php",bsl:"bsl",c:"c","c#":"cs","c++":"cpp",cadence:"cdc",cairo:"cairo",cdc:"cdc",clarity:"clar",clj:"clj",clojure:"clj","closure-templates":"soy",cmake:"cmake",cmd:"cmd",cobol:"cob",codeowners:"CODEOWNERS",codeql:"ql",coffee:"coffee",coffeescript:"coffee","common-lisp":"lisp",console:"sh",coq:"v",cpp:"cpp",cql:"cql",crystal:"cr",cs:"cs",csharp:"cs",css:"css",csv:"csv",cue:"cue",cypher:"cql",d:"d",dart:"dart",dax:"dax",desktop:"desktop",diff:"diff",docker:"dockerfile",dockerfile:"dockerfile",dotenv:"env","dream-maker":"dm",edge:"edge",elisp:"el",elixir:"ex",elm:"elm","emacs-lisp":"el",erb:"erb",erl:"erl",erlang:"erl",f:"f","f#":"fs",f03:"f03",f08:"f08",f18:"f18",f77:"f77",f90:"f90",f95:"f95",fennel:"fnl",fish:"fish",fluent:"ftl",for:"for","fortran-fixed-form":"f","fortran-free-form":"f90",fs:"fs",fsharp:"fs",fsl:"fsl",ftl:"ftl",gdresource:"tres",gdscript:"gd",gdshader:"gdshader",genie:"gs",gherkin:"feature","git-commit":"gitcommit","git-rebase":"gitrebase",gjs:"js",gleam:"gleam","glimmer-js":"js","glimmer-ts":"ts",glsl:"glsl",gnuplot:"plt",go:"go",gql:"gql",graphql:"graphql",groovy:"groovy",gts:"gts",hack:"hack",haml:"haml",handlebars:"hbs",haskell:"hs",haxe:"hx",hbs:"hbs",hcl:"hcl",hjson:"hjson",hlsl:"hlsl",hs:"hs",html:"html","html-derivative":"html",http:"http",hxml:"hxml",hy:"hy",imba:"imba",ini:"ini",jade:"jade",java:"java",javascript:"js",jinja:"jinja",jison:"jison",jl:"jl",js:"js",json:"json",json5:"json5",jsonc:"jsonc",jsonl:"jsonl",jsonnet:"jsonnet",jssm:"jssm",jsx:"jsx",julia:"jl",kotlin:"kt",kql:"kql",kt:"kt",kts:"kts",kusto:"kql",latex:"tex",lean:"lean",lean4:"lean",less:"less",liquid:"liquid",lisp:"lisp",lit:"lit",llvm:"ll",log:"log",logo:"logo",lua:"lua",luau:"luau",make:"mak",makefile:"mak",markdown:"md",marko:"marko",matlab:"m",md:"md",mdc:"mdc",mdx:"mdx",mediawiki:"wiki",mermaid:"mmd",mips:"s",mipsasm:"s",mmd:"mmd",mojo:"mojo",move:"move",nar:"nar",narrat:"narrat",nextflow:"nf",nf:"nf",nginx:"conf",nim:"nim",nix:"nix",nu:"nu",nushell:"nu",objc:"m","objective-c":"m","objective-cpp":"mm",ocaml:"ml",pascal:"pas",perl:"pl",perl6:"p6",php:"php",plsql:"pls",po:"po",polar:"polar",postcss:"pcss",pot:"pot",potx:"potx",powerquery:"pq",powershell:"ps1",prisma:"prisma",prolog:"pl",properties:"properties",proto:"proto",protobuf:"proto",ps:"ps",ps1:"ps1",pug:"pug",puppet:"pp",purescript:"purs",py:"py",python:"py",ql:"ql",qml:"qml",qmldir:"qmldir",qss:"qss",r:"r",racket:"rkt",raku:"raku",razor:"cshtml",rb:"rb",reg:"reg",regex:"regex",regexp:"regexp",rel:"rel",riscv:"s",rs:"rs",rst:"rst",ruby:"rb",rust:"rs",sas:"sas",sass:"sass",scala:"scala",scheme:"scm",scss:"scss",sdbl:"sdbl",sh:"sh",shader:"shader",shaderlab:"shader",shell:"sh",shellscript:"sh",shellsession:"sh",smalltalk:"st",solidity:"sol",soy:"soy",sparql:"rq",spl:"spl",splunk:"spl",sql:"sql","ssh-config":"config",stata:"do",styl:"styl",stylus:"styl",svelte:"svelte",swift:"swift","system-verilog":"sv",systemd:"service",talon:"talon",talonscript:"talon",tasl:"tasl",tcl:"tcl",templ:"templ",terraform:"tf",tex:"tex",tf:"tf",tfvars:"tfvars",toml:"toml",ts:"ts","ts-tags":"ts",tsp:"tsp",tsv:"tsv",tsx:"tsx",turtle:"ttl",twig:"twig",typ:"typ",typescript:"ts",typespec:"tsp",typst:"typ",v:"v",vala:"vala",vb:"vb",verilog:"v",vhdl:"vhdl",vim:"vim",viml:"vim",vimscript:"vim",vue:"vue","vue-html":"html","vue-vine":"vine",vy:"vy",vyper:"vy",wasm:"wasm",wenyan:"wy",wgsl:"wgsl",wiki:"wiki",wikitext:"wiki",wit:"wit",wl:"wl",wolfram:"wl",xml:"xml",xsl:"xsl",yaml:"yaml",yml:"yml",zenscript:"zs",zig:"zig",zsh:"zsh",文言:"wy"},h7=({onDownload:e,onError:t,language:n,children:a,className:s,code:u,...o})=>{let f=Xe(),{code:d}=R_(),{isAnimating:h}=S.useContext(Yn),b=ra(),g=pr(),E=u??d,x=`file.${n&&n in WE?WE[n]:"txt"}`,v="text/plain",N=()=>{try{Cl(x,E,v),e==null||e()}catch(w){t==null||t(w)}};return T.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),"data-streamdown":"code-block-download-button",disabled:h,onClick:N,title:b.downloadFile,type:"button",...o,children:a??T.jsx(g.DownloadIcon,{size:14})})},JE=()=>{let{Loader2Icon:e}=pr(),t=Xe();return T.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[T.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),T.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:T.jsx(e,{className:t("size-4 animate-spin")})})]})},m7=/\.[^/.]+$/,p7=({node:e,className:t,src:n,alt:a,onLoad:s,onError:u,...o})=>{let{DownloadIcon:f}=pr(),d=Xe(),h=S.useRef(null),[b,g]=S.useState(!1),[E,x]=S.useState(!1),v=ra(),N=o.width!=null||o.height!=null,w=(b||N)&&!E,O=E&&!N;S.useEffect(()=>{let q=h.current;if(q!=null&&q.complete){let M=q.naturalWidth>0;g(M),x(!M)}},[]);let z=S.useCallback(q=>{g(!0),x(!1),s==null||s(q)},[s]),U=S.useCallback(q=>{g(!1),x(!0),u==null||u(q)},[u]),D=async()=>{if(n)try{let q=await(await fetch(n)).blob(),M=new URL(n,window.location.origin).pathname.split("/").pop()||"",$=M.split(".").pop(),G=M.includes(".")&&$!==void 0&&$.length<=4,de="";if(G)de=M;else{let F=q.type,oe="png";F.includes("jpeg")||F.includes("jpg")?oe="jpg":F.includes("png")?oe="png":F.includes("svg")?oe="svg":F.includes("gif")?oe="gif":F.includes("webp")&&(oe="webp"),de=`${(a||M||"image").replace(m7,"")}.${oe}`}Cl(de,q,q.type)}catch{window.open(n,"_blank")}};return n?T.jsxs("div",{className:d("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[T.jsx("img",{alt:a,className:d("max-w-full rounded-lg",O&&"hidden",t),"data-streamdown":"image",onError:U,onLoad:z,ref:h,src:n,...o}),O&&T.jsx("span",{className:d("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:v.imageNotAvailable}),T.jsx("div",{className:d("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),w&&T.jsx("button",{className:d("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:D,title:v.downloadImage,type:"button",children:T.jsx(f,{size:14})})]}):null},su=0,q0=()=>{su+=1,su===1&&(document.body.style.overflow="hidden")},Y0=()=>{su=Math.max(0,su-1),su===0&&(document.body.style.overflow="")},g7=({url:e,isOpen:t,onClose:n,onConfirm:a})=>{let{CheckIcon:s,CopyIcon:u,ExternalLinkIcon:o,XIcon:f}=pr(),d=Xe(),[h,b]=S.useState(!1),g=ra(),E=S.useCallback(async()=>{try{await navigator.clipboard.writeText(e),b(!0),setTimeout(()=>b(!1),2e3)}catch{}},[e]),x=S.useCallback(()=>{a(),n()},[a,n]);return S.useEffect(()=>{if(t){q0();let v=N=>{N.key==="Escape"&&n()};return document.addEventListener("keydown",v),()=>{document.removeEventListener("keydown",v),Y0()}}},[t,n]),t?T.jsx("div",{className:d("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:v=>{v.key==="Escape"&&n()},role:"button",tabIndex:0,children:T.jsxs("div",{className:d("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:v=>v.stopPropagation(),onKeyDown:v=>v.stopPropagation(),role:"presentation",children:[T.jsx("button",{className:d("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:g.close,type:"button",children:T.jsx(f,{size:16})}),T.jsxs("div",{className:d("flex flex-col gap-2"),children:[T.jsxs("div",{className:d("flex items-center gap-2 font-semibold text-lg"),children:[T.jsx(o,{size:20}),T.jsx("span",{children:g.openExternalLink})]}),T.jsx("p",{className:d("text-muted-foreground text-sm"),children:g.externalLinkWarning})]}),T.jsx("div",{className:d("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),T.jsxs("div",{className:d("flex gap-2"),children:[T.jsx("button",{className:d("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:E,type:"button",children:h?T.jsxs(T.Fragment,{children:[T.jsx(s,{size:14}),T.jsx("span",{children:g.copied})]}):T.jsxs(T.Fragment,{children:[T.jsx(u,{size:14}),T.jsx("span",{children:g.copyLink})]})}),T.jsxs("button",{className:d("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:x,type:"button",children:[T.jsx(o,{size:14}),T.jsx("span",{children:g.openLink})]})]})]})}):null},qm=S.createContext(null),$0=()=>S.useContext(qm),Nz=()=>{var e;let t=$0();return(e=t==null?void 0:t.code)!=null?e:null},V0=()=>{var e;let t=$0();return(e=t==null?void 0:t.mermaid)!=null?e:null},b7=e=>{var t;let n=$0();return n!=null&&n.renderers&&e&&(t=n.renderers.find(a=>Array.isArray(a.language)?a.language.includes(e):a.language===e))!=null?t:null},y7=(e,t)=>{var n;let a=(n=void 0)!=null?n:5;return new Promise((s,u)=>{let o="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),f=new Image;f.crossOrigin="anonymous",f.onload=()=>{let d=document.createElement("canvas"),h=f.width*a,b=f.height*a;d.width=h,d.height=b;let g=d.getContext("2d");if(!g){u(new Error("Failed to create 2D canvas context for PNG export"));return}g.drawImage(f,0,0,h,b),d.toBlob(E=>{if(!E){u(new Error("Failed to create PNG blob"));return}s(E)},"image/png")},f.onerror=()=>u(new Error("Failed to load SVG image")),f.src=o})},E7=({chart:e,children:t,className:n,onDownload:a,config:s,onError:u})=>{let o=Xe(),[f,d]=S.useState(!1),h=S.useRef(null),{isAnimating:b}=S.useContext(Yn),g=pr(),E=V0(),x=ra(),v=async N=>{try{if(N==="mmd"){Cl("diagram.mmd",e,"text/plain"),d(!1),a==null||a(N);return}if(!E){u==null||u(new Error("Mermaid plugin not available"));return}let w=E.getMermaid(s),O=e.split("").reduce((D,q)=>(D<<5)-D+q.charCodeAt(0)|0,0),z=`mermaid-${Math.abs(O)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:U}=await w.render(z,e);if(!U){u==null||u(new Error("SVG not found. Please wait for the diagram to render."));return}if(N==="svg"){Cl("diagram.svg",U,"image/svg+xml"),d(!1),a==null||a(N);return}if(N==="png"){let D=await y7(U);Cl("diagram.png",D,"image/png"),a==null||a(N),d(!1);return}}catch(w){u==null||u(w)}};return S.useEffect(()=>{let N=w=>{let O=w.composedPath();h.current&&!O.includes(h.current)&&d(!1)};return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[]),T.jsxs("div",{className:o("relative"),ref:h,children:[T.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:b,onClick:()=>d(!f),title:x.downloadDiagram,type:"button",children:t??T.jsx(g.DownloadIcon,{size:14})}),f?T.jsxs("div",{className:o("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("svg"),title:x.downloadDiagramAsSvg,type:"button",children:x.mermaidFormatSvg}),T.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("png"),title:x.downloadDiagramAsPng,type:"button",children:x.mermaidFormatPng}),T.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("mmd"),title:x.downloadDiagramAsMmd,type:"button",children:x.mermaidFormatMmd})]}):null]})},x7=({chart:e,config:t,onFullscreen:n,onExit:a,className:s,...u})=>{let{Maximize2Icon:o,XIcon:f}=pr(),d=Xe(),[h,b]=S.useState(!1),{isAnimating:g,controls:E}=S.useContext(Yn),x=ra(),v=(()=>{if(typeof E=="boolean")return E;let w=E.mermaid;return w===!1?!1:w===!0||w===void 0?!0:w.panZoom!==!1})(),N=()=>{b(!h)};return S.useEffect(()=>{if(h){q0();let w=O=>{O.key==="Escape"&&b(!1)};return document.addEventListener("keydown",w),()=>{document.removeEventListener("keydown",w),Y0()}}},[h]),S.useEffect(()=>{h?n==null||n():a&&a()},[h,n,a]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:d("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",s),disabled:g,onClick:N,title:x.viewFullscreen,type:"button",...u,children:T.jsx(o,{size:14})}),h?l_.createPortal(T.jsxs("div",{className:d("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:N,onKeyDown:w=>{w.key==="Escape"&&N()},role:"button",tabIndex:0,children:[T.jsx("button",{className:d("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:N,title:x.exitFullscreen,type:"button",children:T.jsx(f,{size:20})}),T.jsx("div",{className:d("flex size-full items-center justify-center p-4"),onClick:w=>w.stopPropagation(),onKeyDown:w=>w.stopPropagation(),role:"presentation",children:T.jsx(hv,{chart:e,className:d("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:v})})]}),document.body):null]})},D_=e=>{var t,n;let a=[],s=[],u=e.querySelectorAll("thead th");for(let f of u)a.push(((t=f.textContent)==null?void 0:t.trim())||"");let o=e.querySelectorAll("tbody tr");for(let f of o){let d=[],h=f.querySelectorAll("td");for(let b of h)d.push(((n=b.textContent)==null?void 0:n.trim())||"");s.push(d)}return{headers:a,rows:s}},I_=e=>{let{headers:t,rows:n}=e,a=f=>{let d=!1,h=!1;for(let b of f){if(b==='"'){d=!0,h=!0;break}(b===","||b===`
317
- `)&&(d=!0)}return d?h?`"${f.replace(/"/g,'""')}"`:`"${f}"`:f},s=t.length>0?n.length+1:n.length,u=new Array(s),o=0;t.length>0&&(u[o]=t.map(a).join(","),o+=1);for(let f of n)u[o]=f.map(a).join(","),o+=1;return u.join(`
318
- `)},T7=e=>{let{headers:t,rows:n}=e,a=f=>{let d=!1;for(let b of f)if(b===" "||b===`
319
- `||b==="\r"){d=!0;break}if(!d)return f;let h=[];for(let b of f)b===" "?h.push("\\t"):b===`
320
- `?h.push("\\n"):b==="\r"?h.push("\\r"):h.push(b);return h.join("")},s=t.length>0?n.length+1:n.length,u=new Array(s),o=0;t.length>0&&(u[o]=t.map(a).join(" "),o+=1);for(let f of n)u[o]=f.map(a).join(" "),o+=1;return u.join(`
321
- `)},rm=e=>{let t=!1;for(let a of e)if(a==="\\"||a==="|"){t=!0;break}if(!t)return e;let n=[];for(let a of e)a==="\\"?n.push("\\\\"):a==="|"?n.push("\\|"):n.push(a);return n.join("")},Ym=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let a=new Array(n.length+2),s=0,u=t.map(f=>rm(f));a[s]=`| ${u.join(" | ")} |`,s+=1;let o=new Array(t.length);for(let f=0;f<t.length;f+=1)o[f]="---";a[s]=`| ${o.join(" | ")} |`,s+=1;for(let f of n)if(f.length<t.length){let d=new Array(t.length);for(let h=0;h<t.length;h+=1)d[h]=h<f.length?rm(f[h]):"";a[s]=`| ${d.join(" | ")} |`,s+=1}else{let d=f.map(h=>rm(h));a[s]=`| ${d.join(" | ")} |`,s+=1}return a.join(`
322
- `)},M_=({children:e,className:t,onCopy:n,onError:a,timeout:s=2e3})=>{let u=Xe(),[o,f]=S.useState(!1),[d,h]=S.useState(!1),b=S.useRef(null),g=S.useRef(0),{isAnimating:E}=S.useContext(Yn),x=ra(),v=async O=>{var z,U;if(typeof window>"u"||!((z=navigator==null?void 0:navigator.clipboard)!=null&&z.write)){a==null||a(new Error("Clipboard API not available"));return}try{let D=(U=b.current)==null?void 0:U.closest('[data-streamdown="table-wrapper"]'),q=D==null?void 0:D.querySelector("table");if(!q){a==null||a(new Error("Table not found"));return}let M=D_(q),$=({csv:I_,tsv:T7,md:Ym}[O]||Ym)(M),G=new ClipboardItem({"text/plain":new Blob([$],{type:"text/plain"}),"text/html":new Blob([q.outerHTML],{type:"text/html"})});await navigator.clipboard.write([G]),h(!0),f(!1),n==null||n(O),g.current=window.setTimeout(()=>h(!1),s)}catch(D){a==null||a(D)}};S.useEffect(()=>{let O=z=>{let U=z.composedPath();b.current&&!U.includes(b.current)&&f(!1)};return document.addEventListener("mousedown",O),()=>{document.removeEventListener("mousedown",O),window.clearTimeout(g.current)}},[]);let N=pr(),w=d?N.CheckIcon:N.CopyIcon;return T.jsxs("div",{className:u("relative"),ref:b,children:[T.jsx("button",{className:u("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:E,onClick:()=>f(!o),title:x.copyTable,type:"button",children:e??T.jsx(w,{height:14,width:14})}),o?T.jsxs("div",{className:u("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("md"),title:x.copyTableAsMarkdown,type:"button",children:x.tableFormatMarkdown}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("csv"),title:x.copyTableAsCsv,type:"button",children:x.tableFormatCsv}),T.jsx("button",{className:u("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>v("tsv"),title:x.copyTableAsTsv,type:"button",children:x.tableFormatTsv})]}):null]})},B_=({children:e,className:t,onDownload:n,onError:a})=>{let s=Xe(),[u,o]=S.useState(!1),f=S.useRef(null),{isAnimating:d}=S.useContext(Yn),h=ra(),b=pr(),g=E=>{var x;try{let v=(x=f.current)==null?void 0:x.closest('[data-streamdown="table-wrapper"]'),N=v==null?void 0:v.querySelector("table");if(!N){a==null||a(new Error("Table not found"));return}let w=D_(N),O=E==="csv"?I_(w):Ym(w);Cl(`table.${E==="csv"?"csv":"md"}`,O,E==="csv"?"text/csv":"text/markdown"),o(!1),n==null||n(E)}catch(v){a==null||a(v)}};return S.useEffect(()=>{let E=x=>{let v=x.composedPath();f.current&&!v.includes(f.current)&&o(!1)};return document.addEventListener("mousedown",E),()=>{document.removeEventListener("mousedown",E)}},[]),T.jsxs("div",{className:s("relative"),ref:f,children:[T.jsx("button",{className:s("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:d,onClick:()=>o(!u),title:h.downloadTable,type:"button",children:e??T.jsx(b.DownloadIcon,{size:14})}),u?T.jsxs("div",{className:s("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[T.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),T.jsx("button",{className:s("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>g("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},_7=({children:e,className:t,showCopy:n=!0,showDownload:a=!0})=>{let{Maximize2Icon:s,XIcon:u}=pr(),o=Xe(),[f,d]=S.useState(!1),{isAnimating:h}=S.useContext(Yn),b=ra(),g=()=>{d(!0)},E=()=>{d(!1)};return S.useEffect(()=>{if(f){q0();let x=v=>{v.key==="Escape"&&d(!1)};return document.addEventListener("keydown",x),()=>{document.removeEventListener("keydown",x),Y0()}}},[f]),T.jsxs(T.Fragment,{children:[T.jsx("button",{className:o("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:g,title:b.viewFullscreen,type:"button",children:T.jsx(s,{size:14})}),f?l_.createPortal(T.jsx("div",{"aria-label":b.viewFullscreen,"aria-modal":"true",className:o("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:E,onKeyDown:x=>{x.key==="Escape"&&E()},role:"dialog",children:T.jsxs("div",{className:o("flex h-full flex-col"),onClick:x=>x.stopPropagation(),onKeyDown:x=>x.stopPropagation(),role:"presentation",children:[T.jsxs("div",{className:o("flex items-center justify-end gap-1 p-4"),children:[n?T.jsx(M_,{}):null,a?T.jsx(B_,{}):null,T.jsx("button",{className:o("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:E,title:b.exitFullscreen,type:"button",children:T.jsx(u,{size:20})})]}),T.jsx("div",{className:o("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:T.jsx("table",{className:o("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},v7=({children:e,className:t,showControls:n,showCopy:a=!0,showDownload:s=!0,showFullscreen:u=!0,...o})=>{let f=Xe(),d=n&&a,h=n&&s,b=n&&u,g=d||h||b;return T.jsxs("div",{className:f("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[g?T.jsxs("div",{className:f("flex items-center justify-end gap-1"),children:[d?T.jsx(M_,{}):null,h?T.jsx(B_,{}):null,b?T.jsx(_7,{showCopy:d,showDownload:h,children:e}):null]}):null,T.jsx("div",{className:f("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:T.jsx("table",{className:f("w-full divide-y divide-border",t),"data-streamdown":"table",...o,children:e})})]})},S7=/startLine=(\d+)/,k7=/\bnoLineNumbers\b/,A7=S.lazy(()=>u0(()=>Promise.resolve().then(()=>Sz),void 0).then(e=>({default:e.Mermaid}))),C7=/language-([^\s]+)/;function nf(e,t){if(!(e!=null&&e.position||t!=null&&t.position))return!0;if(!(e!=null&&e.position&&t!=null&&t.position))return!1;let n=e.position.start,a=t.position.start,s=e.position.end,u=t.position.end;return(n==null?void 0:n.line)===(a==null?void 0:a.line)&&(n==null?void 0:n.column)===(a==null?void 0:a.column)&&(s==null?void 0:s.line)===(u==null?void 0:u.line)&&(s==null?void 0:s.column)===(u==null?void 0:u.column)}function zt(e,t){return e.className===t.className&&nf(e.node,t.node)}var $m=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,am=(e,t)=>{if(typeof e=="boolean")return e;let n=e.table;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},ex=(e,t)=>{if(typeof e=="boolean")return e;let n=e.code;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},Zo=(e,t)=>{if(typeof e=="boolean")return e;let n=e.mermaid;return n===!1?!1:n===!0||n===void 0?!0:n[t]!==!1},G0=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("ol",{className:s("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...a,children:e})},(e,t)=>zt(e,t));G0.displayName="MarkdownOl";var z_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("li",{className:s("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...a,children:e})},(e,t)=>e.className===t.className&&nf(e.node,t.node));z_.displayName="MarkdownLi";var H_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("ul",{className:s("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...a,children:e})},(e,t)=>zt(e,t));H_.displayName="MarkdownUl";var U_=S.memo(({className:e,node:t,...n})=>{let a=Xe();return T.jsx("hr",{className:a("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>zt(e,t));U_.displayName="MarkdownHr";var P_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("span",{className:s("font-semibold",t),"data-streamdown":"strong",...a,children:e})},(e,t)=>zt(e,t));P_.displayName="MarkdownStrong";var N7=({children:e,className:t,href:n,node:a,...s})=>{let u=Xe(),{linkSafety:o}=S.useContext(Yn),[f,d]=S.useState(!1),h=n==="streamdown:incomplete-link",b=S.useCallback(async v=>{if(!(!(o!=null&&o.enabled&&n)||h)){if(v.preventDefault(),o.onLinkCheck&&await o.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}d(!0)}},[o,n,h]),g=S.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),E=S.useCallback(()=>{d(!1)},[]),x={url:n??"",isOpen:f,onClose:E,onConfirm:g};return o!=null&&o.enabled&&n?T.jsxs(T.Fragment,{children:[T.jsx("button",{className:u("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:b,type:"button",children:e}),o.renderModal?o.renderModal(x):T.jsx(g7,{...x})]}):T.jsx("a",{className:u("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...s,children:e})},j_=S.memo(N7,(e,t)=>zt(e,t)&&e.href===t.href);j_.displayName="MarkdownA";var F_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h1",{className:s("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...a,children:e})},(e,t)=>zt(e,t));F_.displayName="MarkdownH1";var q_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h2",{className:s("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...a,children:e})},(e,t)=>zt(e,t));q_.displayName="MarkdownH2";var Y_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h3",{className:s("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...a,children:e})},(e,t)=>zt(e,t));Y_.displayName="MarkdownH3";var $_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h4",{className:s("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...a,children:e})},(e,t)=>zt(e,t));$_.displayName="MarkdownH4";var V_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h5",{className:s("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...a,children:e})},(e,t)=>zt(e,t));V_.displayName="MarkdownH5";var G_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("h6",{className:s("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...a,children:e})},(e,t)=>zt(e,t));G_.displayName="MarkdownH6";var Q_=S.memo(({children:e,className:t,node:n,...a})=>{let{controls:s}=S.useContext(Yn),u=$m(s,"table"),o=am(s,"copy"),f=am(s,"download"),d=am(s,"fullscreen");return T.jsx(v7,{className:t,showControls:u,showCopy:o,showDownload:f,showFullscreen:d,...a,children:e})},(e,t)=>zt(e,t));Q_.displayName="MarkdownTable";var X_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("thead",{className:s("bg-muted/80",t),"data-streamdown":"table-header",...a,children:e})},(e,t)=>zt(e,t));X_.displayName="MarkdownThead";var Z_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("tbody",{className:s("divide-y divide-border",t),"data-streamdown":"table-body",...a,children:e})},(e,t)=>zt(e,t));Z_.displayName="MarkdownTbody";var K_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("tr",{className:s("border-border",t),"data-streamdown":"table-row",...a,children:e})},(e,t)=>zt(e,t));K_.displayName="MarkdownTr";var W_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("th",{className:s("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...a,children:e})},(e,t)=>zt(e,t));W_.displayName="MarkdownTh";var J_=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("td",{className:s("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...a,children:e})},(e,t)=>zt(e,t));J_.displayName="MarkdownTd";var ev=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("blockquote",{className:s("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...a,children:e})},(e,t)=>zt(e,t));ev.displayName="MarkdownBlockquote";var tv=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("sup",{className:s("text-sm",t),"data-streamdown":"superscript",...a,children:e})},(e,t)=>zt(e,t));tv.displayName="MarkdownSup";var nv=S.memo(({children:e,className:t,node:n,...a})=>{let s=Xe();return T.jsx("sub",{className:s("text-sm",t),"data-streamdown":"subscript",...a,children:e})},(e,t)=>zt(e,t));nv.displayName="MarkdownSub";var rv=S.memo(({children:e,className:t,node:n,...a})=>{if("data-footnotes"in a){let s=o=>{var f,d;if(!S.isValidElement(o))return!1;let h=Array.isArray(o.props.children)?o.props.children:[o.props.children],b=!1,g=!1;for(let E of h)if(E){if(typeof E=="string")E.trim()!==""&&(b=!0);else if(S.isValidElement(E))if(((f=E.props)==null?void 0:f["data-footnote-backref"])!==void 0)g=!0;else{let x=Array.isArray(E.props.children)?E.props.children:[E.props.children];for(let v of x){if(typeof v=="string"&&v.trim()!==""){b=!0;break}if(S.isValidElement(v)&&((d=v.props)==null?void 0:d["data-footnote-backref"])===void 0){b=!0;break}}}}return g&&!b},u=Array.isArray(e)?e.map(o=>{if(!S.isValidElement(o))return o;if(o.type===G0){let f=(Array.isArray(o.props.children)?o.props.children:[o.props.children]).filter(d=>!s(d));return f.length===0?null:{...o,props:{...o.props,children:f}}}return o}):e;return(Array.isArray(u)?u.some(o=>o!==null):u!==null)?T.jsx("section",{className:t,...a,children:u}):null}return T.jsx("section",{className:t,...a,children:e})},(e,t)=>zt(e,t));rv.displayName="MarkdownSection";var w7=({node:e,className:t,children:n,...a})=>{var s,u;let o=Xe(),f=!("data-block"in a),{mermaid:d,controls:h,lineNumbers:b}=S.useContext(Yn),g=V0(),E=$M(),x=t==null?void 0:t.match(C7),v=(s=x==null?void 0:x.at(1))!=null?s:"",N=b7(v);if(f)return T.jsx("code",{className:o("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...a,children:n});let w=(u=e==null?void 0:e.properties)==null?void 0:u.metastring,O=w==null?void 0:w.match(S7),z=O?Number.parseInt(O[1],10):void 0,U=z!==void 0&&z>=1?z:void 0,D=!(w&&k7.test(w))&&b!==!1,q="";if(S.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?q=n.props.children:typeof n=="string"&&(q=n),N){let de=N.component;return T.jsx(S.Suspense,{fallback:T.jsx(JE,{}),children:T.jsx(de,{code:q,isIncomplete:E,language:v,meta:w})})}if(v==="mermaid"&&g){let de=$m(h,"mermaid"),F=Zo(h,"download"),oe=Zo(h,"copy"),ce=Zo(h,"fullscreen"),we=Zo(h,"panZoom"),pe=de&&(F||oe||ce);return T.jsx(S.Suspense,{fallback:T.jsx(JE,{}),children:T.jsxs("div",{className:o("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[T.jsx("div",{className:o("flex h-8 items-center text-muted-foreground text-xs"),children:T.jsx("span",{className:o("ml-1 font-mono lowercase"),children:"mermaid"})}),pe?T.jsx("div",{className:o("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:T.jsxs("div",{className:o("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[F?T.jsx(E7,{chart:q,config:d==null?void 0:d.config}):null,oe?T.jsx(KE,{code:q}):null,ce?T.jsx(x7,{chart:q,config:d==null?void 0:d.config}):null]})}):null,T.jsx("div",{className:o("rounded-md border border-border bg-background"),children:T.jsx(A7,{chart:q,config:d==null?void 0:d.config,showControls:we})})]})})}let M=$m(h,"code"),$=ex(h,"download"),G=ex(h,"copy");return T.jsx(t7,{className:t,code:q,isIncomplete:E,language:v,lineNumbers:D,startLine:U,children:M?T.jsxs(T.Fragment,{children:[$?T.jsx(h7,{code:q,language:v}):null,G?T.jsx(KE,{}):null]}):null})},av=S.memo(w7,(e,t)=>e.className===t.className&&nf(e.node,t.node));av.displayName="MarkdownCode";var iv=S.memo(p7,(e,t)=>e.className===t.className&&nf(e.node,t.node));iv.displayName="MarkdownImg";var lv=S.memo(({children:e,node:t,...n})=>{let a=(Array.isArray(e)?e:[e]).filter(s=>s!=null&&s!=="");if(a.length===1&&S.isValidElement(a[0])){let s=a[0].props.node,u=s==null?void 0:s.tagName;if(u==="img")return T.jsx(T.Fragment,{children:e});if(u==="code"&&"data-block"in a[0].props)return T.jsx(T.Fragment,{children:e})}return T.jsx("p",{...n,children:e})},(e,t)=>zt(e,t));lv.displayName="MarkdownParagraph";var R7={ol:G0,li:z_,ul:H_,hr:U_,strong:P_,a:j_,h1:F_,h2:q_,h3:Y_,h4:$_,h5:V_,h6:G_,table:Q_,thead:X_,tbody:Z_,tr:K_,th:W_,td:J_,blockquote:ev,code:av,img:iv,pre:({children:e})=>S.isValidElement(e)?S.cloneElement(e,{"data-block":"true"}):e,sup:tv,sub:nv,p:lv,section:rv},O7=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,L7=new RegExp("\\p{L}","u");function tx(e){let t=e.replace(/^#{1,6}\s+/gm,"").replace(/(\*{1,3}|_{1,3})/g,"").replace(/`[^`]*`/g,"").replace(/\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/^[\s>*\-+\d.]+/gm,"");for(let n of t){if(O7.test(n))return"rtl";if(L7.test(n))return"ltr"}return"ltr"}var D7=/^[ \t]{0,3}(`{3,}|~{3,})/,I7=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,nx=e=>{let t=e.split(`
323
- `),n=null,a=0;for(let s of t){let u=D7.exec(s);if(n===null){if(u){let o=u[1];n=o[0],a=o.length}}else if(u){let o=u[1],f=o[0],d=o.length;f===n&&d>=a&&(n=null,a=0)}}return n!==null},M7=e=>{let t=e.split(`
324
- `);for(let n of t){let a=n.trim();if(a.length>0&&a.includes("|")&&I7.test(a))return!0}return!1},B7=()=>e=>{Ar(e,"html",(t,n,a)=>{!a||typeof n!="number"||(a.children[n]={type:"text",value:t.value})})},rx=[],ax={allowDangerousHtml:!0},Ko=new WeakMap,z7=class{constructor(){this.cache=new Map,this.keyCache=new WeakMap,this.maxSize=100}generateCacheKey(e){let t=this.keyCache.get(e);if(t)return t;let n=e.rehypePlugins,a=e.remarkPlugins,s=e.remarkRehypeOptions;if(!(n||a||s)){let b="default";return this.keyCache.set(e,b),b}let u=b=>{if(!b||b.length===0)return"";let g="";for(let E=0;E<b.length;E+=1){let x=b[E];if(E>0&&(g+=","),Array.isArray(x)){let[v,N]=x;if(typeof v=="function"){let w=Ko.get(v);w||(w=v.name,Ko.set(v,w)),g+=w}else g+=String(v);g+=":",g+=JSON.stringify(N)}else if(typeof x=="function"){let v=Ko.get(x);v||(v=x.name,Ko.set(x,v)),g+=v}else g+=String(x)}return g},o=u(n),f=u(a),d=s?JSON.stringify(s):"",h=`${f}::${o}::${d}`;return this.keyCache.set(e,h),h}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let a=this.cache.keys().next().value;a&&this.cache.delete(a)}this.cache.set(n,t)}clear(){this.cache.clear()}},ix=new z7,sv=e=>{let t=H7(e),n=e.children||"",a=t.runSync(t.parse(n),n);return $7(a,e)},H7=e=>{let t=ix.get(e);if(t)return t;let n=P7(e);return ix.set(e,n),n},U7=e=>e.some(t=>Array.isArray(t)?t[0]===wm:t===wm),P7=e=>{let t=e.rehypePlugins||rx,n=e.remarkPlugins||rx,a=U7(t)?n:[...n,B7],s=e.remarkRehypeOptions?{...ax,...e.remarkRehypeOptions}:ax;return j9().use(PI).use(a).use(_9,s).use(t)},j7=e=>e,F7=(e,t,n,a)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:a}},q7=(e,t)=>{var n;for(let a in Qh)if(Object.hasOwn(Qh,a)&&Object.hasOwn(e.properties,a)){let s=e.properties[a],u=Qh[a];(u===null||u.includes(e.tagName))&&(e.properties[a]=(n=t(String(s||""),a,e))!=null?n:void 0)}},Y7=(e,t,n,a,s,u)=>{let o=!1;return a?o=!a.includes(e.tagName):s&&(o=s.includes(e.tagName)),!o&&u&&typeof t=="number"&&(o=!u(e,t,n)),o},$7=(e,t)=>{let{allowElement:n,allowedElements:a,disallowedElements:s,skipHtml:u,unwrapDisallowed:o,urlTransform:f}=t;if(n||a||s||u||f){let d=f||j7;Ar(e,(h,b,g)=>{if(h.type==="raw"&&g&&typeof b=="number")return F7(g,b,u,h.value),b;if(h.type==="element"&&(q7(h,d),Y7(h,b,g,a,s,n)&&g&&typeof b=="number"))return o&&h.children?g.children.splice(b,1,...h.children):g.children.splice(b,1),b})}return Q8(e,{Fragment:T.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:T.jsx,jsxs:T.jsxs,passKeys:!0,passNode:!0})},V7=/\[\^[\w-]{1,200}\](?!:)/,G7=/\[\^[\w-]{1,200}\]:/,Q7=/<(\w+)[\s>]/,X7=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),lx=new Map,sx=new Map,Z7=e=>{let t=e.toLowerCase(),n=lx.get(t);if(n)return n;let a=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return lx.set(t,a),a},K7=e=>{let t=e.toLowerCase(),n=sx.get(t);if(n)return n;let a=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return sx.set(t,a),a},ux=(e,t)=>{if(X7.has(t.toLowerCase()))return 0;let n=e.match(Z7(t));if(!n)return 0;let a=0;for(let s of n)s.trimEnd().endsWith("/>")||(a+=1);return a},ox=(e,t)=>{let n=e.match(K7(t));return n?n.length:0},W7=e=>{let t=0;for(let n=0;n<e.length-1;n+=1)e[n]==="$"&&e[n+1]==="$"&&(t+=1,n+=1);return t},J7=e=>{let t=V7.test(e),n=G7.test(e);if(t||n)return[e];let a=ar.lex(e,{gfm:!0}),s=[],u=[],o=!1;for(let f of a){let d=f.raw,h=s.length;if(u.length>0){s[h-1]+=d;let b=u.at(-1),g=ux(d,b),E=ox(d,b);for(let x=0;x<g;x+=1)u.push(b);for(let x=0;x<E;x+=1)u.length>0&&u.at(-1)===b&&u.pop();continue}if(f.type==="html"&&f.block){let b=d.match(Q7);if(b){let g=b[1],E=ux(d,g),x=ox(d,g);E>x&&u.push(g)}}if(h>0&&!o){let b=s[h-1];if(W7(b)%2===1){s[h-1]=b+d;continue}}s.push(d),f.type!=="space"&&(o=f.type==="code")}return s},eB=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let s=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(s,(u,o,f,d)=>{if(!f.includes(`
325
-
326
- `))return o+f+d;let h=f.replace(/\n\n/g,`
327
- <!---->
328
- `),b=(h.startsWith(`
329
- `)?"":`
330
- `)+h+(h.endsWith(`
331
- `)?"":`
332
- `);return`${o}${b}${d}
333
-
334
- `})}return n},tB=/([\\`*_~[\]|])/g,nB=e=>e.replace(tB,"\\$1"),rB=(e,t)=>{if(!t.length)return e;let n=e;for(let a of t){let s=new RegExp(`(<${a}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${a}\\s*>)`,"gi");n=n.replace(s,(u,o,f,d)=>{let h=nB(f).replace(/\n\n/g,"&#10;&#10;");return o+h+d})}return n},uv=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(uv).join(""):"",aB=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(a=>a.toLowerCase()));Ar(t,"element",a=>{if(n.has(a.tagName.toLowerCase())){let s=uv(a);a.children=s?[{type:"text",value:s}]:[]}})},iB=()=>e=>{Ar(e,"code",t=>{var n,a;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(a=t.data.hProperties)!=null?a:{},metastring:t.meta})})},lB=/^[ \t]*<[\w!/?-]/,sB=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,uB=e=>typeof e!="string"||e.length===0||!lB.test(e)?e:e.replace(sB,"$1"),cx,fx,dx,hx,rc={...gi,protocols:{...gi.protocols,href:[...(fx=(cx=gi.protocols)==null?void 0:cx.href)!=null?fx:[],"tel"]},attributes:{...gi.attributes,code:[...(hx=(dx=gi.attributes)==null?void 0:dx.code)!=null?hx:[],"metastring"]}},Vm={raw:wm,sanitize:[bT,rc],harden:[n6,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},oB={gfm:[TD,{}],codeMeta:iB},mx=Object.values(Vm),cB=Object.values(oB),fB={block:" ▋",circle:" ●"},ov=["github-light","github-dark"],cv={enabled:!0},dB={shikiTheme:ov,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:cv},Yn=S.createContext(dB),fv=S.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:a,isIncomplete:s,dir:u,animatePlugin:o,...f})=>{if(o){let b=o.getLastRenderCharCount();o.setPrevContentLength(b)}let d=typeof e=="string"&&n?uB(e):e,h=T.jsx(sv,{...f,children:d});return T.jsx(N_.Provider,{value:s,children:u?T.jsx("div",{dir:u,style:{display:"contents"},children:h}):h})},(e,t)=>{if(e.content!==t.content||e.shouldNormalizeHtmlIndentation!==t.shouldNormalizeHtmlIndentation||e.index!==t.index||e.isIncomplete!==t.isIncomplete||e.dir!==t.dir)return!1;if(e.components!==t.components){let n=Object.keys(e.components||{}),a=Object.keys(t.components||{});if(n.length!==a.length||n.some(s=>{var u,o;return((u=e.components)==null?void 0:u[s])!==((o=t.components)==null?void 0:o[s])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});fv.displayName="Block";var dv=S.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:a=!0,normalizeHtmlIndentation:s=!1,components:u,rehypePlugins:o=mx,remarkPlugins:f=cB,className:d,shikiTheme:h=ov,mermaid:b,controls:g=!0,isAnimating:E=!1,animated:x,BlockComponent:v=fv,parseMarkdownIntoBlocksFn:N=J7,caret:w,plugins:O,remend:z,linkSafety:U=cv,lineNumbers:D=!0,allowedTags:q,literalTagContent:M,translations:$,icons:G,prefix:de,onAnimationStart:F,onAnimationEnd:oe,...ce})=>{let we=S.useId(),[pe,ae]=S.useTransition(),P=S.useMemo(()=>GM(de),[de]),ne=S.useRef(null),xe=S.useRef(F),Te=S.useRef(oe);xe.current=F,Te.current=oe,S.useEffect(()=>{var Le,st,jt;if(t==="static")return;let Ft=ne.current;if(ne.current=E,Ft===null){E&&((Le=xe.current)==null||Le.call(xe));return}E&&!Ft?(st=xe.current)==null||st.call(xe):!E&&Ft&&((jt=Te.current)==null||jt.call(Te))},[E,t]);let C=S.useMemo(()=>q?Object.keys(q):[],[q]),I=S.useMemo(()=>{if(typeof e!="string")return"";let Le=t==="streaming"&&a?L8(e,z):e;return M&&M.length>0&&(Le=rB(Le,M)),C.length>0&&(Le=eB(Le,C)),Le},[e,t,a,z,C,M]),K=S.useMemo(()=>N(I),[I,N]),[A,ee]=S.useState(K);S.useEffect(()=>{t==="streaming"&&!Ee?ae(()=>{ee(K)}):ee(K)},[K,t]);let se=t==="streaming"?A:K,ie=S.useMemo(()=>n==="auto"?se.map(tx):void 0,[se,n]),he=S.useMemo(()=>se.map((Le,st)=>`${we}-${st}`),[se.length,we]),_e=S.useMemo(()=>x===!0?"true":x?JSON.stringify(x):"",[x]),Ee=S.useMemo(()=>_e?_e==="true"?Pm():Pm(x):null,[_e]),Ye=S.useMemo(()=>{var Le,st;return{shikiTheme:(st=(Le=O==null?void 0:O.code)==null?void 0:Le.getThemes())!=null?st:h,controls:g,isAnimating:E,lineNumbers:D,mode:t,mermaid:b,linkSafety:U}},[h,g,E,D,t,b,U,O==null?void 0:O.code]),_t=S.useMemo(()=>$?JSON.stringify($):"",[$]),wt=S.useMemo(()=>({...L_,...$}),[_t]),rt=S.useMemo(()=>{let{inlineCode:Le,...st}=u??{},jt={...R7,...st};if(Le){let Ft=jt.code;jt.code=$n=>"data-block"in $n?Ft?S.createElement(Ft,$n):null:S.createElement(Le,$n)}return jt},[u]),mt=S.useMemo(()=>{let Le=[];return O!=null&&O.cjk&&(Le=[...Le,...O.cjk.remarkPluginsBefore]),Le=[...Le,...f],O!=null&&O.cjk&&(Le=[...Le,...O.cjk.remarkPluginsAfter]),O!=null&&O.math&&(Le=[...Le,O.math.remarkPlugin]),Le},[f,O==null?void 0:O.math,O==null?void 0:O.cjk]),dn=S.useMemo(()=>{var Le;let st=o;if(q&&Object.keys(q).length>0&&o===mx){let jt={...rc,tagNames:[...(Le=rc.tagNames)!=null?Le:[],...Object.keys(q)],attributes:{...rc.attributes,...q}};st=[Vm.raw,[bT,jt],Vm.harden]}return M&&M.length>0&&(st=[...st,[aB,M]]),O!=null&&O.math&&(st=[...st,O.math.rehypePlugin]),Ee&&E&&(st=[...st,Ee.rehypePlugin]),st},[o,O==null?void 0:O.math,Ee,E,q,M]),hn=S.useMemo(()=>{if(!E||se.length===0)return!1;let Le=se.at(-1);return nx(Le)||M7(Le)},[E,se]),gr=S.useMemo(()=>w&&E&&!hn?{"--streamdown-caret":`"${fB[w]}"`}:void 0,[w,E,hn]);return t==="static"?T.jsx(Fm.Provider,{value:wt,children:T.jsx(qm.Provider,{value:O??null,children:T.jsx(Yn.Provider,{value:Ye,children:T.jsx(ZE,{icons:G,children:T.jsx(jm.Provider,{value:P,children:T.jsx("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",d),dir:n==="auto"?tx(I):n,children:T.jsx(sv,{components:rt,rehypePlugins:dn,remarkPlugins:mt,...ce,children:I})})})})})})}):T.jsx(Fm.Provider,{value:wt,children:T.jsx(qm.Provider,{value:O??null,children:T.jsx(Yn.Provider,{value:Ye,children:T.jsx(ZE,{icons:G,children:T.jsx(jm.Provider,{value:P,children:T.jsxs("div",{className:P("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",w&&!hn?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,d),style:gr,children:[se.length===0&&w&&E&&T.jsx("span",{}),se.map((Le,st)=>{var jt;let Ft=st===se.length-1,$n=E&&Ft&&nx(Le);return T.jsx(v,{animatePlugin:Ee,components:rt,content:Le,dir:(jt=ie==null?void 0:ie[st])!=null?jt:n!=="auto"?n:void 0,index:st,isIncomplete:$n,rehypePlugins:dn,remarkPlugins:mt,shouldNormalizeHtmlIndentation:s,shouldParseIncompleteMarkdown:a,...ce},he[st])})]})})})})})})},(e,t)=>e.children===t.children&&e.shikiTheme===t.shikiTheme&&e.isAnimating===t.isAnimating&&e.animated===t.animated&&e.mode===t.mode&&e.plugins===t.plugins&&e.className===t.className&&e.linkSafety===t.linkSafety&&e.lineNumbers===t.lineNumbers&&e.normalizeHtmlIndentation===t.normalizeHtmlIndentation&&e.literalTagContent===t.literalTagContent&&JSON.stringify(e.translations)===JSON.stringify(t.translations)&&e.prefix===t.prefix&&e.dir===t.dir);dv.displayName="Streamdown";var hB=({children:e,className:t,minZoom:n=.5,maxZoom:a=3,zoomStep:s=.1,showControls:u=!0,initialZoom:o=1,fullscreen:f=!1})=>{let{RotateCcwIcon:d,ZoomInIcon:h,ZoomOutIcon:b}=pr(),g=Xe(),E=S.useRef(null),x=S.useRef(null),[v,N]=S.useState(o),[w,O]=S.useState({x:0,y:0}),[z,U]=S.useState(!1),[D,q]=S.useState({x:0,y:0}),[M,$]=S.useState({x:0,y:0}),G=S.useCallback(P=>{N(ne=>Math.max(n,Math.min(a,ne+P)))},[n,a]),de=S.useCallback(()=>{G(s)},[G,s]),F=S.useCallback(()=>{G(-s)},[G,s]),oe=S.useCallback(()=>{N(o),O({x:0,y:0})},[o]),ce=S.useCallback(P=>{P.preventDefault();let ne=P.deltaY>0?-s:s;G(ne)},[G,s]),we=S.useCallback(P=>{if(P.button!==0||P.isPrimary===!1)return;U(!0),q({x:P.clientX,y:P.clientY}),$(w);let ne=P.currentTarget;ne instanceof HTMLElement&&ne.setPointerCapture(P.pointerId)},[w]),pe=S.useCallback(P=>{if(!z)return;P.preventDefault();let ne=P.clientX-D.x,xe=P.clientY-D.y;O({x:M.x+ne,y:M.y+xe})},[z,D,M]),ae=S.useCallback(P=>{U(!1);let ne=P.currentTarget;ne instanceof HTMLElement&&ne.releasePointerCapture(P.pointerId)},[]);return S.useEffect(()=>{let P=E.current;if(P)return P.addEventListener("wheel",ce,{passive:!1}),()=>{P.removeEventListener("wheel",ce)}},[ce]),S.useEffect(()=>{let P=x.current;if(P&&z)return document.body.style.userSelect="none",P.addEventListener("pointermove",pe,{passive:!1}),P.addEventListener("pointerup",ae),P.addEventListener("pointercancel",ae),()=>{document.body.style.userSelect="",P.removeEventListener("pointermove",pe),P.removeEventListener("pointerup",ae),P.removeEventListener("pointercancel",ae)}},[z,pe,ae]),T.jsxs("div",{className:g("relative flex flex-col",f?"h-full w-full":"min-h-28 w-full",t),ref:E,style:{cursor:z?"grabbing":"grab"},children:[u?T.jsxs("div",{className:g("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",f?"bottom-4 left-4":"bottom-2 left-2"),children:[T.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:v>=a,onClick:de,title:"Zoom in",type:"button",children:T.jsx(h,{size:16})}),T.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50"),disabled:v<=n,onClick:F,title:"Zoom out",type:"button",children:T.jsx(b,{size:16})}),T.jsx("button",{className:g("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:oe,title:"Reset zoom and pan",type:"button",children:T.jsx(d,{size:16})})]}):null,T.jsx("div",{className:g("flex-1 origin-center transition-transform duration-150 ease-out",f?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:we,ref:x,role:"application",style:{transform:`translate(${w.x}px, ${w.y}px) scale(${v})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},hv=({chart:e,className:t,config:n,fullscreen:a=!1,showControls:s=!0})=>{let u=Xe(),[o,f]=S.useState(null),[d,h]=S.useState(!1),[b,g]=S.useState(""),[E,x]=S.useState(""),[v,N]=S.useState(0),{mermaid:w}=S.useContext(Yn),O=V0(),z=w==null?void 0:w.errorComponent,{shouldRender:U,containerRef:D}=MM({immediate:a});if(S.useEffect(()=>{if(U){if(!O){f("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{f(null),h(!0);let M=O.getMermaid(n),$=e.split("").reduce((F,oe)=>(F<<5)-F+oe.charCodeAt(0)|0,0),G=`mermaid-${Math.abs($)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:de}=await M.render(G,e);g(de),x(de)}catch(M){if(!(E||b)){let $=M instanceof Error?M.message:"Failed to render Mermaid chart";f($)}}finally{h(!1)}})()}},[e,n,v,U,O]),!(U||b||E))return T.jsx("div",{className:u("my-4 min-h-[200px]",t),ref:D});if(d&&!b&&!E)return T.jsx("div",{className:u("my-4 flex justify-center p-4",t),ref:D,children:T.jsxs("div",{className:u("flex items-center space-x-2 text-muted-foreground"),children:[T.jsx("div",{className:u("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),T.jsx("span",{className:u("text-sm"),children:"Loading diagram..."})]})});if(o&&!b&&!E){let M=()=>N($=>$+1);return z?T.jsx("div",{ref:D,children:T.jsx(z,{chart:e,error:o,retry:M})}):T.jsxs("div",{className:u("rounded-md bg-red-50 p-4",t),ref:D,children:[T.jsxs("p",{className:u("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",o]}),T.jsxs("details",{className:u("mt-2"),children:[T.jsx("summary",{className:u("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),T.jsx("pre",{className:u("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let q=b||E;return T.jsx("div",{className:u("size-full",t),"data-streamdown":"mermaid",ref:D,children:T.jsx(hB,{className:u(a?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:a,maxZoom:3,minZoom:.5,showControls:s,zoomStep:.1,children:T.jsx("div",{"aria-label":"Mermaid chart",className:u("flex justify-center",a?"size-full items-center":null),dangerouslySetInnerHTML:{__html:q},role:"img"})})})};const mB=({className:e,from:t,...n})=>T.jsx("div",{className:Bt("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),pB=({children:e,className:t,...n})=>T.jsx("div",{className:Bt("flex w-fit max-w-full min-w-0 flex-col gap-2 overflow-hidden text-sm","group-[.is-user]:ml-auto group-[.is-user]:rounded-lg group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground",t),...n,children:e}),mv=S.memo(({className:e,...t})=>T.jsx(dv,{className:Bt("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);mv.displayName="MessageResponse";function gB({payload:e}){const t=e.status==="confirmed",n=t?IA:BA;return T.jsxs("div",{"data-testid":"decision-card","data-status":e.status,className:Bt("mx-auto flex w-full max-w-2xl items-start gap-2 rounded-lg border px-3 py-2 text-sm",t?"border-emerald-500/30 bg-emerald-500/5":"border-amber-500/40 bg-amber-500/10"),children:[T.jsx(n,{className:Bt("mt-0.5 size-4 shrink-0",t?"text-emerald-600 dark:text-emerald-400":"text-amber-600 dark:text-amber-400")}),T.jsxs("div",{className:"min-w-0 flex-1",children:[T.jsx("div",{className:"flex items-center gap-2",children:T.jsx("span",{className:"font-medium text-[10px] uppercase tracking-wide text-muted-foreground",children:t?"Decided":"Assumed"})}),T.jsx("p",{className:"font-medium",children:e.summary}),e.detail?T.jsx("p",{className:"text-muted-foreground text-xs",children:e.detail}):null]})]})}function bB({payload:e,active:t,onAnswer:n}){const[a,s]=S.useState(null),[u,o]=S.useState(""),f=Pc(g=>o(E=>E?`${E} ${g}`:g)),d=u.trim(),h=t&&(a!==null||d.length>0),b=()=>{if(!h)return;const g=a?d?`${a} - ${d}`:a:d;n(g),s(null),o("")};return T.jsxs("div",{className:"mx-auto w-full max-w-2xl space-y-2 rounded-xl border bg-card p-3 shadow-sm","data-testid":"question-card",children:[T.jsx("p",{className:"font-medium text-sm",children:e.question}),T.jsx("div",{className:"space-y-1.5",children:e.options.map(g=>{const E=a===g.label;return T.jsxs("button",{type:"button","data-testid":"question-option",disabled:!t,onClick:()=>s(E?null:g.label),className:Bt("flex w-full items-start gap-2 rounded-lg border p-2 text-left transition-colors",E?"border-primary bg-primary/10":"hover:bg-accent hover:text-accent-foreground",!t&&"opacity-70"),children:[T.jsx("span",{className:Bt("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border",E?"border-primary bg-primary text-primary-foreground":"border-muted-foreground/40"),children:E?T.jsx(zc,{className:"size-3"}):null}),T.jsxs("span",{className:"min-w-0 flex-1",children:[T.jsxs("span",{className:"flex items-center gap-2",children:[T.jsx("span",{className:"font-medium text-sm",children:g.label}),g.recommended?T.jsx("span",{className:"rounded-full bg-emerald-500/15 px-1.5 py-0.5 text-[10px] text-emerald-600 dark:text-emerald-400",children:"Recommended"}):null]}),T.jsx("span",{className:"block text-muted-foreground text-xs",children:g.description})]})]},g.label)})}),t?T.jsxs(T.Fragment,{children:[T.jsxs("div",{className:"flex items-start gap-1",children:[T.jsx("textarea",{value:u,onChange:g=>o(g.target.value),placeholder:a?"Add a note to your choice…":"Type your own answer, or add a note…",rows:2,onKeyDown:g=>{g.key==="Enter"&&(g.metaKey||g.ctrlKey)&&(g.preventDefault(),b())},className:"min-h-[2rem] flex-1 resize-none rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"}),f.supported?T.jsx(ft,{type:"button",size:"icon-sm",variant:f.listening?"default":"ghost","aria-label":f.listening?"Stop dictation":"Dictate answer","aria-pressed":f.listening,onClick:f.toggle,children:T.jsx(Hc,{})}):null]}),T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("span",{className:"text-muted-foreground text-xs",children:e.stopHint??"You can pick, type your own, or stop anytime."}),T.jsxs(ft,{type:"button",size:"sm",disabled:!h,onClick:b,children:[T.jsx(r0,{}),"Answer"]})]})]}):T.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"question-answered",children:"Answered above."})]})}const yB={draft:"Draft updated",mock:"Mock updated",diagram:"Diagram updated"};function EB({event:e,sessionId:t,cardAnswered:n,ended:a,onSend:s}){if(e.type==="system")return T.jsx("div",{className:"mx-auto text-center text-muted-foreground text-xs","data-testid":"system-notice",children:YN(e)});if(e.type===jk)return T.jsx(VN,{event:e,sessionId:t});if(e.type===zx){const u=Xk.safeParse(e.payload);return u.success?T.jsx(bB,{payload:u.data,active:!n&&!a,onAnswer:o=>void s({text:o})}):null}if(e.type===Gk){const u=Kk.safeParse(e.payload);return u.success?T.jsx(gB,{payload:u.data}):null}if(e.type===Hx){const u=Wk.safeParse(e.payload);if(!u.success)return null;const{kind:o,name:f}=u.data.artifact;return T.jsxs("div",{className:"mx-auto text-center text-muted-foreground text-xs","data-testid":"artifact-notice","data-kind":o,children:[yB[o]??"Artifact updated"," · ",f]})}if(e.type==="message"){const u=FN(e),o=qN(e);return T.jsx(mB,{from:e.source==="user"?"user":"assistant","data-testid":"message","data-source":e.source,children:T.jsxs(pB,{children:[u?T.jsx(mv,{children:u}):null,T.jsx(GN,{sessionId:t,attachments:o})]})})}return null}function xB({sessionId:e,presence:t,status:n,ended:a}){const s=a||n==="open"&&t==="away",[u,o]=S.useState(void 0),[f,d]=S.useState(!1),[h,b]=S.useState(null);if(S.useEffect(()=>{if(!s||a){o(null);return}let v=!1;return Bc().then(N=>{if(v)return;const w=N.find(O=>O.presence==="listening"&&O.meta.id!==e);o((w==null?void 0:w.meta.id)??null)}).catch(()=>{v||o(null)}),()=>{v=!0}},[s,a,e]),!s)return null;const g=async()=>{if(u){d(!0),b(null);try{await e0(u,e)}catch(v){b(v.message),d(!1)}}},E=!a&&u!==null&&u!==void 0,x=a?"ended":E?"activate":"attach";return T.jsx("div",{"data-testid":"resume-banner","data-mode":x,className:"flex flex-col gap-2 border-amber-500/30 border-b bg-amber-500/10 px-4 py-2.5 text-sm",children:a?T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground",children:"This session has ended. Reattach from your terminal to keep working with its context:"}),T.jsx(px,{sessionId:e})]}):E?T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground",children:"The agent is attending another session."}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(ft,{type:"button",size:"sm",disabled:f,onClick:()=>void g(),children:f?"Activating…":"Activate this session"}),h?T.jsx("span",{className:"text-destructive text-xs",children:h}):null]})]}):T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground",children:"No agent is attending this session. Bring one here from your terminal:"}),T.jsx(px,{sessionId:e})]})})}function px({sessionId:e}){const[t,n]=S.useState(!1),a=`chamba attach ${e}`,s=async()=>{try{await navigator.clipboard.writeText(a),n(!0)}catch{n(!1)}};return T.jsxs("div",{className:"flex items-center gap-2 rounded-md border bg-background p-1.5",children:[T.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:a}),T.jsx(ft,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Copy command",onClick:()=>void s(),children:t?T.jsx(zc,{}):T.jsx(t0,{})})]})}function TB({sessionId:e,events:t,ended:n,presence:a,status:s,loadError:u,onSend:o,queue:f,sendingQueue:d,queueError:h,onNoteChange:b,onDiscard:g,onDiscardAll:E,onSendBatch:x,composerRef:v}){const N=S.useMemo(()=>{let w=-1;for(const z of t)z.type==="message"&&z.source==="user"&&z.seq>w&&(w=z.seq);const O=new Set;for(const z of t)z.type===zx&&z.seq<w&&O.add(z.id);return O},[t]);return T.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[T.jsx(xB,{sessionId:e,presence:a,status:s,ended:n}),u?T.jsx("div",{className:"border-destructive/40 border-b bg-destructive/10 px-4 py-2 text-destructive text-sm",children:u}):null,T.jsxs(BN,{className:"min-h-0 flex-1",children:[T.jsx(zN,{children:t.length===0?T.jsx(HN,{icon:T.jsx(GA,{className:"size-6"}),title:"No messages yet",description:"Say hello below - your terminal agent is listening."}):t.map(w=>T.jsx(EB,{event:w,sessionId:e,cardAnswered:N.has(w.id),ended:n,onSend:o},w.id))}),T.jsx(UN,{})]}),T.jsx(NN,{queue:f,disabled:n,sending:d,error:h,onNoteChange:b,onDiscard:g,onDiscardAll:E,onSend:x}),T.jsx(PN,{ref:v,sessionId:e,disabled:n,onSend:o})]})}const _B=[{value:"bug",label:"Bug",Icon:wA},{value:"feature",label:"Feature",Icon:qA}];function vB({sessionId:e,onClose:t}){const[n,a]=S.useState("bug"),[s,u]=S.useState(""),[o,f]=S.useState([]),[d,h]=S.useState(!1),[b,g]=S.useState(null),[E,x]=S.useState(null),v=S.useRef(null),N=Pc(D=>{u(q=>q?`${q} ${D}`:D)});S.useEffect(()=>{const D=q=>{q.key==="Escape"&&t()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[t]);const w=async D=>{const q=Array.from(D);if(q.length!==0){h(!0),g(null);try{for(const M of q){const $=await Jm(e,M);f(G=>[...G,$])}}catch(M){g(M.message)}finally{h(!1)}}},O=async()=>{const D=s.trim();if(!(!D||d)){h(!0),g(null);try{const q=await dA(e,{type:n,text:D,...o.length>0?{screenshotAttachmentIds:o.map(M=>M.id)}:{}});x(q)}catch(q){g(q.message)}finally{h(!1)}}},z=D=>{D.clipboardData.files.length>0&&(D.preventDefault(),w(D.clipboardData.files))},U=D=>{D.preventDefault(),D.dataTransfer.files.length>0&&w(D.dataTransfer.files)};return T.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",onClick:D=>{D.target===D.currentTarget&&t()},children:T.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":"Report an issue",className:"flex w-full max-w-md flex-col gap-4 rounded-lg border bg-background p-5 shadow-lg",children:[T.jsxs("div",{className:"flex items-center justify-between",children:[T.jsx("h2",{className:"font-semibold text-sm",children:"Report an issue"}),T.jsx(ft,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:t,children:T.jsx(pc,{})})]}),E?T.jsx(SB,{result:E,onClose:t}):T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"flex items-center rounded-md border p-0.5",role:"toolbar","aria-label":"Issue type",children:_B.map(({value:D,label:q,Icon:M})=>T.jsxs("button",{type:"button","aria-pressed":n===D,onClick:()=>a(D),className:`flex flex-1 items-center justify-center gap-1.5 rounded-sm px-3 py-1.5 text-sm transition-colors ${n===D?"bg-accent text-accent-foreground":"text-muted-foreground hover:text-foreground"}`,children:[T.jsx(M,{className:"size-4"}),q]},D))}),T.jsx("div",{onDrop:U,onDragOver:D=>D.preventDefault(),children:T.jsx("textarea",{value:s,onChange:D=>u(D.target.value),onPaste:z,placeholder:n==="bug"?"What went wrong? Steps, what you expected, what happened…":"What would you like chamba to do?",rows:5,autoFocus:!0,className:"w-full resize-none rounded-md border bg-background px-3 py-2 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"})}),o.length>0?T.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(D=>T.jsxs("span",{className:"inline-flex items-center gap-1 rounded-md border bg-muted px-2 py-1 text-xs",children:[D.name,T.jsx("button",{type:"button","aria-label":`Remove ${D.name}`,onClick:()=>f(q=>q.filter(M=>M.id!==D.id)),className:"text-muted-foreground hover:text-foreground",children:T.jsx(pc,{className:"size-3"})})]},D.id))}):null,b?T.jsx("div",{className:"text-destructive text-sm",children:b}):null,T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("input",{ref:v,type:"file",multiple:!0,accept:"image/*",className:"hidden",onChange:D=>{D.target.files&&w(D.target.files),D.target.value=""}}),T.jsx(ft,{type:"button",variant:"ghost",size:"icon",disabled:d,"aria-label":"Attach screenshots",onClick:()=>{var D;return(D=v.current)==null?void 0:D.click()},children:T.jsx(n0,{})}),N.supported?T.jsx(ft,{type:"button",variant:N.listening?"default":"ghost",size:"icon","aria-label":N.listening?"Stop dictation":"Start dictation","aria-pressed":N.listening,onClick:N.toggle,children:T.jsx(Hc,{})}):null,T.jsx("div",{className:"flex-1"}),T.jsx(ft,{type:"button",variant:"ghost",size:"sm",onClick:t,children:"Cancel"}),T.jsx(ft,{type:"button",size:"sm",disabled:d||s.trim().length===0,onClick:()=>void O(),children:"Save report"})]})]})]})})}function SB({result:e,onClose:t}){const[n,a]=S.useState(!1),s=async()=>{try{await navigator.clipboard.writeText(e.path),a(!0)}catch{a(!1)}};return T.jsxs("div",{className:"flex flex-col gap-3",children:[T.jsx("p",{className:"text-muted-foreground text-sm",children:"Saved. Hand this folder to an agent in the chamba repo to act on it:"}),T.jsxs("div",{className:"flex items-center gap-2 rounded-md border bg-muted p-2",children:[T.jsx("code",{className:"min-w-0 flex-1 break-all text-xs",children:e.path}),T.jsx(ft,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Copy path",onClick:()=>void s(),children:n?T.jsx(zc,{}):T.jsx(t0,{})})]}),T.jsx("div",{className:"flex justify-end",children:T.jsx(ft,{type:"button",size:"sm",onClick:t,children:"Done"})})]})}function kB({sessionId:e}){const[t,n]=S.useState(null),[a,s]=S.useState(null),u=async o=>{n(o),s(null);try{await hA(e,o)}catch(f){s(f.message),n(null)}};return T.jsx("div",{className:"flex h-full items-center justify-center p-6",children:T.jsxs("div",{className:"w-full max-w-md rounded-lg border p-6 text-center",children:[T.jsx("h2",{className:"font-medium text-base",children:"How will you use this session?"}),T.jsx("p",{className:"mt-1 text-muted-foreground text-sm",children:"Pick once - it sets up this session's surfaces."}),T.jsx("div",{className:"mt-4 flex flex-col gap-2 text-left sm:flex-row",children:l2.map(o=>T.jsxs("button",{type:"button",disabled:t!==null,"data-testid":`kind-chooser-${o.value}`,onClick:()=>void u(o.value),className:Bt("flex-1 rounded-md border px-3 py-3 transition-colors hover:bg-accent/50 disabled:opacity-60",t===o.value&&"border-primary bg-accent"),children:[T.jsx("span",{className:"block font-medium text-sm",children:t===o.value?"Setting up…":o.label}),T.jsx("span",{className:"block text-muted-foreground text-xs",children:o.hint})]},o.value))}),a?T.jsx("p",{className:"mt-3 text-destructive text-xs","data-testid":"kind-chooser-error",children:a}):null]})})}function AB({presence:e,status:t,ended:n}){const{tone:a,label:s,state:u}=CB(e,t,n);return T.jsxs("span",{className:"inline-flex items-center gap-1.5 text-muted-foreground text-sm","data-testid":"presence","data-state":u,children:[T.jsx("span",{className:Bt("size-2 rounded-full",a)}),s]})}function CB(e,t,n){return n?{tone:"bg-muted-foreground",label:"session ended",state:"ended"}:t!=="open"?{tone:"bg-amber-500",label:"reconnecting…",state:"reconnecting"}:e==="working"?{tone:"bg-sky-500 animate-pulse",label:"agent is working…",state:"working"}:e==="listening"?{tone:"bg-emerald-500",label:"agent is here",state:"here"}:{tone:"bg-muted-foreground",label:"agent is away",state:"away"}}function NB({currentId:e,onSwitch:t}){const[n,a]=S.useState(!1),[s,u]=S.useState([]),[o,f]=S.useState(null),d=S.useRef(null);return S.useEffect(()=>{n&&Bc().then(u).catch(h=>f(h.message))},[n]),S.useEffect(()=>{if(!n)return;const h=b=>{var g;(g=d.current)!=null&&g.contains(b.target)||a(!1)};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[n]),T.jsxs("div",{ref:d,className:"relative",children:[T.jsxs(ft,{type:"button",variant:"outline",size:"sm",onClick:()=>a(h=>!h),"aria-haspopup":"listbox","aria-expanded":n,children:["Sessions",T.jsx(LA,{className:"size-3.5"})]}),n?T.jsxs("div",{className:"absolute right-0 z-20 mt-1 max-h-96 w-80 overflow-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md",children:[T.jsx("div",{className:"p-1",children:T.jsx(s2,{onOpen:t})}),T.jsx("div",{className:"my-1 border-t"}),o?T.jsx("div",{className:"px-2 py-1.5 text-destructive text-sm",children:o}):null,s.length===0&&!o?T.jsx("div",{className:"px-2 py-1.5 text-muted-foreground text-sm",children:"No sessions."}):null,s.map(({meta:h,presence:b})=>{const g=h.id===e;return T.jsxs("button",{type:"button",onClick:()=>{a(!1),g||t(h.id)},className:Bt("flex w-full items-center gap-2 rounded-sm px-2 py-1.5 text-left text-sm hover:bg-accent hover:text-accent-foreground",g&&"bg-accent/50"),children:[T.jsx(zc,{className:Bt("size-4 shrink-0",g?"opacity-100":"opacity-0")}),T.jsxs("span",{className:"min-w-0 flex-1",children:[T.jsx("span",{className:"block truncate",children:h.title??h.id}),T.jsxs("span",{className:"block truncate text-muted-foreground text-xs",children:[h.kind??"choosing…",h.status==="ended"?" · read-only":` · agent ${b}`]})]})]},h.id)})]}):null]})}function pv(e,t,n,a){let s="*";if(!a)try{s=new URL(t,window.location.href).origin}catch{}const u=b=>{var g;return(g=e.contentWindow)==null?void 0:g.postMessage(b,s)},o=b=>{if(b.source!==e.contentWindow||s!=="*"&&b.origin!==s)return;const g=b.data;if(!(!g||g.tag!==wh))if(g.t==="ready")n.onReady({react:g.react===!0,url:g.url??t});else if(g.t==="selected"){const E=Wm.safeParse(g.target);if(!E.success)return;n.onSelected(E.data,g.screenshot instanceof Blob?g.screenshot:void 0)}else g.t==="region"&&g.screenshot instanceof Blob&&n.onRegion(g.screenshot)};window.addEventListener("message",o);const f=()=>u({tag:wh,t:"hello"});let d;const h=()=>{f(),d!==void 0&&clearTimeout(d),d=setTimeout(f,400)};return e.addEventListener("load",h),f(),{setMode:b=>u({tag:wh,t:"mode",mode:b}),disconnect:()=>{d!==void 0&&clearTimeout(d),window.removeEventListener("message",o),e.removeEventListener("load",h)}}}const wB={id:"script-tag",label:"Script tag",setupHint:e=>`<script src="${e}"><\/script>`,connect:(e,t,n)=>pv(e,t,n,!1)},RB={id:"sandboxed",label:"Sandboxed",setupHint:e=>`<script src="${e}"><\/script>`,connect:(e,t,n)=>pv(e,t,n,!0)};function gv({provider:e,url:t,srcdoc:n,sandbox:a,reloadKey:s=0,title:u="surface",leading:o,banner:f,onAnnotation:d,onRegionShot:h,onConnectionChange:b}){const g=S.useRef(null),E=S.useRef(null),[x,v]=S.useState("off"),[N,w]=S.useState(!1),[O,z]=S.useState(!1),U=t!==void 0||n!==void 0;S.useEffect(()=>{w(!1),z(!1),v("off");const q=g.current;if(!q||!U)return;const M=e.connect(q,t??"about:srcdoc",{onReady:$=>{w(!0),z($.react)},onSelected:d,onRegion:h});return E.current=M,()=>{M.disconnect(),E.current=null}},[e,t,n,s,U,d,h]),S.useEffect(()=>{b==null||b({connected:N,react:O})},[N,O,b]);const D=q=>{var $;const M=x===q?"off":q;v(M),($=E.current)==null||$.setMode(M)};return T.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[T.jsxs("div",{className:"flex shrink-0 items-center gap-1 border-b px-2 py-1.5",children:[o?T.jsx("div",{className:"flex min-w-0 flex-1 items-center",children:o}):null,T.jsx(ft,{type:"button",size:"icon-sm",variant:x==="annotate"?"default":"ghost",disabled:!N,"aria-pressed":x==="annotate","aria-label":"Annotate elements",title:"Annotate - click elements to comment",onClick:()=>D("annotate"),children:T.jsx(WA,{})}),T.jsx(ft,{type:"button",size:"icon-sm",variant:x==="region"?"default":"ghost",disabled:!N,"aria-pressed":x==="region","aria-label":"Screenshot a region",title:"Screenshot a region into the composer",onClick:()=>D("region"),children:T.jsx(iC,{})}),o?null:T.jsx("div",{className:"flex-1"}),T.jsx(OB,{connected:N,react:O,active:U})]}),f,T.jsx("div",{className:"relative min-h-0 flex-1 bg-muted/30",children:U?T.jsx("iframe",{ref:g,title:u,...t!==void 0?{src:t}:{srcDoc:n},...a?{sandbox:a}:{},className:"h-full w-full border-0 bg-background"},`${t??"srcdoc"}::${s}`):null})]})}function OB({connected:e,react:t,active:n}){return n?T.jsxs("span",{className:"flex items-center gap-1.5 pr-1 text-muted-foreground text-xs","data-testid":"surface-connection","data-connected":e,"data-react":t,children:[T.jsx("span",{className:Bt("size-2 rounded-full",e?"bg-emerald-500":"bg-muted-foreground/40")}),e?t?"React":"connected":"connecting"]}):null}const im=wB,LB=1500;function gx(e){try{return localStorage.getItem(e)??""}catch{return""}}function DB({storageKey:e,onAnnotation:t,onRegionShot:n,onRequestSetup:a}){const[s,u]=S.useState(()=>gx(e)),[o,f]=S.useState(()=>gx(e)),[d,h]=S.useState(0),[b,g]=S.useState(!1),[E,x]=S.useState(!1),[v,N]=S.useState(!1),[w,O]=S.useState(!1),z=S.useCallback(de=>{g(de.connected)},[]);S.useEffect(()=>{if(!o||b){x(!1);return}const de=setTimeout(()=>x(!0),LB);return()=>clearTimeout(de)},[o,d,b]);const U=de=>{de.preventDefault();const F=s.trim();if(F){try{localStorage.setItem(e,F)}catch{}f(F),h(oe=>oe+1)}},D=()=>h(de=>de+1),q=()=>{a(),O(!0),setTimeout(()=>O(!1),2500)},M=async()=>{try{await navigator.clipboard.writeText(im.setupHint(Em())),N(!0),setTimeout(()=>N(!1),1500)}catch{}},$=T.jsxs("form",{onSubmit:U,className:"flex min-w-0 flex-1 items-center gap-2",children:[T.jsx("input",{value:s,onChange:de=>u(de.target.value),placeholder:"http://localhost:3000",className:"min-w-0 flex-1 rounded-md border bg-background px-2.5 py-1.5 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring"}),T.jsx(ft,{type:"submit",size:"sm",variant:"secondary",children:"Load"}),o?T.jsx(ft,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Reload app",onClick:D,children:T.jsx(rC,{})}):null]}),G=E?T.jsxs("div",{className:"shrink-0 border-amber-500/40 border-b bg-amber-500/10 px-3 py-2 text-xs",children:[T.jsxs("div",{className:"mb-2 flex items-center justify-between gap-2",children:[T.jsx("p",{className:"min-w-0 text-muted-foreground",children:"Annotation layer not detected."}),T.jsx(ft,{type:"button",size:"sm",variant:"secondary",className:"shrink-0",onClick:q,children:"Ask the agent to set this up"})]}),w?T.jsx("p",{className:"text-muted-foreground",children:"Asked - see the conversation."}):T.jsxs(T.Fragment,{children:[T.jsx("p",{className:"mb-1 text-muted-foreground",children:"Or add this tag to your dev app yourself:"}),T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("code",{className:"min-w-0 flex-1 truncate rounded bg-muted px-2 py-1 font-mono",children:im.setupHint(Em())}),T.jsx(ft,{type:"button",size:"icon-sm",variant:"ghost","aria-label":"Copy script tag",onClick:M,children:T.jsx(t0,{})}),v?T.jsx("span",{className:"text-muted-foreground",children:"copied"}):null]})]})]}):null;return T.jsx("div",{className:"flex h-full min-h-0 flex-col",children:o?T.jsx(gv,{provider:im,url:o,reloadKey:d,title:"Your app",leading:$,banner:G,onAnnotation:t,onRegionShot:n,onConnectionChange:z}):T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"flex shrink-0 items-center gap-2 border-b px-2 py-1.5",children:$}),T.jsx("div",{className:"flex flex-1 items-center justify-center p-8 text-center",children:T.jsxs("div",{className:"space-y-1",children:[T.jsx("h3",{className:"font-medium text-sm",children:"Your app"}),T.jsx("p",{className:"text-muted-foreground text-sm",children:"Enter your dev server URL above to point at the running app and annotate it."})]})})]})})}const IB={draft:"The draft spec will build here as the agent writes it.",mock:"Agent-authored HTML mocks will appear here, annotatable like the app.",diagram:"Mermaid diagrams the agent draws will render here."};let MB=0;function BB({sessionId:e,kind:t,artifacts:n,onAnnotation:a,onRegionShot:s}){const[u]=f2(),[o,f]=S.useState(null),d=S.useMemo(()=>n.find(v=>v.ref.name===o)??n[0],[n,o]),h=d?zB(d.ref.relPath):"",b=d?`${d.ref.name}:${d.rev}`:"none",[g,E]=S.useState(void 0);if(S.useEffect(()=>{if(t!=="diagram"||!d){E(void 0);return}let v=!1;return E(void 0),(async()=>{try{const N=await gA(e,h),w=await HB(N,u);v||E(bx(w,u))}catch(N){v||E(bx(`<pre>${UB(String(N))}</pre>`,u))}})(),()=>{v=!0}},[t,e,h,b,d,u]),!d)return T.jsx("div",{className:"flex h-full flex-1 items-center justify-center p-8 text-center",children:T.jsxs("div",{className:"space-y-1",children:[T.jsx("h3",{className:"font-medium text-sm capitalize",children:t}),T.jsx("p",{className:"text-muted-foreground text-sm",children:IB[t]})]})});const x=t==="diagram"&&g===void 0;return T.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[n.length>1?T.jsxs("div",{className:"flex shrink-0 items-center gap-2 border-b px-2 py-1.5",children:[T.jsx("span",{className:"text-muted-foreground text-xs",children:t}),T.jsx("select",{value:d.ref.name,onChange:v=>f(v.target.value),className:"min-w-0 flex-1 rounded-md border bg-background px-2 py-1 text-sm outline-none focus-visible:ring-1 focus-visible:ring-ring",children:n.map(v=>T.jsx("option",{value:v.ref.name,children:v.ref.name},v.ref.name))})]}):null,x?T.jsx("div",{className:"flex flex-1 items-center justify-center p-8 text-center",children:T.jsx("p",{className:"text-muted-foreground text-sm",children:"Rendering diagram…"})}):T.jsx(gv,{provider:RB,sandbox:"allow-scripts",reloadKey:b,title:`${t}: ${d.ref.name}`,...t==="diagram"?{srcdoc:g}:{url:qx(e,h)},onAnnotation:a,onRegionShot:s})]})}function zB(e){return e.split("/").pop()??e}async function HB(e,t){const n=(await u0(async()=>{const{default:s}=await import("./mermaid.core-bOV5iNX_.js").then(u=>u.bp);return{default:s}},[])).default;n.initialize({startOnLoad:!1,theme:t==="dark"?"dark":"default",securityLevel:"strict"});const{svg:a}=await n.render(`chamba-mmd-${++MB}`,e);return a}function bx(e,t){return`<!doctype html>
335
- <html lang="en">
336
- <head>
337
- <meta charset="utf-8" />
338
- <style>
339
- :root { color-scheme: ${t}; }
340
- body { margin: 0; padding: 1.5rem; display: flex; justify-content: center;
341
- font-family: system-ui, -apple-system, sans-serif; }
342
- svg { max-width: 100%; height: auto; }
343
- pre { white-space: pre-wrap; color: #b91c1c; }
344
- </style>
345
- </head>
346
- <body>
347
- ${e}
348
- <script src="${Em()}"><\/script>
349
- </body>
350
- </html>`}function UB(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}const PB={everyday:["Your app"],spec:["Draft","Mock","Diagram","Your app"]},jB={Draft:"draft",Mock:"mock",Diagram:"diagram"};function FB({kind:e,sessionId:t,events:n,onAnnotation:a,onRegionShot:s,onRequestSetup:u}){const o=PB[e],[f,d]=S.useState(e==="spec"?"Draft":o[0]??"Your app"),h=S.useMemo(()=>qB(n),[n]),b=jB[f];return T.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[T.jsx("div",{className:"flex shrink-0 items-center gap-1 border-b px-2 py-1.5",role:"tablist",children:o.map(g=>T.jsx("button",{type:"button",role:"tab","aria-selected":g===f,"data-testid":`surface-tab-${g.replace(/\s+/g,"-").toLowerCase()}`,onClick:()=>d(g),className:Bt("rounded-md px-3 py-1.5 text-sm transition-colors",g===f?"bg-secondary text-secondary-foreground":"text-muted-foreground hover:bg-accent hover:text-accent-foreground"),children:g},g))}),f==="Your app"||!b?T.jsx(DB,{storageKey:`chamba:appurl:${t}`,onAnnotation:a,onRegionShot:s,onRequestSetup:u}):T.jsx(BB,{sessionId:t,kind:b,artifacts:h[b],onAnnotation:a,onRegionShot:s})]})}function qB(e){var a;const t=new Map;for(const s of e){if(s.type!==Hx)continue;const u=Px.safeParse((a=s.payload)==null?void 0:a.artifact);u.success&&t.set(`${u.data.kind}:${u.data.name}`,{ref:u.data,rev:s.seq})}const n={draft:[],mock:[],diagram:[]};for(const s of t.values())n[s.ref.kind].push(s);for(const s of Object.values(n))s.sort((u,o)=>o.rev-u.rev);return n}const rf=S.createContext(null);rf.displayName="PanelGroupContext";const Mt={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Q0=10,Ti=S.useLayoutEffect,yx=Ox.useId,YB=typeof yx=="function"?yx:()=>null;let $B=0;function X0(e=null){const t=YB(),n=S.useRef(e||t||null);return n.current===null&&(n.current=""+$B++),e??n.current}function bv({children:e,className:t="",collapsedSize:n,collapsible:a,defaultSize:s,forwardedRef:u,id:o,maxSize:f,minSize:d,onCollapse:h,onExpand:b,onResize:g,order:E,style:x,tagName:v="div",...N}){const w=S.useContext(rf);if(w===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:O,expandPanel:z,getPanelSize:U,getPanelStyle:D,groupId:q,isPanelCollapsed:M,reevaluatePanelConstraints:$,registerPanel:G,resizePanel:de,unregisterPanel:F}=w,oe=X0(o),ce=S.useRef({callbacks:{onCollapse:h,onExpand:b,onResize:g},constraints:{collapsedSize:n,collapsible:a,defaultSize:s,maxSize:f,minSize:d},id:oe,idIsFromProps:o!==void 0,order:E});S.useRef({didLogMissingDefaultSizeWarning:!1}),Ti(()=>{const{callbacks:pe,constraints:ae}=ce.current,P={...ae};ce.current.id=oe,ce.current.idIsFromProps=o!==void 0,ce.current.order=E,pe.onCollapse=h,pe.onExpand=b,pe.onResize=g,ae.collapsedSize=n,ae.collapsible=a,ae.defaultSize=s,ae.maxSize=f,ae.minSize=d,(P.collapsedSize!==ae.collapsedSize||P.collapsible!==ae.collapsible||P.maxSize!==ae.maxSize||P.minSize!==ae.minSize)&&$(ce.current,P)}),Ti(()=>{const pe=ce.current;return G(pe),()=>{F(pe)}},[E,oe,G,F]),S.useImperativeHandle(u,()=>({collapse:()=>{O(ce.current)},expand:pe=>{z(ce.current,pe)},getId(){return oe},getSize(){return U(ce.current)},isCollapsed(){return M(ce.current)},isExpanded(){return!M(ce.current)},resize:pe=>{de(ce.current,pe)}}),[O,z,U,M,oe,de]);const we=D(ce.current,s);return S.createElement(v,{...N,children:e,className:t,id:oe,style:{...we,...x},[Mt.groupId]:q,[Mt.panel]:"",[Mt.panelCollapsible]:a||void 0,[Mt.panelId]:oe,[Mt.panelSize]:parseFloat(""+we.flexGrow).toFixed(1)})}const yv=S.forwardRef((e,t)=>S.createElement(bv,{...e,forwardedRef:t}));bv.displayName="Panel";yv.displayName="forwardRef(Panel)";let Gm=null,ac=-1,Ma=null;function VB(e,t,n){const a=(t&vv)!==0,s=(t&Sv)!==0,u=(t&kv)!==0,o=(t&Av)!==0;if(t){if(a)return u?"se-resize":o?"ne-resize":"e-resize";if(s)return u?"sw-resize":o?"nw-resize":"w-resize";if(u)return"s-resize";if(o)return"n-resize"}switch(e){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function GB(){Ma!==null&&(document.head.removeChild(Ma),Gm=null,Ma=null,ac=-1)}function lm(e,t,n){var a,s;const u=VB(e,t);if(Gm!==u){if(Gm=u,Ma===null&&(Ma=document.createElement("style"),document.head.appendChild(Ma)),ac>=0){var o;(o=Ma.sheet)===null||o===void 0||o.removeRule(ac)}ac=(a=(s=Ma.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${u} !important;}`))!==null&&a!==void 0?a:-1}}function Ev(e){return e.type==="keydown"}function xv(e){return e.type.startsWith("pointer")}function Tv(e){return e.type.startsWith("mouse")}function af(e){if(xv(e)){if(e.isPrimary)return{x:e.clientX,y:e.clientY}}else if(Tv(e))return{x:e.clientX,y:e.clientY};return{x:1/0,y:1/0}}function QB(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function XB(e,t,n){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function ZB(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:Tx(e),b:Tx(t)};let a;for(;n.a.at(-1)===n.b.at(-1);)e=n.a.pop(),t=n.b.pop(),a=e;qe(a,"Stacking order can only be calculated for elements with a common ancestor");const s={a:xx(Ex(n.a)),b:xx(Ex(n.b))};if(s.a===s.b){const u=a.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let f=u.length;for(;f--;){const d=u[f];if(d===o.a)return 1;if(d===o.b)return-1}}return Math.sign(s.a-s.b)}const KB=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function WB(e){var t;const n=getComputedStyle((t=_v(e))!==null&&t!==void 0?t:e).display;return n==="flex"||n==="inline-flex"}function JB(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||WB(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||KB.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function Ex(e){let t=e.length;for(;t--;){const n=e[t];if(qe(n,"Missing node"),JB(n))return n}return null}function xx(e){return e&&Number(getComputedStyle(e).zIndex)||0}function Tx(e){const t=[];for(;e;)t.push(e),e=_v(e);return t}function _v(e){const{parentNode:t}=e;return t&&t instanceof ShadowRoot?t.host:t}const vv=1,Sv=2,kv=4,Av=8,ez=QB()==="coarse";let hr=[],Nl=!1,Ba=new Map,lf=new Map;const mu=new Set;function tz(e,t,n,a,s){var u;const{ownerDocument:o}=t,f={direction:n,element:t,hitAreaMargins:a,setResizeHandlerState:s},d=(u=Ba.get(o))!==null&&u!==void 0?u:0;return Ba.set(o,d+1),mu.add(f),Nc(),function(){var b;lf.delete(e),mu.delete(f);const g=(b=Ba.get(o))!==null&&b!==void 0?b:1;if(Ba.set(o,g-1),Nc(),g===1&&Ba.delete(o),hr.includes(f)){const E=hr.indexOf(f);E>=0&&hr.splice(E,1),sf(),s("up",!0,null)}}}function nz(e){const{target:t}=e,{x:n,y:a}=af(e);Nl=!0,Z0({target:t,x:n,y:a}),Nc(),hr.length>0&&(wc("down",e),sf(),e.preventDefault(),Cv(t)||e.stopImmediatePropagation())}function sm(e){const{x:t,y:n}=af(e);if(Nl&&e.type!=="pointerleave"&&e.buttons===0&&(Nl=!1,wc("up",e)),!Nl){const{target:a}=e;Z0({target:a,x:t,y:n})}wc("move",e),sf(),hr.length>0&&e.preventDefault()}function um(e){const{target:t}=e,{x:n,y:a}=af(e);lf.clear(),Nl=!1,hr.length>0&&(e.preventDefault(),Cv(t)||e.stopImmediatePropagation()),wc("up",e),Z0({target:t,x:n,y:a}),sf(),Nc()}function Cv(e){let t=e;for(;t;){if(t.hasAttribute(Mt.resizeHandle))return!0;t=t.parentElement}return!1}function Z0({target:e,x:t,y:n}){hr.splice(0);let a=null;(e instanceof HTMLElement||e instanceof SVGElement)&&(a=e),mu.forEach(s=>{const{element:u,hitAreaMargins:o}=s,f=u.getBoundingClientRect(),{bottom:d,left:h,right:b,top:g}=f,E=ez?o.coarse:o.fine;if(t>=h-E&&t<=b+E&&n>=g-E&&n<=d+E){if(a!==null&&document.contains(a)&&u!==a&&!u.contains(a)&&!a.contains(u)&&ZB(a,u)>0){let v=a,N=!1;for(;v&&!v.contains(u);){if(XB(v.getBoundingClientRect(),f)){N=!0;break}v=v.parentElement}if(N)return}hr.push(s)}})}function om(e,t){lf.set(e,t)}function sf(){let e=!1,t=!1;hr.forEach(a=>{const{direction:s}=a;s==="horizontal"?e=!0:t=!0});let n=0;lf.forEach(a=>{n|=a}),e&&t?lm("intersection",n):e?lm("horizontal",n):t?lm("vertical",n):GB()}let cm;function Nc(){var e;(e=cm)===null||e===void 0||e.abort(),cm=new AbortController;const t={capture:!0,signal:cm.signal};mu.size&&(Nl?(hr.length>0&&Ba.forEach((n,a)=>{const{body:s}=a;n>0&&(s.addEventListener("contextmenu",um,t),s.addEventListener("pointerleave",sm,t),s.addEventListener("pointermove",sm,t))}),Ba.forEach((n,a)=>{const{body:s}=a;s.addEventListener("pointerup",um,t),s.addEventListener("pointercancel",um,t)})):Ba.forEach((n,a)=>{const{body:s}=a;n>0&&(s.addEventListener("pointerdown",nz,t),s.addEventListener("pointermove",sm,t))}))}function wc(e,t){mu.forEach(n=>{const{setResizeHandlerState:a}=n,s=hr.includes(n);a(e,s,t)})}function rz(){const[e,t]=S.useState(0);return S.useCallback(()=>t(n=>n+1),[])}function qe(e,t){if(!e)throw console.error(t),Error(t)}function wi(e,t,n=Q0){return e.toFixed(n)===t.toFixed(n)?0:e>t?1:-1}function Kr(e,t,n=Q0){return wi(e,t,n)===0}function jn(e,t,n){return wi(e,t,n)===0}function az(e,t,n){if(e.length!==t.length)return!1;for(let a=0;a<e.length;a++){const s=e[a],u=t[a];if(!jn(s,u,n))return!1}return!0}function Al({panelConstraints:e,panelIndex:t,size:n}){const a=e[t];qe(a!=null,`Panel constraints not found for index ${t}`);let{collapsedSize:s=0,collapsible:u,maxSize:o=100,minSize:f=0}=a;if(wi(n,f)<0)if(u){const d=(s+f)/2;wi(n,d)<0?n=s:n=f}else n=f;return n=Math.min(o,n),n=parseFloat(n.toFixed(Q0)),n}function Zs({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:a,prevLayout:s,trigger:u}){if(jn(e,0))return t;const o=[...t],[f,d]=a;qe(f!=null,"Invalid first pivot index"),qe(d!=null,"Invalid second pivot index");let h=0;if(u==="keyboard"){{const g=e<0?d:f,E=n[g];qe(E,`Panel constraints not found for index ${g}`);const{collapsedSize:x=0,collapsible:v,minSize:N=0}=E;if(v){const w=t[g];if(qe(w!=null,`Previous layout not found for panel index ${g}`),jn(w,x)){const O=N-w;wi(O,Math.abs(e))>0&&(e=e<0?0-O:O)}}}{const g=e<0?f:d,E=n[g];qe(E,`No panel constraints found for index ${g}`);const{collapsedSize:x=0,collapsible:v,minSize:N=0}=E;if(v){const w=t[g];if(qe(w!=null,`Previous layout not found for panel index ${g}`),jn(w,N)){const O=w-x;wi(O,Math.abs(e))>0&&(e=e<0?0-O:O)}}}}{const g=e<0?1:-1;let E=e<0?d:f,x=0;for(;;){const N=t[E];qe(N!=null,`Previous layout not found for panel index ${E}`);const O=Al({panelConstraints:n,panelIndex:E,size:100})-N;if(x+=O,E+=g,E<0||E>=n.length)break}const v=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-v:v}{let E=e<0?f:d;for(;E>=0&&E<n.length;){const x=Math.abs(e)-Math.abs(h),v=t[E];qe(v!=null,`Previous layout not found for panel index ${E}`);const N=v-x,w=Al({panelConstraints:n,panelIndex:E,size:N});if(!jn(v,w)&&(h+=v-w,o[E]=w,h.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?E--:E++}}if(az(s,o))return s;{const g=e<0?d:f,E=t[g];qe(E!=null,`Previous layout not found for panel index ${g}`);const x=E+h,v=Al({panelConstraints:n,panelIndex:g,size:x});if(o[g]=v,!jn(v,x)){let N=x-v,O=e<0?d:f;for(;O>=0&&O<n.length;){const z=o[O];qe(z!=null,`Previous layout not found for panel index ${O}`);const U=z+N,D=Al({panelConstraints:n,panelIndex:O,size:U});if(jn(z,D)||(N-=D-z,o[O]=D),jn(N,0))break;e>0?O--:O++}}}const b=o.reduce((g,E)=>E+g,0);return jn(b,100)?o:s}function iz({layout:e,panelsArray:t,pivotIndices:n}){let a=0,s=100,u=0,o=0;const f=n[0];qe(f!=null,"No pivot index found"),t.forEach((g,E)=>{const{constraints:x}=g,{maxSize:v=100,minSize:N=0}=x;E===f?(a=N,s=v):(u+=N,o+=v)});const d=Math.min(s,100-u),h=Math.max(a,100-o),b=e[f];return{valueMax:d,valueMin:h,valueNow:b}}function pu(e,t=document){return Array.from(t.querySelectorAll(`[${Mt.resizeHandleId}][data-panel-group-id="${e}"]`))}function Nv(e,t,n=document){const s=pu(e,n).findIndex(u=>u.getAttribute(Mt.resizeHandleId)===t);return s??null}function wv(e,t,n){const a=Nv(e,t,n);return a!=null?[a,a+1]:[-1,-1]}function lz(e){return e instanceof HTMLElement?!0:typeof e=="object"&&e!==null&&"tagName"in e&&"getAttribute"in e}function Rv(e,t=document){if(lz(t)&&t.dataset.panelGroupId==e)return t;const n=t.querySelector(`[data-panel-group][data-panel-group-id="${e}"]`);return n||null}function uf(e,t=document){const n=t.querySelector(`[${Mt.resizeHandleId}="${e}"]`);return n||null}function sz(e,t,n,a=document){var s,u,o,f;const d=uf(t,a),h=pu(e,a),b=d?h.indexOf(d):-1,g=(s=(u=n[b])===null||u===void 0?void 0:u.id)!==null&&s!==void 0?s:null,E=(o=(f=n[b+1])===null||f===void 0?void 0:f.id)!==null&&o!==void 0?o:null;return[g,E]}function uz({committedValuesRef:e,eagerValuesRef:t,groupId:n,layout:a,panelDataArray:s,panelGroupElement:u,setLayout:o}){S.useRef({didWarnAboutMissingResizeHandle:!1}),Ti(()=>{if(!u)return;const f=pu(n,u);for(let d=0;d<s.length-1;d++){const{valueMax:h,valueMin:b,valueNow:g}=iz({layout:a,panelsArray:s,pivotIndices:[d,d+1]}),E=f[d];if(E!=null){const x=s[d];qe(x,`No panel data found for index "${d}"`),E.setAttribute("aria-controls",x.id),E.setAttribute("aria-valuemax",""+Math.round(h)),E.setAttribute("aria-valuemin",""+Math.round(b)),E.setAttribute("aria-valuenow",g!=null?""+Math.round(g):"")}}return()=>{f.forEach((d,h)=>{d.removeAttribute("aria-controls"),d.removeAttribute("aria-valuemax"),d.removeAttribute("aria-valuemin"),d.removeAttribute("aria-valuenow")})}},[n,a,s,u]),S.useEffect(()=>{if(!u)return;const f=t.current;qe(f,"Eager values not found");const{panelDataArray:d}=f,h=Rv(n,u);qe(h!=null,`No group found for id "${n}"`);const b=pu(n,u);qe(b,`No resize handles found for group id "${n}"`);const g=b.map(E=>{const x=E.getAttribute(Mt.resizeHandleId);qe(x,"Resize handle element has no handle id attribute");const[v,N]=sz(n,x,d,u);if(v==null||N==null)return()=>{};const w=O=>{if(!O.defaultPrevented)switch(O.key){case"Enter":{O.preventDefault();const z=d.findIndex(U=>U.id===v);if(z>=0){const U=d[z];qe(U,`No panel data found for index ${z}`);const D=a[z],{collapsedSize:q=0,collapsible:M,minSize:$=0}=U.constraints;if(D!=null&&M){const G=Zs({delta:jn(D,q)?$-q:q-D,initialLayout:a,panelConstraints:d.map(de=>de.constraints),pivotIndices:wv(n,x,u),prevLayout:a,trigger:"keyboard"});a!==G&&o(G)}}break}}};return E.addEventListener("keydown",w),()=>{E.removeEventListener("keydown",w)}});return()=>{g.forEach(E=>E())}},[u,e,t,n,a,s,o])}function _x(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Ov(e,t){const n=e==="horizontal",{x:a,y:s}=af(t);return n?a:s}function oz(e,t,n,a,s){const u=n==="horizontal",o=uf(t,s);qe(o,`No resize handle element found for id "${t}"`);const f=o.getAttribute(Mt.groupId);qe(f,"Resize handle element has no group id attribute");let{initialCursorPosition:d}=a;const h=Ov(n,e),b=Rv(f,s);qe(b,`No group element found for id "${f}"`);const g=b.getBoundingClientRect(),E=u?g.width:g.height;return(h-d)/E*100}function cz(e,t,n,a,s,u){if(Ev(e)){const o=n==="horizontal";let f=0;e.shiftKey?f=100:s!=null?f=s:f=10;let d=0;switch(e.key){case"ArrowDown":d=o?0:f;break;case"ArrowLeft":d=o?-f:0;break;case"ArrowRight":d=o?f:0;break;case"ArrowUp":d=o?0:-f;break;case"End":d=100;break;case"Home":d=-100;break}return d}else return a==null?0:oz(e,t,n,a,u)}function fz({panelDataArray:e}){const t=Array(e.length),n=e.map(u=>u.constraints);let a=0,s=100;for(let u=0;u<e.length;u++){const o=n[u];qe(o,`Panel constraints not found for index ${u}`);const{defaultSize:f}=o;f!=null&&(a++,t[u]=f,s-=f)}for(let u=0;u<e.length;u++){const o=n[u];qe(o,`Panel constraints not found for index ${u}`);const{defaultSize:f}=o;if(f!=null)continue;const d=e.length-a,h=s/d;a++,t[u]=h,s-=h}return t}function xl(e,t,n){t.forEach((a,s)=>{const u=e[s];qe(u,`Panel data not found for index ${s}`);const{callbacks:o,constraints:f,id:d}=u,{collapsedSize:h=0,collapsible:b}=f,g=n[d];if(g==null||a!==g){n[d]=a;const{onCollapse:E,onExpand:x,onResize:v}=o;v&&v(a,g),b&&(E||x)&&(x&&(g==null||Kr(g,h))&&!Kr(a,h)&&x(),E&&(g==null||!Kr(g,h))&&Kr(a,h)&&E())}})}function Wo(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function dz({defaultSize:e,dragState:t,layout:n,panelData:a,panelIndex:s,precision:u=3}){const o=n[s];let f;return o==null?f=e!=null?e.toFixed(u):"1":a.length===1?f="1":f=o.toFixed(u),{flexBasis:0,flexGrow:f,flexShrink:1,overflow:"hidden",pointerEvents:t!==null?"none":void 0}}function hz(e,t=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)}}function vx(e){try{if(typeof localStorage<"u")e.getItem=t=>localStorage.getItem(t),e.setItem=(t,n)=>{localStorage.setItem(t,n)};else throw new Error("localStorage not supported in this environment")}catch(t){console.error(t),e.getItem=()=>null,e.setItem=()=>{}}}function Lv(e){return`react-resizable-panels:${e}`}function Dv(e){return e.map(t=>{const{constraints:n,id:a,idIsFromProps:s,order:u}=t;return s?a:u?`${u}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((t,n)=>t.localeCompare(n)).join(",")}function Iv(e,t){try{const n=Lv(e),a=t.getItem(n);if(a){const s=JSON.parse(a);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function mz(e,t,n){var a,s;const u=(a=Iv(e,n))!==null&&a!==void 0?a:{},o=Dv(t);return(s=u[o])!==null&&s!==void 0?s:null}function pz(e,t,n,a,s){var u;const o=Lv(e),f=Dv(t),d=(u=Iv(e,s))!==null&&u!==void 0?u:{};d[f]={expandToSizes:Object.fromEntries(n.entries()),layout:a};try{s.setItem(o,JSON.stringify(d))}catch(h){console.error(h)}}function Sx({layout:e,panelConstraints:t}){const n=[...e],a=n.reduce((u,o)=>u+o,0);if(n.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${n.map(u=>`${u}%`).join(", ")}`);if(!jn(a,100)&&n.length>0)for(let u=0;u<t.length;u++){const o=n[u];qe(o!=null,`No layout data found for index ${u}`);const f=100/a*o;n[u]=f}let s=0;for(let u=0;u<t.length;u++){const o=n[u];qe(o!=null,`No layout data found for index ${u}`);const f=Al({panelConstraints:t,panelIndex:u,size:o});o!=f&&(s+=o-f,n[u]=f)}if(!jn(s,0))for(let u=0;u<t.length;u++){const o=n[u];qe(o!=null,`No layout data found for index ${u}`);const f=o+s,d=Al({panelConstraints:t,panelIndex:u,size:f});if(o!==d&&(s-=d-o,n[u]=d,jn(s,0)))break}return n}const gz=100,Ks={getItem:e=>(vx(Ks),Ks.getItem(e)),setItem:(e,t)=>{vx(Ks),Ks.setItem(e,t)}},kx={};function Mv({autoSaveId:e=null,children:t,className:n="",direction:a,forwardedRef:s,id:u=null,onLayout:o=null,keyboardResizeBy:f=null,storage:d=Ks,style:h,tagName:b="div",...g}){const E=X0(u),x=S.useRef(null),[v,N]=S.useState(null),[w,O]=S.useState([]),z=rz(),U=S.useRef({}),D=S.useRef(new Map),q=S.useRef(0),M=S.useRef({autoSaveId:e,direction:a,dragState:v,id:E,keyboardResizeBy:f,onLayout:o,storage:d}),$=S.useRef({layout:w,panelDataArray:[],panelDataArrayChanged:!1});S.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),S.useImperativeHandle(s,()=>({getId:()=>M.current.id,getLayout:()=>{const{layout:A}=$.current;return A},setLayout:A=>{const{onLayout:ee}=M.current,{layout:se,panelDataArray:ie}=$.current,he=Sx({layout:A,panelConstraints:ie.map(_e=>_e.constraints)});_x(se,he)||(O(he),$.current.layout=he,ee&&ee(he),xl(ie,he,U.current))}}),[]),Ti(()=>{M.current.autoSaveId=e,M.current.direction=a,M.current.dragState=v,M.current.id=E,M.current.onLayout=o,M.current.storage=d}),uz({committedValuesRef:M,eagerValuesRef:$,groupId:E,layout:w,panelDataArray:$.current.panelDataArray,setLayout:O,panelGroupElement:x.current}),S.useEffect(()=>{const{panelDataArray:A}=$.current;if(e){if(w.length===0||w.length!==A.length)return;let ee=kx[e];ee==null&&(ee=hz(pz,gz),kx[e]=ee);const se=[...A],ie=new Map(D.current);ee(e,se,ie,w,d)}},[e,w,d]),S.useEffect(()=>{});const G=S.useCallback(A=>{const{onLayout:ee}=M.current,{layout:se,panelDataArray:ie}=$.current;if(A.constraints.collapsible){const he=ie.map(_t=>_t.constraints),{collapsedSize:_e=0,panelSize:Ee,pivotIndices:Ye}=mi(ie,A,se);if(qe(Ee!=null,`Panel size not found for panel "${A.id}"`),!Kr(Ee,_e)){D.current.set(A.id,Ee);const wt=vl(ie,A)===ie.length-1?Ee-_e:_e-Ee,rt=Zs({delta:wt,initialLayout:se,panelConstraints:he,pivotIndices:Ye,prevLayout:se,trigger:"imperative-api"});Wo(se,rt)||(O(rt),$.current.layout=rt,ee&&ee(rt),xl(ie,rt,U.current))}}},[]),de=S.useCallback((A,ee)=>{const{onLayout:se}=M.current,{layout:ie,panelDataArray:he}=$.current;if(A.constraints.collapsible){const _e=he.map(mt=>mt.constraints),{collapsedSize:Ee=0,panelSize:Ye=0,minSize:_t=0,pivotIndices:wt}=mi(he,A,ie),rt=ee??_t;if(Kr(Ye,Ee)){const mt=D.current.get(A.id),dn=mt!=null&&mt>=rt?mt:rt,gr=vl(he,A)===he.length-1?Ye-dn:dn-Ye,Le=Zs({delta:gr,initialLayout:ie,panelConstraints:_e,pivotIndices:wt,prevLayout:ie,trigger:"imperative-api"});Wo(ie,Le)||(O(Le),$.current.layout=Le,se&&se(Le),xl(he,Le,U.current))}}},[]),F=S.useCallback(A=>{const{layout:ee,panelDataArray:se}=$.current,{panelSize:ie}=mi(se,A,ee);return qe(ie!=null,`Panel size not found for panel "${A.id}"`),ie},[]),oe=S.useCallback((A,ee)=>{const{panelDataArray:se}=$.current,ie=vl(se,A);return dz({defaultSize:ee,dragState:v,layout:w,panelData:se,panelIndex:ie})},[v,w]),ce=S.useCallback(A=>{const{layout:ee,panelDataArray:se}=$.current,{collapsedSize:ie=0,collapsible:he,panelSize:_e}=mi(se,A,ee);return qe(_e!=null,`Panel size not found for panel "${A.id}"`),he===!0&&Kr(_e,ie)},[]),we=S.useCallback(A=>{const{layout:ee,panelDataArray:se}=$.current,{collapsedSize:ie=0,collapsible:he,panelSize:_e}=mi(se,A,ee);return qe(_e!=null,`Panel size not found for panel "${A.id}"`),!he||wi(_e,ie)>0},[]),pe=S.useCallback(A=>{const{panelDataArray:ee}=$.current;ee.push(A),ee.sort((se,ie)=>{const he=se.order,_e=ie.order;return he==null&&_e==null?0:he==null?-1:_e==null?1:he-_e}),$.current.panelDataArrayChanged=!0,z()},[z]);Ti(()=>{if($.current.panelDataArrayChanged){$.current.panelDataArrayChanged=!1;const{autoSaveId:A,onLayout:ee,storage:se}=M.current,{layout:ie,panelDataArray:he}=$.current;let _e=null;if(A){const Ye=mz(A,he,se);Ye&&(D.current=new Map(Object.entries(Ye.expandToSizes)),_e=Ye.layout)}_e==null&&(_e=fz({panelDataArray:he}));const Ee=Sx({layout:_e,panelConstraints:he.map(Ye=>Ye.constraints)});_x(ie,Ee)||(O(Ee),$.current.layout=Ee,ee&&ee(Ee),xl(he,Ee,U.current))}}),Ti(()=>{const A=$.current;return()=>{A.layout=[]}},[]);const ae=S.useCallback(A=>{let ee=!1;const se=x.current;return se&&window.getComputedStyle(se,null).getPropertyValue("direction")==="rtl"&&(ee=!0),function(he){he.preventDefault();const _e=x.current;if(!_e)return()=>null;const{direction:Ee,dragState:Ye,id:_t,keyboardResizeBy:wt,onLayout:rt}=M.current,{layout:mt,panelDataArray:dn}=$.current,{initialLayout:hn}=Ye??{},gr=wv(_t,A,_e);let Le=cz(he,A,Ee,Ye,wt,_e);const st=Ee==="horizontal";st&&ee&&(Le=-Le);const jt=dn.map(jl=>jl.constraints),Ft=Zs({delta:Le,initialLayout:hn??mt,panelConstraints:jt,pivotIndices:gr,prevLayout:mt,trigger:Ev(he)?"keyboard":"mouse-or-touch"}),$n=!Wo(mt,Ft);(xv(he)||Tv(he))&&q.current!=Le&&(q.current=Le,!$n&&Le!==0?st?om(A,Le<0?vv:Sv):om(A,Le<0?kv:Av):om(A,0)),$n&&(O(Ft),$.current.layout=Ft,rt&&rt(Ft),xl(dn,Ft,U.current))}},[]),P=S.useCallback((A,ee)=>{const{onLayout:se}=M.current,{layout:ie,panelDataArray:he}=$.current,_e=he.map(mt=>mt.constraints),{panelSize:Ee,pivotIndices:Ye}=mi(he,A,ie);qe(Ee!=null,`Panel size not found for panel "${A.id}"`);const wt=vl(he,A)===he.length-1?Ee-ee:ee-Ee,rt=Zs({delta:wt,initialLayout:ie,panelConstraints:_e,pivotIndices:Ye,prevLayout:ie,trigger:"imperative-api"});Wo(ie,rt)||(O(rt),$.current.layout=rt,se&&se(rt),xl(he,rt,U.current))},[]),ne=S.useCallback((A,ee)=>{const{layout:se,panelDataArray:ie}=$.current,{collapsedSize:he=0,collapsible:_e}=ee,{collapsedSize:Ee=0,collapsible:Ye,maxSize:_t=100,minSize:wt=0}=A.constraints,{panelSize:rt}=mi(ie,A,se);rt!=null&&(_e&&Ye&&Kr(rt,he)?Kr(he,Ee)||P(A,Ee):rt<wt?P(A,wt):rt>_t&&P(A,_t))},[P]),xe=S.useCallback((A,ee)=>{const{direction:se}=M.current,{layout:ie}=$.current;if(!x.current)return;const he=uf(A,x.current);qe(he,`Drag handle element not found for id "${A}"`);const _e=Ov(se,ee);N({dragHandleId:A,dragHandleRect:he.getBoundingClientRect(),initialCursorPosition:_e,initialLayout:ie})},[]),Te=S.useCallback(()=>{N(null)},[]),C=S.useCallback(A=>{const{panelDataArray:ee}=$.current,se=vl(ee,A);se>=0&&(ee.splice(se,1),delete U.current[A.id],$.current.panelDataArrayChanged=!0,z())},[z]),I=S.useMemo(()=>({collapsePanel:G,direction:a,dragState:v,expandPanel:de,getPanelSize:F,getPanelStyle:oe,groupId:E,isPanelCollapsed:ce,isPanelExpanded:we,reevaluatePanelConstraints:ne,registerPanel:pe,registerResizeHandle:ae,resizePanel:P,startDragging:xe,stopDragging:Te,unregisterPanel:C,panelGroupElement:x.current}),[G,v,a,de,F,oe,E,ce,we,ne,pe,ae,P,xe,Te,C]),K={display:"flex",flexDirection:a==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return S.createElement(rf.Provider,{value:I},S.createElement(b,{...g,children:t,className:n,id:u,ref:x,style:{...K,...h},[Mt.group]:"",[Mt.groupDirection]:a,[Mt.groupId]:E}))}const Bv=S.forwardRef((e,t)=>S.createElement(Mv,{...e,forwardedRef:t}));Mv.displayName="PanelGroup";Bv.displayName="forwardRef(PanelGroup)";function vl(e,t){return e.findIndex(n=>n===t||n.id===t.id)}function mi(e,t,n){const a=vl(e,t),u=a===e.length-1?[a-1,a]:[a,a+1],o=n[a];return{...t.constraints,panelSize:o,pivotIndices:u}}function bz({disabled:e,handleId:t,resizeHandler:n,panelGroupElement:a}){S.useEffect(()=>{if(e||n==null||a==null)return;const s=uf(t,a);if(s==null)return;const u=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),n(o);break}case"F6":{o.preventDefault();const f=s.getAttribute(Mt.groupId);qe(f,`No group element found for id "${f}"`);const d=pu(f,a),h=Nv(f,t,a);qe(h!==null,`No resize element found for id "${t}"`);const b=o.shiftKey?h>0?h-1:d.length-1:h+1<d.length?h+1:0;d[b].focus();break}}};return s.addEventListener("keydown",u),()=>{s.removeEventListener("keydown",u)}},[a,e,t,n])}function zv({children:e=null,className:t="",disabled:n=!1,hitAreaMargins:a,id:s,onBlur:u,onClick:o,onDragging:f,onFocus:d,onPointerDown:h,onPointerUp:b,style:g={},tabIndex:E=0,tagName:x="div",...v}){var N,w;const O=S.useRef(null),z=S.useRef({onClick:o,onDragging:f,onPointerDown:h,onPointerUp:b});S.useEffect(()=>{z.current.onClick=o,z.current.onDragging=f,z.current.onPointerDown=h,z.current.onPointerUp=b});const U=S.useContext(rf);if(U===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:D,groupId:q,registerResizeHandle:M,startDragging:$,stopDragging:G,panelGroupElement:de}=U,F=X0(s),[oe,ce]=S.useState("inactive"),[we,pe]=S.useState(!1),[ae,P]=S.useState(null),ne=S.useRef({state:oe});Ti(()=>{ne.current.state=oe}),S.useEffect(()=>{if(n)P(null);else{const I=M(F);P(()=>I)}},[n,F,M]);const xe=(N=a==null?void 0:a.coarse)!==null&&N!==void 0?N:15,Te=(w=a==null?void 0:a.fine)!==null&&w!==void 0?w:5;S.useEffect(()=>{if(n||ae==null)return;const I=O.current;qe(I,"Element ref not attached");let K=!1;return tz(F,I,D,{coarse:xe,fine:Te},(ee,se,ie)=>{if(!se){ce("inactive");return}switch(ee){case"down":{ce("drag"),K=!1,qe(ie,'Expected event to be defined for "down" action'),$(F,ie);const{onDragging:he,onPointerDown:_e}=z.current;he==null||he(!0),_e==null||_e();break}case"move":{const{state:he}=ne.current;K=!0,he!=="drag"&&ce("hover"),qe(ie,'Expected event to be defined for "move" action'),ae(ie);break}case"up":{ce("hover"),G();const{onClick:he,onDragging:_e,onPointerUp:Ee}=z.current;_e==null||_e(!1),Ee==null||Ee(),K||he==null||he();break}}})},[xe,D,n,Te,M,F,ae,$,G]),bz({disabled:n,handleId:F,resizeHandler:ae,panelGroupElement:de});const C={touchAction:"none",userSelect:"none"};return S.createElement(x,{...v,children:e,className:t,id:s,onBlur:()=>{pe(!1),u==null||u()},onFocus:()=>{pe(!0),d==null||d()},ref:O,role:"separator",style:{...C,...g},tabIndex:E,[Mt.groupDirection]:D,[Mt.groupId]:q,[Mt.resizeHandle]:"",[Mt.resizeHandleActive]:oe==="drag"?"pointer":we?"keyboard":void 0,[Mt.resizeHandleEnabled]:!n,[Mt.resizeHandleId]:F,[Mt.resizeHandleState]:oe})}zv.displayName="PanelResizeHandle";const yz=({className:e,...t})=>T.jsx(Bv,{className:Bt("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",e),...t}),Ax=yv,Ez=({withHandle:e,className:t,...n})=>T.jsx(zv,{className:Bt("relative flex w-px items-center justify-center bg-border after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-1 data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),...n,children:e&&T.jsx("div",{className:"z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border",children:T.jsx(jA,{className:"h-2.5 w-2.5"})})}),xz=[{mode:"conversation",label:"Conversation only",Icon:$A},{mode:"split",label:"Split view",Icon:HA},{mode:"surface",label:"Surface only",Icon:kA}],Tz='Can you set up the chamba annotation client in my app? I want to point the "Your app" tab at my dev server and annotate the running app, but the annotation layer is not detected. Please add the annotation script tag to my app dev entry, guarded to dev.';function _z({sessionId:e,onSwitch:t}){const{events:n,meta:a,presence:s,status:u,loadError:o,ended:f,send:d}=_N(e),h=S.useRef(null),b=S.useRef(null),g=S.useRef(null),[E,x]=S.useState(!1),[v,N]=S.useState(!1),[w,O]=S.useState([]),[z,U]=S.useState(!1),[D,q]=S.useState(null),[M,$]=S.useState(!1),G=S.useRef(w);G.current=w,S.useEffect(()=>()=>{for(const Te of G.current)Te.previewUrl&&URL.revokeObjectURL(Te.previewUrl)},[]);const de=S.useCallback((Te,C)=>{const I=C?URL.createObjectURL(C):void 0;O(K=>[...K,{id:ky(),target:Te,note:"",screenshot:C,previewUrl:I}]),q(null)},[]),F=S.useCallback(Te=>{var I;const C=new File([Te],`region-${ky().slice(0,8)}.png`,{type:Te.type||"image/png"});(I=g.current)==null||I.addFiles([C])},[]),oe=S.useCallback((Te,C)=>{O(I=>I.map(K=>K.id===Te?{...K,note:C}:K))},[]),ce=S.useCallback(Te=>{O(C=>{const I=C.find(K=>K.id===Te);return I!=null&&I.previewUrl&&URL.revokeObjectURL(I.previewUrl),C.filter(K=>K.id!==Te)})},[]),we=S.useCallback(()=>{O(Te=>{for(const C of Te)C.previewUrl&&URL.revokeObjectURL(C.previewUrl);return[]})},[]),pe=async()=>{if(!(w.length===0||z||f)){U(!0),q(null);try{const Te=[];for(const C of w){let I;if(C.screenshot){const A=new File([C.screenshot],"annotation.png",{type:C.screenshot.type||"image/png"});I=(await Jm(e,A)).id}const K=C.note.trim();Te.push({...K?{note:K}:{},target:C.target,...I?{screenshotAttachmentId:I}:{}})}await fA(e,{items:Te}),we()}catch(Te){q(Te.message)}finally{U(!1)}}},ae=v&&!E?"conversation":E&&!v?"surface":"split",P=Te=>{const C=h.current,I=b.current;!C||!I||(Te==="conversation"?(C.expand(),I.collapse()):Te==="surface"?(I.expand(),C.collapse()):(C.expand(),I.expand()))},ne=async()=>{try{await mA(e)}catch{}},xe=S.useCallback(()=>{f||d({text:Tz})},[f,d]);return T.jsxs("main",{className:"flex h-full min-h-0 flex-col",children:[T.jsxs("header",{className:"flex shrink-0 items-center gap-3 border-b px-4 py-2",children:[T.jsxs("div",{className:"min-w-0 flex-1",children:[T.jsx("h1",{className:"truncate font-medium text-sm",children:(a==null?void 0:a.title)??"chamba session"}),T.jsx("span",{className:"block truncate text-muted-foreground text-xs",children:e})]}),T.jsx(AB,{presence:s,status:u,ended:f}),T.jsx(NB,{currentId:e,onSwitch:t}),T.jsx(ft,{type:"button",variant:"ghost",size:"sm",onClick:()=>$(!0),children:"Report issue"}),f?null:T.jsx(ft,{type:"button",variant:"outline",size:"sm",onClick:()=>void ne(),children:"Hand back"}),T.jsx(d2,{}),T.jsx("div",{className:"flex items-center rounded-md border p-0.5",role:"toolbar","aria-label":"View mode",children:xz.map(({mode:Te,label:C,Icon:I})=>T.jsx("button",{type:"button",onClick:()=>P(Te),"aria-pressed":ae===Te,"aria-label":C,title:C,className:Bt("flex h-7 w-7 items-center justify-center rounded-sm text-muted-foreground transition-colors hover:text-foreground",ae===Te&&"bg-accent text-accent-foreground"),children:T.jsx(I,{className:"h-4 w-4"})},Te))})]}),T.jsxs(yz,{direction:"horizontal",autoSaveId:`chamba:layout:${e}`,className:"min-h-0 flex-1",children:[T.jsx(Ax,{ref:h,defaultSize:38,minSize:30,collapsible:!0,collapsedSize:0,onCollapse:()=>x(!0),onExpand:()=>x(!1),children:T.jsx(TB,{sessionId:e,events:n,ended:f,presence:s,status:u,loadError:o,onSend:d,queue:w,sendingQueue:z,queueError:D,onNoteChange:oe,onDiscard:ce,onDiscardAll:we,onSendBatch:()=>void pe(),composerRef:g})}),T.jsx(Ez,{withHandle:!0}),T.jsx(Ax,{ref:b,defaultSize:62,minSize:25,collapsible:!0,collapsedSize:0,onCollapse:()=>N(!0),onExpand:()=>N(!1),children:a===null?T.jsx("div",{className:"flex h-full items-center justify-center text-muted-foreground text-sm",children:"Connecting…"}):!a.kind&&!f?T.jsx(kB,{sessionId:e}):T.jsx(FB,{kind:a.kind??"everyday",sessionId:e,events:n,onAnnotation:de,onRegionShot:F,onRequestSetup:xe})})]}),M?T.jsx(vB,{sessionId:e,onClose:()=>$(!1)}):null]})}function vz(){const[e,t]=S.useState(dy);S.useEffect(()=>{const a=()=>t(dy());return window.addEventListener("popstate",a),()=>window.removeEventListener("popstate",a)},[]);const n=S.useCallback(a=>{if(e===a)return;e&&e0(e,a).catch(()=>{});const s=new URL(window.location.href);s.searchParams.set("s",a),window.history.pushState({},"",s),t(a)},[e]);return e?T.jsx(_z,{sessionId:e,onSwitch:n},e):T.jsx(EN,{onOpen:n})}const Hv=document.getElementById("root");if(!Hv)throw new Error("root element #root not found");fk.createRoot(Hv).render(T.jsx(S.StrictMode,{children:T.jsx(vz,{})}));const Sz=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:hv},Symbol.toStringTag,{value:"Module"}));export{ZM as A,Nz as L,Yn as R,u0 as _,Qm as g,T as j,S as r};