@slopus/rig 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/selectSystemPromptForModel.js +1 -1
- package/dist/app/CodingAssistantApp.d.ts +2 -1
- package/dist/app/CodingAssistantApp.d.ts.map +1 -1
- package/dist/app/CodingAssistantApp.js +52 -16
- package/dist/app/FileMentionAutocomplete.d.ts +27 -0
- package/dist/app/FileMentionAutocomplete.d.ts.map +1 -0
- package/dist/app/FileMentionAutocomplete.js +122 -0
- package/dist/app/createCodingAssistantAgent.js +2 -2
- package/dist/app/createFileMentionAutocompleteItems.d.ts +4 -0
- package/dist/app/createFileMentionAutocompleteItems.d.ts.map +1 -0
- package/dist/app/createFileMentionAutocompleteItems.js +7 -0
- package/dist/app/describeReasoningLevel.d.ts.map +1 -1
- package/dist/app/describeReasoningLevel.js +1 -0
- package/dist/app/findFileMentionContext.d.ts +10 -0
- package/dist/app/findFileMentionContext.d.ts.map +1 -0
- package/dist/app/findFileMentionContext.js +13 -0
- package/dist/app/findFileMentionPrefix.d.ts +6 -0
- package/dist/app/findFileMentionPrefix.d.ts.map +1 -0
- package/dist/app/findFileMentionPrefix.js +17 -0
- package/dist/app/formatFileMention.d.ts +2 -0
- package/dist/app/formatFileMention.d.ts.map +1 -0
- package/dist/app/formatFileMention.js +6 -0
- package/dist/app/humanizeReasoningLevel.d.ts.map +1 -1
- package/dist/app/humanizeReasoningLevel.js +3 -0
- package/dist/app/runApp.d.ts.map +1 -1
- package/dist/app/runApp.js +3 -0
- package/dist/client/ProtocolHttpClient.d.ts +2 -1
- package/dist/client/ProtocolHttpClient.d.ts.map +1 -1
- package/dist/client/ProtocolHttpClient.js +7 -0
- package/dist/protocol/SessionProtocol.d.ts +7 -0
- package/dist/protocol/SessionProtocol.d.ts.map +1 -1
- package/dist/protocol/index.d.ts +1 -1
- package/dist/protocol/index.d.ts.map +1 -1
- package/dist/providers/codex.d.ts.map +1 -1
- package/dist/providers/codex.js +52 -6
- package/dist/providers/models.d.ts +3 -0
- package/dist/providers/models.d.ts.map +1 -1
- package/dist/providers/models.js +18 -0
- package/dist/server/FileSearchService.d.ts +14 -0
- package/dist/server/FileSearchService.d.ts.map +1 -0
- package/dist/server/FileSearchService.js +71 -0
- package/dist/server/createModelCatalog.js +2 -2
- package/dist/server/createProtocolHttpServer.d.ts +2 -0
- package/dist/server/createProtocolHttpServer.d.ts.map +1 -1
- package/dist/server/createProtocolHttpServer.js +25 -3
- package/dist/web/assets/highlighted-body-OFNGDK62-CCrJakL3.js +1 -0
- package/dist/web/assets/index-B6Z_CQNK.css +1 -0
- package/dist/web/assets/index-kjfb8ssZ.js +341 -0
- package/dist/web/index.html +2 -2
- package/package.json +2 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-DA-rfuFy.js","assets/html-pp8916En.js","assets/javascript-wDzz0qaB.js","assets/css-CLj8gQPS.js","assets/angular-ts-BrjP3tb8.js","assets/scss-D5BDwBP9.js","assets/apl-CORt7UWP.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-HNnZUWAn.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-2xfisSek.js","assets/html-derivative-DlHx6ybY.js","assets/sql-CRqJ_cUM.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nBiQ_Alo.js","assets/coffee-Ch7k5sss.js","assets/cpp-UfJy6YNI.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-DGywbUpC.js","assets/shellscript-Yzrsuije.js","assets/edge-FbVlp4U3.js","assets/elixir-CkH2-t6x.js","assets/elm-DbKCFpqz.js","assets/erb-Dm6A9KJ5.js","assets/ruby-DyJCeAvU.js","assets/haml-D5jkg6IW.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BaeVxFsk.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-CkoXwp7k.js","assets/fortran-free-form-BxgE0vQu.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-BOOCDP_w.js","assets/gdshader-DkwncUOv.js","assets/gdscript-C5YyOfLZ.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-ByusRIyA.js","assets/glimmer-ts-BfAWNZQY.js","assets/hack-DbPARsA_.js","assets/handlebars-BpdQsYii.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-f2NsQr07.js","assets/jison-wvAkD_A8.js","assets/julia-D7OTSIA_.js","assets/r-Dspwwk_N.js","assets/just-CUsbIsdP.js","assets/perl-B9cMNwum.js","assets/latex-CaSxy8MP.js","assets/tex-idrVyKtj.js","assets/liquid-C0sCDyMI.js","assets/marko-DjSrsDqO.js","assets/less-B1dDrJ26.js","assets/mdc-DTYItulj.js","assets/nextflow-C-mBbutL.js","assets/nextflow-groovy-vE_lwT2v.js","assets/nginx-BpAMiNFr.js","assets/nim-BIad80T-.js","assets/php-Csjmro_R.js","assets/pug-DKIMFp6K.js","assets/qml-3beO22l8.js","assets/razor-BjBPvh-w.js","assets/csharp-DSvCPggb.js","assets/rst-CpCqk9r5.js","assets/cmake-D1j8_8rp.js","assets/sas-DEy46yEz.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-8wufbnw4.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-DI20mbqo.js","assets/surrealql-Bq5Q-fJD.js","assets/svelte-Cy7k_4gC.js","assets/templ-DhtptRzy.js","assets/go-C27-OAKa.js","assets/ts-tags-D351s5mN.js","assets/twig-CW1WmMYd.js","assets/vue-D2xRrEX4.js","assets/vue-html-AaS7Mt5G.js","assets/vue-vine-BoDAl6tE.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
function YO(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function lg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Jm={exports:{}},bl={};var K_;function XO(){if(K_)return bl;K_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var l=null;if(o!==void 0&&(l=""+o),i.key!==void 0&&(l=""+i.key),"key"in i){o={};for(var c in i)c!=="key"&&(o[c]=i[c])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:l,ref:i!==void 0?i:null,props:o}}return bl.Fragment=t,bl.jsx=n,bl.jsxs=n,bl}var Z_;function QO(){return Z_||(Z_=1,Jm.exports=XO()),Jm.exports}var _=QO(),ep={exports:{}},Me={};var J_;function WO(){if(J_)return Me;J_=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),y=Symbol.iterator;function E(z){return z===null||typeof z!="object"?null:(z=y&&z[y]||z["@@iterator"],typeof z=="function"?z:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,C={};function w(z,te,M){this.props=z,this.context=te,this.refs=C,this.updater=M||T}w.prototype.isReactComponent={},w.prototype.setState=function(z,te){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,te,"setState")},w.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function k(){}k.prototype=w.prototype;function N(z,te,M){this.props=z,this.context=te,this.refs=C,this.updater=M||T}var P=N.prototype=new k;P.constructor=N,S(P,w.prototype),P.isPureReactComponent=!0;var B=Array.isArray;function D(){}var $={H:null,A:null,T:null,S:null},G=Object.prototype.hasOwnProperty;function ie(z,te,M){var ge=M.ref;return{$$typeof:e,type:z,key:te,ref:ge!==void 0?ge:null,props:M}}function V(z,te){return ie(z.type,te,z.props)}function X(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function J(z){var te={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(M){return te[M]})}var he=/\/+/g;function ue(z,te){return typeof z=="object"&&z!==null&&z.key!=null?J(""+z.key):te.toString(36)}function re(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(D,D):(z.status="pending",z.then(function(te){z.status==="pending"&&(z.status="fulfilled",z.value=te)},function(te){z.status==="pending"&&(z.status="rejected",z.reason=te)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function U(z,te,M,ge,Ee){var ye=typeof z;(ye==="undefined"||ye==="boolean")&&(z=null);var be=!1;if(z===null)be=!0;else switch(ye){case"bigint":case"string":case"number":be=!0;break;case"object":switch(z.$$typeof){case e:case t:be=!0;break;case p:return be=z._init,U(be(z._payload),te,M,ge,Ee)}}if(be)return Ee=Ee(z),be=ge===""?"."+ue(z,0):ge,B(Ee)?(M="",be!=null&&(M=be.replace(he,"$&/")+"/"),U(Ee,te,M,"",function(De){return De})):Ee!=null&&(X(Ee)&&(Ee=V(Ee,M+(Ee.key==null||z&&z.key===Ee.key?"":(""+Ee.key).replace(he,"$&/")+"/")+be)),te.push(Ee)),1;be=0;var ke=ge===""?".":ge+":";if(B(z))for(var Te=0;Te<z.length;Te++)ge=z[Te],ye=ke+ue(ge,Te),be+=U(ge,te,M,ye,Ee);else if(Te=E(z),typeof Te=="function")for(z=Te.call(z),Te=0;!(ge=z.next()).done;)ge=ge.value,ye=ke+ue(ge,Te++),be+=U(ge,te,M,ye,Ee);else if(ye==="object"){if(typeof z.then=="function")return U(re(z),te,M,ge,Ee);throw te=String(z),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return be}function ee(z,te,M){if(z==null)return z;var ge=[],Ee=0;return U(z,ge,"","",function(ye){return te.call(M,ye,Ee++)}),ge}function ce(z){if(z._status===-1){var te=z._result;te=te(),te.then(function(M){(z._status===0||z._status===-1)&&(z._status=1,z._result=M)},function(M){(z._status===0||z._status===-1)&&(z._status=2,z._result=M)}),z._status===-1&&(z._status=0,z._result=te)}if(z._status===1)return z._result.default;throw z._result}var xe=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},O={map:ee,forEach:function(z,te,M){ee(z,function(){te.apply(this,arguments)},M)},count:function(z){var te=0;return ee(z,function(){te++}),te},toArray:function(z){return ee(z,function(te){return te})||[]},only:function(z){if(!X(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Me.Activity=m,Me.Children=O,Me.Component=w,Me.Fragment=n,Me.Profiler=i,Me.PureComponent=N,Me.StrictMode=r,Me.Suspense=f,Me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Me.__COMPILER_RUNTIME={__proto__:null,c:function(z){return $.H.useMemoCache(z)}},Me.cache=function(z){return function(){return z.apply(null,arguments)}},Me.cacheSignal=function(){return null},Me.cloneElement=function(z,te,M){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ge=S({},z.props),Ee=z.key;if(te!=null)for(ye in te.key!==void 0&&(Ee=""+te.key),te)!G.call(te,ye)||ye==="key"||ye==="__self"||ye==="__source"||ye==="ref"&&te.ref===void 0||(ge[ye]=te[ye]);var ye=arguments.length-2;if(ye===1)ge.children=M;else if(1<ye){for(var be=Array(ye),ke=0;ke<ye;ke++)be[ke]=arguments[ke+2];ge.children=be}return ie(z.type,Ee,ge)},Me.createContext=function(z){return z={$$typeof:l,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:o,_context:z},z},Me.createElement=function(z,te,M){var ge,Ee={},ye=null;if(te!=null)for(ge in te.key!==void 0&&(ye=""+te.key),te)G.call(te,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(Ee[ge]=te[ge]);var be=arguments.length-2;if(be===1)Ee.children=M;else if(1<be){for(var ke=Array(be),Te=0;Te<be;Te++)ke[Te]=arguments[Te+2];Ee.children=ke}if(z&&z.defaultProps)for(ge in be=z.defaultProps,be)Ee[ge]===void 0&&(Ee[ge]=be[ge]);return ie(z,ye,Ee)},Me.createRef=function(){return{current:null}},Me.forwardRef=function(z){return{$$typeof:c,render:z}},Me.isValidElement=X,Me.lazy=function(z){return{$$typeof:p,_payload:{_status:-1,_result:z},_init:ce}},Me.memo=function(z,te){return{$$typeof:h,type:z,compare:te===void 0?null:te}},Me.startTransition=function(z){var te=$.T,M={};$.T=M;try{var ge=z(),Ee=$.S;Ee!==null&&Ee(M,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(D,xe)}catch(ye){xe(ye)}finally{te!==null&&M.types!==null&&(te.types=M.types),$.T=te}},Me.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Me.use=function(z){return $.H.use(z)},Me.useActionState=function(z,te,M){return $.H.useActionState(z,te,M)},Me.useCallback=function(z,te){return $.H.useCallback(z,te)},Me.useContext=function(z){return $.H.useContext(z)},Me.useDebugValue=function(){},Me.useDeferredValue=function(z,te){return $.H.useDeferredValue(z,te)},Me.useEffect=function(z,te){return $.H.useEffect(z,te)},Me.useEffectEvent=function(z){return $.H.useEffectEvent(z)},Me.useId=function(){return $.H.useId()},Me.useImperativeHandle=function(z,te,M){return $.H.useImperativeHandle(z,te,M)},Me.useInsertionEffect=function(z,te){return $.H.useInsertionEffect(z,te)},Me.useLayoutEffect=function(z,te){return $.H.useLayoutEffect(z,te)},Me.useMemo=function(z,te){return $.H.useMemo(z,te)},Me.useOptimistic=function(z,te){return $.H.useOptimistic(z,te)},Me.useReducer=function(z,te,M){return $.H.useReducer(z,te,M)},Me.useRef=function(z){return $.H.useRef(z)},Me.useState=function(z){return $.H.useState(z)},Me.useSyncExternalStore=function(z,te,M){return $.H.useSyncExternalStore(z,te,M)},Me.useTransition=function(){return $.H.useTransition()},Me.version="19.2.7",Me}var ex;function ug(){return ex||(ex=1,ep.exports=WO()),ep.exports}var v=ug();const KO=lg(v),au=YO({__proto__:null,default:KO},[v]);var tp={exports:{}},El={},np={exports:{}},rp={};var tx;function ZO(){return tx||(tx=1,(function(e){function t(U,ee){var ce=U.length;U.push(ee);e:for(;0<ce;){var xe=ce-1>>>1,O=U[xe];if(0<i(O,ee))U[xe]=ee,U[ce]=O,ce=xe;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var ee=U[0],ce=U.pop();if(ce!==ee){U[0]=ce;e:for(var xe=0,O=U.length,z=O>>>1;xe<z;){var te=2*(xe+1)-1,M=U[te],ge=te+1,Ee=U[ge];if(0>i(M,ce))ge<O&&0>i(Ee,M)?(U[xe]=Ee,U[ge]=ce,xe=ge):(U[xe]=M,U[te]=ce,xe=te);else if(ge<O&&0>i(Ee,ce))U[xe]=Ee,U[ge]=ce,xe=ge;else break e}}return ee}function i(U,ee){var ce=U.sortIndex-ee.sortIndex;return ce!==0?ce:U.id-ee.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var l=Date,c=l.now();e.unstable_now=function(){return l.now()-c}}var f=[],h=[],p=1,m=null,y=3,E=!1,T=!1,S=!1,C=!1,w=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate<"u"?setImmediate:null;function P(U){for(var ee=n(h);ee!==null;){if(ee.callback===null)r(h);else if(ee.startTime<=U)r(h),ee.sortIndex=ee.expirationTime,t(f,ee);else break;ee=n(h)}}function B(U){if(S=!1,P(U),!T)if(n(f)!==null)T=!0,D||(D=!0,J());else{var ee=n(h);ee!==null&&re(B,ee.startTime-U)}}var D=!1,$=-1,G=5,ie=-1;function V(){return C?!0:!(e.unstable_now()-ie<G)}function X(){if(C=!1,D){var U=e.unstable_now();ie=U;var ee=!0;try{e:{T=!1,S&&(S=!1,k($),$=-1),E=!0;var ce=y;try{t:{for(P(U),m=n(f);m!==null&&!(m.expirationTime>U&&V());){var xe=m.callback;if(typeof xe=="function"){m.callback=null,y=m.priorityLevel;var O=xe(m.expirationTime<=U);if(U=e.unstable_now(),typeof O=="function"){m.callback=O,P(U),ee=!0;break t}m===n(f)&&r(f),P(U)}else r(f);m=n(f)}if(m!==null)ee=!0;else{var z=n(h);z!==null&&re(B,z.startTime-U),ee=!1}}break e}finally{m=null,y=ce,E=!1}ee=void 0}}finally{ee?J():D=!1}}}var J;if(typeof N=="function")J=function(){N(X)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ue=he.port2;he.port1.onmessage=X,J=function(){ue.postMessage(null)}}else J=function(){w(X,0)};function re(U,ee){$=w(function(){U(e.unstable_now())},ee)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return y},e.unstable_next=function(U){switch(y){case 1:case 2:case 3:var ee=3;break;default:ee=y}var ce=y;y=ee;try{return U()}finally{y=ce}},e.unstable_requestPaint=function(){C=!0},e.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var ce=y;y=U;try{return ee()}finally{y=ce}},e.unstable_scheduleCallback=function(U,ee,ce){var xe=e.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?xe+ce:xe):ce=xe,U){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=ce+O,U={id:p++,callback:ee,priorityLevel:U,startTime:ce,expirationTime:O,sortIndex:-1},ce>xe?(U.sortIndex=ce,t(h,U),n(f)===null&&U===n(h)&&(S?(k($),$=-1):S=!0,re(B,ce-xe))):(U.sortIndex=O,t(f,U),T||E||(T=!0,D||(D=!0,J()))),U},e.unstable_shouldYield=V,e.unstable_wrapCallback=function(U){var ee=y;return function(){var ce=y;y=ee;try{return U.apply(this,arguments)}finally{y=ce}}}})(rp)),rp}var nx;function JO(){return nx||(nx=1,np.exports=ZO()),np.exports}var ap={exports:{}},rn={};var rx;function eL(){if(rx)return rn;rx=1;var e=ug();function t(f){var h="https://react.dev/errors/"+f;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+f+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={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},i=Symbol.for("react.portal");function o(f,h,p){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:m==null?null:""+m,children:f,containerInfo:h,implementation:p}}var l=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(f,h){if(f==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,rn.createPortal=function(f,h){var p=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 o(f,h,null,p)},rn.flushSync=function(f){var h=l.T,p=r.p;try{if(l.T=null,r.p=2,f)return f()}finally{l.T=h,r.p=p,r.d.f()}},rn.preconnect=function(f,h){typeof f=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,r.d.C(f,h))},rn.prefetchDNS=function(f){typeof f=="string"&&r.d.D(f)},rn.preinit=function(f,h){if(typeof f=="string"&&h&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin),y=typeof h.integrity=="string"?h.integrity:void 0,E=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?r.d.S(f,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:m,integrity:y,fetchPriority:E}):p==="script"&&r.d.X(f,{crossOrigin:m,integrity:y,fetchPriority:E,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},rn.preinitModule=function(f,h){if(typeof f=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=c(h.as,h.crossOrigin);r.d.M(f,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&r.d.M(f)},rn.preload=function(f,h){if(typeof f=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,m=c(p,h.crossOrigin);r.d.L(f,p,{crossOrigin:m,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})}},rn.preloadModule=function(f,h){if(typeof f=="string")if(h){var p=c(h.as,h.crossOrigin);r.d.m(f,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else r.d.m(f)},rn.requestFormReset=function(f){r.d.r(f)},rn.unstable_batchedUpdates=function(f,h){return f(h)},rn.useFormState=function(f,h,p){return l.H.useFormState(f,h,p)},rn.useFormStatus=function(){return l.H.useHostTransitionStatus()},rn.version="19.2.7",rn}var ax;function O2(){if(ax)return ap.exports;ax=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(),ap.exports=eL(),ap.exports}var ix;function tL(){if(ix)return El;ix=1;var e=JO(),t=ug(),n=O2();function r(a){var s="https://react.dev/errors/"+a;if(1<arguments.length){s+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)s+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+a+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function o(a){var s=a,u=a;if(a.alternate)for(;s.return;)s=s.return;else{a=s;do s=a,(s.flags&4098)!==0&&(u=s.return),a=s.return;while(a)}return s.tag===3?u:null}function l(a){if(a.tag===13){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function c(a){if(a.tag===31){var s=a.memoizedState;if(s===null&&(a=a.alternate,a!==null&&(s=a.memoizedState)),s!==null)return s.dehydrated}return null}function f(a){if(o(a)!==a)throw Error(r(188))}function h(a){var s=a.alternate;if(!s){if(s=o(a),s===null)throw Error(r(188));return s!==a?null:a}for(var u=a,d=s;;){var g=u.return;if(g===null)break;var b=g.alternate;if(b===null){if(d=g.return,d!==null){u=d;continue}break}if(g.child===b.child){for(b=g.child;b;){if(b===u)return f(g),a;if(b===d)return f(g),s;b=b.sibling}throw Error(r(188))}if(u.return!==d.return)u=g,d=b;else{for(var A=!1,R=g.child;R;){if(R===u){A=!0,u=g,d=b;break}if(R===d){A=!0,d=g,u=b;break}R=R.sibling}if(!A){for(R=b.child;R;){if(R===u){A=!0,u=b,d=g;break}if(R===d){A=!0,d=b,u=g;break}R=R.sibling}if(!A)throw Error(r(189))}}if(u.alternate!==d)throw Error(r(190))}if(u.tag!==3)throw Error(r(188));return u.stateNode.current===u?a:s}function p(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a;for(a=a.child;a!==null;){if(s=p(a),s!==null)return s;a=a.sibling}return null}var m=Object.assign,y=Symbol.for("react.element"),E=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),k=Symbol.for("react.consumer"),N=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),V=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(a){return a===null||typeof a!="object"?null:(a=X&&a[X]||a["@@iterator"],typeof a=="function"?a:null)}var he=Symbol.for("react.client.reference");function ue(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===he?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case w:return"Profiler";case C:return"StrictMode";case B:return"Suspense";case D:return"SuspenseList";case ie:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case T:return"Portal";case N:return a.displayName||"Context";case k:return(a._context.displayName||"Context")+".Consumer";case P:var s=a.render;return a=a.displayName,a||(a=s.displayName||s.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case $:return s=a.displayName||null,s!==null?s:ue(a.type)||"Memo";case G:s=a._payload,a=a._init;try{return ue(a(s))}catch{}}return null}var re=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce={pending:!1,data:null,method:null,action:null},xe=[],O=-1;function z(a){return{current:a}}function te(a){0>O||(a.current=xe[O],xe[O]=null,O--)}function M(a,s){O++,xe[O]=a.current,a.current=s}var ge=z(null),Ee=z(null),ye=z(null),be=z(null);function ke(a,s){switch(M(ye,s),M(Ee,a),M(ge,null),s.nodeType){case 9:case 11:a=(a=s.documentElement)&&(a=a.namespaceURI)?__(a):0;break;default:if(a=s.tagName,s=s.namespaceURI)s=__(s),a=x_(s,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(ge),M(ge,a)}function Te(){te(ge),te(Ee),te(ye)}function De(a){a.memoizedState!==null&&M(be,a);var s=ge.current,u=x_(s,a.type);s!==u&&(M(Ee,a),M(ge,u))}function je(a){Ee.current===a&&(te(ge),te(Ee)),be.current===a&&(te(be),hl._currentValue=ce)}var Je,kt;function it(a){if(Je===void 0)try{throw Error()}catch(u){var s=u.stack.trim().match(/\n( *(at )?)/);Je=s&&s[1]||"",kt=-1<u.stack.indexOf(`
|
|
3
|
+
at`)?" (<anonymous>)":-1<u.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
|
+
`+Je+a+kt}var On=!1;function En(a,s){if(!a||On)return"";On=!0;var u=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:function(){try{if(s){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ne){var Z=ne}Reflect.construct(a,[],fe)}else{try{fe.call()}catch(ne){Z=ne}a.call(fe.prototype)}}else{try{throw Error()}catch(ne){Z=ne}(fe=a())&&typeof fe.catch=="function"&&fe.catch(function(){})}}catch(ne){if(ne&&Z&&typeof ne.stack=="string")return[ne.stack,Z.stack]}return[null,null]}};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),A=b[0],R=b[1];if(A&&R){var F=A.split(`
|
|
5
|
+
`),K=R.split(`
|
|
6
|
+
`);for(g=d=0;d<F.length&&!F[d].includes("DetermineComponentFrameRoot");)d++;for(;g<K.length&&!K[g].includes("DetermineComponentFrameRoot");)g++;if(d===F.length||g===K.length)for(d=F.length-1,g=K.length-1;1<=d&&0<=g&&F[d]!==K[g];)g--;for(;1<=d&&0<=g;d--,g--)if(F[d]!==K[g]){if(d!==1||g!==1)do if(d--,g--,0>g||F[d]!==K[g]){var se=`
|
|
7
|
+
`+F[d].replace(" at new "," at ");return a.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",a.displayName)),se}while(1<=d&&0<=g);break}}}finally{On=!1,Error.prepareStackTrace=u}return(u=a?a.displayName||a.name:"")?it(u):""}function xr(a,s){switch(a.tag){case 26:case 27:case 5:return it(a.type);case 16:return it("Lazy");case 13:return a.child!==s&&s!==null?it("Suspense Fallback"):it("Suspense");case 19:return it("SuspenseList");case 0:case 15:return En(a.type,!1);case 11:return En(a.type.render,!1);case 1:return En(a.type,!0);case 31:return it("Activity");default:return""}}function He(a){try{var s="",u=null;do s+=xr(a,u),u=a,a=a.return;while(a);return s}catch(d){return`
|
|
8
|
+
Error generating stack: `+d.message+`
|
|
9
|
+
`+d.stack}}var st=Object.prototype.hasOwnProperty,Gt=e.unstable_scheduleCallback,yn=e.unstable_cancelCallback,Hr=e.unstable_shouldYield,Ud=e.unstable_requestPaint,fn=e.unstable_now,Hd=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,_e=e.unstable_UserBlockingPriority,Le=e.unstable_NormalPriority,Ve=e.unstable_LowPriority,ot=e.unstable_IdlePriority,Ln=e.log,zr=e.unstable_setDisableYieldValue,dn=null,jt=null;function _n(a){if(typeof Ln=="function"&&zr(a),jt&&typeof jt.setStrictMode=="function")try{jt.setStrictMode(dn,a)}catch{}}var pt=Math.clz32?Math.clz32:I3,Ea=Math.log,or=Math.LN2;function I3(a){return a>>>=0,a===0?32:31-(Ea(a)/or|0)|0}var Eu=256,yu=262144,_u=4194304;function ci(a){var s=a&42;if(s!==0)return s;switch(a&-a){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 a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function xu(a,s,u){var d=a.pendingLanes;if(d===0)return 0;var g=0,b=a.suspendedLanes,A=a.pingedLanes;a=a.warmLanes;var R=d&134217727;return R!==0?(d=R&~b,d!==0?g=ci(d):(A&=R,A!==0?g=ci(A):u||(u=R&~a,u!==0&&(g=ci(u))))):(R=d&~b,R!==0?g=ci(R):A!==0?g=ci(A):u||(u=d&~a,u!==0&&(g=ci(u)))),g===0?0:s!==0&&s!==g&&(s&b)===0&&(b=g&-g,u=s&-s,b>=u||b===32&&(u&4194048)!==0)?s:g}function Co(a,s){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&s)===0}function D3(a,s){switch(a){case 1:case 2:case 4:case 8:case 64:return s+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 s+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 tb(){var a=_u;return _u<<=1,(_u&62914560)===0&&(_u=4194304),a}function zd(a){for(var s=[],u=0;31>u;u++)s.push(a);return s}function wo(a,s){a.pendingLanes|=s,s!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function M3(a,s,u,d,g,b){var A=a.pendingLanes;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=u,a.entangledLanes&=u,a.errorRecoveryDisabledLanes&=u,a.shellSuspendCounter=0;var R=a.entanglements,F=a.expirationTimes,K=a.hiddenUpdates;for(u=A&~u;0<u;){var se=31-pt(u),fe=1<<se;R[se]=0,F[se]=-1;var Z=K[se];if(Z!==null)for(K[se]=null,se=0;se<Z.length;se++){var ne=Z[se];ne!==null&&(ne.lane&=-536870913)}u&=~fe}d!==0&&nb(a,d,0),b!==0&&g===0&&a.tag!==0&&(a.suspendedLanes|=b&~(A&~s))}function nb(a,s,u){a.pendingLanes|=s,a.suspendedLanes&=~s;var d=31-pt(s);a.entangledLanes|=s,a.entanglements[d]=a.entanglements[d]|1073741824|u&261930}function rb(a,s){var u=a.entangledLanes|=s;for(a=a.entanglements;u;){var d=31-pt(u),g=1<<d;g&s|a[d]&s&&(a[d]|=s),u&=~g}}function ab(a,s){var u=s&-s;return u=(u&42)!==0?1:Fd(u),(u&(a.suspendedLanes|s))!==0?0:u}function Fd(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=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:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function $d(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function ib(){var a=ee.p;return a!==0?a:(a=window.event,a===void 0?32:V_(a.type))}function sb(a,s){var u=ee.p;try{return ee.p=a,s()}finally{ee.p=u}}var ya=Math.random().toString(36).slice(2),Zt="__reactFiber$"+ya,xn="__reactProps$"+ya,os="__reactContainer$"+ya,Vd="__reactEvents$"+ya,P3="__reactListeners$"+ya,B3="__reactHandles$"+ya,ob="__reactResources$"+ya,ko="__reactMarker$"+ya;function Gd(a){delete a[Zt],delete a[xn],delete a[Vd],delete a[P3],delete a[B3]}function ls(a){var s=a[Zt];if(s)return s;for(var u=a.parentNode;u;){if(s=u[os]||u[Zt]){if(u=s.alternate,s.child!==null||u!==null&&u.child!==null)for(a=k_(a);a!==null;){if(u=a[Zt])return u;a=k_(a)}return s}a=u,u=a.parentNode}return null}function us(a){if(a=a[Zt]||a[os]){var s=a.tag;if(s===5||s===6||s===13||s===31||s===26||s===27||s===3)return a}return null}function No(a){var s=a.tag;if(s===5||s===26||s===27||s===6)return a.stateNode;throw Error(r(33))}function cs(a){var s=a[ob];return s||(s=a[ob]={hoistableStyles:new Map,hoistableScripts:new Map}),s}function qt(a){a[ko]=!0}var lb=new Set,ub={};function fi(a,s){fs(a,s),fs(a+"Capture",s)}function fs(a,s){for(ub[a]=s,a=0;a<s.length;a++)lb.add(s[a])}var j3=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]*$"),cb={},fb={};function U3(a){return st.call(fb,a)?!0:st.call(cb,a)?!1:j3.test(a)?fb[a]=!0:(cb[a]=!0,!1)}function Tu(a,s,u){if(U3(s))if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":a.removeAttribute(s);return;case"boolean":var d=s.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){a.removeAttribute(s);return}}a.setAttribute(s,""+u)}}function vu(a,s,u){if(u===null)a.removeAttribute(s);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(s);return}a.setAttribute(s,""+u)}}function Fr(a,s,u,d){if(d===null)a.removeAttribute(u);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttributeNS(s,u,""+d)}}function Gn(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function db(a){var s=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function H3(a,s,u){var d=Object.getOwnPropertyDescriptor(a.constructor.prototype,s);if(!a.hasOwnProperty(s)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,b=d.set;return Object.defineProperty(a,s,{configurable:!0,get:function(){return g.call(this)},set:function(A){u=""+A,b.call(this,A)}}),Object.defineProperty(a,s,{enumerable:d.enumerable}),{getValue:function(){return u},setValue:function(A){u=""+A},stopTracking:function(){a._valueTracker=null,delete a[s]}}}}function qd(a){if(!a._valueTracker){var s=db(a)?"checked":"value";a._valueTracker=H3(a,s,""+a[s])}}function hb(a){if(!a)return!1;var s=a._valueTracker;if(!s)return!0;var u=s.getValue(),d="";return a&&(d=db(a)?a.checked?"true":"false":a.value),a=d,a!==u?(s.setValue(a),!0):!1}function Su(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var z3=/[\n"\\]/g;function qn(a){return a.replace(z3,function(s){return"\\"+s.charCodeAt(0).toString(16)+" "})}function Yd(a,s,u,d,g,b,A,R){a.name="",A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?a.type=A:a.removeAttribute("type"),s!=null?A==="number"?(s===0&&a.value===""||a.value!=s)&&(a.value=""+Gn(s)):a.value!==""+Gn(s)&&(a.value=""+Gn(s)):A!=="submit"&&A!=="reset"||a.removeAttribute("value"),s!=null?Xd(a,A,Gn(s)):u!=null?Xd(a,A,Gn(u)):d!=null&&a.removeAttribute("value"),g==null&&b!=null&&(a.defaultChecked=!!b),g!=null&&(a.checked=g&&typeof g!="function"&&typeof g!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?a.name=""+Gn(R):a.removeAttribute("name")}function mb(a,s,u,d,g,b,A,R){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),s!=null||u!=null){if(!(b!=="submit"&&b!=="reset"||s!=null)){qd(a);return}u=u!=null?""+Gn(u):"",s=s!=null?""+Gn(s):u,R||s===a.value||(a.value=s),a.defaultValue=s}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,a.checked=R?a.checked:!!d,a.defaultChecked=!!d,A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(a.name=A),qd(a)}function Xd(a,s,u){s==="number"&&Su(a.ownerDocument)===a||a.defaultValue===""+u||(a.defaultValue=""+u)}function ds(a,s,u,d){if(a=a.options,s){s={};for(var g=0;g<u.length;g++)s["$"+u[g]]=!0;for(u=0;u<a.length;u++)g=s.hasOwnProperty("$"+a[u].value),a[u].selected!==g&&(a[u].selected=g),g&&d&&(a[u].defaultSelected=!0)}else{for(u=""+Gn(u),s=null,g=0;g<a.length;g++){if(a[g].value===u){a[g].selected=!0,d&&(a[g].defaultSelected=!0);return}s!==null||a[g].disabled||(s=a[g])}s!==null&&(s.selected=!0)}}function pb(a,s,u){if(s!=null&&(s=""+Gn(s),s!==a.value&&(a.value=s),u==null)){a.defaultValue!==s&&(a.defaultValue=s);return}a.defaultValue=u!=null?""+Gn(u):""}function gb(a,s,u,d){if(s==null){if(d!=null){if(u!=null)throw Error(r(92));if(re(d)){if(1<d.length)throw Error(r(93));d=d[0]}u=d}u==null&&(u=""),s=u}u=Gn(s),a.defaultValue=u,d=a.textContent,d===u&&d!==""&&d!==null&&(a.value=d),qd(a)}function hs(a,s){if(s){var u=a.firstChild;if(u&&u===a.lastChild&&u.nodeType===3){u.nodeValue=s;return}}a.textContent=s}var F3=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 bb(a,s,u){var d=s.indexOf("--")===0;u==null||typeof u=="boolean"||u===""?d?a.setProperty(s,""):s==="float"?a.cssFloat="":a[s]="":d?a.setProperty(s,u):typeof u!="number"||u===0||F3.has(s)?s==="float"?a.cssFloat=u:a[s]=(""+u).trim():a[s]=u+"px"}function Eb(a,s,u){if(s!=null&&typeof s!="object")throw Error(r(62));if(a=a.style,u!=null){for(var d in u)!u.hasOwnProperty(d)||s!=null&&s.hasOwnProperty(d)||(d.indexOf("--")===0?a.setProperty(d,""):d==="float"?a.cssFloat="":a[d]="");for(var g in s)d=s[g],s.hasOwnProperty(g)&&u[g]!==d&&bb(a,g,d)}else for(var b in s)s.hasOwnProperty(b)&&bb(a,b,s[b])}function Qd(a){if(a.indexOf("-")===-1)return!1;switch(a){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 $3=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"]]),V3=/^[\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 Au(a){return V3.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function $r(){}var Wd=null;function Kd(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var ms=null,ps=null;function yb(a){var s=us(a);if(s&&(a=s.stateNode)){var u=a[xn]||null;e:switch(a=s.stateNode,s.type){case"input":if(Yd(a,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name),s=u.name,u.type==="radio"&&s!=null){for(u=a;u.parentNode;)u=u.parentNode;for(u=u.querySelectorAll('input[name="'+qn(""+s)+'"][type="radio"]'),s=0;s<u.length;s++){var d=u[s];if(d!==a&&d.form===a.form){var g=d[xn]||null;if(!g)throw Error(r(90));Yd(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(s=0;s<u.length;s++)d=u[s],d.form===a.form&&hb(d)}break e;case"textarea":pb(a,u.value,u.defaultValue);break e;case"select":s=u.value,s!=null&&ds(a,!!u.multiple,s,!1)}}}var Zd=!1;function _b(a,s,u){if(Zd)return a(s,u);Zd=!0;try{var d=a(s);return d}finally{if(Zd=!1,(ms!==null||ps!==null)&&(dc(),ms&&(s=ms,a=ps,ps=ms=null,yb(s),a)))for(s=0;s<a.length;s++)yb(a[s])}}function Ro(a,s){var u=a.stateNode;if(u===null)return null;var d=u[xn]||null;if(d===null)return null;u=d[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(a=a.type,d=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!d;break e;default:a=!1}if(a)return null;if(u&&typeof u!="function")throw Error(r(231,s,typeof u));return u}var Vr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jd=!1;if(Vr)try{var Oo={};Object.defineProperty(Oo,"passive",{get:function(){Jd=!0}}),window.addEventListener("test",Oo,Oo),window.removeEventListener("test",Oo,Oo)}catch{Jd=!1}var _a=null,eh=null,Cu=null;function xb(){if(Cu)return Cu;var a,s=eh,u=s.length,d,g="value"in _a?_a.value:_a.textContent,b=g.length;for(a=0;a<u&&s[a]===g[a];a++);var A=u-a;for(d=1;d<=A&&s[u-d]===g[b-d];d++);return Cu=g.slice(a,1<d?1-d:void 0)}function wu(a){var s=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&s===13&&(a=13)):a=s,a===10&&(a=13),32<=a||a===13?a:0}function ku(){return!0}function Tb(){return!1}function Tn(a){function s(u,d,g,b,A){this._reactName=u,this._targetInst=g,this.type=d,this.nativeEvent=b,this.target=A,this.currentTarget=null;for(var R in a)a.hasOwnProperty(R)&&(u=a[R],this[R]=u?u(b):b[R]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?ku:Tb,this.isPropagationStopped=Tb,this}return m(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var u=this.nativeEvent;u&&(u.preventDefault?u.preventDefault():typeof u.returnValue!="unknown"&&(u.returnValue=!1),this.isDefaultPrevented=ku)},stopPropagation:function(){var u=this.nativeEvent;u&&(u.stopPropagation?u.stopPropagation():typeof u.cancelBubble!="unknown"&&(u.cancelBubble=!0),this.isPropagationStopped=ku)},persist:function(){},isPersistent:ku}),s}var di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Nu=Tn(di),Lo=m({},di,{view:0,detail:0}),G3=Tn(Lo),th,nh,Io,Ru=m({},Lo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ah,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==Io&&(Io&&a.type==="mousemove"?(th=a.screenX-Io.screenX,nh=a.screenY-Io.screenY):nh=th=0,Io=a),th)},movementY:function(a){return"movementY"in a?a.movementY:nh}}),vb=Tn(Ru),q3=m({},Ru,{dataTransfer:0}),Y3=Tn(q3),X3=m({},Lo,{relatedTarget:0}),rh=Tn(X3),Q3=m({},di,{animationName:0,elapsedTime:0,pseudoElement:0}),W3=Tn(Q3),K3=m({},di,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),Z3=Tn(K3),J3=m({},di,{data:0}),Sb=Tn(J3),eR={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tR={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"},nR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rR(a){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(a):(a=nR[a])?!!s[a]:!1}function ah(){return rR}var aR=m({},Lo,{key:function(a){if(a.key){var s=eR[a.key]||a.key;if(s!=="Unidentified")return s}return a.type==="keypress"?(a=wu(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?tR[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ah,charCode:function(a){return a.type==="keypress"?wu(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?wu(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),iR=Tn(aR),sR=m({},Ru,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ab=Tn(sR),oR=m({},Lo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ah}),lR=Tn(oR),uR=m({},di,{propertyName:0,elapsedTime:0,pseudoElement:0}),cR=Tn(uR),fR=m({},Ru,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),dR=Tn(fR),hR=m({},di,{newState:0,oldState:0}),mR=Tn(hR),pR=[9,13,27,32],ih=Vr&&"CompositionEvent"in window,Do=null;Vr&&"documentMode"in document&&(Do=document.documentMode);var gR=Vr&&"TextEvent"in window&&!Do,Cb=Vr&&(!ih||Do&&8<Do&&11>=Do),wb=" ",kb=!1;function Nb(a,s){switch(a){case"keyup":return pR.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rb(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var gs=!1;function bR(a,s){switch(a){case"compositionend":return Rb(s);case"keypress":return s.which!==32?null:(kb=!0,wb);case"textInput":return a=s.data,a===wb&&kb?null:a;default:return null}}function ER(a,s){if(gs)return a==="compositionend"||!ih&&Nb(a,s)?(a=xb(),Cu=eh=_a=null,gs=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return Cb&&s.locale!=="ko"?null:s.data;default:return null}}var yR={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 Ob(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s==="input"?!!yR[a.type]:s==="textarea"}function Lb(a,s,u,d){ms?ps?ps.push(d):ps=[d]:ms=d,s=yc(s,"onChange"),0<s.length&&(u=new Nu("onChange","change",null,u,d),a.push({event:u,listeners:s}))}var Mo=null,Po=null;function _R(a){m_(a,0)}function Ou(a){var s=No(a);if(hb(s))return a}function Ib(a,s){if(a==="change")return s}var Db=!1;if(Vr){var sh;if(Vr){var oh="oninput"in document;if(!oh){var Mb=document.createElement("div");Mb.setAttribute("oninput","return;"),oh=typeof Mb.oninput=="function"}sh=oh}else sh=!1;Db=sh&&(!document.documentMode||9<document.documentMode)}function Pb(){Mo&&(Mo.detachEvent("onpropertychange",Bb),Po=Mo=null)}function Bb(a){if(a.propertyName==="value"&&Ou(Po)){var s=[];Lb(s,Po,a,Kd(a)),_b(_R,s)}}function xR(a,s,u){a==="focusin"?(Pb(),Mo=s,Po=u,Mo.attachEvent("onpropertychange",Bb)):a==="focusout"&&Pb()}function TR(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Ou(Po)}function vR(a,s){if(a==="click")return Ou(s)}function SR(a,s){if(a==="input"||a==="change")return Ou(s)}function AR(a,s){return a===s&&(a!==0||1/a===1/s)||a!==a&&s!==s}var In=typeof Object.is=="function"?Object.is:AR;function Bo(a,s){if(In(a,s))return!0;if(typeof a!="object"||a===null||typeof s!="object"||s===null)return!1;var u=Object.keys(a),d=Object.keys(s);if(u.length!==d.length)return!1;for(d=0;d<u.length;d++){var g=u[d];if(!st.call(s,g)||!In(a[g],s[g]))return!1}return!0}function jb(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function Ub(a,s){var u=jb(a);a=0;for(var d;u;){if(u.nodeType===3){if(d=a+u.textContent.length,a<=s&&d>=s)return{node:u,offset:s-a};a=d}e:{for(;u;){if(u.nextSibling){u=u.nextSibling;break e}u=u.parentNode}u=void 0}u=jb(u)}}function Hb(a,s){return a&&s?a===s?!0:a&&a.nodeType===3?!1:s&&s.nodeType===3?Hb(a,s.parentNode):"contains"in a?a.contains(s):a.compareDocumentPosition?!!(a.compareDocumentPosition(s)&16):!1:!1}function zb(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var s=Su(a.document);s instanceof a.HTMLIFrameElement;){try{var u=typeof s.contentWindow.location.href=="string"}catch{u=!1}if(u)a=s.contentWindow;else break;s=Su(a.document)}return s}function lh(a){var s=a&&a.nodeName&&a.nodeName.toLowerCase();return s&&(s==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||s==="textarea"||a.contentEditable==="true")}var CR=Vr&&"documentMode"in document&&11>=document.documentMode,bs=null,uh=null,jo=null,ch=!1;function Fb(a,s,u){var d=u.window===u?u.document:u.nodeType===9?u:u.ownerDocument;ch||bs==null||bs!==Su(d)||(d=bs,"selectionStart"in d&&lh(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),jo&&Bo(jo,d)||(jo=d,d=yc(uh,"onSelect"),0<d.length&&(s=new Nu("onSelect","select",null,s,u),a.push({event:s,listeners:d}),s.target=bs)))}function hi(a,s){var u={};return u[a.toLowerCase()]=s.toLowerCase(),u["Webkit"+a]="webkit"+s,u["Moz"+a]="moz"+s,u}var Es={animationend:hi("Animation","AnimationEnd"),animationiteration:hi("Animation","AnimationIteration"),animationstart:hi("Animation","AnimationStart"),transitionrun:hi("Transition","TransitionRun"),transitionstart:hi("Transition","TransitionStart"),transitioncancel:hi("Transition","TransitionCancel"),transitionend:hi("Transition","TransitionEnd")},fh={},$b={};Vr&&($b=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function mi(a){if(fh[a])return fh[a];if(!Es[a])return a;var s=Es[a],u;for(u in s)if(s.hasOwnProperty(u)&&u in $b)return fh[a]=s[u];return a}var Vb=mi("animationend"),Gb=mi("animationiteration"),qb=mi("animationstart"),wR=mi("transitionrun"),kR=mi("transitionstart"),NR=mi("transitioncancel"),Yb=mi("transitionend"),Xb=new Map,dh="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(" ");dh.push("scrollEnd");function lr(a,s){Xb.set(a,s),fi(s,[a])}var Lu=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var s=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(s))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Yn=[],ys=0,hh=0;function Iu(){for(var a=ys,s=hh=ys=0;s<a;){var u=Yn[s];Yn[s++]=null;var d=Yn[s];Yn[s++]=null;var g=Yn[s];Yn[s++]=null;var b=Yn[s];if(Yn[s++]=null,d!==null&&g!==null){var A=d.pending;A===null?g.next=g:(g.next=A.next,A.next=g),d.pending=g}b!==0&&Qb(u,g,b)}}function Du(a,s,u,d){Yn[ys++]=a,Yn[ys++]=s,Yn[ys++]=u,Yn[ys++]=d,hh|=d,a.lanes|=d,a=a.alternate,a!==null&&(a.lanes|=d)}function mh(a,s,u,d){return Du(a,s,u,d),Mu(a)}function pi(a,s){return Du(a,null,null,s),Mu(a)}function Qb(a,s,u){a.lanes|=u;var d=a.alternate;d!==null&&(d.lanes|=u);for(var g=!1,b=a.return;b!==null;)b.childLanes|=u,d=b.alternate,d!==null&&(d.childLanes|=u),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(g=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,g&&s!==null&&(g=31-pt(u),a=b.hiddenUpdates,d=a[g],d===null?a[g]=[s]:d.push(s),s.lane=u|536870912),b):null}function Mu(a){if(50<sl)throw sl=0,vm=null,Error(r(185));for(var s=a.return;s!==null;)a=s,s=a.return;return a.tag===3?a.stateNode:null}var _s={};function RR(a,s,u,d){this.tag=a,this.key=u,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Dn(a,s,u,d){return new RR(a,s,u,d)}function ph(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Gr(a,s){var u=a.alternate;return u===null?(u=Dn(a.tag,s,a.key,a.mode),u.elementType=a.elementType,u.type=a.type,u.stateNode=a.stateNode,u.alternate=a,a.alternate=u):(u.pendingProps=s,u.type=a.type,u.flags=0,u.subtreeFlags=0,u.deletions=null),u.flags=a.flags&65011712,u.childLanes=a.childLanes,u.lanes=a.lanes,u.child=a.child,u.memoizedProps=a.memoizedProps,u.memoizedState=a.memoizedState,u.updateQueue=a.updateQueue,s=a.dependencies,u.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},u.sibling=a.sibling,u.index=a.index,u.ref=a.ref,u.refCleanup=a.refCleanup,u}function Wb(a,s){a.flags&=65011714;var u=a.alternate;return u===null?(a.childLanes=0,a.lanes=s,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=u.childLanes,a.lanes=u.lanes,a.child=u.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=u.memoizedProps,a.memoizedState=u.memoizedState,a.updateQueue=u.updateQueue,a.type=u.type,s=u.dependencies,a.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),a}function Pu(a,s,u,d,g,b){var A=0;if(d=a,typeof a=="function")ph(a)&&(A=1);else if(typeof a=="string")A=MO(a,u,ge.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case ie:return a=Dn(31,u,s,g),a.elementType=ie,a.lanes=b,a;case S:return gi(u.children,g,b,s);case C:A=8,g|=24;break;case w:return a=Dn(12,u,s,g|2),a.elementType=w,a.lanes=b,a;case B:return a=Dn(13,u,s,g),a.elementType=B,a.lanes=b,a;case D:return a=Dn(19,u,s,g),a.elementType=D,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case N:A=10;break e;case k:A=9;break e;case P:A=11;break e;case $:A=14;break e;case G:A=16,d=null;break e}A=29,u=Error(r(130,a===null?"null":typeof a,"")),d=null}return s=Dn(A,u,s,g),s.elementType=a,s.type=d,s.lanes=b,s}function gi(a,s,u,d){return a=Dn(7,a,d,s),a.lanes=u,a}function gh(a,s,u){return a=Dn(6,a,null,s),a.lanes=u,a}function Kb(a){var s=Dn(18,null,null,0);return s.stateNode=a,s}function bh(a,s,u){return s=Dn(4,a.children!==null?a.children:[],a.key,s),s.lanes=u,s.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},s}var Zb=new WeakMap;function Xn(a,s){if(typeof a=="object"&&a!==null){var u=Zb.get(a);return u!==void 0?u:(s={value:a,source:s,stack:He(s)},Zb.set(a,s),s)}return{value:a,source:s,stack:He(s)}}var xs=[],Ts=0,Bu=null,Uo=0,Qn=[],Wn=0,xa=null,Tr=1,vr="";function qr(a,s){xs[Ts++]=Uo,xs[Ts++]=Bu,Bu=a,Uo=s}function Jb(a,s,u){Qn[Wn++]=Tr,Qn[Wn++]=vr,Qn[Wn++]=xa,xa=a;var d=Tr;a=vr;var g=32-pt(d)-1;d&=~(1<<g),u+=1;var b=32-pt(s)+g;if(30<b){var A=g-g%5;b=(d&(1<<A)-1).toString(32),d>>=A,g-=A,Tr=1<<32-pt(s)+g|u<<g|d,vr=b+a}else Tr=1<<b|u<<g|d,vr=a}function Eh(a){a.return!==null&&(qr(a,1),Jb(a,1,0))}function yh(a){for(;a===Bu;)Bu=xs[--Ts],xs[Ts]=null,Uo=xs[--Ts],xs[Ts]=null;for(;a===xa;)xa=Qn[--Wn],Qn[Wn]=null,vr=Qn[--Wn],Qn[Wn]=null,Tr=Qn[--Wn],Qn[Wn]=null}function eE(a,s){Qn[Wn++]=Tr,Qn[Wn++]=vr,Qn[Wn++]=xa,Tr=s.id,vr=s.overflow,xa=a}var Jt=null,_t=null,Ke=!1,Ta=null,Kn=!1,_h=Error(r(519));function va(a){var s=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ho(Xn(s,a)),_h}function tE(a){var s=a.stateNode,u=a.type,d=a.memoizedProps;switch(s[Zt]=a,s[xn]=d,u){case"dialog":qe("cancel",s),qe("close",s);break;case"iframe":case"object":case"embed":qe("load",s);break;case"video":case"audio":for(u=0;u<ll.length;u++)qe(ll[u],s);break;case"source":qe("error",s);break;case"img":case"image":case"link":qe("error",s),qe("load",s);break;case"details":qe("toggle",s);break;case"input":qe("invalid",s),mb(s,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":qe("invalid",s);break;case"textarea":qe("invalid",s),gb(s,d.value,d.defaultValue,d.children)}u=d.children,typeof u!="string"&&typeof u!="number"&&typeof u!="bigint"||s.textContent===""+u||d.suppressHydrationWarning===!0||E_(s.textContent,u)?(d.popover!=null&&(qe("beforetoggle",s),qe("toggle",s)),d.onScroll!=null&&qe("scroll",s),d.onScrollEnd!=null&&qe("scrollend",s),d.onClick!=null&&(s.onclick=$r),s=!0):s=!1,s||va(a,!0)}function nE(a){for(Jt=a.return;Jt;)switch(Jt.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:Jt=Jt.return}}function vs(a){if(a!==Jt)return!1;if(!Ke)return nE(a),Ke=!0,!1;var s=a.tag,u;if((u=s!==3&&s!==27)&&((u=s===5)&&(u=a.type,u=!(u!=="form"&&u!=="button")||jm(a.type,a.memoizedProps)),u=!u),u&&_t&&va(a),nE(a),s===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=w_(a)}else if(s===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));_t=w_(a)}else s===27?(s=_t,Ba(a.type)?(a=$m,$m=null,_t=a):_t=s):_t=Jt?Jn(a.stateNode.nextSibling):null;return!0}function bi(){_t=Jt=null,Ke=!1}function xh(){var a=Ta;return a!==null&&(Cn===null?Cn=a:Cn.push.apply(Cn,a),Ta=null),a}function Ho(a){Ta===null?Ta=[a]:Ta.push(a)}var Th=z(null),Ei=null,Yr=null;function Sa(a,s,u){M(Th,s._currentValue),s._currentValue=u}function Xr(a){a._currentValue=Th.current,te(Th)}function vh(a,s,u){for(;a!==null;){var d=a.alternate;if((a.childLanes&s)!==s?(a.childLanes|=s,d!==null&&(d.childLanes|=s)):d!==null&&(d.childLanes&s)!==s&&(d.childLanes|=s),a===u)break;a=a.return}}function Sh(a,s,u,d){var g=a.child;for(g!==null&&(g.return=a);g!==null;){var b=g.dependencies;if(b!==null){var A=g.child;b=b.firstContext;e:for(;b!==null;){var R=b;b=g;for(var F=0;F<s.length;F++)if(R.context===s[F]){b.lanes|=u,R=b.alternate,R!==null&&(R.lanes|=u),vh(b.return,u,a),d||(A=null);break e}b=R.next}}else if(g.tag===18){if(A=g.return,A===null)throw Error(r(341));A.lanes|=u,b=A.alternate,b!==null&&(b.lanes|=u),vh(A,u,a),A=null}else A=g.child;if(A!==null)A.return=g;else for(A=g;A!==null;){if(A===a){A=null;break}if(g=A.sibling,g!==null){g.return=A.return,A=g;break}A=A.return}g=A}}function Ss(a,s,u,d){a=null;for(var g=s,b=!1;g!==null;){if(!b){if((g.flags&524288)!==0)b=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var A=g.alternate;if(A===null)throw Error(r(387));if(A=A.memoizedProps,A!==null){var R=g.type;In(g.pendingProps.value,A.value)||(a!==null?a.push(R):a=[R])}}else if(g===be.current){if(A=g.alternate,A===null)throw Error(r(387));A.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(a!==null?a.push(hl):a=[hl])}g=g.return}a!==null&&Sh(s,a,u,d),s.flags|=262144}function ju(a){for(a=a.firstContext;a!==null;){if(!In(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function yi(a){Ei=a,Yr=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function en(a){return rE(Ei,a)}function Uu(a,s){return Ei===null&&yi(a),rE(a,s)}function rE(a,s){var u=s._currentValue;if(s={context:s,memoizedValue:u,next:null},Yr===null){if(a===null)throw Error(r(308));Yr=s,a.dependencies={lanes:0,firstContext:s},a.flags|=524288}else Yr=Yr.next=s;return u}var OR=typeof AbortController<"u"?AbortController:function(){var a=[],s=this.signal={aborted:!1,addEventListener:function(u,d){a.push(d)}};this.abort=function(){s.aborted=!0,a.forEach(function(u){return u()})}},LR=e.unstable_scheduleCallback,IR=e.unstable_NormalPriority,It={$$typeof:N,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ah(){return{controller:new OR,data:new Map,refCount:0}}function zo(a){a.refCount--,a.refCount===0&&LR(IR,function(){a.controller.abort()})}var Fo=null,Ch=0,As=0,Cs=null;function DR(a,s){if(Fo===null){var u=Fo=[];Ch=0,As=Nm(),Cs={status:"pending",value:void 0,then:function(d){u.push(d)}}}return Ch++,s.then(aE,aE),s}function aE(){if(--Ch===0&&Fo!==null){Cs!==null&&(Cs.status="fulfilled");var a=Fo;Fo=null,As=0,Cs=null;for(var s=0;s<a.length;s++)(0,a[s])()}}function MR(a,s){var u=[],d={status:"pending",value:null,reason:null,then:function(g){u.push(g)}};return a.then(function(){d.status="fulfilled",d.value=s;for(var g=0;g<u.length;g++)(0,u[g])(s)},function(g){for(d.status="rejected",d.reason=g,g=0;g<u.length;g++)(0,u[g])(void 0)}),d}var iE=U.S;U.S=function(a,s){Fy=fn(),typeof s=="object"&&s!==null&&typeof s.then=="function"&&DR(a,s),iE!==null&&iE(a,s)};var _i=z(null);function wh(){var a=_i.current;return a!==null?a:gt.pooledCache}function Hu(a,s){s===null?M(_i,_i.current):M(_i,s.pool)}function sE(){var a=wh();return a===null?null:{parent:It._currentValue,pool:a}}var ws=Error(r(460)),kh=Error(r(474)),zu=Error(r(542)),Fu={then:function(){}};function oE(a){return a=a.status,a==="fulfilled"||a==="rejected"}function lE(a,s,u){switch(u=a[u],u===void 0?a.push(s):u!==s&&(s.then($r,$r),s=u),s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,cE(a),a;default:if(typeof s.status=="string")s.then($r,$r);else{if(a=gt,a!==null&&100<a.shellSuspendCounter)throw Error(r(482));a=s,a.status="pending",a.then(function(d){if(s.status==="pending"){var g=s;g.status="fulfilled",g.value=d}},function(d){if(s.status==="pending"){var g=s;g.status="rejected",g.reason=d}})}switch(s.status){case"fulfilled":return s.value;case"rejected":throw a=s.reason,cE(a),a}throw Ti=s,ws}}function xi(a){try{var s=a._init;return s(a._payload)}catch(u){throw u!==null&&typeof u=="object"&&typeof u.then=="function"?(Ti=u,ws):u}}var Ti=null;function uE(){if(Ti===null)throw Error(r(459));var a=Ti;return Ti=null,a}function cE(a){if(a===ws||a===zu)throw Error(r(483))}var ks=null,$o=0;function $u(a){var s=$o;return $o+=1,ks===null&&(ks=[]),lE(ks,a,s)}function Vo(a,s){s=s.props.ref,a.ref=s!==void 0?s:null}function Vu(a,s){throw s.$$typeof===y?Error(r(525)):(a=Object.prototype.toString.call(s),Error(r(31,a==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":a)))}function fE(a){function s(Y,q){if(a){var W=Y.deletions;W===null?(Y.deletions=[q],Y.flags|=16):W.push(q)}}function u(Y,q){if(!a)return null;for(;q!==null;)s(Y,q),q=q.sibling;return null}function d(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function g(Y,q){return Y=Gr(Y,q),Y.index=0,Y.sibling=null,Y}function b(Y,q,W){return Y.index=W,a?(W=Y.alternate,W!==null?(W=W.index,W<q?(Y.flags|=67108866,q):W):(Y.flags|=67108866,q)):(Y.flags|=1048576,q)}function A(Y){return a&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,q,W,le){return q===null||q.tag!==6?(q=gh(W,Y.mode,le),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function F(Y,q,W,le){var Ne=W.type;return Ne===S?se(Y,q,W.props.children,le,W.key):q!==null&&(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&xi(Ne)===q.type)?(q=g(q,W.props),Vo(q,W),q.return=Y,q):(q=Pu(W.type,W.key,W.props,null,Y.mode,le),Vo(q,W),q.return=Y,q)}function K(Y,q,W,le){return q===null||q.tag!==4||q.stateNode.containerInfo!==W.containerInfo||q.stateNode.implementation!==W.implementation?(q=bh(W,Y.mode,le),q.return=Y,q):(q=g(q,W.children||[]),q.return=Y,q)}function se(Y,q,W,le,Ne){return q===null||q.tag!==7?(q=gi(W,Y.mode,le,Ne),q.return=Y,q):(q=g(q,W),q.return=Y,q)}function fe(Y,q,W){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=gh(""+q,Y.mode,W),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case E:return W=Pu(q.type,q.key,q.props,null,Y.mode,W),Vo(W,q),W.return=Y,W;case T:return q=bh(q,Y.mode,W),q.return=Y,q;case G:return q=xi(q),fe(Y,q,W)}if(re(q)||J(q))return q=gi(q,Y.mode,W,null),q.return=Y,q;if(typeof q.then=="function")return fe(Y,$u(q),W);if(q.$$typeof===N)return fe(Y,Uu(Y,q),W);Vu(Y,q)}return null}function Z(Y,q,W,le){var Ne=q!==null?q.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ne!==null?null:R(Y,q,""+W,le);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case E:return W.key===Ne?F(Y,q,W,le):null;case T:return W.key===Ne?K(Y,q,W,le):null;case G:return W=xi(W),Z(Y,q,W,le)}if(re(W)||J(W))return Ne!==null?null:se(Y,q,W,le,null);if(typeof W.then=="function")return Z(Y,q,$u(W),le);if(W.$$typeof===N)return Z(Y,q,Uu(Y,W),le);Vu(Y,W)}return null}function ne(Y,q,W,le,Ne){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Y=Y.get(W)||null,R(q,Y,""+le,Ne);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case E:return Y=Y.get(le.key===null?W:le.key)||null,F(q,Y,le,Ne);case T:return Y=Y.get(le.key===null?W:le.key)||null,K(q,Y,le,Ne);case G:return le=xi(le),ne(Y,q,W,le,Ne)}if(re(le)||J(le))return Y=Y.get(W)||null,se(q,Y,le,Ne,null);if(typeof le.then=="function")return ne(Y,q,W,$u(le),Ne);if(le.$$typeof===N)return ne(Y,q,W,Uu(q,le),Ne);Vu(q,le)}return null}function Ae(Y,q,W,le){for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null;Ce!==null&&Ue<W.length;Ue++){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var rt=Z(Y,Ce,W[Ue],le);if(rt===null){Ce===null&&(Ce=Qe);break}a&&Ce&&rt.alternate===null&&s(Y,Ce),q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt,Ce=Qe}if(Ue===W.length)return u(Y,Ce),Ke&&qr(Y,Ue),Ne;if(Ce===null){for(;Ue<W.length;Ue++)Ce=fe(Y,W[Ue],le),Ce!==null&&(q=b(Ce,q,Ue),nt===null?Ne=Ce:nt.sibling=Ce,nt=Ce);return Ke&&qr(Y,Ue),Ne}for(Ce=d(Ce);Ue<W.length;Ue++)Qe=ne(Ce,Y,Ue,W[Ue],le),Qe!==null&&(a&&Qe.alternate!==null&&Ce.delete(Qe.key===null?Ue:Qe.key),q=b(Qe,q,Ue),nt===null?Ne=Qe:nt.sibling=Qe,nt=Qe);return a&&Ce.forEach(function(Fa){return s(Y,Fa)}),Ke&&qr(Y,Ue),Ne}function Oe(Y,q,W,le){if(W==null)throw Error(r(151));for(var Ne=null,nt=null,Ce=q,Ue=q=0,Qe=null,rt=W.next();Ce!==null&&!rt.done;Ue++,rt=W.next()){Ce.index>Ue?(Qe=Ce,Ce=null):Qe=Ce.sibling;var Fa=Z(Y,Ce,rt.value,le);if(Fa===null){Ce===null&&(Ce=Qe);break}a&&Ce&&Fa.alternate===null&&s(Y,Ce),q=b(Fa,q,Ue),nt===null?Ne=Fa:nt.sibling=Fa,nt=Fa,Ce=Qe}if(rt.done)return u(Y,Ce),Ke&&qr(Y,Ue),Ne;if(Ce===null){for(;!rt.done;Ue++,rt=W.next())rt=fe(Y,rt.value,le),rt!==null&&(q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return Ke&&qr(Y,Ue),Ne}for(Ce=d(Ce);!rt.done;Ue++,rt=W.next())rt=ne(Ce,Y,Ue,rt.value,le),rt!==null&&(a&&rt.alternate!==null&&Ce.delete(rt.key===null?Ue:rt.key),q=b(rt,q,Ue),nt===null?Ne=rt:nt.sibling=rt,nt=rt);return a&&Ce.forEach(function(qO){return s(Y,qO)}),Ke&&qr(Y,Ue),Ne}function ht(Y,q,W,le){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case E:e:{for(var Ne=W.key;q!==null;){if(q.key===Ne){if(Ne=W.type,Ne===S){if(q.tag===7){u(Y,q.sibling),le=g(q,W.props.children),le.return=Y,Y=le;break e}}else if(q.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===G&&xi(Ne)===q.type){u(Y,q.sibling),le=g(q,W.props),Vo(le,W),le.return=Y,Y=le;break e}u(Y,q);break}else s(Y,q);q=q.sibling}W.type===S?(le=gi(W.props.children,Y.mode,le,W.key),le.return=Y,Y=le):(le=Pu(W.type,W.key,W.props,null,Y.mode,le),Vo(le,W),le.return=Y,Y=le)}return A(Y);case T:e:{for(Ne=W.key;q!==null;){if(q.key===Ne)if(q.tag===4&&q.stateNode.containerInfo===W.containerInfo&&q.stateNode.implementation===W.implementation){u(Y,q.sibling),le=g(q,W.children||[]),le.return=Y,Y=le;break e}else{u(Y,q);break}else s(Y,q);q=q.sibling}le=bh(W,Y.mode,le),le.return=Y,Y=le}return A(Y);case G:return W=xi(W),ht(Y,q,W,le)}if(re(W))return Ae(Y,q,W,le);if(J(W)){if(Ne=J(W),typeof Ne!="function")throw Error(r(150));return W=Ne.call(W),Oe(Y,q,W,le)}if(typeof W.then=="function")return ht(Y,q,$u(W),le);if(W.$$typeof===N)return ht(Y,q,Uu(Y,W),le);Vu(Y,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,q!==null&&q.tag===6?(u(Y,q.sibling),le=g(q,W),le.return=Y,Y=le):(u(Y,q),le=gh(W,Y.mode,le),le.return=Y,Y=le),A(Y)):u(Y,q)}return function(Y,q,W,le){try{$o=0;var Ne=ht(Y,q,W,le);return ks=null,Ne}catch(Ce){if(Ce===ws||Ce===zu)throw Ce;var nt=Dn(29,Ce,null,Y.mode);return nt.lanes=le,nt.return=Y,nt}}}var vi=fE(!0),dE=fE(!1),Aa=!1;function Nh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rh(a,s){a=a.updateQueue,s.updateQueue===a&&(s.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ca(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function wa(a,s,u){var d=a.updateQueue;if(d===null)return null;if(d=d.shared,(at&2)!==0){var g=d.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),d.pending=s,s=Mu(a),Qb(a,null,u),s}return Du(a,d,s,u),Mu(a)}function Go(a,s,u){if(s=s.updateQueue,s!==null&&(s=s.shared,(u&4194048)!==0)){var d=s.lanes;d&=a.pendingLanes,u|=d,s.lanes=u,rb(a,u)}}function Oh(a,s){var u=a.updateQueue,d=a.alternate;if(d!==null&&(d=d.updateQueue,u===d)){var g=null,b=null;if(u=u.firstBaseUpdate,u!==null){do{var A={lane:u.lane,tag:u.tag,payload:u.payload,callback:null,next:null};b===null?g=b=A:b=b.next=A,u=u.next}while(u!==null);b===null?g=b=s:b=b.next=s}else g=b=s;u={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},a.updateQueue=u;return}a=u.lastBaseUpdate,a===null?u.firstBaseUpdate=s:a.next=s,u.lastBaseUpdate=s}var Lh=!1;function qo(){if(Lh){var a=Cs;if(a!==null)throw a}}function Yo(a,s,u,d){Lh=!1;var g=a.updateQueue;Aa=!1;var b=g.firstBaseUpdate,A=g.lastBaseUpdate,R=g.shared.pending;if(R!==null){g.shared.pending=null;var F=R,K=F.next;F.next=null,A===null?b=K:A.next=K,A=F;var se=a.alternate;se!==null&&(se=se.updateQueue,R=se.lastBaseUpdate,R!==A&&(R===null?se.firstBaseUpdate=K:R.next=K,se.lastBaseUpdate=F))}if(b!==null){var fe=g.baseState;A=0,se=K=F=null,R=b;do{var Z=R.lane&-536870913,ne=Z!==R.lane;if(ne?(Xe&Z)===Z:(d&Z)===Z){Z!==0&&Z===As&&(Lh=!0),se!==null&&(se=se.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var Ae=a,Oe=R;Z=s;var ht=u;switch(Oe.tag){case 1:if(Ae=Oe.payload,typeof Ae=="function"){fe=Ae.call(ht,fe,Z);break e}fe=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Oe.payload,Z=typeof Ae=="function"?Ae.call(ht,fe,Z):Ae,Z==null)break e;fe=m({},fe,Z);break e;case 2:Aa=!0}}Z=R.callback,Z!==null&&(a.flags|=64,ne&&(a.flags|=8192),ne=g.callbacks,ne===null?g.callbacks=[Z]:ne.push(Z))}else ne={lane:Z,tag:R.tag,payload:R.payload,callback:R.callback,next:null},se===null?(K=se=ne,F=fe):se=se.next=ne,A|=Z;if(R=R.next,R===null){if(R=g.shared.pending,R===null)break;ne=R,R=ne.next,ne.next=null,g.lastBaseUpdate=ne,g.shared.pending=null}}while(!0);se===null&&(F=fe),g.baseState=F,g.firstBaseUpdate=K,g.lastBaseUpdate=se,b===null&&(g.shared.lanes=0),La|=A,a.lanes=A,a.memoizedState=fe}}function hE(a,s){if(typeof a!="function")throw Error(r(191,a));a.call(s)}function mE(a,s){var u=a.callbacks;if(u!==null)for(a.callbacks=null,a=0;a<u.length;a++)hE(u[a],s)}var Ns=z(null),Gu=z(0);function pE(a,s){a=ra,M(Gu,a),M(Ns,s),ra=a|s.baseLanes}function Ih(){M(Gu,ra),M(Ns,Ns.current)}function Dh(){ra=Gu.current,te(Ns),te(Gu)}var Mn=z(null),Zn=null;function ka(a){var s=a.alternate;M(Nt,Nt.current&1),M(Mn,a),Zn===null&&(s===null||Ns.current!==null||s.memoizedState!==null)&&(Zn=a)}function Mh(a){M(Nt,Nt.current),M(Mn,a),Zn===null&&(Zn=a)}function gE(a){a.tag===22?(M(Nt,Nt.current),M(Mn,a),Zn===null&&(Zn=a)):Na()}function Na(){M(Nt,Nt.current),M(Mn,Mn.current)}function Pn(a){te(Mn),Zn===a&&(Zn=null),te(Nt)}var Nt=z(0);function qu(a){for(var s=a;s!==null;){if(s.tag===13){var u=s.memoizedState;if(u!==null&&(u=u.dehydrated,u===null||zm(u)||Fm(u)))return s}else if(s.tag===19&&(s.memoizedProps.revealOrder==="forwards"||s.memoizedProps.revealOrder==="backwards"||s.memoizedProps.revealOrder==="unstable_legacy-backwards"||s.memoizedProps.revealOrder==="together")){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Qr=0,Be=null,ft=null,Dt=null,Yu=!1,Rs=!1,Si=!1,Xu=0,Xo=0,Os=null,PR=0;function At(){throw Error(r(321))}function Ph(a,s){if(s===null)return!1;for(var u=0;u<s.length&&u<a.length;u++)if(!In(a[u],s[u]))return!1;return!0}function Bh(a,s,u,d,g,b){return Qr=b,Be=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,U.H=a===null||a.memoizedState===null?JE:Zh,Si=!1,b=u(d,g),Si=!1,Rs&&(b=EE(s,u,d,g)),bE(a),b}function bE(a){U.H=Ko;var s=ft!==null&&ft.next!==null;if(Qr=0,Dt=ft=Be=null,Yu=!1,Xo=0,Os=null,s)throw Error(r(300));a===null||Mt||(a=a.dependencies,a!==null&&ju(a)&&(Mt=!0))}function EE(a,s,u,d){Be=a;var g=0;do{if(Rs&&(Os=null),Xo=0,Rs=!1,25<=g)throw Error(r(301));if(g+=1,Dt=ft=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}U.H=ey,b=s(u,d)}while(Rs);return b}function BR(){var a=U.H,s=a.useState()[0];return s=typeof s.then=="function"?Qo(s):s,a=a.useState()[0],(ft!==null?ft.memoizedState:null)!==a&&(Be.flags|=1024),s}function jh(){var a=Xu!==0;return Xu=0,a}function Uh(a,s,u){s.updateQueue=a.updateQueue,s.flags&=-2053,a.lanes&=~u}function Hh(a){if(Yu){for(a=a.memoizedState;a!==null;){var s=a.queue;s!==null&&(s.pending=null),a=a.next}Yu=!1}Qr=0,Dt=ft=Be=null,Rs=!1,Xo=Xu=0,Os=null}function hn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Dt===null?Be.memoizedState=Dt=a:Dt=Dt.next=a,Dt}function Rt(){if(ft===null){var a=Be.alternate;a=a!==null?a.memoizedState:null}else a=ft.next;var s=Dt===null?Be.memoizedState:Dt.next;if(s!==null)Dt=s,ft=a;else{if(a===null)throw Be.alternate===null?Error(r(467)):Error(r(310));ft=a,a={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},Dt===null?Be.memoizedState=Dt=a:Dt=Dt.next=a}return Dt}function Qu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qo(a){var s=Xo;return Xo+=1,Os===null&&(Os=[]),a=lE(Os,a,s),s=Be,(Dt===null?s.memoizedState:Dt.next)===null&&(s=s.alternate,U.H=s===null||s.memoizedState===null?JE:Zh),a}function Wu(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return Qo(a);if(a.$$typeof===N)return en(a)}throw Error(r(438,String(a)))}function zh(a){var s=null,u=Be.updateQueue;if(u!==null&&(s=u.memoCache),s==null){var d=Be.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(s={data:d.data.map(function(g){return g.slice()}),index:0})))}if(s==null&&(s={data:[],index:0}),u===null&&(u=Qu(),Be.updateQueue=u),u.memoCache=s,u=s.data[s.index],u===void 0)for(u=s.data[s.index]=Array(a),d=0;d<a;d++)u[d]=V;return s.index++,u}function Wr(a,s){return typeof s=="function"?s(a):s}function Ku(a){var s=Rt();return Fh(s,ft,a)}function Fh(a,s,u){var d=a.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=u;var g=a.baseQueue,b=d.pending;if(b!==null){if(g!==null){var A=g.next;g.next=b.next,b.next=A}s.baseQueue=g=b,d.pending=null}if(b=a.baseState,g===null)a.memoizedState=b;else{s=g.next;var R=A=null,F=null,K=s,se=!1;do{var fe=K.lane&-536870913;if(fe!==K.lane?(Xe&fe)===fe:(Qr&fe)===fe){var Z=K.revertLane;if(Z===0)F!==null&&(F=F.next={lane:0,revertLane:0,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null}),fe===As&&(se=!0);else if((Qr&Z)===Z){K=K.next,Z===As&&(se=!0);continue}else fe={lane:0,revertLane:K.revertLane,gesture:null,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},F===null?(R=F=fe,A=b):F=F.next=fe,Be.lanes|=Z,La|=Z;fe=K.action,Si&&u(b,fe),b=K.hasEagerState?K.eagerState:u(b,fe)}else Z={lane:fe,revertLane:K.revertLane,gesture:K.gesture,action:K.action,hasEagerState:K.hasEagerState,eagerState:K.eagerState,next:null},F===null?(R=F=Z,A=b):F=F.next=Z,Be.lanes|=fe,La|=fe;K=K.next}while(K!==null&&K!==s);if(F===null?A=b:F.next=R,!In(b,a.memoizedState)&&(Mt=!0,se&&(u=Cs,u!==null)))throw u;a.memoizedState=b,a.baseState=A,a.baseQueue=F,d.lastRenderedState=b}return g===null&&(d.lanes=0),[a.memoizedState,d.dispatch]}function $h(a){var s=Rt(),u=s.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var d=u.dispatch,g=u.pending,b=s.memoizedState;if(g!==null){u.pending=null;var A=g=g.next;do b=a(b,A.action),A=A.next;while(A!==g);In(b,s.memoizedState)||(Mt=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),u.lastRenderedState=b}return[b,d]}function yE(a,s,u){var d=Be,g=Rt(),b=Ke;if(b){if(u===void 0)throw Error(r(407));u=u()}else u=s();var A=!In((ft||g).memoizedState,u);if(A&&(g.memoizedState=u,Mt=!0),g=g.queue,qh(TE.bind(null,d,g,a),[a]),g.getSnapshot!==s||A||Dt!==null&&Dt.memoizedState.tag&1){if(d.flags|=2048,Ls(9,{destroy:void 0},xE.bind(null,d,g,u,s),null),gt===null)throw Error(r(349));b||(Qr&127)!==0||_E(d,s,u)}return u}function _E(a,s,u){a.flags|=16384,a={getSnapshot:s,value:u},s=Be.updateQueue,s===null?(s=Qu(),Be.updateQueue=s,s.stores=[a]):(u=s.stores,u===null?s.stores=[a]:u.push(a))}function xE(a,s,u,d){s.value=u,s.getSnapshot=d,vE(s)&&SE(a)}function TE(a,s,u){return u(function(){vE(s)&&SE(a)})}function vE(a){var s=a.getSnapshot;a=a.value;try{var u=s();return!In(a,u)}catch{return!0}}function SE(a){var s=pi(a,2);s!==null&&wn(s,a,2)}function Vh(a){var s=hn();if(typeof a=="function"){var u=a;if(a=u(),Si){_n(!0);try{u()}finally{_n(!1)}}}return s.memoizedState=s.baseState=a,s.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:a},s}function AE(a,s,u,d){return a.baseState=u,Fh(a,ft,typeof d=="function"?d:Wr)}function jR(a,s,u,d,g){if(ec(a))throw Error(r(485));if(a=s.action,a!==null){var b={payload:g,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(A){b.listeners.push(A)}};U.T!==null?u(!0):b.isTransition=!1,d(b),u=s.pending,u===null?(b.next=s.pending=b,CE(s,b)):(b.next=u.next,s.pending=u.next=b)}}function CE(a,s){var u=s.action,d=s.payload,g=a.state;if(s.isTransition){var b=U.T,A={};U.T=A;try{var R=u(g,d),F=U.S;F!==null&&F(A,R),wE(a,s,R)}catch(K){Gh(a,s,K)}finally{b!==null&&A.types!==null&&(b.types=A.types),U.T=b}}else try{b=u(g,d),wE(a,s,b)}catch(K){Gh(a,s,K)}}function wE(a,s,u){u!==null&&typeof u=="object"&&typeof u.then=="function"?u.then(function(d){kE(a,s,d)},function(d){return Gh(a,s,d)}):kE(a,s,u)}function kE(a,s,u){s.status="fulfilled",s.value=u,NE(s),a.state=u,s=a.pending,s!==null&&(u=s.next,u===s?a.pending=null:(u=u.next,s.next=u,CE(a,u)))}function Gh(a,s,u){var d=a.pending;if(a.pending=null,d!==null){d=d.next;do s.status="rejected",s.reason=u,NE(s),s=s.next;while(s!==d)}a.action=null}function NE(a){a=a.listeners;for(var s=0;s<a.length;s++)(0,a[s])()}function RE(a,s){return s}function OE(a,s){if(Ke){var u=gt.formState;if(u!==null){e:{var d=Be;if(Ke){if(_t){t:{for(var g=_t,b=Kn;g.nodeType!==8;){if(!b){g=null;break t}if(g=Jn(g.nextSibling),g===null){g=null;break t}}b=g.data,g=b==="F!"||b==="F"?g:null}if(g){_t=Jn(g.nextSibling),d=g.data==="F!";break e}}va(d)}d=!1}d&&(s=u[0])}}return u=hn(),u.memoizedState=u.baseState=s,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RE,lastRenderedState:s},u.queue=d,u=WE.bind(null,Be,d),d.dispatch=u,d=Vh(!1),b=Kh.bind(null,Be,!1,d.queue),d=hn(),g={state:s,dispatch:null,action:a,pending:null},d.queue=g,u=jR.bind(null,Be,g,b,u),g.dispatch=u,d.memoizedState=a,[s,u,!1]}function LE(a){var s=Rt();return IE(s,ft,a)}function IE(a,s,u){if(s=Fh(a,s,RE)[0],a=Ku(Wr)[0],typeof s=="object"&&s!==null&&typeof s.then=="function")try{var d=Qo(s)}catch(A){throw A===ws?zu:A}else d=s;s=Rt();var g=s.queue,b=g.dispatch;return u!==s.memoizedState&&(Be.flags|=2048,Ls(9,{destroy:void 0},UR.bind(null,g,u),null)),[d,b,a]}function UR(a,s){a.action=s}function DE(a){var s=Rt(),u=ft;if(u!==null)return IE(s,u,a);Rt(),s=s.memoizedState,u=Rt();var d=u.queue.dispatch;return u.memoizedState=a,[s,d,!1]}function Ls(a,s,u,d){return a={tag:a,create:u,deps:d,inst:s,next:null},s=Be.updateQueue,s===null&&(s=Qu(),Be.updateQueue=s),u=s.lastEffect,u===null?s.lastEffect=a.next=a:(d=u.next,u.next=a,a.next=d,s.lastEffect=a),a}function ME(){return Rt().memoizedState}function Zu(a,s,u,d){var g=hn();Be.flags|=a,g.memoizedState=Ls(1|s,{destroy:void 0},u,d===void 0?null:d)}function Ju(a,s,u,d){var g=Rt();d=d===void 0?null:d;var b=g.memoizedState.inst;ft!==null&&d!==null&&Ph(d,ft.memoizedState.deps)?g.memoizedState=Ls(s,b,u,d):(Be.flags|=a,g.memoizedState=Ls(1|s,b,u,d))}function PE(a,s){Zu(8390656,8,a,s)}function qh(a,s){Ju(2048,8,a,s)}function HR(a){Be.flags|=4;var s=Be.updateQueue;if(s===null)s=Qu(),Be.updateQueue=s,s.events=[a];else{var u=s.events;u===null?s.events=[a]:u.push(a)}}function BE(a){var s=Rt().memoizedState;return HR({ref:s,nextImpl:a}),function(){if((at&2)!==0)throw Error(r(440));return s.impl.apply(void 0,arguments)}}function jE(a,s){return Ju(4,2,a,s)}function UE(a,s){return Ju(4,4,a,s)}function HE(a,s){if(typeof s=="function"){a=a();var u=s(a);return function(){typeof u=="function"?u():s(null)}}if(s!=null)return a=a(),s.current=a,function(){s.current=null}}function zE(a,s,u){u=u!=null?u.concat([a]):null,Ju(4,4,HE.bind(null,s,a),u)}function Yh(){}function FE(a,s){var u=Rt();s=s===void 0?null:s;var d=u.memoizedState;return s!==null&&Ph(s,d[1])?d[0]:(u.memoizedState=[a,s],a)}function $E(a,s){var u=Rt();s=s===void 0?null:s;var d=u.memoizedState;if(s!==null&&Ph(s,d[1]))return d[0];if(d=a(),Si){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[d,s],d}function Xh(a,s,u){return u===void 0||(Qr&1073741824)!==0&&(Xe&261930)===0?a.memoizedState=s:(a.memoizedState=u,a=Vy(),Be.lanes|=a,La|=a,u)}function VE(a,s,u,d){return In(u,s)?u:Ns.current!==null?(a=Xh(a,u,d),In(a,s)||(Mt=!0),a):(Qr&42)===0||(Qr&1073741824)!==0&&(Xe&261930)===0?(Mt=!0,a.memoizedState=u):(a=Vy(),Be.lanes|=a,La|=a,s)}function GE(a,s,u,d,g){var b=ee.p;ee.p=b!==0&&8>b?b:8;var A=U.T,R={};U.T=R,Kh(a,!1,s,u);try{var F=g(),K=U.S;if(K!==null&&K(R,F),F!==null&&typeof F=="object"&&typeof F.then=="function"){var se=MR(F,d);Wo(a,s,se,Un(a))}else Wo(a,s,d,Un(a))}catch(fe){Wo(a,s,{then:function(){},status:"rejected",reason:fe},Un())}finally{ee.p=b,A!==null&&R.types!==null&&(A.types=R.types),U.T=A}}function zR(){}function Qh(a,s,u,d){if(a.tag!==5)throw Error(r(476));var g=qE(a).queue;GE(a,g,s,ce,u===null?zR:function(){return YE(a),u(d)})}function qE(a){var s=a.memoizedState;if(s!==null)return s;s={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:ce},next:null};var u={};return s.next={memoizedState:u,baseState:u,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wr,lastRenderedState:u},next:null},a.memoizedState=s,a=a.alternate,a!==null&&(a.memoizedState=s),s}function YE(a){var s=qE(a);s.next===null&&(s=a.alternate.memoizedState),Wo(a,s.next.queue,{},Un())}function Wh(){return en(hl)}function XE(){return Rt().memoizedState}function QE(){return Rt().memoizedState}function FR(a){for(var s=a.return;s!==null;){switch(s.tag){case 24:case 3:var u=Un();a=Ca(u);var d=wa(s,a,u);d!==null&&(wn(d,s,u),Go(d,s,u)),s={cache:Ah()},a.payload=s;return}s=s.return}}function $R(a,s,u){var d=Un();u={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},ec(a)?KE(s,u):(u=mh(a,s,u,d),u!==null&&(wn(u,a,d),ZE(u,s,d)))}function WE(a,s,u){var d=Un();Wo(a,s,u,d)}function Wo(a,s,u,d){var g={lane:d,revertLane:0,gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null};if(ec(a))KE(s,g);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var A=s.lastRenderedState,R=b(A,u);if(g.hasEagerState=!0,g.eagerState=R,In(R,A))return Du(a,s,g,0),gt===null&&Iu(),!1}catch{}if(u=mh(a,s,g,d),u!==null)return wn(u,a,d),ZE(u,s,d),!0}return!1}function Kh(a,s,u,d){if(d={lane:2,revertLane:Nm(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},ec(a)){if(s)throw Error(r(479))}else s=mh(a,u,d,2),s!==null&&wn(s,a,2)}function ec(a){var s=a.alternate;return a===Be||s!==null&&s===Be}function KE(a,s){Rs=Yu=!0;var u=a.pending;u===null?s.next=s:(s.next=u.next,u.next=s),a.pending=s}function ZE(a,s,u){if((u&4194048)!==0){var d=s.lanes;d&=a.pendingLanes,u|=d,s.lanes=u,rb(a,u)}}var Ko={readContext:en,use:Wu,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Ko.useEffectEvent=At;var JE={readContext:en,use:Wu,useCallback:function(a,s){return hn().memoizedState=[a,s===void 0?null:s],a},useContext:en,useEffect:PE,useImperativeHandle:function(a,s,u){u=u!=null?u.concat([a]):null,Zu(4194308,4,HE.bind(null,s,a),u)},useLayoutEffect:function(a,s){return Zu(4194308,4,a,s)},useInsertionEffect:function(a,s){Zu(4,2,a,s)},useMemo:function(a,s){var u=hn();s=s===void 0?null:s;var d=a();if(Si){_n(!0);try{a()}finally{_n(!1)}}return u.memoizedState=[d,s],d},useReducer:function(a,s,u){var d=hn();if(u!==void 0){var g=u(s);if(Si){_n(!0);try{u(s)}finally{_n(!1)}}}else g=s;return d.memoizedState=d.baseState=g,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:g},d.queue=a,a=a.dispatch=$R.bind(null,Be,a),[d.memoizedState,a]},useRef:function(a){var s=hn();return a={current:a},s.memoizedState=a},useState:function(a){a=Vh(a);var s=a.queue,u=WE.bind(null,Be,s);return s.dispatch=u,[a.memoizedState,u]},useDebugValue:Yh,useDeferredValue:function(a,s){var u=hn();return Xh(u,a,s)},useTransition:function(){var a=Vh(!1);return a=GE.bind(null,Be,a.queue,!0,!1),hn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,s,u){var d=Be,g=hn();if(Ke){if(u===void 0)throw Error(r(407));u=u()}else{if(u=s(),gt===null)throw Error(r(349));(Xe&127)!==0||_E(d,s,u)}g.memoizedState=u;var b={value:u,getSnapshot:s};return g.queue=b,PE(TE.bind(null,d,b,a),[a]),d.flags|=2048,Ls(9,{destroy:void 0},xE.bind(null,d,b,u,s),null),u},useId:function(){var a=hn(),s=gt.identifierPrefix;if(Ke){var u=vr,d=Tr;u=(d&~(1<<32-pt(d)-1)).toString(32)+u,s="_"+s+"R_"+u,u=Xu++,0<u&&(s+="H"+u.toString(32)),s+="_"}else u=PR++,s="_"+s+"r_"+u.toString(32)+"_";return a.memoizedState=s},useHostTransitionStatus:Wh,useFormState:OE,useActionState:OE,useOptimistic:function(a){var s=hn();s.memoizedState=s.baseState=a;var u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return s.queue=u,s=Kh.bind(null,Be,!0,u),u.dispatch=s,[a,s]},useMemoCache:zh,useCacheRefresh:function(){return hn().memoizedState=FR.bind(null,Be)},useEffectEvent:function(a){var s=hn(),u={impl:a};return s.memoizedState=u,function(){if((at&2)!==0)throw Error(r(440));return u.impl.apply(void 0,arguments)}}},Zh={readContext:en,use:Wu,useCallback:FE,useContext:en,useEffect:qh,useImperativeHandle:zE,useInsertionEffect:jE,useLayoutEffect:UE,useMemo:$E,useReducer:Ku,useRef:ME,useState:function(){return Ku(Wr)},useDebugValue:Yh,useDeferredValue:function(a,s){var u=Rt();return VE(u,ft.memoizedState,a,s)},useTransition:function(){var a=Ku(Wr)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:Qo(a),s]},useSyncExternalStore:yE,useId:XE,useHostTransitionStatus:Wh,useFormState:LE,useActionState:LE,useOptimistic:function(a,s){var u=Rt();return AE(u,ft,a,s)},useMemoCache:zh,useCacheRefresh:QE};Zh.useEffectEvent=BE;var ey={readContext:en,use:Wu,useCallback:FE,useContext:en,useEffect:qh,useImperativeHandle:zE,useInsertionEffect:jE,useLayoutEffect:UE,useMemo:$E,useReducer:$h,useRef:ME,useState:function(){return $h(Wr)},useDebugValue:Yh,useDeferredValue:function(a,s){var u=Rt();return ft===null?Xh(u,a,s):VE(u,ft.memoizedState,a,s)},useTransition:function(){var a=$h(Wr)[0],s=Rt().memoizedState;return[typeof a=="boolean"?a:Qo(a),s]},useSyncExternalStore:yE,useId:XE,useHostTransitionStatus:Wh,useFormState:DE,useActionState:DE,useOptimistic:function(a,s){var u=Rt();return ft!==null?AE(u,ft,a,s):(u.baseState=a,[a,u.queue.dispatch])},useMemoCache:zh,useCacheRefresh:QE};ey.useEffectEvent=BE;function Jh(a,s,u,d){s=a.memoizedState,u=u(d,s),u=u==null?s:m({},s,u),a.memoizedState=u,a.lanes===0&&(a.updateQueue.baseState=u)}var em={enqueueSetState:function(a,s,u){a=a._reactInternals;var d=Un(),g=Ca(d);g.payload=s,u!=null&&(g.callback=u),s=wa(a,g,d),s!==null&&(wn(s,a,d),Go(s,a,d))},enqueueReplaceState:function(a,s,u){a=a._reactInternals;var d=Un(),g=Ca(d);g.tag=1,g.payload=s,u!=null&&(g.callback=u),s=wa(a,g,d),s!==null&&(wn(s,a,d),Go(s,a,d))},enqueueForceUpdate:function(a,s){a=a._reactInternals;var u=Un(),d=Ca(u);d.tag=2,s!=null&&(d.callback=s),s=wa(a,d,u),s!==null&&(wn(s,a,u),Go(s,a,u))}};function ty(a,s,u,d,g,b,A){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(d,b,A):s.prototype&&s.prototype.isPureReactComponent?!Bo(u,d)||!Bo(g,b):!0}function ny(a,s,u,d){a=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(u,d),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(u,d),s.state!==a&&em.enqueueReplaceState(s,s.state,null)}function Ai(a,s){var u=s;if("ref"in s){u={};for(var d in s)d!=="ref"&&(u[d]=s[d])}if(a=a.defaultProps){u===s&&(u=m({},u));for(var g in a)u[g]===void 0&&(u[g]=a[g])}return u}function ry(a){Lu(a)}function ay(a){console.error(a)}function iy(a){Lu(a)}function tc(a,s){try{var u=a.onUncaughtError;u(s.value,{componentStack:s.stack})}catch(d){setTimeout(function(){throw d})}}function sy(a,s,u){try{var d=a.onCaughtError;d(u.value,{componentStack:u.stack,errorBoundary:s.tag===1?s.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function tm(a,s,u){return u=Ca(u),u.tag=3,u.payload={element:null},u.callback=function(){tc(a,s)},u}function oy(a){return a=Ca(a),a.tag=3,a}function ly(a,s,u,d){var g=u.type.getDerivedStateFromError;if(typeof g=="function"){var b=d.value;a.payload=function(){return g(b)},a.callback=function(){sy(s,u,d)}}var A=u.stateNode;A!==null&&typeof A.componentDidCatch=="function"&&(a.callback=function(){sy(s,u,d),typeof g!="function"&&(Ia===null?Ia=new Set([this]):Ia.add(this));var R=d.stack;this.componentDidCatch(d.value,{componentStack:R!==null?R:""})})}function VR(a,s,u,d,g){if(u.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(s=u.alternate,s!==null&&Ss(s,u,g,!0),u=Mn.current,u!==null){switch(u.tag){case 31:case 13:return Zn===null?hc():u.alternate===null&&Ct===0&&(Ct=3),u.flags&=-257,u.flags|=65536,u.lanes=g,d===Fu?u.flags|=16384:(s=u.updateQueue,s===null?u.updateQueue=new Set([d]):s.add(d),Cm(a,d,g)),!1;case 22:return u.flags|=65536,d===Fu?u.flags|=16384:(s=u.updateQueue,s===null?(s={transitions:null,markerInstances:null,retryQueue:new Set([d])},u.updateQueue=s):(u=s.retryQueue,u===null?s.retryQueue=new Set([d]):u.add(d)),Cm(a,d,g)),!1}throw Error(r(435,u.tag))}return Cm(a,d,g),hc(),!1}if(Ke)return s=Mn.current,s!==null?((s.flags&65536)===0&&(s.flags|=256),s.flags|=65536,s.lanes=g,d!==_h&&(a=Error(r(422),{cause:d}),Ho(Xn(a,u)))):(d!==_h&&(s=Error(r(423),{cause:d}),Ho(Xn(s,u))),a=a.current.alternate,a.flags|=65536,g&=-g,a.lanes|=g,d=Xn(d,u),g=tm(a.stateNode,d,g),Oh(a,g),Ct!==4&&(Ct=2)),!1;var b=Error(r(520),{cause:d});if(b=Xn(b,u),il===null?il=[b]:il.push(b),Ct!==4&&(Ct=2),s===null)return!0;d=Xn(d,u),u=s;do{switch(u.tag){case 3:return u.flags|=65536,a=g&-g,u.lanes|=a,a=tm(u.stateNode,d,a),Oh(u,a),!1;case 1:if(s=u.type,b=u.stateNode,(u.flags&128)===0&&(typeof s.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Ia===null||!Ia.has(b))))return u.flags|=65536,g&=-g,u.lanes|=g,g=oy(g),ly(g,a,u,d),Oh(u,g),!1}u=u.return}while(u!==null);return!1}var nm=Error(r(461)),Mt=!1;function tn(a,s,u,d){s.child=a===null?dE(s,null,u,d):vi(s,a.child,u,d)}function uy(a,s,u,d,g){u=u.render;var b=s.ref;if("ref"in d){var A={};for(var R in d)R!=="ref"&&(A[R]=d[R])}else A=d;return yi(s),d=Bh(a,s,u,A,b,g),R=jh(),a!==null&&!Mt?(Uh(a,s,g),Kr(a,s,g)):(Ke&&R&&Eh(s),s.flags|=1,tn(a,s,d,g),s.child)}function cy(a,s,u,d,g){if(a===null){var b=u.type;return typeof b=="function"&&!ph(b)&&b.defaultProps===void 0&&u.compare===null?(s.tag=15,s.type=b,fy(a,s,b,d,g)):(a=Pu(u.type,null,d,s,s.mode,g),a.ref=s.ref,a.return=s,s.child=a)}if(b=a.child,!cm(a,g)){var A=b.memoizedProps;if(u=u.compare,u=u!==null?u:Bo,u(A,d)&&a.ref===s.ref)return Kr(a,s,g)}return s.flags|=1,a=Gr(b,d),a.ref=s.ref,a.return=s,s.child=a}function fy(a,s,u,d,g){if(a!==null){var b=a.memoizedProps;if(Bo(b,d)&&a.ref===s.ref)if(Mt=!1,s.pendingProps=d=b,cm(a,g))(a.flags&131072)!==0&&(Mt=!0);else return s.lanes=a.lanes,Kr(a,s,g)}return rm(a,s,u,d,g)}function dy(a,s,u,d){var g=d.children,b=a!==null?a.memoizedState:null;if(a===null&&s.stateNode===null&&(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((s.flags&128)!==0){if(b=b!==null?b.baseLanes|u:u,a!==null){for(d=s.child=a.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~b}else d=0,s.child=null;return hy(a,s,b,u,d)}if((u&536870912)!==0)s.memoizedState={baseLanes:0,cachePool:null},a!==null&&Hu(s,b!==null?b.cachePool:null),b!==null?pE(s,b):Ih(),gE(s);else return d=s.lanes=536870912,hy(a,s,b!==null?b.baseLanes|u:u,u,d)}else b!==null?(Hu(s,b.cachePool),pE(s,b),Na(),s.memoizedState=null):(a!==null&&Hu(s,null),Ih(),Na());return tn(a,s,g,u),s.child}function Zo(a,s){return a!==null&&a.tag===22||s.stateNode!==null||(s.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.sibling}function hy(a,s,u,d,g){var b=wh();return b=b===null?null:{parent:It._currentValue,pool:b},s.memoizedState={baseLanes:u,cachePool:b},a!==null&&Hu(s,null),Ih(),gE(s),a!==null&&Ss(a,s,d,!0),s.childLanes=g,null}function nc(a,s){return s=ac({mode:s.mode,children:s.children},a.mode),s.ref=a.ref,a.child=s,s.return=a,s}function my(a,s,u){return vi(s,a.child,null,u),a=nc(s,s.pendingProps),a.flags|=2,Pn(s),s.memoizedState=null,a}function GR(a,s,u){var d=s.pendingProps,g=(s.flags&128)!==0;if(s.flags&=-129,a===null){if(Ke){if(d.mode==="hidden")return a=nc(s,d),s.lanes=536870912,Zo(null,a);if(Mh(s),(a=_t)?(a=C_(a,Kn),a=a!==null&&a.data==="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xa!==null?{id:Tr,overflow:vr}:null,retryLane:536870912,hydrationErrors:null},u=Kb(a),u.return=s,s.child=u,Jt=s,_t=null)):a=null,a===null)throw va(s);return s.lanes=536870912,null}return nc(s,d)}var b=a.memoizedState;if(b!==null){var A=b.dehydrated;if(Mh(s),g)if(s.flags&256)s.flags&=-257,s=my(a,s,u);else if(s.memoizedState!==null)s.child=a.child,s.flags|=128,s=null;else throw Error(r(558));else if(Mt||Ss(a,s,u,!1),g=(u&a.childLanes)!==0,Mt||g){if(d=gt,d!==null&&(A=ab(d,u),A!==0&&A!==b.retryLane))throw b.retryLane=A,pi(a,A),wn(d,a,A),nm;hc(),s=my(a,s,u)}else a=b.treeContext,_t=Jn(A.nextSibling),Jt=s,Ke=!0,Ta=null,Kn=!1,a!==null&&eE(s,a),s=nc(s,d),s.flags|=4096;return s}return a=Gr(a.child,{mode:d.mode,children:d.children}),a.ref=s.ref,s.child=a,a.return=s,a}function rc(a,s){var u=s.ref;if(u===null)a!==null&&a.ref!==null&&(s.flags|=4194816);else{if(typeof u!="function"&&typeof u!="object")throw Error(r(284));(a===null||a.ref!==u)&&(s.flags|=4194816)}}function rm(a,s,u,d,g){return yi(s),u=Bh(a,s,u,d,void 0,g),d=jh(),a!==null&&!Mt?(Uh(a,s,g),Kr(a,s,g)):(Ke&&d&&Eh(s),s.flags|=1,tn(a,s,u,g),s.child)}function py(a,s,u,d,g,b){return yi(s),s.updateQueue=null,u=EE(s,d,u,g),bE(a),d=jh(),a!==null&&!Mt?(Uh(a,s,b),Kr(a,s,b)):(Ke&&d&&Eh(s),s.flags|=1,tn(a,s,u,b),s.child)}function gy(a,s,u,d,g){if(yi(s),s.stateNode===null){var b=_s,A=u.contextType;typeof A=="object"&&A!==null&&(b=en(A)),b=new u(d,b),s.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=em,s.stateNode=b,b._reactInternals=s,b=s.stateNode,b.props=d,b.state=s.memoizedState,b.refs={},Nh(s),A=u.contextType,b.context=typeof A=="object"&&A!==null?en(A):_s,b.state=s.memoizedState,A=u.getDerivedStateFromProps,typeof A=="function"&&(Jh(s,u,A,d),b.state=s.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(A=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),A!==b.state&&em.enqueueReplaceState(b,b.state,null),Yo(s,d,b,g),qo(),b.state=s.memoizedState),typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!0}else if(a===null){b=s.stateNode;var R=s.memoizedProps,F=Ai(u,R);b.props=F;var K=b.context,se=u.contextType;A=_s,typeof se=="object"&&se!==null&&(A=en(se));var fe=u.getDerivedStateFromProps;se=typeof fe=="function"||typeof b.getSnapshotBeforeUpdate=="function",R=s.pendingProps!==R,se||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R||K!==A)&&ny(s,b,d,A),Aa=!1;var Z=s.memoizedState;b.state=Z,Yo(s,d,b,g),qo(),K=s.memoizedState,R||Z!==K||Aa?(typeof fe=="function"&&(Jh(s,u,fe,d),K=s.memoizedState),(F=Aa||ty(s,u,F,d,Z,K,A))?(se||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(s.flags|=4194308)):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=d,s.memoizedState=K),b.props=d,b.state=K,b.context=A,d=F):(typeof b.componentDidMount=="function"&&(s.flags|=4194308),d=!1)}else{b=s.stateNode,Rh(a,s),A=s.memoizedProps,se=Ai(u,A),b.props=se,fe=s.pendingProps,Z=b.context,K=u.contextType,F=_s,typeof K=="object"&&K!==null&&(F=en(K)),R=u.getDerivedStateFromProps,(K=typeof R=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(A!==fe||Z!==F)&&ny(s,b,d,F),Aa=!1,Z=s.memoizedState,b.state=Z,Yo(s,d,b,g),qo();var ne=s.memoizedState;A!==fe||Z!==ne||Aa||a!==null&&a.dependencies!==null&&ju(a.dependencies)?(typeof R=="function"&&(Jh(s,u,R,d),ne=s.memoizedState),(se=Aa||ty(s,u,se,d,Z,ne,F)||a!==null&&a.dependencies!==null&&ju(a.dependencies))?(K||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,ne,F),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,ne,F)),typeof b.componentDidUpdate=="function"&&(s.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof b.componentDidUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),s.memoizedProps=d,s.memoizedState=ne),b.props=d,b.state=ne,b.context=F,d=se):(typeof b.componentDidUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||A===a.memoizedProps&&Z===a.memoizedState||(s.flags|=1024),d=!1)}return b=d,rc(a,s),d=(s.flags&128)!==0,b||d?(b=s.stateNode,u=d&&typeof u.getDerivedStateFromError!="function"?null:b.render(),s.flags|=1,a!==null&&d?(s.child=vi(s,a.child,null,g),s.child=vi(s,null,u,g)):tn(a,s,u,g),s.memoizedState=b.state,a=s.child):a=Kr(a,s,g),a}function by(a,s,u,d){return bi(),s.flags|=256,tn(a,s,u,d),s.child}var am={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function im(a){return{baseLanes:a,cachePool:sE()}}function sm(a,s,u){return a=a!==null?a.childLanes&~u:0,s&&(a|=jn),a}function Ey(a,s,u){var d=s.pendingProps,g=!1,b=(s.flags&128)!==0,A;if((A=b)||(A=a!==null&&a.memoizedState===null?!1:(Nt.current&2)!==0),A&&(g=!0,s.flags&=-129),A=(s.flags&32)!==0,s.flags&=-33,a===null){if(Ke){if(g?ka(s):Na(),(a=_t)?(a=C_(a,Kn),a=a!==null&&a.data!=="&"?a:null,a!==null&&(s.memoizedState={dehydrated:a,treeContext:xa!==null?{id:Tr,overflow:vr}:null,retryLane:536870912,hydrationErrors:null},u=Kb(a),u.return=s,s.child=u,Jt=s,_t=null)):a=null,a===null)throw va(s);return Fm(a)?s.lanes=32:s.lanes=536870912,null}var R=d.children;return d=d.fallback,g?(Na(),g=s.mode,R=ac({mode:"hidden",children:R},g),d=gi(d,g,u,null),R.return=s,d.return=s,R.sibling=d,s.child=R,d=s.child,d.memoizedState=im(u),d.childLanes=sm(a,A,u),s.memoizedState=am,Zo(null,d)):(ka(s),om(s,R))}var F=a.memoizedState;if(F!==null&&(R=F.dehydrated,R!==null)){if(b)s.flags&256?(ka(s),s.flags&=-257,s=lm(a,s,u)):s.memoizedState!==null?(Na(),s.child=a.child,s.flags|=128,s=null):(Na(),R=d.fallback,g=s.mode,d=ac({mode:"visible",children:d.children},g),R=gi(R,g,u,null),R.flags|=2,d.return=s,R.return=s,d.sibling=R,s.child=d,vi(s,a.child,null,u),d=s.child,d.memoizedState=im(u),d.childLanes=sm(a,A,u),s.memoizedState=am,s=Zo(null,d));else if(ka(s),Fm(R)){if(A=R.nextSibling&&R.nextSibling.dataset,A)var K=A.dgst;A=K,d=Error(r(419)),d.stack="",d.digest=A,Ho({value:d,source:null,stack:null}),s=lm(a,s,u)}else if(Mt||Ss(a,s,u,!1),A=(u&a.childLanes)!==0,Mt||A){if(A=gt,A!==null&&(d=ab(A,u),d!==0&&d!==F.retryLane))throw F.retryLane=d,pi(a,d),wn(A,a,d),nm;zm(R)||hc(),s=lm(a,s,u)}else zm(R)?(s.flags|=192,s.child=a.child,s=null):(a=F.treeContext,_t=Jn(R.nextSibling),Jt=s,Ke=!0,Ta=null,Kn=!1,a!==null&&eE(s,a),s=om(s,d.children),s.flags|=4096);return s}return g?(Na(),R=d.fallback,g=s.mode,F=a.child,K=F.sibling,d=Gr(F,{mode:"hidden",children:d.children}),d.subtreeFlags=F.subtreeFlags&65011712,K!==null?R=Gr(K,R):(R=gi(R,g,u,null),R.flags|=2),R.return=s,d.return=s,d.sibling=R,s.child=d,Zo(null,d),d=s.child,R=a.child.memoizedState,R===null?R=im(u):(g=R.cachePool,g!==null?(F=It._currentValue,g=g.parent!==F?{parent:F,pool:F}:g):g=sE(),R={baseLanes:R.baseLanes|u,cachePool:g}),d.memoizedState=R,d.childLanes=sm(a,A,u),s.memoizedState=am,Zo(a.child,d)):(ka(s),u=a.child,a=u.sibling,u=Gr(u,{mode:"visible",children:d.children}),u.return=s,u.sibling=null,a!==null&&(A=s.deletions,A===null?(s.deletions=[a],s.flags|=16):A.push(a)),s.child=u,s.memoizedState=null,u)}function om(a,s){return s=ac({mode:"visible",children:s},a.mode),s.return=a,a.child=s}function ac(a,s){return a=Dn(22,a,null,s),a.lanes=0,a}function lm(a,s,u){return vi(s,a.child,null,u),a=om(s,s.pendingProps.children),a.flags|=2,s.memoizedState=null,a}function yy(a,s,u){a.lanes|=s;var d=a.alternate;d!==null&&(d.lanes|=s),vh(a.return,s,u)}function um(a,s,u,d,g,b){var A=a.memoizedState;A===null?a.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:d,tail:u,tailMode:g,treeForkCount:b}:(A.isBackwards=s,A.rendering=null,A.renderingStartTime=0,A.last=d,A.tail=u,A.tailMode=g,A.treeForkCount=b)}function _y(a,s,u){var d=s.pendingProps,g=d.revealOrder,b=d.tail;d=d.children;var A=Nt.current,R=(A&2)!==0;if(R?(A=A&1|2,s.flags|=128):A&=1,M(Nt,A),tn(a,s,d,u),d=Ke?Uo:0,!R&&a!==null&&(a.flags&128)!==0)e:for(a=s.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&yy(a,u,s);else if(a.tag===19)yy(a,u,s);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break e;for(;a.sibling===null;){if(a.return===null||a.return===s)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(g){case"forwards":for(u=s.child,g=null;u!==null;)a=u.alternate,a!==null&&qu(a)===null&&(g=u),u=u.sibling;u=g,u===null?(g=s.child,s.child=null):(g=u.sibling,u.sibling=null),um(s,!1,g,u,b,d);break;case"backwards":case"unstable_legacy-backwards":for(u=null,g=s.child,s.child=null;g!==null;){if(a=g.alternate,a!==null&&qu(a)===null){s.child=g;break}a=g.sibling,g.sibling=u,u=g,g=a}um(s,!0,u,null,b,d);break;case"together":um(s,!1,null,null,void 0,d);break;default:s.memoizedState=null}return s.child}function Kr(a,s,u){if(a!==null&&(s.dependencies=a.dependencies),La|=s.lanes,(u&s.childLanes)===0)if(a!==null){if(Ss(a,s,u,!1),(u&s.childLanes)===0)return null}else return null;if(a!==null&&s.child!==a.child)throw Error(r(153));if(s.child!==null){for(a=s.child,u=Gr(a,a.pendingProps),s.child=u,u.return=s;a.sibling!==null;)a=a.sibling,u=u.sibling=Gr(a,a.pendingProps),u.return=s;u.sibling=null}return s.child}function cm(a,s){return(a.lanes&s)!==0?!0:(a=a.dependencies,!!(a!==null&&ju(a)))}function qR(a,s,u){switch(s.tag){case 3:ke(s,s.stateNode.containerInfo),Sa(s,It,a.memoizedState.cache),bi();break;case 27:case 5:De(s);break;case 4:ke(s,s.stateNode.containerInfo);break;case 10:Sa(s,s.type,s.memoizedProps.value);break;case 31:if(s.memoizedState!==null)return s.flags|=128,Mh(s),null;break;case 13:var d=s.memoizedState;if(d!==null)return d.dehydrated!==null?(ka(s),s.flags|=128,null):(u&s.child.childLanes)!==0?Ey(a,s,u):(ka(s),a=Kr(a,s,u),a!==null?a.sibling:null);ka(s);break;case 19:var g=(a.flags&128)!==0;if(d=(u&s.childLanes)!==0,d||(Ss(a,s,u,!1),d=(u&s.childLanes)!==0),g){if(d)return _y(a,s,u);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),M(Nt,Nt.current),d)break;return null;case 22:return s.lanes=0,dy(a,s,u,s.pendingProps);case 24:Sa(s,It,a.memoizedState.cache)}return Kr(a,s,u)}function xy(a,s,u){if(a!==null)if(a.memoizedProps!==s.pendingProps)Mt=!0;else{if(!cm(a,u)&&(s.flags&128)===0)return Mt=!1,qR(a,s,u);Mt=(a.flags&131072)!==0}else Mt=!1,Ke&&(s.flags&1048576)!==0&&Jb(s,Uo,s.index);switch(s.lanes=0,s.tag){case 16:e:{var d=s.pendingProps;if(a=xi(s.elementType),s.type=a,typeof a=="function")ph(a)?(d=Ai(a,d),s.tag=1,s=gy(null,s,a,d,u)):(s.tag=0,s=rm(null,s,a,d,u));else{if(a!=null){var g=a.$$typeof;if(g===P){s.tag=11,s=uy(null,s,a,d,u);break e}else if(g===$){s.tag=14,s=cy(null,s,a,d,u);break e}}throw s=ue(a)||a,Error(r(306,s,""))}}return s;case 0:return rm(a,s,s.type,s.pendingProps,u);case 1:return d=s.type,g=Ai(d,s.pendingProps),gy(a,s,d,g,u);case 3:e:{if(ke(s,s.stateNode.containerInfo),a===null)throw Error(r(387));d=s.pendingProps;var b=s.memoizedState;g=b.element,Rh(a,s),Yo(s,d,null,u);var A=s.memoizedState;if(d=A.cache,Sa(s,It,d),d!==b.cache&&Sh(s,[It],u,!0),qo(),d=A.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:A.cache},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){s=by(a,s,d,u);break e}else if(d!==g){g=Xn(Error(r(424)),s),Ho(g),s=by(a,s,d,u);break e}else for(a=s.stateNode.containerInfo,a.nodeType===9?a=a.body:a=a.nodeName==="HTML"?a.ownerDocument.body:a,_t=Jn(a.firstChild),Jt=s,Ke=!0,Ta=null,Kn=!0,u=dE(s,null,d,u),s.child=u;u;)u.flags=u.flags&-3|4096,u=u.sibling;else{if(bi(),d===g){s=Kr(a,s,u);break e}tn(a,s,d,u)}s=s.child}return s;case 26:return rc(a,s),a===null?(u=L_(s.type,null,s.pendingProps,null))?s.memoizedState=u:Ke||(u=s.type,a=s.pendingProps,d=_c(ye.current).createElement(u),d[Zt]=s,d[xn]=a,nn(d,u,a),qt(d),s.stateNode=d):s.memoizedState=L_(s.type,a.memoizedProps,s.pendingProps,a.memoizedState),null;case 27:return De(s),a===null&&Ke&&(d=s.stateNode=N_(s.type,s.pendingProps,ye.current),Jt=s,Kn=!0,g=_t,Ba(s.type)?($m=g,_t=Jn(d.firstChild)):_t=g),tn(a,s,s.pendingProps.children,u),rc(a,s),a===null&&(s.flags|=4194304),s.child;case 5:return a===null&&Ke&&((g=d=_t)&&(d=TO(d,s.type,s.pendingProps,Kn),d!==null?(s.stateNode=d,Jt=s,_t=Jn(d.firstChild),Kn=!1,g=!0):g=!1),g||va(s)),De(s),g=s.type,b=s.pendingProps,A=a!==null?a.memoizedProps:null,d=b.children,jm(g,b)?d=null:A!==null&&jm(g,A)&&(s.flags|=32),s.memoizedState!==null&&(g=Bh(a,s,BR,null,null,u),hl._currentValue=g),rc(a,s),tn(a,s,d,u),s.child;case 6:return a===null&&Ke&&((a=u=_t)&&(u=vO(u,s.pendingProps,Kn),u!==null?(s.stateNode=u,Jt=s,_t=null,a=!0):a=!1),a||va(s)),null;case 13:return Ey(a,s,u);case 4:return ke(s,s.stateNode.containerInfo),d=s.pendingProps,a===null?s.child=vi(s,null,d,u):tn(a,s,d,u),s.child;case 11:return uy(a,s,s.type,s.pendingProps,u);case 7:return tn(a,s,s.pendingProps,u),s.child;case 8:return tn(a,s,s.pendingProps.children,u),s.child;case 12:return tn(a,s,s.pendingProps.children,u),s.child;case 10:return d=s.pendingProps,Sa(s,s.type,d.value),tn(a,s,d.children,u),s.child;case 9:return g=s.type._context,d=s.pendingProps.children,yi(s),g=en(g),d=d(g),s.flags|=1,tn(a,s,d,u),s.child;case 14:return cy(a,s,s.type,s.pendingProps,u);case 15:return fy(a,s,s.type,s.pendingProps,u);case 19:return _y(a,s,u);case 31:return GR(a,s,u);case 22:return dy(a,s,u,s.pendingProps);case 24:return yi(s),d=en(It),a===null?(g=wh(),g===null&&(g=gt,b=Ah(),g.pooledCache=b,b.refCount++,b!==null&&(g.pooledCacheLanes|=u),g=b),s.memoizedState={parent:d,cache:g},Nh(s),Sa(s,It,g)):((a.lanes&u)!==0&&(Rh(a,s),Yo(s,null,null,u),qo()),g=a.memoizedState,b=s.memoizedState,g.parent!==d?(g={parent:d,cache:d},s.memoizedState=g,s.lanes===0&&(s.memoizedState=s.updateQueue.baseState=g),Sa(s,It,d)):(d=b.cache,Sa(s,It,d),d!==g.cache&&Sh(s,[It],u,!0))),tn(a,s,s.pendingProps.children,u),s.child;case 29:throw s.pendingProps}throw Error(r(156,s.tag))}function Zr(a){a.flags|=4}function fm(a,s,u,d,g){if((s=(a.mode&32)!==0)&&(s=!1),s){if(a.flags|=16777216,(g&335544128)===g)if(a.stateNode.complete)a.flags|=8192;else if(Xy())a.flags|=8192;else throw Ti=Fu,kh}else a.flags&=-16777217}function Ty(a,s){if(s.type!=="stylesheet"||(s.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!B_(s))if(Xy())a.flags|=8192;else throw Ti=Fu,kh}function ic(a,s){s!==null&&(a.flags|=4),a.flags&16384&&(s=a.tag!==22?tb():536870912,a.lanes|=s,Ps|=s)}function Jo(a,s){if(!Ke)switch(a.tailMode){case"hidden":s=a.tail;for(var u=null;s!==null;)s.alternate!==null&&(u=s),s=s.sibling;u===null?a.tail=null:u.sibling=null;break;case"collapsed":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?s||a.tail===null?a.tail=null:a.tail.sibling=null:d.sibling=null}}function xt(a){var s=a.alternate!==null&&a.alternate.child===a.child,u=0,d=0;if(s)for(var g=a.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=a,g=g.sibling;else for(g=a.child;g!==null;)u|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=a,g=g.sibling;return a.subtreeFlags|=d,a.childLanes=u,s}function YR(a,s,u){var d=s.pendingProps;switch(yh(s),s.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(s),null;case 1:return xt(s),null;case 3:return u=s.stateNode,d=null,a!==null&&(d=a.memoizedState.cache),s.memoizedState.cache!==d&&(s.flags|=2048),Xr(It),Te(),u.pendingContext&&(u.context=u.pendingContext,u.pendingContext=null),(a===null||a.child===null)&&(vs(s)?Zr(s):a===null||a.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,xh())),xt(s),null;case 26:var g=s.type,b=s.memoizedState;return a===null?(Zr(s),b!==null?(xt(s),Ty(s,b)):(xt(s),fm(s,g,null,d,u))):b?b!==a.memoizedState?(Zr(s),xt(s),Ty(s,b)):(xt(s),s.flags&=-16777217):(a=a.memoizedProps,a!==d&&Zr(s),xt(s),fm(s,g,a,d,u)),null;case 27:if(je(s),u=ye.current,g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return xt(s),null}a=ge.current,vs(s)?tE(s):(a=N_(g,d,u),s.stateNode=a,Zr(s))}return xt(s),null;case 5:if(je(s),g=s.type,a!==null&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(!d){if(s.stateNode===null)throw Error(r(166));return xt(s),null}if(b=ge.current,vs(s))tE(s);else{var A=_c(ye.current);switch(b){case 1:b=A.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:b=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":b=A.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":b=A.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":b=A.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?A.createElement("select",{is:d.is}):A.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?A.createElement(g,{is:d.is}):A.createElement(g)}}b[Zt]=s,b[xn]=d;e:for(A=s.child;A!==null;){if(A.tag===5||A.tag===6)b.appendChild(A.stateNode);else if(A.tag!==4&&A.tag!==27&&A.child!==null){A.child.return=A,A=A.child;continue}if(A===s)break e;for(;A.sibling===null;){if(A.return===null||A.return===s)break e;A=A.return}A.sibling.return=A.return,A=A.sibling}s.stateNode=b;e:switch(nn(b,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&Zr(s)}}return xt(s),fm(s,s.type,a===null?null:a.memoizedProps,s.pendingProps,u),null;case 6:if(a&&s.stateNode!=null)a.memoizedProps!==d&&Zr(s);else{if(typeof d!="string"&&s.stateNode===null)throw Error(r(166));if(a=ye.current,vs(s)){if(a=s.stateNode,u=s.memoizedProps,d=null,g=Jt,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}a[Zt]=s,a=!!(a.nodeValue===u||d!==null&&d.suppressHydrationWarning===!0||E_(a.nodeValue,u)),a||va(s,!0)}else a=_c(a).createTextNode(d),a[Zt]=s,s.stateNode=a}return xt(s),null;case 31:if(u=s.memoizedState,a===null||a.memoizedState!==null){if(d=vs(s),u!==null){if(a===null){if(!d)throw Error(r(318));if(a=s.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(557));a[Zt]=s}else bi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),a=!1}else u=xh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=u),a=!0;if(!a)return s.flags&256?(Pn(s),s):(Pn(s),null);if((s.flags&128)!==0)throw Error(r(558))}return xt(s),null;case 13:if(d=s.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(g=vs(s),d!==null&&d.dehydrated!==null){if(a===null){if(!g)throw Error(r(318));if(g=s.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(r(317));g[Zt]=s}else bi(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;xt(s),g=!1}else g=xh(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=g),g=!0;if(!g)return s.flags&256?(Pn(s),s):(Pn(s),null)}return Pn(s),(s.flags&128)!==0?(s.lanes=u,s):(u=d!==null,a=a!==null&&a.memoizedState!==null,u&&(d=s.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==g&&(d.flags|=2048)),u!==a&&u&&(s.child.flags|=8192),ic(s,s.updateQueue),xt(s),null);case 4:return Te(),a===null&&Im(s.stateNode.containerInfo),xt(s),null;case 10:return Xr(s.type),xt(s),null;case 19:if(te(Nt),d=s.memoizedState,d===null)return xt(s),null;if(g=(s.flags&128)!==0,b=d.rendering,b===null)if(g)Jo(d,!1);else{if(Ct!==0||a!==null&&(a.flags&128)!==0)for(a=s.child;a!==null;){if(b=qu(a),b!==null){for(s.flags|=128,Jo(d,!1),a=b.updateQueue,s.updateQueue=a,ic(s,a),s.subtreeFlags=0,a=u,u=s.child;u!==null;)Wb(u,a),u=u.sibling;return M(Nt,Nt.current&1|2),Ke&&qr(s,d.treeForkCount),s.child}a=a.sibling}d.tail!==null&&fn()>cc&&(s.flags|=128,g=!0,Jo(d,!1),s.lanes=4194304)}else{if(!g)if(a=qu(b),a!==null){if(s.flags|=128,g=!0,a=a.updateQueue,s.updateQueue=a,ic(s,a),Jo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!Ke)return xt(s),null}else 2*fn()-d.renderingStartTime>cc&&u!==536870912&&(s.flags|=128,g=!0,Jo(d,!1),s.lanes=4194304);d.isBackwards?(b.sibling=s.child,s.child=b):(a=d.last,a!==null?a.sibling=b:s.child=b,d.last=b)}return d.tail!==null?(a=d.tail,d.rendering=a,d.tail=a.sibling,d.renderingStartTime=fn(),a.sibling=null,u=Nt.current,M(Nt,g?u&1|2:u&1),Ke&&qr(s,d.treeForkCount),a):(xt(s),null);case 22:case 23:return Pn(s),Dh(),d=s.memoizedState!==null,a!==null?a.memoizedState!==null!==d&&(s.flags|=8192):d&&(s.flags|=8192),d?(u&536870912)!==0&&(s.flags&128)===0&&(xt(s),s.subtreeFlags&6&&(s.flags|=8192)):xt(s),u=s.updateQueue,u!==null&&ic(s,u.retryQueue),u=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==u&&(s.flags|=2048),a!==null&&te(_i),null;case 24:return u=null,a!==null&&(u=a.memoizedState.cache),s.memoizedState.cache!==u&&(s.flags|=2048),Xr(It),xt(s),null;case 25:return null;case 30:return null}throw Error(r(156,s.tag))}function XR(a,s){switch(yh(s),s.tag){case 1:return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 3:return Xr(It),Te(),a=s.flags,(a&65536)!==0&&(a&128)===0?(s.flags=a&-65537|128,s):null;case 26:case 27:case 5:return je(s),null;case 31:if(s.memoizedState!==null){if(Pn(s),s.alternate===null)throw Error(r(340));bi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 13:if(Pn(s),a=s.memoizedState,a!==null&&a.dehydrated!==null){if(s.alternate===null)throw Error(r(340));bi()}return a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 19:return te(Nt),null;case 4:return Te(),null;case 10:return Xr(s.type),null;case 22:case 23:return Pn(s),Dh(),a!==null&&te(_i),a=s.flags,a&65536?(s.flags=a&-65537|128,s):null;case 24:return Xr(It),null;case 25:return null;default:return null}}function vy(a,s){switch(yh(s),s.tag){case 3:Xr(It),Te();break;case 26:case 27:case 5:je(s);break;case 4:Te();break;case 31:s.memoizedState!==null&&Pn(s);break;case 13:Pn(s);break;case 19:te(Nt);break;case 10:Xr(s.type);break;case 22:case 23:Pn(s),Dh(),a!==null&&te(_i);break;case 24:Xr(It)}}function el(a,s){try{var u=s.updateQueue,d=u!==null?u.lastEffect:null;if(d!==null){var g=d.next;u=g;do{if((u.tag&a)===a){d=void 0;var b=u.create,A=u.inst;d=b(),A.destroy=d}u=u.next}while(u!==g)}}catch(R){ct(s,s.return,R)}}function Ra(a,s,u){try{var d=s.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var b=g.next;d=b;do{if((d.tag&a)===a){var A=d.inst,R=A.destroy;if(R!==void 0){A.destroy=void 0,g=s;var F=u,K=R;try{K()}catch(se){ct(g,F,se)}}}d=d.next}while(d!==b)}}catch(se){ct(s,s.return,se)}}function Sy(a){var s=a.updateQueue;if(s!==null){var u=a.stateNode;try{mE(s,u)}catch(d){ct(a,a.return,d)}}}function Ay(a,s,u){u.props=Ai(a.type,a.memoizedProps),u.state=a.memoizedState;try{u.componentWillUnmount()}catch(d){ct(a,s,d)}}function tl(a,s){try{var u=a.ref;if(u!==null){switch(a.tag){case 26:case 27:case 5:var d=a.stateNode;break;case 30:d=a.stateNode;break;default:d=a.stateNode}typeof u=="function"?a.refCleanup=u(d):u.current=d}}catch(g){ct(a,s,g)}}function Sr(a,s){var u=a.ref,d=a.refCleanup;if(u!==null)if(typeof d=="function")try{d()}catch(g){ct(a,s,g)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof u=="function")try{u(null)}catch(g){ct(a,s,g)}else u.current=null}function Cy(a){var s=a.type,u=a.memoizedProps,d=a.stateNode;try{e:switch(s){case"button":case"input":case"select":case"textarea":u.autoFocus&&d.focus();break e;case"img":u.src?d.src=u.src:u.srcSet&&(d.srcset=u.srcSet)}}catch(g){ct(a,a.return,g)}}function dm(a,s,u){try{var d=a.stateNode;gO(d,a.type,u,s),d[xn]=s}catch(g){ct(a,a.return,g)}}function wy(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&Ba(a.type)||a.tag===4}function hm(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||wy(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&Ba(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function mm(a,s,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?(u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u).insertBefore(a,s):(s=u.nodeType===9?u.body:u.nodeName==="HTML"?u.ownerDocument.body:u,s.appendChild(a),u=u._reactRootContainer,u!=null||s.onclick!==null||(s.onclick=$r));else if(d!==4&&(d===27&&Ba(a.type)&&(u=a.stateNode,s=null),a=a.child,a!==null))for(mm(a,s,u),a=a.sibling;a!==null;)mm(a,s,u),a=a.sibling}function sc(a,s,u){var d=a.tag;if(d===5||d===6)a=a.stateNode,s?u.insertBefore(a,s):u.appendChild(a);else if(d!==4&&(d===27&&Ba(a.type)&&(u=a.stateNode),a=a.child,a!==null))for(sc(a,s,u),a=a.sibling;a!==null;)sc(a,s,u),a=a.sibling}function ky(a){var s=a.stateNode,u=a.memoizedProps;try{for(var d=a.type,g=s.attributes;g.length;)s.removeAttributeNode(g[0]);nn(s,d,u),s[Zt]=a,s[xn]=u}catch(b){ct(a,a.return,b)}}var Jr=!1,Pt=!1,pm=!1,Ny=typeof WeakSet=="function"?WeakSet:Set,Yt=null;function QR(a,s){if(a=a.containerInfo,Pm=wc,a=zb(a),lh(a)){if("selectionStart"in a)var u={start:a.selectionStart,end:a.selectionEnd};else e:{u=(u=a.ownerDocument)&&u.defaultView||window;var d=u.getSelection&&u.getSelection();if(d&&d.rangeCount!==0){u=d.anchorNode;var g=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{u.nodeType,b.nodeType}catch{u=null;break e}var A=0,R=-1,F=-1,K=0,se=0,fe=a,Z=null;t:for(;;){for(var ne;fe!==u||g!==0&&fe.nodeType!==3||(R=A+g),fe!==b||d!==0&&fe.nodeType!==3||(F=A+d),fe.nodeType===3&&(A+=fe.nodeValue.length),(ne=fe.firstChild)!==null;)Z=fe,fe=ne;for(;;){if(fe===a)break t;if(Z===u&&++K===g&&(R=A),Z===b&&++se===d&&(F=A),(ne=fe.nextSibling)!==null)break;fe=Z,Z=fe.parentNode}fe=ne}u=R===-1||F===-1?null:{start:R,end:F}}else u=null}u=u||{start:0,end:0}}else u=null;for(Bm={focusedElem:a,selectionRange:u},wc=!1,Yt=s;Yt!==null;)if(s=Yt,a=s.child,(s.subtreeFlags&1028)!==0&&a!==null)a.return=s,Yt=a;else for(;Yt!==null;){switch(s=Yt,b=s.alternate,a=s.flags,s.tag){case 0:if((a&4)!==0&&(a=s.updateQueue,a=a!==null?a.events:null,a!==null))for(u=0;u<a.length;u++)g=a[u],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,u=s,g=b.memoizedProps,b=b.memoizedState,d=u.stateNode;try{var Ae=Ai(u.type,g);a=d.getSnapshotBeforeUpdate(Ae,b),d.__reactInternalSnapshotBeforeUpdate=a}catch(Oe){ct(u,u.return,Oe)}}break;case 3:if((a&1024)!==0){if(a=s.stateNode.containerInfo,u=a.nodeType,u===9)Hm(a);else if(u===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":Hm(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(r(163))}if(a=s.sibling,a!==null){a.return=s.return,Yt=a;break}Yt=s.return}}function Ry(a,s,u){var d=u.flags;switch(u.tag){case 0:case 11:case 15:ta(a,u),d&4&&el(5,u);break;case 1:if(ta(a,u),d&4)if(a=u.stateNode,s===null)try{a.componentDidMount()}catch(A){ct(u,u.return,A)}else{var g=Ai(u.type,s.memoizedProps);s=s.memoizedState;try{a.componentDidUpdate(g,s,a.__reactInternalSnapshotBeforeUpdate)}catch(A){ct(u,u.return,A)}}d&64&&Sy(u),d&512&&tl(u,u.return);break;case 3:if(ta(a,u),d&64&&(a=u.updateQueue,a!==null)){if(s=null,u.child!==null)switch(u.child.tag){case 27:case 5:s=u.child.stateNode;break;case 1:s=u.child.stateNode}try{mE(a,s)}catch(A){ct(u,u.return,A)}}break;case 27:s===null&&d&4&&ky(u);case 26:case 5:ta(a,u),s===null&&d&4&&Cy(u),d&512&&tl(u,u.return);break;case 12:ta(a,u);break;case 31:ta(a,u),d&4&&Iy(a,u);break;case 13:ta(a,u),d&4&&Dy(a,u),d&64&&(a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(u=aO.bind(null,u),SO(a,u))));break;case 22:if(d=u.memoizedState!==null||Jr,!d){s=s!==null&&s.memoizedState!==null||Pt,g=Jr;var b=Pt;Jr=d,(Pt=s)&&!b?na(a,u,(u.subtreeFlags&8772)!==0):ta(a,u),Jr=g,Pt=b}break;case 30:break;default:ta(a,u)}}function Oy(a){var s=a.alternate;s!==null&&(a.alternate=null,Oy(s)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(s=a.stateNode,s!==null&&Gd(s)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Tt=null,vn=!1;function ea(a,s,u){for(u=u.child;u!==null;)Ly(a,s,u),u=u.sibling}function Ly(a,s,u){if(jt&&typeof jt.onCommitFiberUnmount=="function")try{jt.onCommitFiberUnmount(dn,u)}catch{}switch(u.tag){case 26:Pt||Sr(u,s),ea(a,s,u),u.memoizedState?u.memoizedState.count--:u.stateNode&&(u=u.stateNode,u.parentNode.removeChild(u));break;case 27:Pt||Sr(u,s);var d=Tt,g=vn;Ba(u.type)&&(Tt=u.stateNode,vn=!1),ea(a,s,u),cl(u.stateNode),Tt=d,vn=g;break;case 5:Pt||Sr(u,s);case 6:if(d=Tt,g=vn,Tt=null,ea(a,s,u),Tt=d,vn=g,Tt!==null)if(vn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(u.stateNode)}catch(b){ct(u,s,b)}else try{Tt.removeChild(u.stateNode)}catch(b){ct(u,s,b)}break;case 18:Tt!==null&&(vn?(a=Tt,S_(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,u.stateNode),Vs(a)):S_(Tt,u.stateNode));break;case 4:d=Tt,g=vn,Tt=u.stateNode.containerInfo,vn=!0,ea(a,s,u),Tt=d,vn=g;break;case 0:case 11:case 14:case 15:Ra(2,u,s),Pt||Ra(4,u,s),ea(a,s,u);break;case 1:Pt||(Sr(u,s),d=u.stateNode,typeof d.componentWillUnmount=="function"&&Ay(u,s,d)),ea(a,s,u);break;case 21:ea(a,s,u);break;case 22:Pt=(d=Pt)||u.memoizedState!==null,ea(a,s,u),Pt=d;break;default:ea(a,s,u)}}function Iy(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Vs(a)}catch(u){ct(s,s.return,u)}}}function Dy(a,s){if(s.memoizedState===null&&(a=s.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Vs(a)}catch(u){ct(s,s.return,u)}}function WR(a){switch(a.tag){case 31:case 13:case 19:var s=a.stateNode;return s===null&&(s=a.stateNode=new Ny),s;case 22:return a=a.stateNode,s=a._retryCache,s===null&&(s=a._retryCache=new Ny),s;default:throw Error(r(435,a.tag))}}function oc(a,s){var u=WR(a);s.forEach(function(d){if(!u.has(d)){u.add(d);var g=iO.bind(null,a,d);d.then(g,g)}})}function Sn(a,s){var u=s.deletions;if(u!==null)for(var d=0;d<u.length;d++){var g=u[d],b=a,A=s,R=A;e:for(;R!==null;){switch(R.tag){case 27:if(Ba(R.type)){Tt=R.stateNode,vn=!1;break e}break;case 5:Tt=R.stateNode,vn=!1;break e;case 3:case 4:Tt=R.stateNode.containerInfo,vn=!0;break e}R=R.return}if(Tt===null)throw Error(r(160));Ly(b,A,g),Tt=null,vn=!1,b=g.alternate,b!==null&&(b.return=null),g.return=null}if(s.subtreeFlags&13886)for(s=s.child;s!==null;)My(s,a),s=s.sibling}var ur=null;function My(a,s){var u=a.alternate,d=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Sn(s,a),An(a),d&4&&(Ra(3,a,a.return),el(3,a),Ra(5,a,a.return));break;case 1:Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),d&64&&Jr&&(a=a.updateQueue,a!==null&&(d=a.callbacks,d!==null&&(u=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=u===null?d:u.concat(d))));break;case 26:var g=ur;if(Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),d&4){var b=u!==null?u.memoizedState:null;if(d=a.memoizedState,u===null)if(d===null)if(a.stateNode===null){e:{d=a.type,u=a.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":b=g.getElementsByTagName("title")[0],(!b||b[ko]||b[Zt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=g.createElement(d),g.head.insertBefore(b,g.querySelector("head > title"))),nn(b,d,u),b[Zt]=a,qt(b),d=b;break e;case"link":var A=M_("link","href",g).get(d+(u.href||""));if(A){for(var R=0;R<A.length;R++)if(b=A[R],b.getAttribute("href")===(u.href==null||u.href===""?null:u.href)&&b.getAttribute("rel")===(u.rel==null?null:u.rel)&&b.getAttribute("title")===(u.title==null?null:u.title)&&b.getAttribute("crossorigin")===(u.crossOrigin==null?null:u.crossOrigin)){A.splice(R,1);break t}}b=g.createElement(d),nn(b,d,u),g.head.appendChild(b);break;case"meta":if(A=M_("meta","content",g).get(d+(u.content||""))){for(R=0;R<A.length;R++)if(b=A[R],b.getAttribute("content")===(u.content==null?null:""+u.content)&&b.getAttribute("name")===(u.name==null?null:u.name)&&b.getAttribute("property")===(u.property==null?null:u.property)&&b.getAttribute("http-equiv")===(u.httpEquiv==null?null:u.httpEquiv)&&b.getAttribute("charset")===(u.charSet==null?null:u.charSet)){A.splice(R,1);break t}}b=g.createElement(d),nn(b,d,u),g.head.appendChild(b);break;default:throw Error(r(468,d))}b[Zt]=a,qt(b),d=b}a.stateNode=d}else P_(g,a.type,a.stateNode);else a.stateNode=D_(g,d,a.memoizedProps);else b!==d?(b===null?u.stateNode!==null&&(u=u.stateNode,u.parentNode.removeChild(u)):b.count--,d===null?P_(g,a.type,a.stateNode):D_(g,d,a.memoizedProps)):d===null&&a.stateNode!==null&&dm(a,a.memoizedProps,u.memoizedProps)}break;case 27:Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),u!==null&&d&4&&dm(a,a.memoizedProps,u.memoizedProps);break;case 5:if(Sn(s,a),An(a),d&512&&(Pt||u===null||Sr(u,u.return)),a.flags&32){g=a.stateNode;try{hs(g,"")}catch(Ae){ct(a,a.return,Ae)}}d&4&&a.stateNode!=null&&(g=a.memoizedProps,dm(a,g,u!==null?u.memoizedProps:g)),d&1024&&(pm=!0);break;case 6:if(Sn(s,a),An(a),d&4){if(a.stateNode===null)throw Error(r(162));d=a.memoizedProps,u=a.stateNode;try{u.nodeValue=d}catch(Ae){ct(a,a.return,Ae)}}break;case 3:if(vc=null,g=ur,ur=xc(s.containerInfo),Sn(s,a),ur=g,An(a),d&4&&u!==null&&u.memoizedState.isDehydrated)try{Vs(s.containerInfo)}catch(Ae){ct(a,a.return,Ae)}pm&&(pm=!1,Py(a));break;case 4:d=ur,ur=xc(a.stateNode.containerInfo),Sn(s,a),An(a),ur=d;break;case 12:Sn(s,a),An(a);break;case 31:Sn(s,a),An(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 13:Sn(s,a),An(a),a.child.flags&8192&&a.memoizedState!==null!=(u!==null&&u.memoizedState!==null)&&(uc=fn()),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 22:g=a.memoizedState!==null;var F=u!==null&&u.memoizedState!==null,K=Jr,se=Pt;if(Jr=K||g,Pt=se||F,Sn(s,a),Pt=se,Jr=K,An(a),d&8192)e:for(s=a.stateNode,s._visibility=g?s._visibility&-2:s._visibility|1,g&&(u===null||F||Jr||Pt||Ci(a)),u=null,s=a;;){if(s.tag===5||s.tag===26){if(u===null){F=u=s;try{if(b=F.stateNode,g)A=b.style,typeof A.setProperty=="function"?A.setProperty("display","none","important"):A.display="none";else{R=F.stateNode;var fe=F.memoizedProps.style,Z=fe!=null&&fe.hasOwnProperty("display")?fe.display:null;R.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Ae){ct(F,F.return,Ae)}}}else if(s.tag===6){if(u===null){F=s;try{F.stateNode.nodeValue=g?"":F.memoizedProps}catch(Ae){ct(F,F.return,Ae)}}}else if(s.tag===18){if(u===null){F=s;try{var ne=F.stateNode;g?A_(ne,!0):A_(F.stateNode,!1)}catch(Ae){ct(F,F.return,Ae)}}}else if((s.tag!==22&&s.tag!==23||s.memoizedState===null||s===a)&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;u===s&&(u=null),s=s.return}u===s&&(u=null),s.sibling.return=s.return,s=s.sibling}d&4&&(d=a.updateQueue,d!==null&&(u=d.retryQueue,u!==null&&(d.retryQueue=null,oc(a,u))));break;case 19:Sn(s,a),An(a),d&4&&(d=a.updateQueue,d!==null&&(a.updateQueue=null,oc(a,d)));break;case 30:break;case 21:break;default:Sn(s,a),An(a)}}function An(a){var s=a.flags;if(s&2){try{for(var u,d=a.return;d!==null;){if(wy(d)){u=d;break}d=d.return}if(u==null)throw Error(r(160));switch(u.tag){case 27:var g=u.stateNode,b=hm(a);sc(a,b,g);break;case 5:var A=u.stateNode;u.flags&32&&(hs(A,""),u.flags&=-33);var R=hm(a);sc(a,R,A);break;case 3:case 4:var F=u.stateNode.containerInfo,K=hm(a);mm(a,K,F);break;default:throw Error(r(161))}}catch(se){ct(a,a.return,se)}a.flags&=-3}s&4096&&(a.flags&=-4097)}function Py(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var s=a;Py(s),s.tag===5&&s.flags&1024&&s.stateNode.reset(),a=a.sibling}}function ta(a,s){if(s.subtreeFlags&8772)for(s=s.child;s!==null;)Ry(a,s.alternate,s),s=s.sibling}function Ci(a){for(a=a.child;a!==null;){var s=a;switch(s.tag){case 0:case 11:case 14:case 15:Ra(4,s,s.return),Ci(s);break;case 1:Sr(s,s.return);var u=s.stateNode;typeof u.componentWillUnmount=="function"&&Ay(s,s.return,u),Ci(s);break;case 27:cl(s.stateNode);case 26:case 5:Sr(s,s.return),Ci(s);break;case 22:s.memoizedState===null&&Ci(s);break;case 30:Ci(s);break;default:Ci(s)}a=a.sibling}}function na(a,s,u){for(u=u&&(s.subtreeFlags&8772)!==0,s=s.child;s!==null;){var d=s.alternate,g=a,b=s,A=b.flags;switch(b.tag){case 0:case 11:case 15:na(g,b,u),el(4,b);break;case 1:if(na(g,b,u),d=b,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(K){ct(d,d.return,K)}if(d=b,g=d.updateQueue,g!==null){var R=d.stateNode;try{var F=g.shared.hiddenCallbacks;if(F!==null)for(g.shared.hiddenCallbacks=null,g=0;g<F.length;g++)hE(F[g],R)}catch(K){ct(d,d.return,K)}}u&&A&64&&Sy(b),tl(b,b.return);break;case 27:ky(b);case 26:case 5:na(g,b,u),u&&d===null&&A&4&&Cy(b),tl(b,b.return);break;case 12:na(g,b,u);break;case 31:na(g,b,u),u&&A&4&&Iy(g,b);break;case 13:na(g,b,u),u&&A&4&&Dy(g,b);break;case 22:b.memoizedState===null&&na(g,b,u),tl(b,b.return);break;case 30:break;default:na(g,b,u)}s=s.sibling}}function gm(a,s){var u=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==u&&(a!=null&&a.refCount++,u!=null&&zo(u))}function bm(a,s){a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zo(a))}function cr(a,s,u,d){if(s.subtreeFlags&10256)for(s=s.child;s!==null;)By(a,s,u,d),s=s.sibling}function By(a,s,u,d){var g=s.flags;switch(s.tag){case 0:case 11:case 15:cr(a,s,u,d),g&2048&&el(9,s);break;case 1:cr(a,s,u,d);break;case 3:cr(a,s,u,d),g&2048&&(a=null,s.alternate!==null&&(a=s.alternate.memoizedState.cache),s=s.memoizedState.cache,s!==a&&(s.refCount++,a!=null&&zo(a)));break;case 12:if(g&2048){cr(a,s,u,d),a=s.stateNode;try{var b=s.memoizedProps,A=b.id,R=b.onPostCommit;typeof R=="function"&&R(A,s.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(F){ct(s,s.return,F)}}else cr(a,s,u,d);break;case 31:cr(a,s,u,d);break;case 13:cr(a,s,u,d);break;case 23:break;case 22:b=s.stateNode,A=s.alternate,s.memoizedState!==null?b._visibility&2?cr(a,s,u,d):nl(a,s):b._visibility&2?cr(a,s,u,d):(b._visibility|=2,Is(a,s,u,d,(s.subtreeFlags&10256)!==0||!1)),g&2048&&gm(A,s);break;case 24:cr(a,s,u,d),g&2048&&bm(s.alternate,s);break;default:cr(a,s,u,d)}}function Is(a,s,u,d,g){for(g=g&&((s.subtreeFlags&10256)!==0||!1),s=s.child;s!==null;){var b=a,A=s,R=u,F=d,K=A.flags;switch(A.tag){case 0:case 11:case 15:Is(b,A,R,F,g),el(8,A);break;case 23:break;case 22:var se=A.stateNode;A.memoizedState!==null?se._visibility&2?Is(b,A,R,F,g):nl(b,A):(se._visibility|=2,Is(b,A,R,F,g)),g&&K&2048&&gm(A.alternate,A);break;case 24:Is(b,A,R,F,g),g&&K&2048&&bm(A.alternate,A);break;default:Is(b,A,R,F,g)}s=s.sibling}}function nl(a,s){if(s.subtreeFlags&10256)for(s=s.child;s!==null;){var u=a,d=s,g=d.flags;switch(d.tag){case 22:nl(u,d),g&2048&&gm(d.alternate,d);break;case 24:nl(u,d),g&2048&&bm(d.alternate,d);break;default:nl(u,d)}s=s.sibling}}var rl=8192;function Ds(a,s,u){if(a.subtreeFlags&rl)for(a=a.child;a!==null;)jy(a,s,u),a=a.sibling}function jy(a,s,u){switch(a.tag){case 26:Ds(a,s,u),a.flags&rl&&a.memoizedState!==null&&PO(u,ur,a.memoizedState,a.memoizedProps);break;case 5:Ds(a,s,u);break;case 3:case 4:var d=ur;ur=xc(a.stateNode.containerInfo),Ds(a,s,u),ur=d;break;case 22:a.memoizedState===null&&(d=a.alternate,d!==null&&d.memoizedState!==null?(d=rl,rl=16777216,Ds(a,s,u),rl=d):Ds(a,s,u));break;default:Ds(a,s,u)}}function Uy(a){var s=a.alternate;if(s!==null&&(a=s.child,a!==null)){s.child=null;do s=a.sibling,a.sibling=null,a=s;while(a!==null)}}function al(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var d=s[u];Yt=d,zy(d,a)}Uy(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)Hy(a),a=a.sibling}function Hy(a){switch(a.tag){case 0:case 11:case 15:al(a),a.flags&2048&&Ra(9,a,a.return);break;case 3:al(a);break;case 12:al(a);break;case 22:var s=a.stateNode;a.memoizedState!==null&&s._visibility&2&&(a.return===null||a.return.tag!==13)?(s._visibility&=-3,lc(a)):al(a);break;default:al(a)}}function lc(a){var s=a.deletions;if((a.flags&16)!==0){if(s!==null)for(var u=0;u<s.length;u++){var d=s[u];Yt=d,zy(d,a)}Uy(a)}for(a=a.child;a!==null;){switch(s=a,s.tag){case 0:case 11:case 15:Ra(8,s,s.return),lc(s);break;case 22:u=s.stateNode,u._visibility&2&&(u._visibility&=-3,lc(s));break;default:lc(s)}a=a.sibling}}function zy(a,s){for(;Yt!==null;){var u=Yt;switch(u.tag){case 0:case 11:case 15:Ra(8,u,s);break;case 23:case 22:if(u.memoizedState!==null&&u.memoizedState.cachePool!==null){var d=u.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:zo(u.memoizedState.cache)}if(d=u.child,d!==null)d.return=u,Yt=d;else e:for(u=a;Yt!==null;){d=Yt;var g=d.sibling,b=d.return;if(Oy(d),d===u){Yt=null;break e}if(g!==null){g.return=b,Yt=g;break e}Yt=b}}}var KR={getCacheForType:function(a){var s=en(It),u=s.data.get(a);return u===void 0&&(u=a(),s.data.set(a,u)),u},cacheSignal:function(){return en(It).controller.signal}},ZR=typeof WeakMap=="function"?WeakMap:Map,at=0,gt=null,Ge=null,Xe=0,ut=0,Bn=null,Oa=!1,Ms=!1,Em=!1,ra=0,Ct=0,La=0,wi=0,ym=0,jn=0,Ps=0,il=null,Cn=null,_m=!1,uc=0,Fy=0,cc=1/0,fc=null,Ia=null,Ut=0,Da=null,Bs=null,aa=0,xm=0,Tm=null,$y=null,sl=0,vm=null;function Un(){return(at&2)!==0&&Xe!==0?Xe&-Xe:U.T!==null?Nm():ib()}function Vy(){if(jn===0)if((Xe&536870912)===0||Ke){var a=yu;yu<<=1,(yu&3932160)===0&&(yu=262144),jn=a}else jn=536870912;return a=Mn.current,a!==null&&(a.flags|=32),jn}function wn(a,s,u){(a===gt&&(ut===2||ut===9)||a.cancelPendingCommit!==null)&&(js(a,0),Ma(a,Xe,jn,!1)),wo(a,u),((at&2)===0||a!==gt)&&(a===gt&&((at&2)===0&&(wi|=u),Ct===4&&Ma(a,Xe,jn,!1)),Ar(a))}function Gy(a,s,u){if((at&6)!==0)throw Error(r(327));var d=!u&&(s&127)===0&&(s&a.expiredLanes)===0||Co(a,s),g=d?tO(a,s):Am(a,s,!0),b=d;do{if(g===0){Ms&&!d&&Ma(a,s,0,!1);break}else{if(u=a.current.alternate,b&&!JR(u)){g=Am(a,s,!1),b=!1;continue}if(g===2){if(b=s,a.errorRecoveryDisabledLanes&b)var A=0;else A=a.pendingLanes&-536870913,A=A!==0?A:A&536870912?536870912:0;if(A!==0){s=A;e:{var R=a;g=il;var F=R.current.memoizedState.isDehydrated;if(F&&(js(R,A).flags|=256),A=Am(R,A,!1),A!==2){if(Em&&!F){R.errorRecoveryDisabledLanes|=b,wi|=b,g=4;break e}b=Cn,Cn=g,b!==null&&(Cn===null?Cn=b:Cn.push.apply(Cn,b))}g=A}if(b=!1,g!==2)continue}}if(g===1){js(a,0),Ma(a,s,0,!0);break}e:{switch(d=a,b=g,b){case 0:case 1:throw Error(r(345));case 4:if((s&4194048)!==s)break;case 6:Ma(d,s,jn,!Oa);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(r(329))}if((s&62914560)===s&&(g=uc+300-fn(),10<g)){if(Ma(d,s,jn,!Oa),xu(d,0,!0)!==0)break e;aa=s,d.timeoutHandle=T_(qy.bind(null,d,u,Cn,fc,_m,s,jn,wi,Ps,Oa,b,"Throttled",-0,0),g);break e}qy(d,u,Cn,fc,_m,s,jn,wi,Ps,Oa,b,null,-0,0)}}break}while(!0);Ar(a)}function qy(a,s,u,d,g,b,A,R,F,K,se,fe,Z,ne){if(a.timeoutHandle=-1,fe=s.subtreeFlags,fe&8192||(fe&16785408)===16785408){fe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$r},jy(s,b,fe);var Ae=(b&62914560)===b?uc-fn():(b&4194048)===b?Fy-fn():0;if(Ae=BO(fe,Ae),Ae!==null){aa=b,a.cancelPendingCommit=Ae(e_.bind(null,a,s,b,u,d,g,A,R,F,se,fe,null,Z,ne)),Ma(a,b,A,!K);return}}e_(a,s,b,u,d,g,A,R,F)}function JR(a){for(var s=a;;){var u=s.tag;if((u===0||u===11||u===15)&&s.flags&16384&&(u=s.updateQueue,u!==null&&(u=u.stores,u!==null)))for(var d=0;d<u.length;d++){var g=u[d],b=g.getSnapshot;g=g.value;try{if(!In(b(),g))return!1}catch{return!1}}if(u=s.child,s.subtreeFlags&16384&&u!==null)u.return=s,s=u;else{if(s===a)break;for(;s.sibling===null;){if(s.return===null||s.return===a)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ma(a,s,u,d){s&=~ym,s&=~wi,a.suspendedLanes|=s,a.pingedLanes&=~s,d&&(a.warmLanes|=s),d=a.expirationTimes;for(var g=s;0<g;){var b=31-pt(g),A=1<<b;d[b]=-1,g&=~A}u!==0&&nb(a,u,s)}function dc(){return(at&6)===0?(ol(0),!1):!0}function Sm(){if(Ge!==null){if(ut===0)var a=Ge.return;else a=Ge,Yr=Ei=null,Hh(a),ks=null,$o=0,a=Ge;for(;a!==null;)vy(a.alternate,a),a=a.return;Ge=null}}function js(a,s){var u=a.timeoutHandle;u!==-1&&(a.timeoutHandle=-1,yO(u)),u=a.cancelPendingCommit,u!==null&&(a.cancelPendingCommit=null,u()),aa=0,Sm(),gt=a,Ge=u=Gr(a.current,null),Xe=s,ut=0,Bn=null,Oa=!1,Ms=Co(a,s),Em=!1,Ps=jn=ym=wi=La=Ct=0,Cn=il=null,_m=!1,(s&8)!==0&&(s|=s&32);var d=a.entangledLanes;if(d!==0)for(a=a.entanglements,d&=s;0<d;){var g=31-pt(d),b=1<<g;s|=a[g],d&=~b}return ra=s,Iu(),u}function Yy(a,s){Be=null,U.H=Ko,s===ws||s===zu?(s=uE(),ut=3):s===kh?(s=uE(),ut=4):ut=s===nm?8:s!==null&&typeof s=="object"&&typeof s.then=="function"?6:1,Bn=s,Ge===null&&(Ct=1,tc(a,Xn(s,a.current)))}function Xy(){var a=Mn.current;return a===null?!0:(Xe&4194048)===Xe?Zn===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?a===Zn:!1}function Qy(){var a=U.H;return U.H=Ko,a===null?Ko:a}function Wy(){var a=U.A;return U.A=KR,a}function hc(){Ct=4,Oa||(Xe&4194048)!==Xe&&Mn.current!==null||(Ms=!0),(La&134217727)===0&&(wi&134217727)===0||gt===null||Ma(gt,Xe,jn,!1)}function Am(a,s,u){var d=at;at|=2;var g=Qy(),b=Wy();(gt!==a||Xe!==s)&&(fc=null,js(a,s)),s=!1;var A=Ct;e:do try{if(ut!==0&&Ge!==null){var R=Ge,F=Bn;switch(ut){case 8:Sm(),A=6;break e;case 3:case 2:case 9:case 6:Mn.current===null&&(s=!0);var K=ut;if(ut=0,Bn=null,Us(a,R,F,K),u&&Ms){A=0;break e}break;default:K=ut,ut=0,Bn=null,Us(a,R,F,K)}}eO(),A=Ct;break}catch(se){Yy(a,se)}while(!0);return s&&a.shellSuspendCounter++,Yr=Ei=null,at=d,U.H=g,U.A=b,Ge===null&&(gt=null,Xe=0,Iu()),A}function eO(){for(;Ge!==null;)Ky(Ge)}function tO(a,s){var u=at;at|=2;var d=Qy(),g=Wy();gt!==a||Xe!==s?(fc=null,cc=fn()+500,js(a,s)):Ms=Co(a,s);e:do try{if(ut!==0&&Ge!==null){s=Ge;var b=Bn;t:switch(ut){case 1:ut=0,Bn=null,Us(a,s,b,1);break;case 2:case 9:if(oE(b)){ut=0,Bn=null,Zy(s);break}s=function(){ut!==2&&ut!==9||gt!==a||(ut=7),Ar(a)},b.then(s,s);break e;case 3:ut=7;break e;case 4:ut=5;break e;case 7:oE(b)?(ut=0,Bn=null,Zy(s)):(ut=0,Bn=null,Us(a,s,b,7));break;case 5:var A=null;switch(Ge.tag){case 26:A=Ge.memoizedState;case 5:case 27:var R=Ge;if(A?B_(A):R.stateNode.complete){ut=0,Bn=null;var F=R.sibling;if(F!==null)Ge=F;else{var K=R.return;K!==null?(Ge=K,mc(K)):Ge=null}break t}}ut=0,Bn=null,Us(a,s,b,5);break;case 6:ut=0,Bn=null,Us(a,s,b,6);break;case 8:Sm(),Ct=6;break e;default:throw Error(r(462))}}nO();break}catch(se){Yy(a,se)}while(!0);return Yr=Ei=null,U.H=d,U.A=g,at=u,Ge!==null?0:(gt=null,Xe=0,Iu(),Ct)}function nO(){for(;Ge!==null&&!Hr();)Ky(Ge)}function Ky(a){var s=xy(a.alternate,a,ra);a.memoizedProps=a.pendingProps,s===null?mc(a):Ge=s}function Zy(a){var s=a,u=s.alternate;switch(s.tag){case 15:case 0:s=py(u,s,s.pendingProps,s.type,void 0,Xe);break;case 11:s=py(u,s,s.pendingProps,s.type.render,s.ref,Xe);break;case 5:Hh(s);default:vy(u,s),s=Ge=Wb(s,ra),s=xy(u,s,ra)}a.memoizedProps=a.pendingProps,s===null?mc(a):Ge=s}function Us(a,s,u,d){Yr=Ei=null,Hh(s),ks=null,$o=0;var g=s.return;try{if(VR(a,g,s,u,Xe)){Ct=1,tc(a,Xn(u,a.current)),Ge=null;return}}catch(b){if(g!==null)throw Ge=g,b;Ct=1,tc(a,Xn(u,a.current)),Ge=null;return}s.flags&32768?(Ke||d===1?a=!0:Ms||(Xe&536870912)!==0?a=!1:(Oa=a=!0,(d===2||d===9||d===3||d===6)&&(d=Mn.current,d!==null&&d.tag===13&&(d.flags|=16384))),Jy(s,a)):mc(s)}function mc(a){var s=a;do{if((s.flags&32768)!==0){Jy(s,Oa);return}a=s.return;var u=YR(s.alternate,s,ra);if(u!==null){Ge=u;return}if(s=s.sibling,s!==null){Ge=s;return}Ge=s=a}while(s!==null);Ct===0&&(Ct=5)}function Jy(a,s){do{var u=XR(a.alternate,a);if(u!==null){u.flags&=32767,Ge=u;return}if(u=a.return,u!==null&&(u.flags|=32768,u.subtreeFlags=0,u.deletions=null),!s&&(a=a.sibling,a!==null)){Ge=a;return}Ge=a=u}while(a!==null);Ct=6,Ge=null}function e_(a,s,u,d,g,b,A,R,F){a.cancelPendingCommit=null;do pc();while(Ut!==0);if((at&6)!==0)throw Error(r(327));if(s!==null){if(s===a.current)throw Error(r(177));if(b=s.lanes|s.childLanes,b|=hh,M3(a,u,b,A,R,F),a===gt&&(Ge=gt=null,Xe=0),Bs=s,Da=a,aa=u,xm=b,Tm=g,$y=d,(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,sO(Le,function(){return i_(),null})):(a.callbackNode=null,a.callbackPriority=0),d=(s.flags&13878)!==0,(s.subtreeFlags&13878)!==0||d){d=U.T,U.T=null,g=ee.p,ee.p=2,A=at,at|=4;try{QR(a,s,u)}finally{at=A,ee.p=g,U.T=d}}Ut=1,t_(),n_(),r_()}}function t_(){if(Ut===1){Ut=0;var a=Da,s=Bs,u=(s.flags&13878)!==0;if((s.subtreeFlags&13878)!==0||u){u=U.T,U.T=null;var d=ee.p;ee.p=2;var g=at;at|=4;try{My(s,a);var b=Bm,A=zb(a.containerInfo),R=b.focusedElem,F=b.selectionRange;if(A!==R&&R&&R.ownerDocument&&Hb(R.ownerDocument.documentElement,R)){if(F!==null&&lh(R)){var K=F.start,se=F.end;if(se===void 0&&(se=K),"selectionStart"in R)R.selectionStart=K,R.selectionEnd=Math.min(se,R.value.length);else{var fe=R.ownerDocument||document,Z=fe&&fe.defaultView||window;if(Z.getSelection){var ne=Z.getSelection(),Ae=R.textContent.length,Oe=Math.min(F.start,Ae),ht=F.end===void 0?Oe:Math.min(F.end,Ae);!ne.extend&&Oe>ht&&(A=ht,ht=Oe,Oe=A);var Y=Ub(R,Oe),q=Ub(R,ht);if(Y&&q&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==q.node||ne.focusOffset!==q.offset)){var W=fe.createRange();W.setStart(Y.node,Y.offset),ne.removeAllRanges(),Oe>ht?(ne.addRange(W),ne.extend(q.node,q.offset)):(W.setEnd(q.node,q.offset),ne.addRange(W))}}}}for(fe=[],ne=R;ne=ne.parentNode;)ne.nodeType===1&&fe.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<fe.length;R++){var le=fe[R];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}wc=!!Pm,Bm=Pm=null}finally{at=g,ee.p=d,U.T=u}}a.current=s,Ut=2}}function n_(){if(Ut===2){Ut=0;var a=Da,s=Bs,u=(s.flags&8772)!==0;if((s.subtreeFlags&8772)!==0||u){u=U.T,U.T=null;var d=ee.p;ee.p=2;var g=at;at|=4;try{Ry(a,s.alternate,s)}finally{at=g,ee.p=d,U.T=u}}Ut=3}}function r_(){if(Ut===4||Ut===3){Ut=0,Ud();var a=Da,s=Bs,u=aa,d=$y;(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0?Ut=5:(Ut=0,Bs=Da=null,a_(a,a.pendingLanes));var g=a.pendingLanes;if(g===0&&(Ia=null),$d(u),s=s.stateNode,jt&&typeof jt.onCommitFiberRoot=="function")try{jt.onCommitFiberRoot(dn,s,void 0,(s.current.flags&128)===128)}catch{}if(d!==null){s=U.T,g=ee.p,ee.p=2,U.T=null;try{for(var b=a.onRecoverableError,A=0;A<d.length;A++){var R=d[A];b(R.value,{componentStack:R.stack})}}finally{U.T=s,ee.p=g}}(aa&3)!==0&&pc(),Ar(a),g=a.pendingLanes,(u&261930)!==0&&(g&42)!==0?a===vm?sl++:(sl=0,vm=a):sl=0,ol(0)}}function a_(a,s){(a.pooledCacheLanes&=s)===0&&(s=a.pooledCache,s!=null&&(a.pooledCache=null,zo(s)))}function pc(){return t_(),n_(),r_(),i_()}function i_(){if(Ut!==5)return!1;var a=Da,s=xm;xm=0;var u=$d(aa),d=U.T,g=ee.p;try{ee.p=32>u?32:u,U.T=null,u=Tm,Tm=null;var b=Da,A=aa;if(Ut=0,Bs=Da=null,aa=0,(at&6)!==0)throw Error(r(331));var R=at;if(at|=4,Hy(b.current),By(b,b.current,A,u),at=R,ol(0,!1),jt&&typeof jt.onPostCommitFiberRoot=="function")try{jt.onPostCommitFiberRoot(dn,b)}catch{}return!0}finally{ee.p=g,U.T=d,a_(a,s)}}function s_(a,s,u){s=Xn(u,s),s=tm(a.stateNode,s,2),a=wa(a,s,2),a!==null&&(wo(a,2),Ar(a))}function ct(a,s,u){if(a.tag===3)s_(a,a,u);else for(;s!==null;){if(s.tag===3){s_(s,a,u);break}else if(s.tag===1){var d=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Ia===null||!Ia.has(d))){a=Xn(u,a),u=oy(2),d=wa(s,u,2),d!==null&&(ly(u,d,s,a),wo(d,2),Ar(d));break}}s=s.return}}function Cm(a,s,u){var d=a.pingCache;if(d===null){d=a.pingCache=new ZR;var g=new Set;d.set(s,g)}else g=d.get(s),g===void 0&&(g=new Set,d.set(s,g));g.has(u)||(Em=!0,g.add(u),a=rO.bind(null,a,s,u),s.then(a,a))}function rO(a,s,u){var d=a.pingCache;d!==null&&d.delete(s),a.pingedLanes|=a.suspendedLanes&u,a.warmLanes&=~u,gt===a&&(Xe&u)===u&&(Ct===4||Ct===3&&(Xe&62914560)===Xe&&300>fn()-uc?(at&2)===0&&js(a,0):ym|=u,Ps===Xe&&(Ps=0)),Ar(a)}function o_(a,s){s===0&&(s=tb()),a=pi(a,s),a!==null&&(wo(a,s),Ar(a))}function aO(a){var s=a.memoizedState,u=0;s!==null&&(u=s.retryLane),o_(a,u)}function iO(a,s){var u=0;switch(a.tag){case 31:case 13:var d=a.stateNode,g=a.memoizedState;g!==null&&(u=g.retryLane);break;case 19:d=a.stateNode;break;case 22:d=a.stateNode._retryCache;break;default:throw Error(r(314))}d!==null&&d.delete(s),o_(a,u)}function sO(a,s){return Gt(a,s)}var gc=null,Hs=null,wm=!1,bc=!1,km=!1,Pa=0;function Ar(a){a!==Hs&&a.next===null&&(Hs===null?gc=Hs=a:Hs=Hs.next=a),bc=!0,wm||(wm=!0,lO())}function ol(a,s){if(!km&&bc){km=!0;do for(var u=!1,d=gc;d!==null;){if(a!==0){var g=d.pendingLanes;if(g===0)var b=0;else{var A=d.suspendedLanes,R=d.pingedLanes;b=(1<<31-pt(42|a)+1)-1,b&=g&~(A&~R),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(u=!0,f_(d,b))}else b=Xe,b=xu(d,d===gt?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||Co(d,b)||(u=!0,f_(d,b));d=d.next}while(u);km=!1}}function oO(){l_()}function l_(){bc=wm=!1;var a=0;Pa!==0&&EO()&&(a=Pa);for(var s=fn(),u=null,d=gc;d!==null;){var g=d.next,b=u_(d,s);b===0?(d.next=null,u===null?gc=g:u.next=g,g===null&&(Hs=u)):(u=d,(a!==0||(b&3)!==0)&&(bc=!0)),d=g}Ut!==0&&Ut!==5||ol(a),Pa!==0&&(Pa=0)}function u_(a,s){for(var u=a.suspendedLanes,d=a.pingedLanes,g=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var A=31-pt(b),R=1<<A,F=g[A];F===-1?((R&u)===0||(R&d)!==0)&&(g[A]=D3(R,s)):F<=s&&(a.expiredLanes|=R),b&=~R}if(s=gt,u=Xe,u=xu(a,a===s?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d=a.callbackNode,u===0||a===s&&(ut===2||ut===9)||a.cancelPendingCommit!==null)return d!==null&&d!==null&&yn(d),a.callbackNode=null,a.callbackPriority=0;if((u&3)===0||Co(a,u)){if(s=u&-u,s===a.callbackPriority)return s;switch(d!==null&&yn(d),$d(u)){case 2:case 8:u=_e;break;case 32:u=Le;break;case 268435456:u=ot;break;default:u=Le}return d=c_.bind(null,a),u=Gt(u,d),a.callbackPriority=s,a.callbackNode=u,s}return d!==null&&d!==null&&yn(d),a.callbackPriority=2,a.callbackNode=null,2}function c_(a,s){if(Ut!==0&&Ut!==5)return a.callbackNode=null,a.callbackPriority=0,null;var u=a.callbackNode;if(pc()&&a.callbackNode!==u)return null;var d=Xe;return d=xu(a,a===gt?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),d===0?null:(Gy(a,d,s),u_(a,fn()),a.callbackNode!=null&&a.callbackNode===u?c_.bind(null,a):null)}function f_(a,s){if(pc())return null;Gy(a,s,!0)}function lO(){_O(function(){(at&6)!==0?Gt(oe,oO):l_()})}function Nm(){if(Pa===0){var a=As;a===0&&(a=Eu,Eu<<=1,(Eu&261888)===0&&(Eu=256)),Pa=a}return Pa}function d_(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:Au(""+a)}function h_(a,s){var u=s.ownerDocument.createElement("input");return u.name=s.name,u.value=s.value,a.id&&u.setAttribute("form",a.id),s.parentNode.insertBefore(u,s),a=new FormData(a),u.parentNode.removeChild(u),a}function uO(a,s,u,d,g){if(s==="submit"&&u&&u.stateNode===g){var b=d_((g[xn]||null).action),A=d.submitter;A&&(s=(s=A[xn]||null)?d_(s.formAction):A.getAttribute("formAction"),s!==null&&(b=s,A=null));var R=new Nu("action","action",null,d,g);a.push({event:R,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(Pa!==0){var F=A?h_(g,A):new FormData(g);Qh(u,{pending:!0,data:F,method:g.method,action:b},null,F)}}else typeof b=="function"&&(R.preventDefault(),F=A?h_(g,A):new FormData(g),Qh(u,{pending:!0,data:F,method:g.method,action:b},b,F))},currentTarget:g}]})}}for(var Rm=0;Rm<dh.length;Rm++){var Om=dh[Rm],cO=Om.toLowerCase(),fO=Om[0].toUpperCase()+Om.slice(1);lr(cO,"on"+fO)}lr(Vb,"onAnimationEnd"),lr(Gb,"onAnimationIteration"),lr(qb,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(wR,"onTransitionRun"),lr(kR,"onTransitionStart"),lr(NR,"onTransitionCancel"),lr(Yb,"onTransitionEnd"),fs("onMouseEnter",["mouseout","mouseover"]),fs("onMouseLeave",["mouseout","mouseover"]),fs("onPointerEnter",["pointerout","pointerover"]),fs("onPointerLeave",["pointerout","pointerover"]),fi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),fi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),fi("onBeforeInput",["compositionend","keypress","textInput","paste"]),fi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),fi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ll="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(" "),dO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ll));function m_(a,s){s=(s&4)!==0;for(var u=0;u<a.length;u++){var d=a[u],g=d.event;d=d.listeners;e:{var b=void 0;if(s)for(var A=d.length-1;0<=A;A--){var R=d[A],F=R.instance,K=R.currentTarget;if(R=R.listener,F!==b&&g.isPropagationStopped())break e;b=R,g.currentTarget=K;try{b(g)}catch(se){Lu(se)}g.currentTarget=null,b=F}else for(A=0;A<d.length;A++){if(R=d[A],F=R.instance,K=R.currentTarget,R=R.listener,F!==b&&g.isPropagationStopped())break e;b=R,g.currentTarget=K;try{b(g)}catch(se){Lu(se)}g.currentTarget=null,b=F}}}}function qe(a,s){var u=s[Vd];u===void 0&&(u=s[Vd]=new Set);var d=a+"__bubble";u.has(d)||(p_(s,a,2,!1),u.add(d))}function Lm(a,s,u){var d=0;s&&(d|=4),p_(u,a,d,s)}var Ec="_reactListening"+Math.random().toString(36).slice(2);function Im(a){if(!a[Ec]){a[Ec]=!0,lb.forEach(function(u){u!=="selectionchange"&&(dO.has(u)||Lm(u,!1,a),Lm(u,!0,a))});var s=a.nodeType===9?a:a.ownerDocument;s===null||s[Ec]||(s[Ec]=!0,Lm("selectionchange",!1,s))}}function p_(a,s,u,d){switch(V_(s)){case 2:var g=HO;break;case 8:g=zO;break;default:g=Xm}u=g.bind(null,s,u,a),g=void 0,!Jd||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),d?g!==void 0?a.addEventListener(s,u,{capture:!0,passive:g}):a.addEventListener(s,u,!0):g!==void 0?a.addEventListener(s,u,{passive:g}):a.addEventListener(s,u,!1)}function Dm(a,s,u,d,g){var b=d;if((s&1)===0&&(s&2)===0&&d!==null)e:for(;;){if(d===null)return;var A=d.tag;if(A===3||A===4){var R=d.stateNode.containerInfo;if(R===g)break;if(A===4)for(A=d.return;A!==null;){var F=A.tag;if((F===3||F===4)&&A.stateNode.containerInfo===g)return;A=A.return}for(;R!==null;){if(A=ls(R),A===null)return;if(F=A.tag,F===5||F===6||F===26||F===27){d=b=A;continue e}R=R.parentNode}}d=d.return}_b(function(){var K=b,se=Kd(u),fe=[];e:{var Z=Xb.get(a);if(Z!==void 0){var ne=Nu,Ae=a;switch(a){case"keypress":if(wu(u)===0)break e;case"keydown":case"keyup":ne=iR;break;case"focusin":Ae="focus",ne=rh;break;case"focusout":Ae="blur",ne=rh;break;case"beforeblur":case"afterblur":ne=rh;break;case"click":if(u.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=vb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=Y3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=lR;break;case Vb:case Gb:case qb:ne=W3;break;case Yb:ne=cR;break;case"scroll":case"scrollend":ne=G3;break;case"wheel":ne=dR;break;case"copy":case"cut":case"paste":ne=Z3;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=Ab;break;case"toggle":case"beforetoggle":ne=mR}var Oe=(s&4)!==0,ht=!Oe&&(a==="scroll"||a==="scrollend"),Y=Oe?Z!==null?Z+"Capture":null:Z;Oe=[];for(var q=K,W;q!==null;){var le=q;if(W=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||W===null||Y===null||(le=Ro(q,Y),le!=null&&Oe.push(ul(q,le,W))),ht)break;q=q.return}0<Oe.length&&(Z=new ne(Z,Ae,null,u,se),fe.push({event:Z,listeners:Oe}))}}if((s&7)===0){e:{if(Z=a==="mouseover"||a==="pointerover",ne=a==="mouseout"||a==="pointerout",Z&&u!==Wd&&(Ae=u.relatedTarget||u.fromElement)&&(ls(Ae)||Ae[os]))break e;if((ne||Z)&&(Z=se.window===se?se:(Z=se.ownerDocument)?Z.defaultView||Z.parentWindow:window,ne?(Ae=u.relatedTarget||u.toElement,ne=K,Ae=Ae?ls(Ae):null,Ae!==null&&(ht=o(Ae),Oe=Ae.tag,Ae!==ht||Oe!==5&&Oe!==27&&Oe!==6)&&(Ae=null)):(ne=null,Ae=K),ne!==Ae)){if(Oe=vb,le="onMouseLeave",Y="onMouseEnter",q="mouse",(a==="pointerout"||a==="pointerover")&&(Oe=Ab,le="onPointerLeave",Y="onPointerEnter",q="pointer"),ht=ne==null?Z:No(ne),W=Ae==null?Z:No(Ae),Z=new Oe(le,q+"leave",ne,u,se),Z.target=ht,Z.relatedTarget=W,le=null,ls(se)===K&&(Oe=new Oe(Y,q+"enter",Ae,u,se),Oe.target=W,Oe.relatedTarget=ht,le=Oe),ht=le,ne&&Ae)t:{for(Oe=hO,Y=ne,q=Ae,W=0,le=Y;le;le=Oe(le))W++;le=0;for(var Ne=q;Ne;Ne=Oe(Ne))le++;for(;0<W-le;)Y=Oe(Y),W--;for(;0<le-W;)q=Oe(q),le--;for(;W--;){if(Y===q||q!==null&&Y===q.alternate){Oe=Y;break t}Y=Oe(Y),q=Oe(q)}Oe=null}else Oe=null;ne!==null&&g_(fe,Z,ne,Oe,!1),Ae!==null&&ht!==null&&g_(fe,ht,Ae,Oe,!0)}}e:{if(Z=K?No(K):window,ne=Z.nodeName&&Z.nodeName.toLowerCase(),ne==="select"||ne==="input"&&Z.type==="file")var nt=Ib;else if(Ob(Z))if(Db)nt=SR;else{nt=TR;var Ce=xR}else ne=Z.nodeName,!ne||ne.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?K&&Qd(K.elementType)&&(nt=Ib):nt=vR;if(nt&&(nt=nt(a,K))){Lb(fe,nt,u,se);break e}Ce&&Ce(a,Z,K),a==="focusout"&&K&&Z.type==="number"&&K.memoizedProps.value!=null&&Xd(Z,"number",Z.value)}switch(Ce=K?No(K):window,a){case"focusin":(Ob(Ce)||Ce.contentEditable==="true")&&(bs=Ce,uh=K,jo=null);break;case"focusout":jo=uh=bs=null;break;case"mousedown":ch=!0;break;case"contextmenu":case"mouseup":case"dragend":ch=!1,Fb(fe,u,se);break;case"selectionchange":if(CR)break;case"keydown":case"keyup":Fb(fe,u,se)}var Ue;if(ih)e:{switch(a){case"compositionstart":var Qe="onCompositionStart";break e;case"compositionend":Qe="onCompositionEnd";break e;case"compositionupdate":Qe="onCompositionUpdate";break e}Qe=void 0}else gs?Nb(a,u)&&(Qe="onCompositionEnd"):a==="keydown"&&u.keyCode===229&&(Qe="onCompositionStart");Qe&&(Cb&&u.locale!=="ko"&&(gs||Qe!=="onCompositionStart"?Qe==="onCompositionEnd"&&gs&&(Ue=xb()):(_a=se,eh="value"in _a?_a.value:_a.textContent,gs=!0)),Ce=yc(K,Qe),0<Ce.length&&(Qe=new Sb(Qe,a,null,u,se),fe.push({event:Qe,listeners:Ce}),Ue?Qe.data=Ue:(Ue=Rb(u),Ue!==null&&(Qe.data=Ue)))),(Ue=gR?bR(a,u):ER(a,u))&&(Qe=yc(K,"onBeforeInput"),0<Qe.length&&(Ce=new Sb("onBeforeInput","beforeinput",null,u,se),fe.push({event:Ce,listeners:Qe}),Ce.data=Ue)),uO(fe,a,K,u,se)}m_(fe,s)})}function ul(a,s,u){return{instance:a,listener:s,currentTarget:u}}function yc(a,s){for(var u=s+"Capture",d=[];a!==null;){var g=a,b=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||b===null||(g=Ro(a,u),g!=null&&d.unshift(ul(a,g,b)),g=Ro(a,s),g!=null&&d.push(ul(a,g,b))),a.tag===3)return d;a=a.return}return[]}function hO(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function g_(a,s,u,d,g){for(var b=s._reactName,A=[];u!==null&&u!==d;){var R=u,F=R.alternate,K=R.stateNode;if(R=R.tag,F!==null&&F===d)break;R!==5&&R!==26&&R!==27||K===null||(F=K,g?(K=Ro(u,b),K!=null&&A.unshift(ul(u,K,F))):g||(K=Ro(u,b),K!=null&&A.push(ul(u,K,F)))),u=u.return}A.length!==0&&a.push({event:s,listeners:A})}var mO=/\r\n?/g,pO=/\u0000|\uFFFD/g;function b_(a){return(typeof a=="string"?a:""+a).replace(mO,`
|
|
10
|
+
`).replace(pO,"")}function E_(a,s){return s=b_(s),b_(a)===s}function dt(a,s,u,d,g,b){switch(u){case"children":typeof d=="string"?s==="body"||s==="textarea"&&d===""||hs(a,d):(typeof d=="number"||typeof d=="bigint")&&s!=="body"&&hs(a,""+d);break;case"className":vu(a,"class",d);break;case"tabIndex":vu(a,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":vu(a,u,d);break;case"style":Eb(a,d,b);break;case"data":if(s!=="object"){vu(a,"data",d);break}case"src":case"href":if(d===""&&(s!=="a"||u!=="href")){a.removeAttribute(u);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(u);break}d=Au(""+d),a.setAttribute(u,d);break;case"action":case"formAction":if(typeof d=="function"){a.setAttribute(u,"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 b=="function"&&(u==="formAction"?(s!=="input"&&dt(a,s,"name",g.name,g,null),dt(a,s,"formEncType",g.formEncType,g,null),dt(a,s,"formMethod",g.formMethod,g,null),dt(a,s,"formTarget",g.formTarget,g,null)):(dt(a,s,"encType",g.encType,g,null),dt(a,s,"method",g.method,g,null),dt(a,s,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){a.removeAttribute(u);break}d=Au(""+d),a.setAttribute(u,d);break;case"onClick":d!=null&&(a.onclick=$r);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"multiple":a.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":a.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){a.removeAttribute("xlink:href");break}u=Au(""+d),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",u);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,""+d):a.removeAttribute(u);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":d&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,""):a.removeAttribute(u);break;case"capture":case"download":d===!0?a.setAttribute(u,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?a.setAttribute(u,d):a.removeAttribute(u);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?a.setAttribute(u,d):a.removeAttribute(u);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?a.removeAttribute(u):a.setAttribute(u,d);break;case"popover":qe("beforetoggle",a),qe("toggle",a),Tu(a,"popover",d);break;case"xlinkActuate":Fr(a,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":Fr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":Fr(a,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":Fr(a,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":Fr(a,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":Fr(a,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":Fr(a,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Tu(a,"is",d);break;case"innerText":case"textContent":break;default:(!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(u=$3.get(u)||u,Tu(a,u,d))}}function Mm(a,s,u,d,g,b){switch(u){case"style":Eb(a,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(r(61));if(u=d.__html,u!=null){if(g.children!=null)throw Error(r(60));a.innerHTML=u}}break;case"children":typeof d=="string"?hs(a,d):(typeof d=="number"||typeof d=="bigint")&&hs(a,""+d);break;case"onScroll":d!=null&&qe("scroll",a);break;case"onScrollEnd":d!=null&&qe("scrollend",a);break;case"onClick":d!=null&&(a.onclick=$r);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ub.hasOwnProperty(u))e:{if(u[0]==="o"&&u[1]==="n"&&(g=u.endsWith("Capture"),s=u.slice(2,g?u.length-7:void 0),b=a[xn]||null,b=b!=null?b[u]:null,typeof b=="function"&&a.removeEventListener(s,b,g),typeof d=="function")){typeof b!="function"&&b!==null&&(u in a?a[u]=null:a.hasAttribute(u)&&a.removeAttribute(u)),a.addEventListener(s,d,g);break e}u in a?a[u]=d:d===!0?a.setAttribute(u,""):Tu(a,u,d)}}}function nn(a,s,u){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var d=!1,g=!1,b;for(b in u)if(u.hasOwnProperty(b)){var A=u[b];if(A!=null)switch(b){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,b,A,u,null)}}g&&dt(a,s,"srcSet",u.srcSet,u,null),d&&dt(a,s,"src",u.src,u,null);return;case"input":qe("invalid",a);var R=b=A=g=null,F=null,K=null;for(d in u)if(u.hasOwnProperty(d)){var se=u[d];if(se!=null)switch(d){case"name":g=se;break;case"type":A=se;break;case"checked":F=se;break;case"defaultChecked":K=se;break;case"value":b=se;break;case"defaultValue":R=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,s));break;default:dt(a,s,d,se,u,null)}}mb(a,b,R,F,K,A,g,!1);return;case"select":qe("invalid",a),d=A=b=null;for(g in u)if(u.hasOwnProperty(g)&&(R=u[g],R!=null))switch(g){case"value":b=R;break;case"defaultValue":A=R;break;case"multiple":d=R;default:dt(a,s,g,R,u,null)}s=b,u=A,a.multiple=!!d,s!=null?ds(a,!!d,s,!1):u!=null&&ds(a,!!d,u,!0);return;case"textarea":qe("invalid",a),b=g=d=null;for(A in u)if(u.hasOwnProperty(A)&&(R=u[A],R!=null))switch(A){case"value":d=R;break;case"defaultValue":g=R;break;case"children":b=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(91));break;default:dt(a,s,A,R,u,null)}gb(a,d,g,b);return;case"option":for(F in u)u.hasOwnProperty(F)&&(d=u[F],d!=null)&&(F==="selected"?a.selected=d&&typeof d!="function"&&typeof d!="symbol":dt(a,s,F,d,u,null));return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(d=0;d<ll.length;d++)qe(ll[d],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(K in u)if(u.hasOwnProperty(K)&&(d=u[K],d!=null))switch(K){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,s));default:dt(a,s,K,d,u,null)}return;default:if(Qd(s)){for(se in u)u.hasOwnProperty(se)&&(d=u[se],d!==void 0&&Mm(a,s,se,d,u,void 0));return}}for(R in u)u.hasOwnProperty(R)&&(d=u[R],d!=null&&dt(a,s,R,d,u,null))}function gO(a,s,u,d){switch(s){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,b=null,A=null,R=null,F=null,K=null,se=null;for(ne in u){var fe=u[ne];if(u.hasOwnProperty(ne)&&fe!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":F=fe;default:d.hasOwnProperty(ne)||dt(a,s,ne,null,d,fe)}}for(var Z in d){var ne=d[Z];if(fe=u[Z],d.hasOwnProperty(Z)&&(ne!=null||fe!=null))switch(Z){case"type":b=ne;break;case"name":g=ne;break;case"checked":K=ne;break;case"defaultChecked":se=ne;break;case"value":A=ne;break;case"defaultValue":R=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(r(137,s));break;default:ne!==fe&&dt(a,s,Z,ne,d,fe)}}Yd(a,A,R,F,K,se,b,g);return;case"select":ne=A=R=Z=null;for(b in u)if(F=u[b],u.hasOwnProperty(b)&&F!=null)switch(b){case"value":break;case"multiple":ne=F;default:d.hasOwnProperty(b)||dt(a,s,b,null,d,F)}for(g in d)if(b=d[g],F=u[g],d.hasOwnProperty(g)&&(b!=null||F!=null))switch(g){case"value":Z=b;break;case"defaultValue":R=b;break;case"multiple":A=b;default:b!==F&&dt(a,s,g,b,d,F)}s=R,u=A,d=ne,Z!=null?ds(a,!!u,Z,!1):!!d!=!!u&&(s!=null?ds(a,!!u,s,!0):ds(a,!!u,u?[]:"",!1));return;case"textarea":ne=Z=null;for(R in u)if(g=u[R],u.hasOwnProperty(R)&&g!=null&&!d.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:dt(a,s,R,null,d,g)}for(A in d)if(g=d[A],b=u[A],d.hasOwnProperty(A)&&(g!=null||b!=null))switch(A){case"value":Z=g;break;case"defaultValue":ne=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(r(91));break;default:g!==b&&dt(a,s,A,g,d,b)}pb(a,Z,ne);return;case"option":for(var Ae in u)Z=u[Ae],u.hasOwnProperty(Ae)&&Z!=null&&!d.hasOwnProperty(Ae)&&(Ae==="selected"?a.selected=!1:dt(a,s,Ae,null,d,Z));for(F in d)Z=d[F],ne=u[F],d.hasOwnProperty(F)&&Z!==ne&&(Z!=null||ne!=null)&&(F==="selected"?a.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":dt(a,s,F,Z,d,ne));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 Oe in u)Z=u[Oe],u.hasOwnProperty(Oe)&&Z!=null&&!d.hasOwnProperty(Oe)&&dt(a,s,Oe,null,d,Z);for(K in d)if(Z=d[K],ne=u[K],d.hasOwnProperty(K)&&Z!==ne&&(Z!=null||ne!=null))switch(K){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,s));break;default:dt(a,s,K,Z,d,ne)}return;default:if(Qd(s)){for(var ht in u)Z=u[ht],u.hasOwnProperty(ht)&&Z!==void 0&&!d.hasOwnProperty(ht)&&Mm(a,s,ht,void 0,d,Z);for(se in d)Z=d[se],ne=u[se],!d.hasOwnProperty(se)||Z===ne||Z===void 0&&ne===void 0||Mm(a,s,se,Z,d,ne);return}}for(var Y in u)Z=u[Y],u.hasOwnProperty(Y)&&Z!=null&&!d.hasOwnProperty(Y)&&dt(a,s,Y,null,d,Z);for(fe in d)Z=d[fe],ne=u[fe],!d.hasOwnProperty(fe)||Z===ne||Z==null&&ne==null||dt(a,s,fe,Z,d,ne)}function y_(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bO(){if(typeof performance.getEntriesByType=="function"){for(var a=0,s=0,u=performance.getEntriesByType("resource"),d=0;d<u.length;d++){var g=u[d],b=g.transferSize,A=g.initiatorType,R=g.duration;if(b&&R&&y_(A)){for(A=0,R=g.responseEnd,d+=1;d<u.length;d++){var F=u[d],K=F.startTime;if(K>R)break;var se=F.transferSize,fe=F.initiatorType;se&&y_(fe)&&(F=F.responseEnd,A+=se*(F<R?1:(R-K)/(F-K)))}if(--d,s+=8*(b+A)/(g.duration/1e3),a++,10<a)break}}if(0<a)return s/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var Pm=null,Bm=null;function _c(a){return a.nodeType===9?a:a.ownerDocument}function __(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function x_(a,s){if(a===0)switch(s){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&s==="foreignObject"?0:a}function jm(a,s){return a==="textarea"||a==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.children=="bigint"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var Um=null;function EO(){var a=window.event;return a&&a.type==="popstate"?a===Um?!1:(Um=a,!0):(Um=null,!1)}var T_=typeof setTimeout=="function"?setTimeout:void 0,yO=typeof clearTimeout=="function"?clearTimeout:void 0,v_=typeof Promise=="function"?Promise:void 0,_O=typeof queueMicrotask=="function"?queueMicrotask:typeof v_<"u"?function(a){return v_.resolve(null).then(a).catch(xO)}:T_;function xO(a){setTimeout(function(){throw a})}function Ba(a){return a==="head"}function S_(a,s){var u=s,d=0;do{var g=u.nextSibling;if(a.removeChild(u),g&&g.nodeType===8)if(u=g.data,u==="/$"||u==="/&"){if(d===0){a.removeChild(g),Vs(s);return}d--}else if(u==="$"||u==="$?"||u==="$~"||u==="$!"||u==="&")d++;else if(u==="html")cl(a.ownerDocument.documentElement);else if(u==="head"){u=a.ownerDocument.head,cl(u);for(var b=u.firstChild;b;){var A=b.nextSibling,R=b.nodeName;b[ko]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&b.rel.toLowerCase()==="stylesheet"||u.removeChild(b),b=A}}else u==="body"&&cl(a.ownerDocument.body);u=g}while(u);Vs(s)}function A_(a,s){var u=a;a=0;do{var d=u.nextSibling;if(u.nodeType===1?s?(u._stashedDisplay=u.style.display,u.style.display="none"):(u.style.display=u._stashedDisplay||"",u.getAttribute("style")===""&&u.removeAttribute("style")):u.nodeType===3&&(s?(u._stashedText=u.nodeValue,u.nodeValue=""):u.nodeValue=u._stashedText||""),d&&d.nodeType===8)if(u=d.data,u==="/$"){if(a===0)break;a--}else u!=="$"&&u!=="$?"&&u!=="$~"&&u!=="$!"||a++;u=d}while(u)}function Hm(a){var s=a.firstChild;for(s&&s.nodeType===10&&(s=s.nextSibling);s;){var u=s;switch(s=s.nextSibling,u.nodeName){case"HTML":case"HEAD":case"BODY":Hm(u),Gd(u);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(u.rel.toLowerCase()==="stylesheet")continue}a.removeChild(u)}}function TO(a,s,u,d){for(;a.nodeType===1;){var g=u;if(a.nodeName.toLowerCase()!==s.toLowerCase()){if(!d&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(d){if(!a[ko])switch(s){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==g.rel||a.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||a.getAttribute("title")!==(g.title==null?null:g.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(g.src==null?null:g.src)||a.getAttribute("type")!==(g.type==null?null:g.type)||a.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(s==="input"&&a.type==="hidden"){var b=g.name==null?null:""+g.name;if(g.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Jn(a.nextSibling),a===null)break}return null}function vO(a,s,u){if(s==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Jn(a.nextSibling),a===null))return null;return a}function C_(a,s){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!s||(a=Jn(a.nextSibling),a===null))return null;return a}function zm(a){return a.data==="$?"||a.data==="$~"}function Fm(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function SO(a,s){var u=a.ownerDocument;if(a.data==="$~")a._reactRetry=s;else if(a.data!=="$?"||u.readyState!=="loading")s();else{var d=function(){s(),u.removeEventListener("DOMContentLoaded",d)};u.addEventListener("DOMContentLoaded",d),a._reactRetry=d}}function Jn(a){for(;a!=null;a=a.nextSibling){var s=a.nodeType;if(s===1||s===3)break;if(s===8){if(s=a.data,s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"||s==="F!"||s==="F")break;if(s==="/$"||s==="/&")return null}}return a}var $m=null;function w_(a){a=a.nextSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="/$"||u==="/&"){if(s===0)return Jn(a.nextSibling);s--}else u!=="$"&&u!=="$!"&&u!=="$?"&&u!=="$~"&&u!=="&"||s++}a=a.nextSibling}return null}function k_(a){a=a.previousSibling;for(var s=0;a;){if(a.nodeType===8){var u=a.data;if(u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"){if(s===0)return a;s--}else u!=="/$"&&u!=="/&"||s++}a=a.previousSibling}return null}function N_(a,s,u){switch(s=_c(u),a){case"html":if(a=s.documentElement,!a)throw Error(r(452));return a;case"head":if(a=s.head,!a)throw Error(r(453));return a;case"body":if(a=s.body,!a)throw Error(r(454));return a;default:throw Error(r(451))}}function cl(a){for(var s=a.attributes;s.length;)a.removeAttributeNode(s[0]);Gd(a)}var er=new Map,R_=new Set;function xc(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ia=ee.d;ee.d={f:AO,r:CO,D:wO,C:kO,L:NO,m:RO,X:LO,S:OO,M:IO};function AO(){var a=ia.f(),s=dc();return a||s}function CO(a){var s=us(a);s!==null&&s.tag===5&&s.type==="form"?YE(s):ia.r(a)}var zs=typeof document>"u"?null:document;function O_(a,s,u){var d=zs;if(d&&typeof s=="string"&&s){var g=qn(s);g='link[rel="'+a+'"][href="'+g+'"]',typeof u=="string"&&(g+='[crossorigin="'+u+'"]'),R_.has(g)||(R_.add(g),a={rel:a,crossOrigin:u,href:s},d.querySelector(g)===null&&(s=d.createElement("link"),nn(s,"link",a),qt(s),d.head.appendChild(s)))}}function wO(a){ia.D(a),O_("dns-prefetch",a,null)}function kO(a,s){ia.C(a,s),O_("preconnect",a,s)}function NO(a,s,u){ia.L(a,s,u);var d=zs;if(d&&a&&s){var g='link[rel="preload"][as="'+qn(s)+'"]';s==="image"&&u&&u.imageSrcSet?(g+='[imagesrcset="'+qn(u.imageSrcSet)+'"]',typeof u.imageSizes=="string"&&(g+='[imagesizes="'+qn(u.imageSizes)+'"]')):g+='[href="'+qn(a)+'"]';var b=g;switch(s){case"style":b=Fs(a);break;case"script":b=$s(a)}er.has(b)||(a=m({rel:"preload",href:s==="image"&&u&&u.imageSrcSet?void 0:a,as:s},u),er.set(b,a),d.querySelector(g)!==null||s==="style"&&d.querySelector(fl(b))||s==="script"&&d.querySelector(dl(b))||(s=d.createElement("link"),nn(s,"link",a),qt(s),d.head.appendChild(s)))}}function RO(a,s){ia.m(a,s);var u=zs;if(u&&a){var d=s&&typeof s.as=="string"?s.as:"script",g='link[rel="modulepreload"][as="'+qn(d)+'"][href="'+qn(a)+'"]',b=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=$s(a)}if(!er.has(b)&&(a=m({rel:"modulepreload",href:a},s),er.set(b,a),u.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(u.querySelector(dl(b)))return}d=u.createElement("link"),nn(d,"link",a),qt(d),u.head.appendChild(d)}}}function OO(a,s,u){ia.S(a,s,u);var d=zs;if(d&&a){var g=cs(d).hoistableStyles,b=Fs(a);s=s||"default";var A=g.get(b);if(!A){var R={loading:0,preload:null};if(A=d.querySelector(fl(b)))R.loading=5;else{a=m({rel:"stylesheet",href:a,"data-precedence":s},u),(u=er.get(b))&&Vm(a,u);var F=A=d.createElement("link");qt(F),nn(F,"link",a),F._p=new Promise(function(K,se){F.onload=K,F.onerror=se}),F.addEventListener("load",function(){R.loading|=1}),F.addEventListener("error",function(){R.loading|=2}),R.loading|=4,Tc(A,s,d)}A={type:"stylesheet",instance:A,count:1,state:R},g.set(b,A)}}}function LO(a,s){ia.X(a,s);var u=zs;if(u&&a){var d=cs(u).hoistableScripts,g=$s(a),b=d.get(g);b||(b=u.querySelector(dl(g)),b||(a=m({src:a,async:!0},s),(s=er.get(g))&&Gm(a,s),b=u.createElement("script"),qt(b),nn(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(g,b))}}function IO(a,s){ia.M(a,s);var u=zs;if(u&&a){var d=cs(u).hoistableScripts,g=$s(a),b=d.get(g);b||(b=u.querySelector(dl(g)),b||(a=m({src:a,async:!0,type:"module"},s),(s=er.get(g))&&Gm(a,s),b=u.createElement("script"),qt(b),nn(b,"link",a),u.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(g,b))}}function L_(a,s,u,d){var g=(g=ye.current)?xc(g):null;if(!g)throw Error(r(446));switch(a){case"meta":case"title":return null;case"style":return typeof u.precedence=="string"&&typeof u.href=="string"?(s=Fs(u.href),u=cs(g).hoistableStyles,d=u.get(s),d||(d={type:"style",instance:null,count:0,state:null},u.set(s,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(u.rel==="stylesheet"&&typeof u.href=="string"&&typeof u.precedence=="string"){a=Fs(u.href);var b=cs(g).hoistableStyles,A=b.get(a);if(A||(g=g.ownerDocument||g,A={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,A),(b=g.querySelector(fl(a)))&&!b._p&&(A.instance=b,A.state.loading=5),er.has(a)||(u={rel:"preload",as:"style",href:u.href,crossOrigin:u.crossOrigin,integrity:u.integrity,media:u.media,hrefLang:u.hrefLang,referrerPolicy:u.referrerPolicy},er.set(a,u),b||DO(g,a,u,A.state))),s&&d===null)throw Error(r(528,""));return A}if(s&&d!==null)throw Error(r(529,""));return null;case"script":return s=u.async,u=u.src,typeof u=="string"&&s&&typeof s!="function"&&typeof s!="symbol"?(s=$s(u),u=cs(g).hoistableScripts,d=u.get(s),d||(d={type:"script",instance:null,count:0,state:null},u.set(s,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,a))}}function Fs(a){return'href="'+qn(a)+'"'}function fl(a){return'link[rel="stylesheet"]['+a+"]"}function I_(a){return m({},a,{"data-precedence":a.precedence,precedence:null})}function DO(a,s,u,d){a.querySelector('link[rel="preload"][as="style"]['+s+"]")?d.loading=1:(s=a.createElement("link"),d.preload=s,s.addEventListener("load",function(){return d.loading|=1}),s.addEventListener("error",function(){return d.loading|=2}),nn(s,"link",u),qt(s),a.head.appendChild(s))}function $s(a){return'[src="'+qn(a)+'"]'}function dl(a){return"script[async]"+a}function D_(a,s,u){if(s.count++,s.instance===null)switch(s.type){case"style":var d=a.querySelector('style[data-href~="'+qn(u.href)+'"]');if(d)return s.instance=d,qt(d),d;var g=m({},u,{"data-href":u.href,"data-precedence":u.precedence,href:null,precedence:null});return d=(a.ownerDocument||a).createElement("style"),qt(d),nn(d,"style",g),Tc(d,u.precedence,a),s.instance=d;case"stylesheet":g=Fs(u.href);var b=a.querySelector(fl(g));if(b)return s.state.loading|=4,s.instance=b,qt(b),b;d=I_(u),(g=er.get(g))&&Vm(d,g),b=(a.ownerDocument||a).createElement("link"),qt(b);var A=b;return A._p=new Promise(function(R,F){A.onload=R,A.onerror=F}),nn(b,"link",d),s.state.loading|=4,Tc(b,u.precedence,a),s.instance=b;case"script":return b=$s(u.src),(g=a.querySelector(dl(b)))?(s.instance=g,qt(g),g):(d=u,(g=er.get(b))&&(d=m({},u),Gm(d,g)),a=a.ownerDocument||a,g=a.createElement("script"),qt(g),nn(g,"link",d),a.head.appendChild(g),s.instance=g);case"void":return null;default:throw Error(r(443,s.type))}else s.type==="stylesheet"&&(s.state.loading&4)===0&&(d=s.instance,s.state.loading|=4,Tc(d,u.precedence,a));return s.instance}function Tc(a,s,u){for(var d=u.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,b=g,A=0;A<d.length;A++){var R=d[A];if(R.dataset.precedence===s)b=R;else if(b!==g)break}b?b.parentNode.insertBefore(a,b.nextSibling):(s=u.nodeType===9?u.head:u,s.insertBefore(a,s.firstChild))}function Vm(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.title==null&&(a.title=s.title)}function Gm(a,s){a.crossOrigin==null&&(a.crossOrigin=s.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=s.referrerPolicy),a.integrity==null&&(a.integrity=s.integrity)}var vc=null;function M_(a,s,u){if(vc===null){var d=new Map,g=vc=new Map;g.set(u,d)}else g=vc,d=g.get(u),d||(d=new Map,g.set(u,d));if(d.has(a))return d;for(d.set(a,null),u=u.getElementsByTagName(a),g=0;g<u.length;g++){var b=u[g];if(!(b[ko]||b[Zt]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var A=b.getAttribute(s)||"";A=a+A;var R=d.get(A);R?R.push(b):d.set(A,[b])}}return d}function P_(a,s,u){a=a.ownerDocument||a,a.head.insertBefore(u,s==="title"?a.querySelector("head > title"):null)}function MO(a,s,u){if(u===1||s.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof s.precedence!="string"||typeof s.href!="string"||s.href==="")break;return!0;case"link":if(typeof s.rel!="string"||typeof s.href!="string"||s.href===""||s.onLoad||s.onError)break;return s.rel==="stylesheet"?(a=s.disabled,typeof s.precedence=="string"&&a==null):!0;case"script":if(s.async&&typeof s.async!="function"&&typeof s.async!="symbol"&&!s.onLoad&&!s.onError&&s.src&&typeof s.src=="string")return!0}return!1}function B_(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function PO(a,s,u,d){if(u.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(u.state.loading&4)===0){if(u.instance===null){var g=Fs(d.href),b=s.querySelector(fl(g));if(b){s=b._p,s!==null&&typeof s=="object"&&typeof s.then=="function"&&(a.count++,a=Sc.bind(a),s.then(a,a)),u.state.loading|=4,u.instance=b,qt(b);return}b=s.ownerDocument||s,d=I_(d),(g=er.get(g))&&Vm(d,g),b=b.createElement("link"),qt(b);var A=b;A._p=new Promise(function(R,F){A.onload=R,A.onerror=F}),nn(b,"link",d),u.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(u,s),(s=u.state.preload)&&(u.state.loading&3)===0&&(a.count++,u=Sc.bind(a),s.addEventListener("load",u),s.addEventListener("error",u))}}var qm=0;function BO(a,s){return a.stylesheets&&a.count===0&&Cc(a,a.stylesheets),0<a.count||0<a.imgCount?function(u){var d=setTimeout(function(){if(a.stylesheets&&Cc(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+s);0<a.imgBytes&&qm===0&&(qm=62500*bO());var g=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&Cc(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>qm?50:800)+s);return a.unsuspend=u,function(){a.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cc(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var Ac=null;function Cc(a,s){a.stylesheets=null,a.unsuspend!==null&&(a.count++,Ac=new Map,s.forEach(jO,a),Ac=null,Sc.call(a))}function jO(a,s){if(!(s.state.loading&4)){var u=Ac.get(a);if(u)var d=u.get(null);else{u=new Map,Ac.set(a,u);for(var g=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<g.length;b++){var A=g[b];(A.nodeName==="LINK"||A.getAttribute("media")!=="not all")&&(u.set(A.dataset.precedence,A),d=A)}d&&u.set(null,d)}g=s.instance,A=g.getAttribute("data-precedence"),b=u.get(A)||d,b===d&&u.set(null,g),u.set(A,g),this.count++,d=Sc.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),b?b.parentNode.insertBefore(g,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(g,a.firstChild)),s.state.loading|=4}}var hl={$$typeof:N,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function UO(a,s,u,d,g,b,A,R,F){this.tag=1,this.containerInfo=a,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=zd(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zd(0),this.hiddenUpdates=zd(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=b,this.onRecoverableError=A,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=F,this.incompleteTransitions=new Map}function j_(a,s,u,d,g,b,A,R,F,K,se,fe){return a=new UO(a,s,u,A,F,K,se,fe,R),s=1,b===!0&&(s|=24),b=Dn(3,null,null,s),a.current=b,b.stateNode=a,s=Ah(),s.refCount++,a.pooledCache=s,s.refCount++,b.memoizedState={element:d,isDehydrated:u,cache:s},Nh(b),a}function U_(a){return a?(a=_s,a):_s}function H_(a,s,u,d,g,b){g=U_(g),d.context===null?d.context=g:d.pendingContext=g,d=Ca(s),d.payload={element:u},b=b===void 0?null:b,b!==null&&(d.callback=b),u=wa(a,d,s),u!==null&&(wn(u,a,s),Go(u,a,s))}function z_(a,s){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var u=a.retryLane;a.retryLane=u!==0&&u<s?u:s}}function Ym(a,s){z_(a,s),(a=a.alternate)&&z_(a,s)}function F_(a){if(a.tag===13||a.tag===31){var s=pi(a,67108864);s!==null&&wn(s,a,67108864),Ym(a,67108864)}}function $_(a){if(a.tag===13||a.tag===31){var s=Un();s=Fd(s);var u=pi(a,s);u!==null&&wn(u,a,s),Ym(a,s)}}var wc=!0;function HO(a,s,u,d){var g=U.T;U.T=null;var b=ee.p;try{ee.p=2,Xm(a,s,u,d)}finally{ee.p=b,U.T=g}}function zO(a,s,u,d){var g=U.T;U.T=null;var b=ee.p;try{ee.p=8,Xm(a,s,u,d)}finally{ee.p=b,U.T=g}}function Xm(a,s,u,d){if(wc){var g=Qm(d);if(g===null)Dm(a,s,d,kc,u),G_(a,d);else if($O(g,a,s,u,d))d.stopPropagation();else if(G_(a,d),s&4&&-1<FO.indexOf(a)){for(;g!==null;){var b=us(g);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var A=ci(b.pendingLanes);if(A!==0){var R=b;for(R.pendingLanes|=2,R.entangledLanes|=2;A;){var F=1<<31-pt(A);R.entanglements[1]|=F,A&=~F}Ar(b),(at&6)===0&&(cc=fn()+500,ol(0))}}break;case 31:case 13:R=pi(b,2),R!==null&&wn(R,b,2),dc(),Ym(b,2)}if(b=Qm(d),b===null&&Dm(a,s,d,kc,u),b===g)break;g=b}g!==null&&d.stopPropagation()}else Dm(a,s,d,null,u)}}function Qm(a){return a=Kd(a),Wm(a)}var kc=null;function Wm(a){if(kc=null,a=ls(a),a!==null){var s=o(a);if(s===null)a=null;else{var u=s.tag;if(u===13){if(a=l(s),a!==null)return a;a=null}else if(u===31){if(a=c(s),a!==null)return a;a=null}else if(u===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;a=null}else s!==a&&(a=null)}}return kc=a,null}function V_(a){switch(a){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(Hd()){case oe:return 2;case _e:return 8;case Le:case Ve:return 32;case ot:return 268435456;default:return 32}default:return 32}}var Km=!1,ja=null,Ua=null,Ha=null,ml=new Map,pl=new Map,za=[],FO="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 G_(a,s){switch(a){case"focusin":case"focusout":ja=null;break;case"dragenter":case"dragleave":Ua=null;break;case"mouseover":case"mouseout":Ha=null;break;case"pointerover":case"pointerout":ml.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(s.pointerId)}}function gl(a,s,u,d,g,b){return a===null||a.nativeEvent!==b?(a={blockedOn:s,domEventName:u,eventSystemFlags:d,nativeEvent:b,targetContainers:[g]},s!==null&&(s=us(s),s!==null&&F_(s)),a):(a.eventSystemFlags|=d,s=a.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),a)}function $O(a,s,u,d,g){switch(s){case"focusin":return ja=gl(ja,a,s,u,d,g),!0;case"dragenter":return Ua=gl(Ua,a,s,u,d,g),!0;case"mouseover":return Ha=gl(Ha,a,s,u,d,g),!0;case"pointerover":var b=g.pointerId;return ml.set(b,gl(ml.get(b)||null,a,s,u,d,g)),!0;case"gotpointercapture":return b=g.pointerId,pl.set(b,gl(pl.get(b)||null,a,s,u,d,g)),!0}return!1}function q_(a){var s=ls(a.target);if(s!==null){var u=o(s);if(u!==null){if(s=u.tag,s===13){if(s=l(u),s!==null){a.blockedOn=s,sb(a.priority,function(){$_(u)});return}}else if(s===31){if(s=c(u),s!==null){a.blockedOn=s,sb(a.priority,function(){$_(u)});return}}else if(s===3&&u.stateNode.current.memoizedState.isDehydrated){a.blockedOn=u.tag===3?u.stateNode.containerInfo:null;return}}}a.blockedOn=null}function Nc(a){if(a.blockedOn!==null)return!1;for(var s=a.targetContainers;0<s.length;){var u=Qm(a.nativeEvent);if(u===null){u=a.nativeEvent;var d=new u.constructor(u.type,u);Wd=d,u.target.dispatchEvent(d),Wd=null}else return s=us(u),s!==null&&F_(s),a.blockedOn=u,!1;s.shift()}return!0}function Y_(a,s,u){Nc(a)&&u.delete(s)}function VO(){Km=!1,ja!==null&&Nc(ja)&&(ja=null),Ua!==null&&Nc(Ua)&&(Ua=null),Ha!==null&&Nc(Ha)&&(Ha=null),ml.forEach(Y_),pl.forEach(Y_)}function Rc(a,s){a.blockedOn===s&&(a.blockedOn=null,Km||(Km=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,VO)))}var Oc=null;function X_(a){Oc!==a&&(Oc=a,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Oc===a&&(Oc=null);for(var s=0;s<a.length;s+=3){var u=a[s],d=a[s+1],g=a[s+2];if(typeof d!="function"){if(Wm(d||u)===null)continue;break}var b=us(u);b!==null&&(a.splice(s,3),s-=3,Qh(b,{pending:!0,data:g,method:u.method,action:d},d,g))}}))}function Vs(a){function s(F){return Rc(F,a)}ja!==null&&Rc(ja,a),Ua!==null&&Rc(Ua,a),Ha!==null&&Rc(Ha,a),ml.forEach(s),pl.forEach(s);for(var u=0;u<za.length;u++){var d=za[u];d.blockedOn===a&&(d.blockedOn=null)}for(;0<za.length&&(u=za[0],u.blockedOn===null);)q_(u),u.blockedOn===null&&za.shift();if(u=(a.ownerDocument||a).$$reactFormReplay,u!=null)for(d=0;d<u.length;d+=3){var g=u[d],b=u[d+1],A=g[xn]||null;if(typeof b=="function")A||X_(u);else if(A){var R=null;if(b&&b.hasAttribute("formAction")){if(g=b,A=b[xn]||null)R=A.formAction;else if(Wm(g)!==null)continue}else R=A.action;typeof R=="function"?u[d+1]=R:(u.splice(d,3),d-=3),X_(u)}}}function Q_(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(A){return g=A})},focusReset:"manual",scroll:"manual"})}function s(){g!==null&&(g(),g=null),d||setTimeout(u,20)}function u(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",s),navigation.addEventListener("navigateerror",s),setTimeout(u,100),function(){d=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",s),navigation.removeEventListener("navigateerror",s),g!==null&&(g(),g=null)}}}function Zm(a){this._internalRoot=a}Lc.prototype.render=Zm.prototype.render=function(a){var s=this._internalRoot;if(s===null)throw Error(r(409));var u=s.current,d=Un();H_(u,d,a,s,null,null)},Lc.prototype.unmount=Zm.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var s=a.containerInfo;H_(a.current,2,null,a,null,null),dc(),s[os]=null}};function Lc(a){this._internalRoot=a}Lc.prototype.unstable_scheduleHydration=function(a){if(a){var s=ib();a={blockedOn:null,target:a,priority:s};for(var u=0;u<za.length&&s!==0&&s<za[u].priority;u++);za.splice(u,0,a),u===0&&q_(a)}};var W_=t.version;if(W_!=="19.2.7")throw Error(r(527,W_,"19.2.7"));ee.findDOMNode=function(a){var s=a._reactInternals;if(s===void 0)throw typeof a.render=="function"?Error(r(188)):(a=Object.keys(a).join(","),Error(r(268,a)));return a=h(s),a=a!==null?p(a):null,a=a===null?null:a.stateNode,a};var GO={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ic.isDisabled&&Ic.supportsFiber)try{dn=Ic.inject(GO),jt=Ic}catch{}}return El.createRoot=function(a,s){if(!i(a))throw Error(r(299));var u=!1,d="",g=ry,b=ay,A=iy;return s!=null&&(s.unstable_strictMode===!0&&(u=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(g=s.onUncaughtError),s.onCaughtError!==void 0&&(b=s.onCaughtError),s.onRecoverableError!==void 0&&(A=s.onRecoverableError)),s=j_(a,1,!1,null,null,u,d,null,g,b,A,Q_),a[os]=s.current,Im(a),new Zm(s)},El.hydrateRoot=function(a,s,u){if(!i(a))throw Error(r(299));var d=!1,g="",b=ry,A=ay,R=iy,F=null;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(g=u.identifierPrefix),u.onUncaughtError!==void 0&&(b=u.onUncaughtError),u.onCaughtError!==void 0&&(A=u.onCaughtError),u.onRecoverableError!==void 0&&(R=u.onRecoverableError),u.formState!==void 0&&(F=u.formState)),s=j_(a,1,!0,s,u??null,d,g,F,b,A,R,Q_),s.context=U_(null),u=s.current,d=Un(),d=Fd(d),g=Ca(d),g.callback=null,wa(u,g,d),u=d,s.current.lanes=u,wo(s,u),Ar(s),a[os]=s.current,Im(a),new Lc(s)},El.version="19.2.7",El}var sx;function nL(){if(sx)return tp.exports;sx=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(),tp.exports=tL(),tp.exports}var rL=nL();const L2=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const aL=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const iL=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const ox=e=>{const t=iL(e);return t.charAt(0).toUpperCase()+t.slice(1)};var ip={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"};const sL=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},oL=v.createContext({}),lL=()=>v.useContext(oL),uL=v.forwardRef(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i="",children:o,iconNode:l,...c},f)=>{const{size:h=24,strokeWidth:p=2,absoluteStrokeWidth:m=!1,color:y="currentColor",className:E=""}=lL()??{},T=r??m?Number(n??p)*24/Number(t??h):n??p;return v.createElement("svg",{ref:f,...ip,width:t??h??ip.width,height:t??h??ip.height,stroke:e??y,strokeWidth:T,className:L2("lucide",E,i),...!o&&!sL(c)&&{"aria-hidden":"true"},...c},[...l.map(([S,C])=>v.createElement(S,C)),...Array.isArray(o)?o:[o]])});const lt=(e,t)=>{const n=v.forwardRef(({className:r,...i},o)=>v.createElement(uL,{ref:o,iconNode:t,className:L2(`lucide-${aL(ox(e))}`,`lucide-${e}`,r),...i}));return n.displayName=ox(e),n};const cL=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],fL=lt("arrow-down",cL);const dL=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],I2=lt("arrow-left",dL);const hL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],mL=lt("arrow-right",hL);const pL=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],gL=lt("brain",pL);const bL=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],EL=lt("check",bL);const yL=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Xf=lt("chevron-down",yL);const _L=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],D2=lt("chevron-right",_L);const xL=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],TL=lt("chevron-up",xL);const vL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],i0=lt("circle-alert",vL);const SL=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],AL=lt("circle-check-big",SL);const CL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wL=lt("circle-check",CL);const kL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],M2=lt("circle-slash",kL);const NL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],P2=lt("circle-x",NL);const RL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],OL=lt("circle",RL);const LL=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],IL=lt("clock",LL);const DL=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],ML=lt("corner-down-left",DL);const PL=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],BL=lt("file",PL);const jL=[["circle",{cx:"12",cy:"18",r:"3",key:"1mpf1b"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["path",{d:"M18 9v2c0 .6-.4 1-1 1H7c-.6 0-1-.4-1-1V9",key:"1uq4wg"}],["path",{d:"M12 12v3",key:"158kv8"}]],B2=lt("git-fork",jL);const UL=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Qf=lt("loader-circle",UL);const HL=[["circle",{cx:"12",cy:"16",r:"1",key:"1au0dj"}],["rect",{x:"3",y:"10",width:"18",height:"12",rx:"2",key:"6s8ecr"}],["path",{d:"M7 10V7a5 5 0 0 1 10 0v3",key:"1pqi11"}]],zL=lt("lock-keyhole",HL);const FL=[["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"}]],$L=lt("message-square",FL);const VL=[["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"}]],j2=lt("messages-square",VL);const GL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],qL=lt("panel-right",GL);const YL=[["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"}]],U2=lt("paperclip",YL);const XL=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],QL=lt("plus",XL);const WL=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],KL=lt("rotate-ccw",WL);const ZL=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],H2=lt("square",ZL);const JL=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],lx=lt("triangle-alert",JL);const eI=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],z2=lt("wrench",eI);const tI=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cg=lt("x",tI);function F2(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=F2(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wf(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=F2(e))&&(r&&(r+=" "),r+=t);return r}const ux=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=Wf,fg=(e,t)=>n=>{var r;if(t?.variants==null)return cx(e,n?.class,n?.className);const{variants:i,defaultVariants:o}=t,l=Object.keys(i).map(h=>{const p=n?.[h],m=o?.[h];if(p===null)return null;const y=ux(p)||ux(m);return i[h][y]}),c=n&&Object.entries(n).reduce((h,p)=>{let[m,y]=p;return y===void 0||(h[m]=y),h},{}),f=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((h,p)=>{let{class:m,className:y,...E}=p;return Object.entries(E).every(T=>{let[S,C]=T;return Array.isArray(C)?C.includes({...o,...c}[S]):{...o,...c}[S]===C})?[...h,m,y]:h},[]);return cx(e,l,f,n?.class,n?.className)};var Ki=O2();function fx(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function nI(...e){return t=>{let n=!1;const r=e.map(i=>{const o=fx(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():fx(e[i],null)}}}}function St(...e){return v.useCallback(nI(...e),e)}function lo(e){const t=v.forwardRef((n,r)=>{let{children:i,...o}=n,l=null,c=!1;const f=[];dx(i)&&typeof Dc=="function"&&(i=Dc(i._payload)),v.Children.forEach(i,y=>{if(oI(y)){c=!0;const E=y;let T="child"in E.props?E.props.child:E.props.children;dx(T)&&typeof Dc=="function"&&(T=Dc(T._payload)),l=aI(E,T),f.push(l?.props?.children)}else f.push(y)}),l?l=v.cloneElement(l,void 0,f):!c&&v.Children.count(i)===1&&v.isValidElement(i)&&(l=i);const h=l?sI(l):void 0,p=St(r,h);if(!l){if(i||i===0)throw new Error(c?fI(e):cI(e));return i}const m=iI(o,l.props??{});return l.type!==v.Fragment&&(m.ref=r?p:h),v.cloneElement(l,m)});return t.displayName=`${e}.Slot`,t}var $2=lo("Slot"),rI=Symbol.for("radix.slottable"),aI=(e,t)=>{if("child"in e.props){const n=e.props.child;return v.isValidElement(n)?v.cloneElement(n,void 0,e.props.children(n.props.children)):null}return v.isValidElement(t)?t:null};function iI(e,t){const n={...t};for(const r in t){const i=e[r],o=t[r];/^on[A-Z]/.test(r)?i&&o?n[r]=(...c)=>{const f=o(...c);return i(...c),f}:i&&(n[r]=i):r==="style"?n[r]={...i,...o}:r==="className"&&(n[r]=[i,o].filter(Boolean).join(" "))}return{...e,...n}}function sI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function oI(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rI}var lI=Symbol.for("react.lazy");function dx(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===lI&&"_payload"in e&&uI(e._payload)}function uI(e){return typeof e=="object"&&e!==null&&"then"in e}var cI=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,fI=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,Dc=au[" use ".trim().toString()],dI=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],We=dI.reduce((e,t)=>{const n=lo(`Primitive.${t}`),r=v.forwardRef((i,o)=>{const{asChild:l,...c}=i,f=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),_.jsx(f,{...c,ref:o})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function hI(e,t){e&&Ki.flushSync(()=>e.dispatchEvent(t))}var V2=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),mI="VisuallyHidden",pI=v.forwardRef((e,t)=>_.jsx(We.span,{...e,ref:t,style:{...V2,...e.style}}));pI.displayName=mI;function Zi(e,t=[]){let n=[];function r(o,l){const c=v.createContext(l);c.displayName=o+"Context";const f=n.length;n=[...n,l];const h=m=>{const{scope:y,children:E,...T}=m,S=y?.[e]?.[f]||c,C=v.useMemo(()=>T,Object.values(T));return _.jsx(S.Provider,{value:C,children:E})};h.displayName=o+"Provider";function p(m,y){const E=y?.[e]?.[f]||c,T=v.useContext(E);if(T)return T;if(l!==void 0)return l;throw new Error(`\`${m}\` must be used within \`${o}\``)}return[h,p]}const i=()=>{const o=n.map(l=>v.createContext(l));return function(c){const f=c?.[e]||o;return v.useMemo(()=>({[`__scope${e}`]:{...c,[e]:f}}),[c,f])}};return i.scopeName=e,[r,gI(i,...t)]}function gI(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(o){const l=r.reduce((c,{useScope:f,scopeName:h})=>{const m=f(o)[`__scope${h}`];return{...c,...m}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function G2(e){const t=e+"CollectionProvider",[n,r]=Zi(t),[i,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=S=>{const{scope:C,children:w}=S,k=v.useRef(null),N=v.useRef(new Map).current;return _.jsx(i,{scope:C,itemMap:N,collectionRef:k,children:w})};l.displayName=t;const c=e+"CollectionSlot",f=lo(c),h=v.forwardRef((S,C)=>{const{scope:w,children:k}=S,N=o(c,w),P=St(C,N.collectionRef);return _.jsx(f,{ref:P,children:k})});h.displayName=c;const p=e+"CollectionItemSlot",m="data-radix-collection-item",y=lo(p),E=v.forwardRef((S,C)=>{const{scope:w,children:k,...N}=S,P=v.useRef(null),B=St(C,P),D=o(p,w);return v.useEffect(()=>(D.itemMap.set(P,{ref:P,...N}),()=>{D.itemMap.delete(P)})),_.jsx(y,{[m]:"",ref:B,children:k})});E.displayName=p;function T(S){const C=o(e+"CollectionConsumer",S);return v.useCallback(()=>{const k=C.collectionRef.current;if(!k)return[];const N=Array.from(k.querySelectorAll(`[${m}]`));return Array.from(C.itemMap.values()).sort((D,$)=>N.indexOf(D.ref.current)-N.indexOf($.ref.current))},[C.collectionRef,C.itemMap])}return[{Provider:l,Slot:h,ItemSlot:E},T,r]}function Ze(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e?.(i),n===!1||!i.defaultPrevented)return t?.(i)}}var $t=globalThis?.document?v.useLayoutEffect:()=>{},hx=au[" useEffectEvent ".trim().toString()],mx=au[" useInsertionEffect ".trim().toString()];function bI(e){if(typeof hx=="function")return hx(e);const t=v.useRef(()=>{throw new Error("Cannot call an event handler while rendering.")});return typeof mx=="function"?mx(()=>{t.current=e}):$t(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var EI=au[" useInsertionEffect ".trim().toString()]||$t;function ei({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,o,l]=yI({defaultProp:t,onChange:n}),c=e!==void 0,f=c?e:i;{const p=v.useRef(e!==void 0);v.useEffect(()=>{const m=p.current;m!==c&&console.warn(`${r} is changing from ${m?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),p.current=c},[c,r])}const h=v.useCallback(p=>{if(c){const m=_I(p)?p(e):p;m!==e&&l.current?.(m)}else o(p)},[c,e,o,l]);return[f,h]}function yI({defaultProp:e,onChange:t}){const[n,r]=v.useState(e),i=v.useRef(n),o=v.useRef(t);return EI(()=>{o.current=t},[t]),v.useEffect(()=>{i.current!==n&&(o.current?.(n),i.current=n)},[n,i]),[n,r,o]}function _I(e){return typeof e=="function"}function xI(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Ji=e=>{const{present:t,children:n}=e,r=TI(t),i=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),o=vI(r.ref,SI(i));return typeof n=="function"||r.isPresent?v.cloneElement(i,{ref:o}):null};Ji.displayName="Presence";function TI(e){const[t,n]=v.useState(),r=v.useRef(null),i=v.useRef(e),o=v.useRef("none"),l=e?"mounted":"unmounted",[c,f]=xI(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=Mc(r.current);o.current=c==="mounted"?h:"none"},[c]),$t(()=>{const h=r.current,p=i.current;if(p!==e){const y=o.current,E=Mc(h);e?f("MOUNT"):E==="none"||h?.display==="none"?f("UNMOUNT"):f(p&&y!==E?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,f]),$t(()=>{if(t){let h;const p=t.ownerDocument.defaultView??window,m=E=>{const S=Mc(r.current).includes(CSS.escape(E.animationName));if(E.target===t&&S&&(f("ANIMATION_END"),!i.current)){const C=t.style.animationFillMode;t.style.animationFillMode="forwards",h=p.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=C)})}},y=E=>{E.target===t&&(o.current=Mc(r.current))};return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{p.clearTimeout(h),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else f("ANIMATION_END")},[t,f]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:v.useCallback(h=>{r.current=h?getComputedStyle(h):null,n(h)},[])}}function px(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function vI(...e){const t=v.useRef(e);return t.current=e,v.useCallback(n=>{const r=t.current;let i=!1;const o=r.map(l=>{const c=px(l,n);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let l=0;l<o.length;l++){const c=o[l];typeof c=="function"?c():px(r[l],null)}}},[])}function Mc(e){return e?.animationName||"none"}function SI(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var AI=au[" useId ".trim().toString()]||(()=>{}),CI=0;function fa(e){const[t,n]=v.useState(AI());return $t(()=>{n(r=>r??String(CI++))},[e]),e||(t?`radix-${t}`:"")}var Kf="Collapsible",[wI]=Zi(Kf),[kI,dg]=wI(Kf),q2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:o,onOpenChange:l,...c}=e,[f,h]=ei({prop:r,defaultProp:i??!1,onChange:l,caller:Kf});return _.jsx(kI,{scope:n,disabled:o,contentId:fa(),open:f,onOpenToggle:v.useCallback(()=>h(p=>!p),[h]),children:_.jsx(We.div,{"data-state":mg(f),"data-disabled":o?"":void 0,...c,ref:t})})});q2.displayName=Kf;var Y2="CollapsibleTrigger",X2=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,i=dg(Y2,n);return _.jsx(We.button,{type:"button","aria-controls":i.open?i.contentId:void 0,"aria-expanded":i.open||!1,"data-state":mg(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:t,onClick:Ze(e.onClick,i.onOpenToggle)})});X2.displayName=Y2;var hg="CollapsibleContent",Q2=v.forwardRef((e,t)=>{const{forceMount:n,...r}=e,i=dg(hg,e.__scopeCollapsible);return _.jsx(Ji,{present:n||i.open,children:({present:o})=>_.jsx(NI,{...r,ref:t,present:o})})});Q2.displayName=hg;var NI=v.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:i,...o}=e,l=dg(hg,n),[c,f]=v.useState(r),h=v.useRef(null),p=St(t,h),m=v.useRef(0),y=m.current,E=v.useRef(0),T=E.current,S=l.open||c,C=v.useRef(S),w=v.useRef(void 0);return v.useEffect(()=>{const k=requestAnimationFrame(()=>C.current=!1);return()=>cancelAnimationFrame(k)},[]),$t(()=>{const k=h.current;if(k){w.current=w.current||{transitionDuration:k.style.transitionDuration,animationName:k.style.animationName},k.style.transitionDuration="0s",k.style.animationName="none";const N=k.getBoundingClientRect();m.current=N.height,E.current=N.width,C.current||(k.style.transitionDuration=w.current.transitionDuration,k.style.animationName=w.current.animationName),f(r)}},[l.open,r]),_.jsx(We.div,{"data-state":mg(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...o,ref:p,style:{"--radix-collapsible-content-height":y?`${y}px`:void 0,"--radix-collapsible-content-width":T?`${T}px`:void 0,...e.style},children:S&&i})});function mg(e){return e?"open":"closed"}var RI=q2,OI=v.createContext(void 0);function pg(e){const t=v.useContext(OI);return e||t||"ltr"}function da(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>((...n)=>t.current?.(...n)),[])}var LI="DismissableLayer",s0="dismissableLayer.update",II="dismissableLayer.pointerDownOutside",DI="dismissableLayer.focusOutside",gx,gg=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),bg=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:o,onFocusOutside:l,onInteractOutside:c,onDismiss:f,...h}=e,p=v.useContext(gg),[m,y]=v.useState(null),E=m?.ownerDocument??globalThis?.document,[,T]=v.useState({}),S=St(t,y),C=Array.from(p.layers),[w]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),k=C.indexOf(w),N=m?C.indexOf(m):-1,P=p.layersWithOutsidePointerEventsDisabled.size>0,B=N>=k,D=v.useRef(!1),$=jI(X=>{const J=X.target;if(!(J instanceof Node))return;const he=[...p.branches].some(ue=>ue.contains(J));!B||he||(o?.(X),c?.(X),X.defaultPrevented||f?.())},{ownerDocument:E,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:D,dismissableSurfaces:p.dismissableSurfaces}),G=UI(X=>{if(r&&D.current)return;const J=X.target;[...p.branches].some(ue=>ue.contains(J))||(l?.(X),c?.(X),X.defaultPrevented||f?.())},E),ie=m?N===C.length-1:!1,V=bI(X=>{X.key==="Escape"&&(i?.(X),!X.defaultPrevented&&f&&(X.preventDefault(),f()))});return v.useEffect(()=>{if(ie)return E.addEventListener("keydown",V,{capture:!0}),()=>E.removeEventListener("keydown",V,{capture:!0})},[E,ie]),v.useEffect(()=>{if(m)return n&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(gx=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),bx(),()=>{n&&(p.layersWithOutsidePointerEventsDisabled.delete(m),p.layersWithOutsidePointerEventsDisabled.size===0&&(E.body.style.pointerEvents=gx))}},[m,E,n,p]),v.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),bx())},[m,p]),v.useEffect(()=>{const X=()=>T({});return document.addEventListener(s0,X),()=>document.removeEventListener(s0,X)},[]),_.jsx(We.div,{...h,ref:S,style:{pointerEvents:P?B?"auto":"none":void 0,...e.style},onFocusCapture:Ze(e.onFocusCapture,G.onFocusCapture),onBlurCapture:Ze(e.onBlurCapture,G.onBlurCapture),onPointerDownCapture:Ze(e.onPointerDownCapture,$.onPointerDownCapture)})});bg.displayName=LI;var MI="DismissableLayerBranch",PI=v.forwardRef((e,t)=>{const n=v.useContext(gg),r=v.useRef(null),i=St(t,r);return v.useEffect(()=>{const o=r.current;if(o)return n.branches.add(o),()=>{n.branches.delete(o)}},[n.branches]),_.jsx(We.div,{...e,ref:i})});PI.displayName=MI;function BI(){const e=v.useContext(gg),[t,n]=v.useState(null);return v.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}function jI(e,t){const{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:o}=t,l=da(e),c=v.useRef(!1),f=v.useRef(!1),h=v.useRef(new Map),p=v.useRef(()=>{});return v.useEffect(()=>{function m(){f.current=!1,i.current=!1,h.current.clear()}function y(){return Array.from(h.current.values()).some(Boolean)}function E(k){if(!f.current)return;const N=k.target;N instanceof Node&&[...o].some(B=>B.contains(N))||h.current.set(k.type,!0),k.type==="click"&&window.setTimeout(()=>{f.current&&p.current()},0)}function T(k){f.current&&h.current.set(k.type,!1)}const S=k=>{if(k.target&&!c.current){let N=function(){n.removeEventListener("click",p.current);const B=y();m(),B||W2(II,l,P,{discrete:!0})};const P={originalEvent:k};f.current=!0,i.current=r&&k.button===0,h.current.clear(),!r||k.button!==0?N():(n.removeEventListener("click",p.current),p.current=N,n.addEventListener("click",p.current,{once:!0}))}else n.removeEventListener("click",p.current),m();c.current=!1},C=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(const k of C)n.addEventListener(k,E,!0),n.addEventListener(k,T);const w=window.setTimeout(()=>{n.addEventListener("pointerdown",S)},0);return()=>{window.clearTimeout(w),n.removeEventListener("pointerdown",S),n.removeEventListener("click",p.current);for(const k of C)n.removeEventListener(k,E,!0),n.removeEventListener(k,T)}},[n,l,r,i,o]),{onPointerDownCapture:()=>c.current=!0}}function UI(e,t=globalThis?.document){const n=da(e),r=v.useRef(!1);return v.useEffect(()=>{const i=o=>{o.target&&!r.current&&W2(DI,n,{originalEvent:o},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bx(){const e=new CustomEvent(s0);document.dispatchEvent(e)}function W2(e,t,n,{discrete:r}){const i=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?hI(i,o):i.dispatchEvent(o)}var sp="focusScope.autoFocusOnMount",op="focusScope.autoFocusOnUnmount",Ex={bubbles:!1,cancelable:!0},HI="FocusScope",Eg=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:o,...l}=e,[c,f]=v.useState(null),h=da(i),p=da(o),m=v.useRef(null),y=St(t,f),E=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let S=function(N){if(E.paused||!c)return;const P=N.target;c.contains(P)?m.current=P:Ga(m.current,{select:!0})},C=function(N){if(E.paused||!c)return;const P=N.relatedTarget;P!==null&&(c.contains(P)||Ga(m.current,{select:!0}))},w=function(N){if(document.activeElement===document.body)for(const B of N)B.removedNodes.length>0&&Ga(c)};document.addEventListener("focusin",S),document.addEventListener("focusout",C);const k=new MutationObserver(w);return c&&k.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",S),document.removeEventListener("focusout",C),k.disconnect()}}},[r,c,E.paused]),v.useEffect(()=>{if(c){_x.add(E);const S=document.activeElement;if(!c.contains(S)){const w=new CustomEvent(sp,Ex);c.addEventListener(sp,h),c.dispatchEvent(w),w.defaultPrevented||(zI(qI(K2(c)),{select:!0}),document.activeElement===S&&Ga(c))}return()=>{c.removeEventListener(sp,h),setTimeout(()=>{const w=new CustomEvent(op,Ex);c.addEventListener(op,p),c.dispatchEvent(w),w.defaultPrevented||Ga(S??document.body,{select:!0}),c.removeEventListener(op,p),_x.remove(E)},0)}}},[c,h,p,E]);const T=v.useCallback(S=>{if(!n&&!r||E.paused)return;const C=S.key==="Tab"&&!S.altKey&&!S.ctrlKey&&!S.metaKey,w=document.activeElement;if(C&&w){const k=S.currentTarget,[N,P]=FI(k);N&&P?!S.shiftKey&&w===P?(S.preventDefault(),n&&Ga(N,{select:!0})):S.shiftKey&&w===N&&(S.preventDefault(),n&&Ga(P,{select:!0})):w===k&&S.preventDefault()}},[n,r,E.paused]);return _.jsx(We.div,{tabIndex:-1,...l,ref:y,onKeyDown:T})});Eg.displayName=HI;function zI(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ga(r,{select:t}),document.activeElement!==n)return}function FI(e){const t=K2(e),n=yx(t,e),r=yx(t.reverse(),e);return[n,r]}function K2(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yx(e,t){for(const n of e)if(!$I(n,{upTo:t}))return n}function $I(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function VI(e){return e instanceof HTMLInputElement&&"select"in e}function Ga(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&VI(e)&&t&&e.select()}}var _x=GI();function GI(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=xx(e,t),e.unshift(t)},remove(t){e=xx(e,t),e[0]?.resume()}}}function xx(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function qI(e){return e.filter(t=>t.tagName!=="A")}var YI="Portal",yg=v.forwardRef((e,t)=>{const{container:n,...r}=e,[i,o]=v.useState(!1);$t(()=>o(!0),[]);const l=n||i&&globalThis?.document?.body;return l?Ki.createPortal(_.jsx(We.div,{...r,ref:t}),l):null});yg.displayName=YI;var Pc=0,Gs=null;function Z2(){v.useEffect(()=>{Gs||(Gs={start:Tx(),end:Tx()});const{start:e,end:t}=Gs;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement("afterbegin",e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement("beforeend",t),Pc++,()=>{Pc===1&&(Gs?.start.remove(),Gs?.end.remove(),Gs=null),Pc=Math.max(0,Pc-1)}},[])}function Tx(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Lr=function(){return Lr=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},Lr.apply(this,arguments)};function J2(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function XI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,o;r<i;r++)(o||!(r in t))&&(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}var lf="right-scroll-bar-position",uf="width-before-scroll-bar",QI="with-scroll-bars-hidden",WI="--removed-body-scroll-bar-size";function lp(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function KI(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var ZI=typeof window<"u"?v.useLayoutEffect:v.useEffect,vx=new WeakMap;function JI(e,t){var n=KI(null,function(r){return e.forEach(function(i){return lp(i,r)})});return ZI(function(){var r=vx.get(n);if(r){var i=new Set(r),o=new Set(e),l=n.current;i.forEach(function(c){o.has(c)||lp(c,null)}),o.forEach(function(c){i.has(c)||lp(c,l)})}vx.set(n,e)},[e]),n}function e6(e){return e}function t6(e,t){t===void 0&&(t=e6);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(o){var l=t(o,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(o){for(r=!0;n.length;){var l=n;n=[],l.forEach(o)}n={push:function(c){return o(c)},filter:function(){return n}}},assignMedium:function(o){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(o),l=n}var f=function(){var p=l;l=[],p.forEach(o)},h=function(){return Promise.resolve().then(f)};h(),n={push:function(p){l.push(p),h()},filter:function(p){return l=l.filter(p),n}}}};return i}function n6(e){e===void 0&&(e={});var t=t6(null);return t.options=Lr({async:!0,ssr:!1},e),t}var eS=function(e){var t=e.sideCar,n=J2(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return v.createElement(r,Lr({},n))};eS.isSideCarExport=!0;function r6(e,t){return e.useMedium(t),eS}var tS=n6(),up=function(){},Zf=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:up,onWheelCapture:up,onTouchMoveCapture:up}),i=r[0],o=r[1],l=e.forwardProps,c=e.children,f=e.className,h=e.removeScrollBar,p=e.enabled,m=e.shards,y=e.sideCar,E=e.noRelative,T=e.noIsolation,S=e.inert,C=e.allowPinchZoom,w=e.as,k=w===void 0?"div":w,N=e.gapMode,P=J2(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),B=y,D=JI([n,t]),$=Lr(Lr({},P),i);return v.createElement(v.Fragment,null,p&&v.createElement(B,{sideCar:tS,removeScrollBar:h,shards:m,noRelative:E,noIsolation:T,inert:S,setCallbacks:o,allowPinchZoom:!!C,lockRef:n,gapMode:N}),l?v.cloneElement(v.Children.only(c),Lr(Lr({},$),{ref:D})):v.createElement(k,Lr({},$,{className:f,ref:D}),c))});Zf.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Zf.classNames={fullWidth:uf,zeroRight:lf};var a6=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function i6(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=a6();return t&&e.setAttribute("nonce",t),e}function s6(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function o6(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var l6=function(){var e=0,t=null;return{add:function(n){e==0&&(t=i6())&&(s6(t,n),o6(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},u6=function(){var e=l6();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nS=function(){var e=u6(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},c6={left:0,top:0,right:0,gap:0},cp=function(e){return parseInt(e||"",10)||0},f6=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[cp(n),cp(r),cp(i)]},d6=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return c6;var t=f6(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},h6=nS(),ro="data-scroll-locked",m6=function(e,t,n,r){var i=e.left,o=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
11
|
+
.`.concat(QI,` {
|
|
12
|
+
overflow: hidden `).concat(r,`;
|
|
13
|
+
padding-right: `).concat(c,"px ").concat(r,`;
|
|
14
|
+
}
|
|
15
|
+
body[`).concat(ro,`] {
|
|
16
|
+
overflow: hidden `).concat(r,`;
|
|
17
|
+
overscroll-behavior: contain;
|
|
18
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
19
|
+
padding-left: `.concat(i,`px;
|
|
20
|
+
padding-top: `).concat(o,`px;
|
|
21
|
+
padding-right: `).concat(l,`px;
|
|
22
|
+
margin-left:0;
|
|
23
|
+
margin-top:0;
|
|
24
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
25
|
+
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.`).concat(lf,` {
|
|
29
|
+
right: `).concat(c,"px ").concat(r,`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.`).concat(uf,` {
|
|
33
|
+
margin-right: `).concat(c,"px ").concat(r,`;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.`).concat(lf," .").concat(lf,` {
|
|
37
|
+
right: 0 `).concat(r,`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.`).concat(uf," .").concat(uf,` {
|
|
41
|
+
margin-right: 0 `).concat(r,`;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
body[`).concat(ro,`] {
|
|
45
|
+
`).concat(WI,": ").concat(c,`px;
|
|
46
|
+
}
|
|
47
|
+
`)},Sx=function(){var e=parseInt(document.body.getAttribute(ro)||"0",10);return isFinite(e)?e:0},p6=function(){v.useEffect(function(){return document.body.setAttribute(ro,(Sx()+1).toString()),function(){var e=Sx()-1;e<=0?document.body.removeAttribute(ro):document.body.setAttribute(ro,e.toString())}},[])},g6=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;p6();var o=v.useMemo(function(){return d6(i)},[i]);return v.createElement(h6,{styles:m6(o,!t,i,n?"":"!important")})},o0=!1;if(typeof window<"u")try{var Bc=Object.defineProperty({},"passive",{get:function(){return o0=!0,!0}});window.addEventListener("test",Bc,Bc),window.removeEventListener("test",Bc,Bc)}catch{o0=!1}var qs=o0?{passive:!1}:!1,b6=function(e){return e.tagName==="TEXTAREA"},rS=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!b6(e)&&n[t]==="visible")},E6=function(e){return rS(e,"overflowY")},y6=function(e){return rS(e,"overflowX")},Ax=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=aS(e,r);if(i){var o=iS(e,r),l=o[1],c=o[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},_6=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},x6=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},aS=function(e,t){return e==="v"?E6(t):y6(t)},iS=function(e,t){return e==="v"?_6(t):x6(t)},T6=function(e,t){return e==="h"&&t==="rtl"?-1:1},v6=function(e,t,n,r,i){var o=T6(e,window.getComputedStyle(t).direction),l=o*r,c=n.target,f=t.contains(c),h=!1,p=l>0,m=0,y=0;do{if(!c)break;var E=iS(e,c),T=E[0],S=E[1],C=E[2],w=S-C-o*T;(T||w)&&aS(e,c)&&(m+=w,y+=T);var k=c.parentNode;c=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!f&&c!==document.body||f&&(t.contains(c)||t===c));return(p&&Math.abs(m)<1||!p&&Math.abs(y)<1)&&(h=!0),h},jc=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cx=function(e){return[e.deltaX,e.deltaY]},wx=function(e){return e&&"current"in e?e.current:e},S6=function(e,t){return e[0]===t[0]&&e[1]===t[1]},A6=function(e){return`
|
|
48
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
49
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
50
|
+
`)},C6=0,Ys=[];function w6(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),i=v.useState(C6++)[0],o=v.useState(nS)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var S=XI([e.lockRef.current],(e.shards||[]).map(wx),!0).filter(Boolean);return S.forEach(function(C){return C.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),S.forEach(function(C){return C.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var c=v.useCallback(function(S,C){if("touches"in S&&S.touches.length===2||S.type==="wheel"&&S.ctrlKey)return!l.current.allowPinchZoom;var w=jc(S),k=n.current,N="deltaX"in S?S.deltaX:k[0]-w[0],P="deltaY"in S?S.deltaY:k[1]-w[1],B,D=S.target,$=Math.abs(N)>Math.abs(P)?"h":"v";if("touches"in S&&$==="h"&&D.type==="range")return!1;var G=window.getSelection(),ie=G&&G.anchorNode,V=ie?ie===D||ie.contains(D):!1;if(V)return!1;var X=Ax($,D);if(!X)return!0;if(X?B=$:(B=$==="v"?"h":"v",X=Ax($,D)),!X)return!1;if(!r.current&&"changedTouches"in S&&(N||P)&&(r.current=B),!B)return!0;var J=r.current||B;return v6(J,C,S,J==="h"?N:P)},[]),f=v.useCallback(function(S){var C=S;if(!(!Ys.length||Ys[Ys.length-1]!==o)){var w="deltaY"in C?Cx(C):jc(C),k=t.current.filter(function(B){return B.name===C.type&&(B.target===C.target||C.target===B.shadowParent)&&S6(B.delta,w)})[0];if(k&&k.should){C.cancelable&&C.preventDefault();return}if(!k){var N=(l.current.shards||[]).map(wx).filter(Boolean).filter(function(B){return B.contains(C.target)}),P=N.length>0?c(C,N[0]):!l.current.noIsolation;P&&C.cancelable&&C.preventDefault()}}},[]),h=v.useCallback(function(S,C,w,k){var N={name:S,delta:C,target:w,should:k,shadowParent:k6(w)};t.current.push(N),setTimeout(function(){t.current=t.current.filter(function(P){return P!==N})},1)},[]),p=v.useCallback(function(S){n.current=jc(S),r.current=void 0},[]),m=v.useCallback(function(S){h(S.type,Cx(S),S.target,c(S,e.lockRef.current))},[]),y=v.useCallback(function(S){h(S.type,jc(S),S.target,c(S,e.lockRef.current))},[]);v.useEffect(function(){return Ys.push(o),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:y}),document.addEventListener("wheel",f,qs),document.addEventListener("touchmove",f,qs),document.addEventListener("touchstart",p,qs),function(){Ys=Ys.filter(function(S){return S!==o}),document.removeEventListener("wheel",f,qs),document.removeEventListener("touchmove",f,qs),document.removeEventListener("touchstart",p,qs)}},[]);var E=e.removeScrollBar,T=e.inert;return v.createElement(v.Fragment,null,T?v.createElement(o,{styles:A6(i)}):null,E?v.createElement(g6,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function k6(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const N6=r6(tS,w6);var _g=v.forwardRef(function(e,t){return v.createElement(Zf,Lr({},e,{ref:t,sideCar:N6}))});_g.classNames=Zf.classNames;var R6=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Xs=new WeakMap,Uc=new WeakMap,Hc={},fp=0,sS=function(e){return e&&(e.host||sS(e.parentNode))},O6=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=sS(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},L6=function(e,t,n,r){var i=O6(t,Array.isArray(e)?e:[e]);Hc[n]||(Hc[n]=new WeakMap);var o=Hc[n],l=[],c=new Set,f=new Set(i),h=function(m){!m||c.has(m)||(c.add(m),h(m.parentNode))};i.forEach(h);var p=function(m){!m||f.has(m)||Array.prototype.forEach.call(m.children,function(y){if(c.has(y))p(y);else try{var E=y.getAttribute(r),T=E!==null&&E!=="false",S=(Xs.get(y)||0)+1,C=(o.get(y)||0)+1;Xs.set(y,S),o.set(y,C),l.push(y),S===1&&T&&Uc.set(y,!0),C===1&&y.setAttribute(n,"true"),T||y.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",y,w)}})};return p(t),c.clear(),fp++,function(){l.forEach(function(m){var y=Xs.get(m)-1,E=o.get(m)-1;Xs.set(m,y),o.set(m,E),y||(Uc.has(m)||m.removeAttribute(r),Uc.delete(m)),E||m.removeAttribute(n)}),fp--,fp||(Xs=new WeakMap,Xs=new WeakMap,Uc=new WeakMap,Hc={})}},oS=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=R6(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),L6(r,i,n,"aria-hidden")):function(){return null}},Jf="Dialog",[lS]=Zi(Jf),[I6,Er]=lS(Jf),uS=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:o,modal:l=!0}=e,c=v.useRef(null),f=v.useRef(null),[h,p]=ei({prop:r,defaultProp:i??!1,onChange:o,caller:Jf});return _.jsx(I6,{scope:t,triggerRef:c,contentRef:f,contentId:fa(),titleId:fa(),descriptionId:fa(),open:h,onOpenChange:p,onOpenToggle:v.useCallback(()=>p(m=>!m),[p]),modal:l,children:n})};uS.displayName=Jf;var cS="DialogTrigger",fS=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(cS,n),o=St(t,i.triggerRef);return _.jsx(We.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Tg(i.open),...r,ref:o,onClick:Ze(e.onClick,i.onOpenToggle)})});fS.displayName=cS;var xg="DialogPortal",[D6,dS]=lS(xg,{forceMount:void 0}),hS=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,o=Er(xg,t);return _.jsx(D6,{scope:t,forceMount:n,children:v.Children.map(r,l=>_.jsx(Ji,{present:n||o.open,children:_.jsx(yg,{asChild:!0,container:i,children:l})}))})};hS.displayName=xg;var yf="DialogOverlay",mS=v.forwardRef((e,t)=>{const n=dS(yf,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Er(yf,e.__scopeDialog);return o.modal?_.jsx(Ji,{present:r||o.open,children:_.jsx(P6,{...i,ref:t})}):null});mS.displayName=yf;var M6=lo("DialogOverlay.RemoveScroll"),P6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(yf,n),o=BI(),l=St(t,o);return _.jsx(_g,{as:M6,allowPinchZoom:!0,shards:[i.contentRef],children:_.jsx(We.div,{"data-state":Tg(i.open),...r,ref:l,style:{pointerEvents:"auto",...r.style}})})}),uo="DialogContent",pS=v.forwardRef((e,t)=>{const n=dS(uo,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,o=Er(uo,e.__scopeDialog);return _.jsx(Ji,{present:r||o.open,children:o.modal?_.jsx(B6,{...i,ref:t}):_.jsx(j6,{...i,ref:t})})});pS.displayName=uo;var B6=v.forwardRef((e,t)=>{const n=Er(uo,e.__scopeDialog),r=v.useRef(null),i=St(t,n.contentRef,r);return v.useEffect(()=>{const o=r.current;if(o)return oS(o)},[]),_.jsx(gS,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:Ze(e.onCloseAutoFocus,o=>{o.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:Ze(e.onPointerDownOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0;(l.button===2||c)&&o.preventDefault()}),onFocusOutside:Ze(e.onFocusOutside,o=>o.preventDefault())})}),j6=v.forwardRef((e,t)=>{const n=Er(uo,e.__scopeDialog),r=v.useRef(!1),i=v.useRef(!1);return _.jsx(gS,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:o=>{e.onCloseAutoFocus?.(o),o.defaultPrevented||(r.current||n.triggerRef.current?.focus(),o.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:o=>{e.onInteractOutside?.(o),o.defaultPrevented||(r.current=!0,o.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const l=o.target;n.triggerRef.current?.contains(l)&&o.preventDefault(),o.detail.originalEvent.type==="focusin"&&i.current&&o.preventDefault()}})}),gS=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:o,...l}=e,c=Er(uo,n);return Z2(),_.jsx(_.Fragment,{children:_.jsx(Eg,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:o,children:_.jsx(bg,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":Tg(c.open),...l,ref:t,deferPointerDownOutside:!0,onDismiss:()=>c.onOpenChange(!1)})})})}),bS="DialogTitle",ES=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(bS,n);return _.jsx(We.h2,{id:i.titleId,...r,ref:t})});ES.displayName=bS;var yS="DialogDescription",_S=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(yS,n);return _.jsx(We.p,{id:i.descriptionId,...r,ref:t})});_S.displayName=yS;var xS="DialogClose",ed=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Er(xS,n);return _.jsx(We.button,{type:"button",...r,ref:t,onClick:Ze(e.onClick,()=>i.onOpenChange(!1))})});ed.displayName=xS;function Tg(e){return e?"open":"closed"}function U6(e){const t=v.useRef({value:e,previous:e});return v.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function H6(e){const[t,n]=v.useState(void 0);return $t(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const o=i[0];let l,c;if("borderBoxSize"in o){const f=o.borderBoxSize,h=Array.isArray(f)?f[0]:f;l=h.inlineSize,c=h.blockSize}else l=e.offsetWidth,c=e.offsetHeight;n({width:l,height:c})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const z6=["top","right","bottom","left"],ti=Math.min,zn=Math.max,_f=Math.round,zc=Math.floor,Dr=e=>({x:e,y:e}),F6={left:"right",right:"left",bottom:"top",top:"bottom"};function l0(e,t,n){return zn(e,ti(t,n))}function ha(e,t){return typeof e=="function"?e(t):e}function ma(e){return e.split("-")[0]}function po(e){return e.split("-")[1]}function vg(e){return e==="x"?"y":"x"}function Sg(e){return e==="y"?"height":"width"}function Ir(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Ag(e){return vg(Ir(e))}function $6(e,t,n){n===void 0&&(n=!1);const r=po(e),i=Ag(e),o=Sg(i);let l=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=xf(l)),[l,xf(l)]}function V6(e){const t=xf(e);return[u0(e),t,u0(t)]}function u0(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const kx=["left","right"],Nx=["right","left"],G6=["top","bottom"],q6=["bottom","top"];function Y6(e,t,n){switch(e){case"top":case"bottom":return n?t?Nx:kx:t?kx:Nx;case"left":case"right":return t?G6:q6;default:return[]}}function X6(e,t,n,r){const i=po(e);let o=Y6(ma(e),n==="start",r);return i&&(o=o.map(l=>l+"-"+i),t&&(o=o.concat(o.map(u0)))),o}function xf(e){const t=ma(e);return F6[t]+e.slice(t.length)}function Q6(e){return{top:0,right:0,bottom:0,left:0,...e}}function TS(e){return typeof e!="number"?Q6(e):{top:e,right:e,bottom:e,left:e}}function Tf(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Rx(e,t,n){let{reference:r,floating:i}=e;const o=Ir(t),l=Ag(t),c=Sg(l),f=ma(t),h=o==="y",p=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,y=r[c]/2-i[c]/2;let E;switch(f){case"top":E={x:p,y:r.y-i.height};break;case"bottom":E={x:p,y:r.y+r.height};break;case"right":E={x:r.x+r.width,y:m};break;case"left":E={x:r.x-i.width,y:m};break;default:E={x:r.x,y:r.y}}switch(po(t)){case"start":E[l]-=y*(n&&h?-1:1);break;case"end":E[l]+=y*(n&&h?-1:1);break}return E}async function W6(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:h="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:y=!1,padding:E=0}=ha(t,e),T=TS(E),C=c[y?m==="floating"?"reference":"floating":m],w=Tf(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(C)))==null||n?C:C.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:h,rootBoundary:p,strategy:f})),k=m==="floating"?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,N=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),P=await(o.isElement==null?void 0:o.isElement(N))?await(o.getScale==null?void 0:o.getScale(N))||{x:1,y:1}:{x:1,y:1},B=Tf(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:N,strategy:f}):k);return{top:(w.top-B.top+T.top)/P.y,bottom:(B.bottom-w.bottom+T.bottom)/P.y,left:(w.left-B.left+T.left)/P.x,right:(B.right-w.right+T.right)/P.x}}const K6=50,Z6=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,c=l.detectOverflow?l:{...l,detectOverflow:W6},f=await(l.isRTL==null?void 0:l.isRTL(t));let h=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:p,y:m}=Rx(h,r,f),y=r,E=0;const T={};for(let S=0;S<o.length;S++){const C=o[S];if(!C)continue;const{name:w,fn:k}=C,{x:N,y:P,data:B,reset:D}=await k({x:p,y:m,initialPlacement:r,placement:y,strategy:i,middlewareData:T,rects:h,platform:c,elements:{reference:e,floating:t}});p=N??p,m=P??m,T[w]={...T[w],...B},D&&E<K6&&(E++,typeof D=="object"&&(D.placement&&(y=D.placement),D.rects&&(h=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:p,y:m}=Rx(h,y,f)),S=-1)}return{x:p,y:m,placement:y,strategy:i,middlewareData:T}},J6=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:h,padding:p=0}=ha(e,t)||{};if(h==null)return{};const m=TS(p),y={x:n,y:r},E=Ag(i),T=Sg(E),S=await l.getDimensions(h),C=E==="y",w=C?"top":"left",k=C?"bottom":"right",N=C?"clientHeight":"clientWidth",P=o.reference[T]+o.reference[E]-y[E]-o.floating[T],B=y[E]-o.reference[E],D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(h));let $=D?D[N]:0;(!$||!await(l.isElement==null?void 0:l.isElement(D)))&&($=c.floating[N]||o.floating[T]);const G=P/2-B/2,ie=$/2-S[T]/2-1,V=ti(m[w],ie),X=ti(m[k],ie),J=V,he=$-S[T]-X,ue=$/2-S[T]/2+G,re=l0(J,ue,he),U=!f.arrow&&po(i)!=null&&ue!==re&&o.reference[T]/2-(ue<J?V:X)-S[T]/2<0,ee=U?ue<J?ue-J:ue-he:0;return{[E]:y[E]+ee,data:{[E]:re,centerOffset:ue-re-ee,...U&&{alignmentOffset:ee}},reset:U}}}),eD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:h}=t,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:y,fallbackStrategy:E="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:S=!0,...C}=ha(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const w=ma(i),k=Ir(c),N=ma(c)===c,P=await(f.isRTL==null?void 0:f.isRTL(h.floating)),B=y||(N||!S?[xf(c)]:V6(c)),D=T!=="none";!y&&D&&B.push(...X6(c,S,T,P));const $=[c,...B],G=await f.detectOverflow(t,C),ie=[];let V=((r=o.flip)==null?void 0:r.overflows)||[];if(p&&ie.push(G[w]),m){const ue=$6(i,l,P);ie.push(G[ue[0]],G[ue[1]])}if(V=[...V,{placement:i,overflows:ie}],!ie.every(ue=>ue<=0)){var X,J;const ue=(((X=o.flip)==null?void 0:X.index)||0)+1,re=$[ue];if(re&&(!(m==="alignment"?k!==Ir(re):!1)||V.every(ce=>Ir(ce.placement)===k?ce.overflows[0]>0:!0)))return{data:{index:ue,overflows:V},reset:{placement:re}};let U=(J=V.filter(ee=>ee.overflows[0]<=0).sort((ee,ce)=>ee.overflows[1]-ce.overflows[1])[0])==null?void 0:J.placement;if(!U)switch(E){case"bestFit":{var he;const ee=(he=V.filter(ce=>{if(D){const xe=Ir(ce.placement);return xe===k||xe==="y"}return!0}).map(ce=>[ce.placement,ce.overflows.filter(xe=>xe>0).reduce((xe,O)=>xe+O,0)]).sort((ce,xe)=>ce[1]-xe[1])[0])==null?void 0:he[0];ee&&(U=ee);break}case"initialPlacement":U=c;break}if(i!==U)return{reset:{placement:U}}}return{}}}};function Ox(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Lx(e){return z6.some(t=>e[t]>=0)}const tD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ha(e,t);switch(i){case"referenceHidden":{const l=await r.detectOverflow(t,{...o,elementContext:"reference"}),c=Ox(l,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Lx(c)}}}case"escaped":{const l=await r.detectOverflow(t,{...o,altBoundary:!0}),c=Ox(l,n.floating);return{data:{escapedOffsets:c,escaped:Lx(c)}}}default:return{}}}}},vS=new Set(["left","top"]);async function nD(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),l=ma(n),c=po(n),f=Ir(n)==="y",h=vS.has(l)?-1:1,p=o&&f?-1:1,m=ha(t,e);let{mainAxis:y,crossAxis:E,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof T=="number"&&(E=c==="end"?T*-1:T),f?{x:E*p,y:y*h}:{x:y*h,y:E*p}}const rD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:l,middlewareData:c}=t,f=await nD(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(r=c.arrow)!=null&&r.alignmentOffset?{}:{x:i+f.x,y:o+f.y,data:{...f,placement:l}}}}},aD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:l=!0,crossAxis:c=!1,limiter:f={fn:w=>{let{x:k,y:N}=w;return{x:k,y:N}}},...h}=ha(e,t),p={x:n,y:r},m=await o.detectOverflow(t,h),y=Ir(ma(i)),E=vg(y);let T=p[E],S=p[y];if(l){const w=E==="y"?"top":"left",k=E==="y"?"bottom":"right",N=T+m[w],P=T-m[k];T=l0(N,T,P)}if(c){const w=y==="y"?"top":"left",k=y==="y"?"bottom":"right",N=S+m[w],P=S-m[k];S=l0(N,S,P)}const C=f.fn({...t,[E]:T,[y]:S});return{...C,data:{x:C.x-n,y:C.y-r,enabled:{[E]:l,[y]:c}}}}}},iD=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:h=!0}=ha(e,t),p={x:n,y:r},m=Ir(i),y=vg(m);let E=p[y],T=p[m];const S=ha(c,t),C=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(f){const N=y==="y"?"height":"width",P=o.reference[y]-o.floating[N]+C.mainAxis,B=o.reference[y]+o.reference[N]-C.mainAxis;E<P?E=P:E>B&&(E=B)}if(h){var w,k;const N=y==="y"?"width":"height",P=vS.has(ma(i)),B=o.reference[m]-o.floating[N]+(P&&((w=l.offset)==null?void 0:w[m])||0)+(P?0:C.crossAxis),D=o.reference[m]+o.reference[N]+(P?0:((k=l.offset)==null?void 0:k[m])||0)-(P?C.crossAxis:0);T<B?T=B:T>D&&(T=D)}return{[y]:E,[m]:T}}}},sD=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...h}=ha(e,t),p=await l.detectOverflow(t,h),m=ma(i),y=po(i),E=Ir(i)==="y",{width:T,height:S}=o.floating;let C,w;m==="top"||m==="bottom"?(C=m,w=y===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(w=m,C=y==="end"?"top":"bottom");const k=S-p.top-p.bottom,N=T-p.left-p.right,P=ti(S-p[C],k),B=ti(T-p[w],N),D=!t.middlewareData.shift;let $=P,G=B;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(G=N),(r=t.middlewareData.shift)!=null&&r.enabled.y&&($=k),D&&!y){const V=zn(p.left,0),X=zn(p.right,0),J=zn(p.top,0),he=zn(p.bottom,0);E?G=T-2*(V!==0||X!==0?V+X:zn(p.left,p.right)):$=S-2*(J!==0||he!==0?J+he:zn(p.top,p.bottom))}await f({...t,availableWidth:G,availableHeight:$});const ie=await l.getDimensions(c.floating);return T!==ie.width||S!==ie.height?{reset:{rects:!0}}:{}}}};function td(){return typeof window<"u"}function go(e){return SS(e)?(e.nodeName||"").toLowerCase():"#document"}function Fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Pr(e){var t;return(t=(SS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function SS(e){return td()?e instanceof Node||e instanceof Fn(e).Node:!1}function gr(e){return td()?e instanceof Element||e instanceof Fn(e).Element:!1}function pa(e){return td()?e instanceof HTMLElement||e instanceof Fn(e).HTMLElement:!1}function Ix(e){return!td()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Fn(e).ShadowRoot}function iu(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=br(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function oD(e){return/^(table|td|th)$/.test(go(e))}function nd(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const lD=/transform|translate|scale|rotate|perspective|filter/,uD=/paint|layout|strict|content/,ki=e=>!!e&&e!=="none";let dp;function Cg(e){const t=gr(e)?br(e):e;return ki(t.transform)||ki(t.translate)||ki(t.scale)||ki(t.rotate)||ki(t.perspective)||!wg()&&(ki(t.backdropFilter)||ki(t.filter))||lD.test(t.willChange||"")||uD.test(t.contain||"")}function cD(e){let t=ni(e);for(;pa(t)&&!co(t);){if(Cg(t))return t;if(nd(t))return null;t=ni(t)}return null}function wg(){return dp==null&&(dp=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),dp}function co(e){return/^(html|body|#document)$/.test(go(e))}function br(e){return Fn(e).getComputedStyle(e)}function rd(e){return gr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ni(e){if(go(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ix(e)&&e.host||Pr(e);return Ix(t)?t.host:t}function AS(e){const t=ni(e);return co(t)?e.ownerDocument?e.ownerDocument.body:e.body:pa(t)&&iu(t)?t:AS(t)}function ql(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=AS(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),l=Fn(i);if(o){const c=c0(l);return t.concat(l,l.visualViewport||[],iu(i)?i:[],c&&n?ql(c):[])}else return t.concat(i,ql(i,[],n))}function c0(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function CS(e){const t=br(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=pa(e),o=i?e.offsetWidth:n,l=i?e.offsetHeight:r,c=_f(n)!==o||_f(r)!==l;return c&&(n=o,r=l),{width:n,height:r,$:c}}function kg(e){return gr(e)?e:e.contextElement}function ao(e){const t=kg(e);if(!pa(t))return Dr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=CS(t);let l=(o?_f(n.width):n.width)/r,c=(o?_f(n.height):n.height)/i;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const fD=Dr(0);function wS(e){const t=Fn(e);return!wg()||!t.visualViewport?fD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function dD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Fn(e)?!1:t}function Gi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=kg(e);let l=Dr(1);t&&(r?gr(r)&&(l=ao(r)):l=ao(e));const c=dD(o,n,r)?wS(o):Dr(0);let f=(i.left+c.x)/l.x,h=(i.top+c.y)/l.y,p=i.width/l.x,m=i.height/l.y;if(o){const y=Fn(o),E=r&&gr(r)?Fn(r):r;let T=y,S=c0(T);for(;S&&r&&E!==T;){const C=ao(S),w=S.getBoundingClientRect(),k=br(S),N=w.left+(S.clientLeft+parseFloat(k.paddingLeft))*C.x,P=w.top+(S.clientTop+parseFloat(k.paddingTop))*C.y;f*=C.x,h*=C.y,p*=C.x,m*=C.y,f+=N,h+=P,T=Fn(S),S=c0(T)}}return Tf({width:p,height:m,x:f,y:h})}function ad(e,t){const n=rd(e).scrollLeft;return t?t.left+n:Gi(Pr(e)).left+n}function kS(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ad(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function hD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",l=Pr(r),c=t?nd(t.floating):!1;if(r===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},h=Dr(1);const p=Dr(0),m=pa(r);if((m||!m&&!o)&&((go(r)!=="body"||iu(l))&&(f=rd(r)),m)){const E=Gi(r);h=ao(r),p.x=E.x+r.clientLeft,p.y=E.y+r.clientTop}const y=l&&!m&&!o?kS(l,f):Dr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-f.scrollLeft*h.x+p.x+y.x,y:n.y*h.y-f.scrollTop*h.y+p.y+y.y}}function mD(e){return Array.from(e.getClientRects())}function pD(e){const t=Pr(e),n=rd(e),r=e.ownerDocument.body,i=zn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=zn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+ad(e);const c=-n.scrollTop;return br(r).direction==="rtl"&&(l+=zn(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:l,y:c}}const Dx=25;function gD(e,t){const n=Fn(e),r=Pr(e),i=n.visualViewport;let o=r.clientWidth,l=r.clientHeight,c=0,f=0;if(i){o=i.width,l=i.height;const p=wg();(!p||p&&t==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const h=ad(r);if(h<=0){const p=r.ownerDocument,m=p.body,y=getComputedStyle(m),E=p.compatMode==="CSS1Compat"&&parseFloat(y.marginLeft)+parseFloat(y.marginRight)||0,T=Math.abs(r.clientWidth-m.clientWidth-E);T<=Dx&&(o-=T)}else h<=Dx&&(o+=h);return{width:o,height:l,x:c,y:f}}function bD(e,t){const n=Gi(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=pa(e)?ao(e):Dr(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=i*o.x,h=r*o.y;return{width:l,height:c,x:f,y:h}}function Mx(e,t,n){let r;if(t==="viewport")r=gD(e,n);else if(t==="document")r=pD(Pr(e));else if(gr(t))r=bD(t,n);else{const i=wS(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Tf(r)}function NS(e,t){const n=ni(e);return n===t||!gr(n)||co(n)?!1:br(n).position==="fixed"||NS(n,t)}function ED(e,t){const n=t.get(e);if(n)return n;let r=ql(e,[],!1).filter(c=>gr(c)&&go(c)!=="body"),i=null;const o=br(e).position==="fixed";let l=o?ni(e):e;for(;gr(l)&&!co(l);){const c=br(l),f=Cg(l);!f&&c.position==="fixed"&&(i=null),(o?!f&&!i:!f&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||iu(l)&&!f&&NS(e,l))?r=r.filter(p=>p!==l):i=c,l=ni(l)}return t.set(e,r),r}function yD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const l=[...n==="clippingAncestors"?nd(t)?[]:ED(t,this._c):[].concat(n),r],c=Mx(t,l[0],i);let f=c.top,h=c.right,p=c.bottom,m=c.left;for(let y=1;y<l.length;y++){const E=Mx(t,l[y],i);f=zn(E.top,f),h=ti(E.right,h),p=ti(E.bottom,p),m=zn(E.left,m)}return{width:h-m,height:p-f,x:m,y:f}}function _D(e){const{width:t,height:n}=CS(e);return{width:t,height:n}}function xD(e,t,n){const r=pa(t),i=Pr(t),o=n==="fixed",l=Gi(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=Dr(0);function h(){f.x=ad(i)}if(r||!r&&!o)if((go(t)!=="body"||iu(i))&&(c=rd(t)),r){const E=Gi(t,!0,o,t);f.x=E.x+t.clientLeft,f.y=E.y+t.clientTop}else i&&h();o&&!r&&i&&h();const p=i&&!r&&!o?kS(i,c):Dr(0),m=l.left+c.scrollLeft-f.x-p.x,y=l.top+c.scrollTop-f.y-p.y;return{x:m,y,width:l.width,height:l.height}}function hp(e){return br(e).position==="static"}function Px(e,t){if(!pa(e)||br(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Pr(e)===n&&(n=n.ownerDocument.body),n}function RS(e,t){const n=Fn(e);if(nd(e))return n;if(!pa(e)){let i=ni(e);for(;i&&!co(i);){if(gr(i)&&!hp(i))return i;i=ni(i)}return n}let r=Px(e,t);for(;r&&oD(r)&&hp(r);)r=Px(r,t);return r&&co(r)&&hp(r)&&!Cg(r)?n:r||cD(e)||n}const TD=async function(e){const t=this.getOffsetParent||RS,n=this.getDimensions,r=await n(e.floating);return{reference:xD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function vD(e){return br(e).direction==="rtl"}const SD={convertOffsetParentRelativeRectToViewportRelativeRect:hD,getDocumentElement:Pr,getClippingRect:yD,getOffsetParent:RS,getElementRects:TD,getClientRects:mD,getDimensions:_D,getScale:ao,isElement:gr,isRTL:vD};function OS(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function AD(e,t){let n=null,r;const i=Pr(e);function o(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const h=e.getBoundingClientRect(),{left:p,top:m,width:y,height:E}=h;if(c||t(),!y||!E)return;const T=zc(m),S=zc(i.clientWidth-(p+y)),C=zc(i.clientHeight-(m+E)),w=zc(p),N={rootMargin:-T+"px "+-S+"px "+-C+"px "+-w+"px",threshold:zn(0,ti(1,f))||1};let P=!0;function B(D){const $=D[0].intersectionRatio;if($!==f){if(!P)return l();$?l(!1,$):r=setTimeout(()=>{l(!1,1e-7)},1e3)}$===1&&!OS(h,e.getBoundingClientRect())&&l(),P=!1}try{n=new IntersectionObserver(B,{...N,root:i.ownerDocument})}catch{n=new IntersectionObserver(B,N)}n.observe(e)}return l(!0),o}function CD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=r,h=kg(e),p=i||o?[...h?ql(h):[],...t?ql(t):[]]:[];p.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),o&&w.addEventListener("resize",n)});const m=h&&c?AD(h,n):null;let y=-1,E=null;l&&(E=new ResizeObserver(w=>{let[k]=w;k&&k.target===h&&E&&t&&(E.unobserve(t),cancelAnimationFrame(y),y=requestAnimationFrame(()=>{var N;(N=E)==null||N.observe(t)})),n()}),h&&!f&&E.observe(h),t&&E.observe(t));let T,S=f?Gi(e):null;f&&C();function C(){const w=Gi(e);S&&!OS(S,w)&&n(),S=w,T=requestAnimationFrame(C)}return n(),()=>{var w;p.forEach(k=>{i&&k.removeEventListener("scroll",n),o&&k.removeEventListener("resize",n)}),m?.(),(w=E)==null||w.disconnect(),E=null,f&&cancelAnimationFrame(T)}}const wD=rD,kD=aD,ND=eD,RD=sD,OD=tD,Bx=J6,LD=iD,ID=(e,t,n)=>{const r=new Map,i={platform:SD,...n},o={...i.platform,_c:r};return Z6(e,t,{...i,platform:o})};var DD=typeof document<"u",MD=function(){},cf=DD?v.useLayoutEffect:MD;function vf(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!vf(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!vf(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function LS(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jx(e,t){const n=LS(e);return Math.round(t*n)/n}function mp(e){const t=v.useRef(e);return cf(()=>{t.current=e}),t}function PD(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:h}=e,[p,m]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[y,E]=v.useState(r);vf(y,r)||E(r);const[T,S]=v.useState(null),[C,w]=v.useState(null),k=v.useCallback(ce=>{ce!==D.current&&(D.current=ce,S(ce))},[]),N=v.useCallback(ce=>{ce!==$.current&&($.current=ce,w(ce))},[]),P=o||T,B=l||C,D=v.useRef(null),$=v.useRef(null),G=v.useRef(p),ie=f!=null,V=mp(f),X=mp(i),J=mp(h),he=v.useCallback(()=>{if(!D.current||!$.current)return;const ce={placement:t,strategy:n,middleware:y};X.current&&(ce.platform=X.current),ID(D.current,$.current,ce).then(xe=>{const O={...xe,isPositioned:J.current!==!1};ue.current&&!vf(G.current,O)&&(G.current=O,Ki.flushSync(()=>{m(O)}))})},[y,t,n,X,J]);cf(()=>{h===!1&&G.current.isPositioned&&(G.current.isPositioned=!1,m(ce=>({...ce,isPositioned:!1})))},[h]);const ue=v.useRef(!1);cf(()=>(ue.current=!0,()=>{ue.current=!1}),[]),cf(()=>{if(P&&(D.current=P),B&&($.current=B),P&&B){if(V.current)return V.current(P,B,he);he()}},[P,B,he,V,ie]);const re=v.useMemo(()=>({reference:D,floating:$,setReference:k,setFloating:N}),[k,N]),U=v.useMemo(()=>({reference:P,floating:B}),[P,B]),ee=v.useMemo(()=>{const ce={position:n,left:0,top:0};if(!U.floating)return ce;const xe=jx(U.floating,p.x),O=jx(U.floating,p.y);return c?{...ce,transform:"translate("+xe+"px, "+O+"px)",...LS(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:xe,top:O}},[n,c,U.floating,p.x,p.y]);return v.useMemo(()=>({...p,update:he,refs:re,elements:U,floatingStyles:ee}),[p,he,re,U,ee])}const BD=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Bx({element:r.current,padding:i}).fn(n):{}:r?Bx({element:r,padding:i}).fn(n):{}}}},jD=(e,t)=>{const n=wD(e);return{name:n.name,fn:n.fn,options:[e,t]}},UD=(e,t)=>{const n=kD(e);return{name:n.name,fn:n.fn,options:[e,t]}},HD=(e,t)=>({fn:LD(e).fn,options:[e,t]}),zD=(e,t)=>{const n=ND(e);return{name:n.name,fn:n.fn,options:[e,t]}},FD=(e,t)=>{const n=RD(e);return{name:n.name,fn:n.fn,options:[e,t]}},$D=(e,t)=>{const n=OD(e);return{name:n.name,fn:n.fn,options:[e,t]}},VD=(e,t)=>{const n=BD(e);return{name:n.name,fn:n.fn,options:[e,t]}};var GD="Arrow",IS=v.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...o}=e;return _.jsx(We.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:_.jsx("polygon",{points:"0,0 30,0 15,10"})})});IS.displayName=GD;var qD=IS,Ng="Popper",[DS,MS]=Zi(Ng),[YD,PS]=DS(Ng),BS=e=>{const{__scopePopper:t,children:n}=e,[r,i]=v.useState(null),[o,l]=v.useState(void 0);return _.jsx(YD,{scope:t,anchor:r,onAnchorChange:i,placementState:o,setPlacementState:l,children:n})};BS.displayName=Ng;var jS="PopperAnchor",US=v.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,o=PS(jS,n),l=v.useRef(null),c=o.onAnchorChange,f=v.useCallback(T=>{l.current=T,T&&c(T)},[c]),h=St(t,f),p=v.useRef(null);v.useEffect(()=>{if(!r)return;const T=p.current;p.current=r.current,T!==p.current&&c(p.current)});const m=o.placementState&&Og(o.placementState),y=m?.[0],E=m?.[1];return r?null:_.jsx(We.div,{"data-radix-popper-side":y,"data-radix-popper-align":E,...i,ref:h})});US.displayName=jS;var Rg="PopperContent",[XD,QD]=DS(Rg),HS=v.forwardRef((e,t)=>{const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:h=[],collisionPadding:p=0,sticky:m="partial",hideWhenDetached:y=!1,updatePositionStrategy:E="optimized",onPlaced:T,...S}=e,C=PS(Rg,n),[w,k]=v.useState(null),N=St(t,k),[P,B]=v.useState(null),D=H6(P),$=D?.width??0,G=D?.height??0,ie=r+(o!=="center"?"-"+o:""),V=typeof p=="number"?p:{top:0,right:0,bottom:0,left:0,...p},X=Array.isArray(h)?h:[h],J=X.length>0,he={padding:V,boundary:X.filter(KD),altBoundary:J},{refs:ue,floatingStyles:re,placement:U,isPositioned:ee,middlewareData:ce}=PD({strategy:"fixed",placement:ie,whileElementsMounted:(...ke)=>CD(...ke,{animationFrame:E==="always"}),elements:{reference:C.anchor},middleware:[jD({mainAxis:i+G,alignmentAxis:l}),f&&UD({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?HD():void 0,...he}),f&&zD({...he}),FD({...he,apply:({elements:ke,rects:Te,availableWidth:De,availableHeight:je})=>{const{width:Je,height:kt}=Te.reference,it=ke.floating.style;it.setProperty("--radix-popper-available-width",`${De}px`),it.setProperty("--radix-popper-available-height",`${je}px`),it.setProperty("--radix-popper-anchor-width",`${Je}px`),it.setProperty("--radix-popper-anchor-height",`${kt}px`)}}),P&&VD({element:P,padding:c}),ZD({arrowWidth:$,arrowHeight:G}),y&&$D({strategy:"referenceHidden",...he,boundary:J?he.boundary:void 0})]}),xe=C.setPlacementState;$t(()=>(xe(U),()=>{xe(void 0)}),[U,xe]);const[O,z]=Og(U),te=da(T);$t(()=>{ee&&te?.()},[ee,te]);const M=ce.arrow?.x,ge=ce.arrow?.y,Ee=ce.arrow?.centerOffset!==0,[ye,be]=v.useState();return $t(()=>{w&&be(window.getComputedStyle(w).zIndex)},[w]),_.jsx("div",{ref:ue.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:ee?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ye,"--radix-popper-transform-origin":[ce.transformOrigin?.x,ce.transformOrigin?.y].join(" "),...ce.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:_.jsx(XD,{scope:n,placedSide:O,placedAlign:z,onArrowChange:B,arrowX:M,arrowY:ge,shouldHideArrow:Ee,children:_.jsx(We.div,{"data-side":O,"data-align":z,...S,ref:N,style:{...S.style,animation:ee?void 0:"none"}})})})});HS.displayName=Rg;var zS="PopperArrow",WD={top:"bottom",right:"left",bottom:"top",left:"right"},FS=v.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,o=QD(zS,r),l=WD[o.placedSide];return _.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:_.jsx(qD,{...i,ref:n,style:{...i.style,display:"block"}})})});FS.displayName=zS;function KD(e){return e!==null}var ZD=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:i}=t,l=i.arrow?.centerOffset!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[h,p]=Og(n),m={start:"0%",center:"50%",end:"100%"}[p],y=(i.arrow?.x??0)+c/2,E=(i.arrow?.y??0)+f/2;let T="",S="";return h==="bottom"?(T=l?m:`${y}px`,S=`${-f}px`):h==="top"?(T=l?m:`${y}px`,S=`${r.floating.height+f}px`):h==="right"?(T=`${-f}px`,S=l?m:`${E}px`):h==="left"&&(T=`${r.floating.width+f}px`,S=l?m:`${E}px`),{data:{x:T,y:S}}}});function Og(e){const[t,n="center"]=e.split("-");return[t,n]}var JD=BS,e4=US,t4=HS,n4=FS,pp="rovingFocusGroup.onEntryFocus",r4={bubbles:!1,cancelable:!0},su="RovingFocusGroup",[f0,$S,a4]=G2(su),[i4,VS]=Zi(su,[a4]),[s4,o4]=i4(su),GS=v.forwardRef((e,t)=>_.jsx(f0.Provider,{scope:e.__scopeRovingFocusGroup,children:_.jsx(f0.Slot,{scope:e.__scopeRovingFocusGroup,children:_.jsx(l4,{...e,ref:t})})}));GS.displayName=su;var l4=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:o,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:f,onEntryFocus:h,preventScrollOnEntryFocus:p=!1,...m}=e,y=v.useRef(null),E=St(t,y),T=pg(o),[S,C]=ei({prop:l,defaultProp:c??null,onChange:f,caller:su}),[w,k]=v.useState(!1),N=da(h),P=$S(n),B=v.useRef(!1),[D,$]=v.useState(0);return v.useEffect(()=>{const G=y.current;if(G)return G.addEventListener(pp,N),()=>G.removeEventListener(pp,N)},[N]),_.jsx(s4,{scope:n,orientation:r,dir:T,loop:i,currentTabStopId:S,onItemFocus:v.useCallback(G=>C(G),[C]),onItemShiftTab:v.useCallback(()=>k(!0),[]),onFocusableItemAdd:v.useCallback(()=>$(G=>G+1),[]),onFocusableItemRemove:v.useCallback(()=>$(G=>G-1),[]),children:_.jsx(We.div,{tabIndex:w||D===0?-1:0,"data-orientation":r,...m,ref:E,style:{outline:"none",...e.style},onMouseDown:Ze(e.onMouseDown,()=>{B.current=!0}),onFocus:Ze(e.onFocus,G=>{const ie=!B.current;if(G.target===G.currentTarget&&ie&&!w){const V=new CustomEvent(pp,r4);if(G.currentTarget.dispatchEvent(V),!V.defaultPrevented){const X=P().filter(U=>U.focusable),J=X.find(U=>U.active),he=X.find(U=>U.id===S),re=[J,he,...X].filter(Boolean).map(U=>U.ref.current);XS(re,p)}}B.current=!1}),onBlur:Ze(e.onBlur,()=>k(!1))})})}),qS="RovingFocusGroupItem",YS=v.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:l,...c}=e,f=fa(),h=o||f,p=o4(qS,n),m=p.currentTabStopId===h,y=$S(n),{onFocusableItemAdd:E,onFocusableItemRemove:T,currentTabStopId:S}=p;return v.useEffect(()=>{if(r)return E(),()=>T()},[r,E,T]),_.jsx(f0.ItemSlot,{scope:n,id:h,focusable:r,active:i,children:_.jsx(We.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...c,ref:t,onMouseDown:Ze(e.onMouseDown,C=>{r?p.onItemFocus(h):C.preventDefault()}),onFocus:Ze(e.onFocus,()=>p.onItemFocus(h)),onKeyDown:Ze(e.onKeyDown,C=>{if(C.key==="Tab"&&C.shiftKey){p.onItemShiftTab();return}if(C.target!==C.currentTarget)return;const w=f4(C,p.orientation,p.dir);if(w!==void 0){if(C.metaKey||C.ctrlKey||C.altKey||C.shiftKey)return;C.preventDefault();let N=y().filter(P=>P.focusable).map(P=>P.ref.current);if(w==="last")N.reverse();else if(w==="prev"||w==="next"){w==="prev"&&N.reverse();const P=N.indexOf(C.currentTarget);N=p.loop?d4(N,P+1):N.slice(P+1)}setTimeout(()=>XS(N))}}),children:typeof l=="function"?l({isCurrentTabStop:m,hasTabStop:S!=null}):l})})});YS.displayName=qS;var u4={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function c4(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function f4(e,t,n){const r=c4(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return u4[r]}function XS(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function d4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h4=GS,m4=YS;function Ux(e,[t,n]){return Math.min(n,Math.max(t,e))}var p4=[" ","Enter","ArrowUp","ArrowDown"],g4=[" ","Enter"],qi="Select",[id,sd,b4]=G2(qi),[es]=Zi(qi,[b4,MS]),od=MS(),[E4,si]=es(qi),[y4,_4]=es(qi),x4="SelectProvider";function QS(e){const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:o,value:l,defaultValue:c,onValueChange:f,dir:h,name:p,autoComplete:m,disabled:y,required:E,form:T,internal_do_not_use_render:S}=e,C=od(t),[w,k]=v.useState(null),[N,P]=v.useState(null),[B,D]=v.useState(!1),$=pg(h),[G,ie]=ei({prop:r,defaultProp:i??!1,onChange:o,caller:qi}),[V,X]=ei({prop:l,defaultProp:c,onChange:f,caller:qi}),J=v.useRef(null),he=w?!!T||!!w.closest("form"):!0,[ue,re]=v.useState(new Set),U=fa(),ee=Array.from(ue).map(z=>z.props.value).join(";"),ce=v.useCallback(z=>{re(te=>new Set(te).add(z))},[]),xe=v.useCallback(z=>{re(te=>{const M=new Set(te);return M.delete(z),M})},[]),O={required:E,trigger:w,onTriggerChange:k,valueNode:N,onValueNodeChange:P,valueNodeHasChildren:B,onValueNodeHasChildrenChange:D,contentId:U,value:V,onValueChange:X,open:G,onOpenChange:ie,dir:$,triggerPointerDownPosRef:J,disabled:y,name:p,autoComplete:m,form:T,nativeOptions:ue,nativeSelectKey:ee,isFormControl:he};return _.jsx(JD,{...C,children:_.jsx(E4,{scope:t,...O,children:_.jsx(id.Provider,{scope:t,children:_.jsx(y4,{scope:t,onNativeOptionAdd:ce,onNativeOptionRemove:xe,children:P4(S)?S(O):n})})})})}QS.displayName=x4;var WS=e=>{const{__scopeSelect:t,children:n,...r}=e;return _.jsx(QS,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:i})=>_.jsxs(_.Fragment,{children:[n,i?_.jsx(SA,{__scopeSelect:t}):null]})})};WS.displayName=qi;var KS="SelectTrigger",ZS=v.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,o=od(n),l=si(KS,n),c=l.disabled||r,f=St(t,l.onTriggerChange),h=sd(n),p=v.useRef("touch"),[m,y,E]=AA(S=>{const C=h().filter(N=>!N.disabled),w=C.find(N=>N.value===l.value),k=CA(C,S,w);k!==void 0&&l.onValueChange(k.value)}),T=S=>{c||(l.onOpenChange(!0),E()),S&&(l.triggerPointerDownPosRef.current={x:Math.round(S.pageX),y:Math.round(S.pageY)})};return _.jsx(e4,{asChild:!0,...o,children:_.jsx(We.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":ld(l.value)?"":void 0,...i,ref:f,onClick:Ze(i.onClick,S=>{S.currentTarget.focus(),p.current!=="mouse"&&T(S)}),onPointerDown:Ze(i.onPointerDown,S=>{p.current=S.pointerType;const C=S.target;C.hasPointerCapture(S.pointerId)&&C.releasePointerCapture(S.pointerId),S.button===0&&S.ctrlKey===!1&&S.pointerType==="mouse"&&(T(S),S.preventDefault())}),onKeyDown:Ze(i.onKeyDown,S=>{const C=m.current!=="";!(S.ctrlKey||S.altKey||S.metaKey)&&S.key.length===1&&y(S.key),!(C&&S.key===" ")&&p4.includes(S.key)&&(T(),S.preventDefault())})})})});ZS.displayName=KS;var JS="SelectValue",eA=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:o,placeholder:l="",...c}=e,f=si(JS,n),{onValueNodeHasChildrenChange:h}=f,p=o!==void 0,m=St(t,f.onValueNodeChange);$t(()=>{h(p)},[h,p]);const y=ld(f.value);return _.jsx(We.span,{...c,asChild:y?!1:c.asChild,ref:m,style:{pointerEvents:"none"},children:_.jsx(v.Fragment,{children:y?l:o},y?"placeholder":"value")})});eA.displayName=JS;var T4="SelectIcon",tA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return _.jsx(We.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});tA.displayName=T4;var nA="SelectPortal",[v4,S4]=es(nA,{forceMount:void 0}),rA=e=>{const{__scopeSelect:t,forceMount:n,...r}=e;return _.jsx(v4,{scope:e.__scopeSelect,forceMount:n,children:_.jsx(yg,{asChild:!0,...r})})};rA.displayName=nA;var ri="SelectContent",aA=v.forwardRef((e,t)=>{const n=S4(ri,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,o=si(ri,e.__scopeSelect),[l,c]=v.useState();return $t(()=>{c(new DocumentFragment)},[]),_.jsx(Ji,{present:r||o.open,children:({present:f})=>f?_.jsx(oA,{...i,ref:t}):_.jsx(iA,{...i,fragment:l})})});aA.displayName=ri;var iA=v.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,fragment:i}=e;return i?Ki.createPortal(_.jsx(sA,{scope:n,children:_.jsx(id.Slot,{scope:n,children:_.jsx("div",{ref:t,children:r})})}),i):null});iA.displayName="SelectContentFragment";var fr=10,[sA,oi]=es(ri),A4="SelectContentImpl",C4=lo("SelectContent.RemoveScroll"),oA=v.forwardRef((e,t)=>{const{__scopeSelect:n}=e,{position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:o,onPointerDownOutside:l,side:c,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:y,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:C,...w}=e,k=si(ri,n),[N,P]=v.useState(null),[B,D]=v.useState(null),$=St(t,P),[G,ie]=v.useState(null),[V,X]=v.useState(null),J=sd(n),[he,ue]=v.useState(!1),re=v.useRef(!1);v.useEffect(()=>{if(N)return oS(N)},[N]),Z2();const U=v.useCallback(be=>{const[ke,...Te]=J().map(Je=>Je.ref.current),[De]=Te.slice(-1),je=document.activeElement;for(const Je of be)if(Je===je||(Je?.scrollIntoView({block:"nearest"}),Je===ke&&B&&(B.scrollTop=0),Je===De&&B&&(B.scrollTop=B.scrollHeight),Je?.focus(),document.activeElement!==je))return},[J,B]),ee=v.useCallback(()=>U([G,N]),[U,G,N]);v.useEffect(()=>{he&&ee()},[he,ee]);const{onOpenChange:ce,triggerPointerDownPosRef:xe}=k;v.useEffect(()=>{if(N){let be={x:0,y:0};const ke=De=>{be={x:Math.abs(Math.round(De.pageX)-(xe.current?.x??0)),y:Math.abs(Math.round(De.pageY)-(xe.current?.y??0))}},Te=De=>{be.x<=10&&be.y<=10?De.preventDefault():De.composedPath().includes(N)||ce(!1),document.removeEventListener("pointermove",ke),xe.current=null};return xe.current!==null&&(document.addEventListener("pointermove",ke),document.addEventListener("pointerup",Te,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ke),document.removeEventListener("pointerup",Te,{capture:!0})}}},[N,ce,xe]),v.useEffect(()=>{const be=()=>ce(!1);return window.addEventListener("blur",be),window.addEventListener("resize",be),()=>{window.removeEventListener("blur",be),window.removeEventListener("resize",be)}},[ce]);const[O,z]=AA(be=>{const ke=J().filter(je=>!je.disabled),Te=ke.find(je=>je.ref.current===document.activeElement),De=CA(ke,be,Te);De&&setTimeout(()=>De.ref.current?.focus())}),te=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&(ie(be),De&&(re.current=!0))},[k.value]),M=v.useCallback(()=>N?.focus(),[N]),ge=v.useCallback((be,ke,Te)=>{const De=!re.current&&!Te;(k.value!==void 0&&k.value===ke||De)&&X(be)},[k.value]),Ee=r==="popper"?d0:lA,ye=Ee===d0?{side:c,sideOffset:f,align:h,alignOffset:p,arrowPadding:m,collisionBoundary:y,collisionPadding:E,sticky:T,hideWhenDetached:S,avoidCollisions:C}:{};return _.jsx(sA,{scope:n,content:N,viewport:B,onViewportChange:D,itemRefCallback:te,selectedItem:G,onItemLeave:M,itemTextRefCallback:ge,focusSelectedItem:ee,selectedItemText:V,position:r,isPositioned:he,searchRef:O,children:_.jsx(_g,{as:C4,allowPinchZoom:!0,children:_.jsx(Eg,{asChild:!0,trapped:k.open,onMountAutoFocus:be=>{be.preventDefault()},onUnmountAutoFocus:Ze(i,be=>{k.trigger?.focus({preventScroll:!0}),be.preventDefault()}),children:_.jsx(bg,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:be=>be.preventDefault(),onDismiss:()=>k.onOpenChange(!1),children:_.jsx(Ee,{role:"listbox",id:k.contentId,"data-state":k.open?"open":"closed",dir:k.dir,onContextMenu:be=>be.preventDefault(),...w,...ye,onPlaced:()=>ue(!0),ref:$,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:Ze(w.onKeyDown,be=>{const ke=be.ctrlKey||be.altKey||be.metaKey;if(be.key==="Tab"&&be.preventDefault(),!ke&&be.key.length===1&&z(be.key),["ArrowUp","ArrowDown","Home","End"].includes(be.key)){let De=J().filter(je=>!je.disabled).map(je=>je.ref.current);if(["ArrowUp","End"].includes(be.key)&&(De=De.slice().reverse()),["ArrowUp","ArrowDown"].includes(be.key)){const je=be.target,Je=De.indexOf(je);De=De.slice(Je+1)}setTimeout(()=>U(De)),be.preventDefault()}})})})})})})});oA.displayName=A4;var w4="SelectItemAlignedPosition",lA=v.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,o=si(ri,n),l=oi(ri,n),[c,f]=v.useState(null),[h,p]=v.useState(null),m=St(t,p),y=sd(n),E=v.useRef(!1),T=v.useRef(!0),{viewport:S,selectedItem:C,selectedItemText:w,focusSelectedItem:k}=l,N=v.useCallback(()=>{if(o.trigger&&o.valueNode&&c&&h&&S&&C&&w){const $=o.trigger.getBoundingClientRect(),G=h.getBoundingClientRect(),ie=o.valueNode.getBoundingClientRect(),V=w.getBoundingClientRect();if(o.dir!=="rtl"){const je=V.left-G.left,Je=ie.left-je,kt=$.left-Je,it=$.width+kt,On=Math.max(it,G.width),En=window.innerWidth-fr,xr=Ux(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.left=xr+"px"}else{const je=G.right-V.right,Je=window.innerWidth-ie.right-je,kt=window.innerWidth-$.right-Je,it=$.width+kt,On=Math.max(it,G.width),En=window.innerWidth-fr,xr=Ux(Je,[fr,Math.max(fr,En-On)]);c.style.minWidth=it+"px",c.style.right=xr+"px"}const X=y(),J=window.innerHeight-fr*2,he=S.scrollHeight,ue=window.getComputedStyle(h),re=parseInt(ue.borderTopWidth,10),U=parseInt(ue.paddingTop,10),ee=parseInt(ue.borderBottomWidth,10),ce=parseInt(ue.paddingBottom,10),xe=re+U+he+ce+ee,O=Math.min(C.offsetHeight*5,xe),z=window.getComputedStyle(S),te=parseInt(z.paddingTop,10),M=parseInt(z.paddingBottom,10),ge=$.top+$.height/2-fr,Ee=J-ge,ye=C.offsetHeight/2,be=C.offsetTop+ye,ke=re+U+be,Te=xe-ke;if(ke<=ge){const je=X.length>0&&C===X[X.length-1].ref.current;c.style.bottom="0px";const Je=h.clientHeight-S.offsetTop-S.offsetHeight,kt=Math.max(Ee,ye+(je?M:0)+Je+ee),it=ke+kt;c.style.height=it+"px"}else{const je=X.length>0&&C===X[0].ref.current;c.style.top="0px";const kt=Math.max(ge,re+S.offsetTop+(je?te:0)+ye)+Te;c.style.height=kt+"px",S.scrollTop=ke-ge+S.offsetTop}c.style.margin=`${fr}px 0`,c.style.minHeight=O+"px",c.style.maxHeight=J+"px",r?.(),requestAnimationFrame(()=>E.current=!0)}},[y,o.trigger,o.valueNode,c,h,S,C,w,o.dir,r]);$t(()=>N(),[N]);const[P,B]=v.useState();$t(()=>{h&&B(window.getComputedStyle(h).zIndex)},[h]);const D=v.useCallback($=>{$&&T.current===!0&&(N(),k?.(),T.current=!1)},[N,k]);return _.jsx(N4,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:E,onScrollButtonChange:D,children:_.jsx("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P},children:_.jsx(We.div,{...i,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});lA.displayName=w4;var k4="SelectPopperPosition",d0=v.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=fr,...o}=e,l=od(n);return _.jsx(t4,{...l,...o,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...o.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});d0.displayName=k4;var[N4,Lg]=es(ri,{}),h0="SelectViewport",uA=v.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,o=oi(h0,n),l=Lg(h0,n),c=St(t,o.onViewportChange),f=v.useRef(0);return _.jsxs(_.Fragment,{children:[_.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),_.jsx(id.Slot,{scope:n,children:_.jsx(We.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Ze(i.onScroll,h=>{const p=h.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:y}=l;if(y?.current&&m){const E=Math.abs(f.current-p.scrollTop);if(E>0){const T=window.innerHeight-fr*2,S=parseFloat(m.style.minHeight),C=parseFloat(m.style.height),w=Math.max(S,C);if(w<T){const k=w+E,N=Math.min(T,k),P=k-N;m.style.height=N+"px",m.style.bottom==="0px"&&(p.scrollTop=P>0?P:0,m.style.justifyContent="flex-end")}}}f.current=p.scrollTop})})})]})});uA.displayName=h0;var cA="SelectGroup",[R4,O4]=es(cA),fA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=fa();return _.jsx(R4,{scope:n,id:i,children:_.jsx(We.div,{role:"group","aria-labelledby":i,...r,ref:t})})});fA.displayName=cA;var dA="SelectLabel",hA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=O4(dA,n);return _.jsx(We.div,{id:i.id,...r,ref:t})});hA.displayName=dA;var Sf="SelectItem",[L4,mA]=es(Sf),pA=v.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:o,...l}=e,c=si(Sf,n),f=oi(Sf,n),h=c.value===r,[p,m]=v.useState(o??""),[y,E]=v.useState(!1),T=da(N=>f.itemRefCallback?.(N,r,i)),S=St(t,T),C=fa(),w=v.useRef("touch"),k=()=>{i||(c.onValueChange(r),c.onOpenChange(!1))};return _.jsx(L4,{scope:n,value:r,disabled:i,textId:C,isSelected:h,onItemTextChange:v.useCallback(N=>{m(P=>P||(N?.textContent??"").trim())},[]),children:_.jsx(id.ItemSlot,{scope:n,value:r,disabled:i,textValue:p,children:_.jsx(We.div,{role:"option","aria-labelledby":C,"data-highlighted":y?"":void 0,"aria-selected":h&&y,"data-state":h?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:S,onFocus:Ze(l.onFocus,()=>E(!0)),onBlur:Ze(l.onBlur,()=>E(!1)),onClick:Ze(l.onClick,()=>{w.current!=="mouse"&&k()}),onPointerUp:Ze(l.onPointerUp,()=>{w.current==="mouse"&&k()}),onPointerDown:Ze(l.onPointerDown,N=>{w.current=N.pointerType}),onPointerMove:Ze(l.onPointerMove,N=>{w.current=N.pointerType,i?f.onItemLeave?.():w.current==="mouse"&&N.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Ze(l.onPointerLeave,N=>{N.currentTarget===document.activeElement&&f.onItemLeave?.()}),onKeyDown:Ze(l.onKeyDown,N=>{f.searchRef?.current!==""&&N.key===" "||(g4.includes(N.key)&&k(),N.key===" "&&N.preventDefault())})})})})});pA.displayName=Sf;var Nl="SelectItemText",gA=v.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...o}=e,l=si(Nl,n),c=oi(Nl,n),f=mA(Nl,n),h=_4(Nl,n),[p,m]=v.useState(null),y=da(k=>c.itemTextRefCallback?.(k,f.value,f.disabled)),E=St(t,m,f.onItemTextChange,y),T=p?.textContent,S=v.useMemo(()=>_.jsx("option",{value:f.value,disabled:f.disabled,children:T},f.value),[f.disabled,f.value,T]),{onNativeOptionAdd:C,onNativeOptionRemove:w}=h;return $t(()=>(C(S),()=>w(S)),[C,w,S]),_.jsxs(_.Fragment,{children:[_.jsx(We.span,{id:f.textId,...o,ref:E}),f.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!ld(l.value)?Ki.createPortal(o.children,l.valueNode):null]})});gA.displayName=Nl;var bA="SelectItemIndicator",EA=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return mA(bA,n).isSelected?_.jsx(We.span,{"aria-hidden":!0,...r,ref:t}):null});EA.displayName=bA;var m0="SelectScrollUpButton",yA=v.forwardRef((e,t)=>{const n=oi(m0,e.__scopeSelect),r=Lg(m0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=f.scrollTop>0;o(h)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?_.jsx(xA,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop-f.offsetHeight)}}):null});yA.displayName=m0;var p0="SelectScrollDownButton",_A=v.forwardRef((e,t)=>{const n=oi(p0,e.__scopeSelect),r=Lg(p0,e.__scopeSelect),[i,o]=v.useState(!1),l=St(t,r.onScrollButtonChange);return $t(()=>{if(n.viewport&&n.isPositioned){let c=function(){const h=f.scrollHeight-f.clientHeight,p=Math.ceil(f.scrollTop)<h;o(p)};const f=n.viewport;return c(),f.addEventListener("scroll",c),()=>f.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),i?_.jsx(xA,{...e,ref:l,onAutoScroll:()=>{const{viewport:c,selectedItem:f}=n;c&&f&&(c.scrollTop=c.scrollTop+f.offsetHeight)}}):null});_A.displayName=p0;var xA=v.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,o=oi("SelectScrollButton",n),l=v.useRef(null),c=sd(n),f=v.useCallback(()=>{l.current!==null&&(window.clearInterval(l.current),l.current=null)},[]);return v.useEffect(()=>()=>f(),[f]),$t(()=>{c().find(p=>p.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),_.jsx(We.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:Ze(i.onPointerDown,()=>{l.current===null&&(l.current=window.setInterval(r,50))}),onPointerMove:Ze(i.onPointerMove,()=>{o.onItemLeave?.(),l.current===null&&(l.current=window.setInterval(r,50))}),onPointerLeave:Ze(i.onPointerLeave,()=>{f()})})}),I4="SelectSeparator",D4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return _.jsx(We.div,{"aria-hidden":!0,...r,ref:t})});D4.displayName=I4;var TA="SelectArrow",M4=v.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=od(n);return oi(TA,n).position==="popper"?_.jsx(n4,{...i,...r,ref:t}):null});M4.displayName=TA;var vA="SelectBubbleInput",SA=v.forwardRef(({__scopeSelect:e,...t},n)=>{const r=si(vA,e),{value:i,onValueChange:o,required:l,disabled:c,name:f,autoComplete:h,form:p}=r,{nativeOptions:m,nativeSelectKey:y}=r,E=v.useRef(null),T=St(n,E),S=i??"",C=U6(S),w=Array.from(m).some(k=>(k.props.value??"")==="");return v.useEffect(()=>{const k=E.current;if(!k)return;const N=window.HTMLSelectElement.prototype,B=Object.getOwnPropertyDescriptor(N,"value").set;if(C!==S&&B){const D=new Event("change",{bubbles:!0});B.call(k,S),k.dispatchEvent(D)}},[C,S]),_.jsxs(We.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:f,autoComplete:h,disabled:c,form:p,onChange:k=>o(k.target.value),...t,style:{...V2,...t.style},ref:T,defaultValue:S,children:[ld(i)&&!w?_.jsx("option",{value:""}):null,Array.from(m)]},y)});SA.displayName=vA;function P4(e){return typeof e=="function"}function ld(e){return e===""||e===void 0}function AA(e){const t=da(e),n=v.useRef(""),r=v.useRef(0),i=v.useCallback(l=>{const c=n.current+l;t(c),(function f(h){n.current=h,window.clearTimeout(r.current),h!==""&&(r.current=window.setTimeout(()=>f(""),1e3))})(c)},[t]),o=v.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return v.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,o]}function CA(e,t,n){const i=t.length>1&&Array.from(t).every(h=>h===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=B4(e,Math.max(o,0));i.length===1&&(l=l.filter(h=>h!==n));const f=l.find(h=>h.textValue.toLowerCase().startsWith(i.toLowerCase()));return f!==n?f:void 0}function B4(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var j4="Separator",Hx="horizontal",U4=["horizontal","vertical"],wA=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Hx,...i}=e,o=H4(r)?r:Hx,c=n?{role:"none"}:{"aria-orientation":o==="vertical"?o:void 0,role:"separator"};return _.jsx(We.div,{"data-orientation":o,...c,...i,ref:t})});wA.displayName=j4;function H4(e){return U4.includes(e)}var z4=wA,ud="Tabs",[F4]=Zi(ud,[VS]),kA=VS(),[$4,Ig]=F4(ud),NA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:f="automatic",...h}=e,p=pg(c),[m,y]=ei({prop:r,onChange:i,defaultProp:o??"",caller:ud});return _.jsx($4,{scope:n,baseId:fa(),value:m,onValueChange:y,orientation:l,dir:p,activationMode:f,children:_.jsx(We.div,{dir:p,"data-orientation":l,...h,ref:t})})});NA.displayName=ud;var RA="TabsList",OA=v.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...i}=e,o=Ig(RA,n),l=kA(n);return _.jsx(h4,{asChild:!0,...l,orientation:o.orientation,dir:o.dir,loop:r,children:_.jsx(We.div,{role:"tablist","aria-orientation":o.orientation,...i,ref:t})})});OA.displayName=RA;var LA="TabsTrigger",IA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,l=Ig(LA,n),c=kA(n),f=PA(l.baseId,r),h=BA(l.baseId,r),p=r===l.value;return _.jsx(m4,{asChild:!0,...c,focusable:!i,active:p,children:_.jsx(We.button,{type:"button",role:"tab","aria-selected":p,"aria-controls":h,"data-state":p?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:f,...o,ref:t,onMouseDown:Ze(e.onMouseDown,m=>{!i&&m.button===0&&m.ctrlKey===!1?l.onValueChange(r):m.preventDefault()}),onKeyDown:Ze(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&l.onValueChange(r)}),onFocus:Ze(e.onFocus,()=>{const m=l.activationMode!=="manual";!p&&!i&&m&&l.onValueChange(r)})})})});IA.displayName=LA;var DA="TabsContent",MA=v.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:i,children:o,...l}=e,c=Ig(DA,n),f=PA(c.baseId,r),h=BA(c.baseId,r),p=r===c.value,m=v.useRef(p);return v.useEffect(()=>{const y=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(y)},[]),_.jsx(Ji,{present:i||p,children:({present:y})=>_.jsx(We.div,{"data-state":p?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":f,hidden:!y,id:h,tabIndex:0,...l,ref:t,style:{...e.style,animationDuration:m.current?"0s":void 0},children:y&&o})})});MA.displayName=DA;function PA(e,t){return`${e}-trigger-${t}`}function BA(e,t){return`${e}-content-${t}`}var V4=NA,G4=OA,q4=IA,Y4=MA;const X4=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},Q4=(e,t)=>({classGroupId:e,validator:t}),jA=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Af="-",zx=[],W4="arbitrary..",K4=e=>{const t=J4(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Z4(l);const c=l.split(Af),f=c[0]===""&&c.length>1?1:0;return UA(c,f,t)},getConflictingClassGroupIds:(l,c)=>{if(c){const f=r[l],h=n[l];return f?h?X4(h,f):f:h||zx}return n[l]||zx}}},UA=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const h=UA(e,t+1,o);if(h)return h}const l=n.validators;if(l===null)return;const c=t===0?e.join(Af):e.slice(t).join(Af),f=l.length;for(let h=0;h<f;h++){const p=l[h];if(p.validator(c))return p.classGroupId}},Z4=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?W4+r:void 0})(),J4=e=>{const{theme:t,classGroups:n}=e;return e5(n,t)},e5=(e,t)=>{const n=jA();for(const r in e){const i=e[r];Dg(i,n,r,t)}return n},Dg=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const l=e[o];t5(l,t,n,r)}},t5=(e,t,n,r)=>{if(typeof e=="string"){n5(e,t,n);return}if(typeof e=="function"){r5(e,t,n,r);return}a5(e,t,n,r)},n5=(e,t,n)=>{const r=e===""?t:HA(t,e);r.classGroupId=n},r5=(e,t,n,r)=>{if(i5(e)){Dg(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(Q4(n,e))},a5=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let l=0;l<o;l++){const[c,f]=i[l];Dg(f,HA(t,c),n,r)}},HA=(e,t)=>{let n=e;const r=t.split(Af),i=r.length;for(let o=0;o<i;o++){const l=r[o];let c=n.nextPart.get(l);c||(c=jA(),n.nextPart.set(l,c)),n=c}return n},i5=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,s5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,l)=>{n[o]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let l=n[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return i(o,l),l},set(o,l){o in n?n[o]=l:i(o,l)}}},g0="!",Fx=":",o5=[],$x=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),l5=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let l=0,c=0,f=0,h;const p=i.length;for(let S=0;S<p;S++){const C=i[S];if(l===0&&c===0){if(C===Fx){o.push(i.slice(f,S)),f=S+1;continue}if(C==="/"){h=S;continue}}C==="["?l++:C==="]"?l--:C==="("?c++:C===")"&&c--}const m=o.length===0?i:i.slice(f);let y=m,E=!1;m.endsWith(g0)?(y=m.slice(0,-1),E=!0):m.startsWith(g0)&&(y=m.slice(1),E=!0);const T=h&&h>f?h-f:void 0;return $x(o,E,y,T)};if(t){const i=t+Fx,o=r;r=l=>l.startsWith(i)?o(l.slice(i.length)):$x(o5,!1,l,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},u5=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const l=n[o],c=l[0]==="[",f=t.has(l);c||f?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(l)):i.push(l)}return i.length>0&&(i.sort(),r.push(...i)),r}},c5=e=>({cache:s5(e.cacheSize),parseClassName:l5(e),sortModifiers:u5(e),postfixLookupClassGroupIds:f5(e),...K4(e)}),f5=e=>{const t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let r=0;r<n.length;r++)t[n[r]]=!0;return t},d5=/\s+/,h5=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o,postfixLookupClassGroupIds:l}=t,c=[],f=e.trim().split(d5);let h="";for(let p=f.length-1;p>=0;p-=1){const m=f[p],{isExternal:y,modifiers:E,hasImportantModifier:T,baseClassName:S,maybePostfixModifierPosition:C}=n(m);if(y){h=m+(h.length>0?" "+h:h);continue}let w=!!C,k;if(w){const $=S.substring(0,C);k=r($);const G=k&&l[k]?r(S):void 0;G&&G!==k&&(k=G,w=!1)}else k=r(S);if(!k){if(!w){h=m+(h.length>0?" "+h:h);continue}if(k=r(S),!k){h=m+(h.length>0?" "+h:h);continue}w=!1}const N=E.length===0?"":E.length===1?E[0]:o(E).join(":"),P=T?N+g0:N,B=P+k;if(c.indexOf(B)>-1)continue;c.push(B);const D=i(k,w);for(let $=0;$<D.length;++$){const G=D[$];c.push(P+G)}h=m+(h.length>0?" "+h:h)}return h},m5=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=zA(n))&&(i&&(i+=" "),i+=r);return i},zA=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zA(e[r]))&&(n&&(n+=" "),n+=t);return n},p5=(e,...t)=>{let n,r,i,o;const l=f=>{const h=t.reduce((p,m)=>m(p),e());return n=c5(h),r=n.cache.get,i=n.cache.set,o=c,c(f)},c=f=>{const h=r(f);if(h)return h;const p=h5(f,n);return i(f,p),p};return o=l,(...f)=>o(m5(...f))},g5=[],Ht=e=>{const t=n=>n[e]||g5;return t.isThemeGetter=!0,t},FA=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$A=/^\((?:(\w[\w-]*):)?(.+)\)$/i,b5=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,E5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,y5=/\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$/,_5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,x5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,T5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$a=e=>b5.test(e),ze=e=>!!e&&!Number.isNaN(Number(e)),Cr=e=>!!e&&Number.isInteger(Number(e)),gp=e=>e.endsWith("%")&&ze(e.slice(0,-1)),sa=e=>E5.test(e),VA=()=>!0,v5=e=>y5.test(e)&&!_5.test(e),Mg=()=>!1,S5=e=>x5.test(e),A5=e=>T5.test(e),C5=e=>!ve(e)&&!Se(e),w5=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)),k5=e=>li(e,YA,Mg),ve=e=>FA.test(e),Ni=e=>li(e,XA,v5),Vx=e=>li(e,P5,ze),N5=e=>li(e,WA,VA),R5=e=>li(e,QA,Mg),Gx=e=>li(e,GA,Mg),O5=e=>li(e,qA,A5),Fc=e=>li(e,KA,S5),Se=e=>$A.test(e),yl=e=>ts(e,XA),L5=e=>ts(e,QA),qx=e=>ts(e,GA),I5=e=>ts(e,YA),D5=e=>ts(e,qA),$c=e=>ts(e,KA,!0),M5=e=>ts(e,WA,!0),li=(e,t,n)=>{const r=FA.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},ts=(e,t,n=!1)=>{const r=$A.exec(e);return r?r[1]?t(r[1]):n:!1},GA=e=>e==="position"||e==="percentage",qA=e=>e==="image"||e==="url",YA=e=>e==="length"||e==="size"||e==="bg-size",XA=e=>e==="length",P5=e=>e==="number",QA=e=>e==="family-name",WA=e=>e==="number"||e==="weight",KA=e=>e==="shadow",B5=()=>{const e=Ht("color"),t=Ht("font"),n=Ht("text"),r=Ht("font-weight"),i=Ht("tracking"),o=Ht("leading"),l=Ht("breakpoint"),c=Ht("container"),f=Ht("spacing"),h=Ht("radius"),p=Ht("shadow"),m=Ht("inset-shadow"),y=Ht("text-shadow"),E=Ht("drop-shadow"),T=Ht("blur"),S=Ht("perspective"),C=Ht("aspect"),w=Ht("ease"),k=Ht("animate"),N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],B=()=>[...P(),Se,ve],D=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto","contain","none"],G=()=>[Se,ve,f],ie=()=>[$a,"full","auto",...G()],V=()=>[Cr,"none","subgrid",Se,ve],X=()=>["auto",{span:["full",Cr,Se,ve]},Cr,Se,ve],J=()=>[Cr,"auto",Se,ve],he=()=>["auto","min","max","fr",Se,ve],ue=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],re=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...G()],ee=()=>[$a,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...G()],ce=()=>[$a,"screen","full","dvw","lvw","svw","min","max","fit",...G()],xe=()=>[$a,"screen","full","lh","dvh","lvh","svh","min","max","fit",...G()],O=()=>[e,Se,ve],z=()=>[...P(),qx,Gx,{position:[Se,ve]}],te=()=>["no-repeat",{repeat:["","x","y","space","round"]}],M=()=>["auto","cover","contain",I5,k5,{size:[Se,ve]}],ge=()=>[gp,yl,Ni],Ee=()=>["","none","full",h,Se,ve],ye=()=>["",ze,yl,Ni],be=()=>["solid","dashed","dotted","double"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Te=()=>[ze,gp,qx,Gx],De=()=>["","none",T,Se,ve],je=()=>["none",ze,Se,ve],Je=()=>["none",ze,Se,ve],kt=()=>[ze,Se,ve],it=()=>[$a,"full",...G()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[sa],breakpoint:[sa],color:[VA],container:[sa],"drop-shadow":[sa],ease:["in","out","in-out"],font:[C5],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[sa],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[sa],shadow:[sa],spacing:["px",ze],text:[sa],"text-shadow":[sa],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",$a,ve,Se,C]}],container:["container"],"container-type":[{"@container":["","normal","size",Se,ve]}],"container-named":[w5],columns:[{columns:[ze,ve,Se,c]}],"break-after":[{"break-after":N()}],"break-before":[{"break-before":N()}],"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:B()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ie()}],"inset-x":[{"inset-x":ie()}],"inset-y":[{"inset-y":ie()}],start:[{"inset-s":ie(),start:ie()}],end:[{"inset-e":ie(),end:ie()}],"inset-bs":[{"inset-bs":ie()}],"inset-be":[{"inset-be":ie()}],top:[{top:ie()}],right:[{right:ie()}],bottom:[{bottom:ie()}],left:[{left:ie()}],visibility:["visible","invisible","collapse"],z:[{z:[Cr,"auto",Se,ve]}],basis:[{basis:[$a,"full","auto",c,...G()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ze,$a,"auto","initial","none",ve]}],grow:[{grow:["",ze,Se,ve]}],shrink:[{shrink:["",ze,Se,ve]}],order:[{order:[Cr,"first","last","none",Se,ve]}],"grid-cols":[{"grid-cols":V()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":V()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":he()}],"auto-rows":[{"auto-rows":he()}],gap:[{gap:G()}],"gap-x":[{"gap-x":G()}],"gap-y":[{"gap-y":G()}],"justify-content":[{justify:[...ue(),"normal"]}],"justify-items":[{"justify-items":[...re(),"normal"]}],"justify-self":[{"justify-self":["auto",...re()]}],"align-content":[{content:["normal",...ue()]}],"align-items":[{items:[...re(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...re(),{baseline:["","last"]}]}],"place-content":[{"place-content":ue()}],"place-items":[{"place-items":[...re(),"baseline"]}],"place-self":[{"place-self":["auto",...re()]}],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:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":G()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":G()}],"space-y-reverse":["space-y-reverse"],size:[{size:ee()}],"inline-size":[{inline:["auto",...ce()]}],"min-inline-size":[{"min-inline":["auto",...ce()]}],"max-inline-size":[{"max-inline":["none",...ce()]}],"block-size":[{block:["auto",...xe()]}],"min-block-size":[{"min-block":["auto",...xe()]}],"max-block-size":[{"max-block":["none",...xe()]}],w:[{w:[c,"screen",...ee()]}],"min-w":[{"min-w":[c,"screen","none",...ee()]}],"max-w":[{"max-w":[c,"screen","none","prose",{screen:[l]},...ee()]}],h:[{h:["screen","lh",...ee()]}],"min-h":[{"min-h":["screen","lh","none",...ee()]}],"max-h":[{"max-h":["screen","lh",...ee()]}],"font-size":[{text:["base",n,yl,Ni]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,M5,N5]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gp,ve]}],"font-family":[{font:[L5,R5,t]}],"font-features":[{"font-features":[ve]}],"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:[i,Se,ve]}],"line-clamp":[{"line-clamp":[ze,"none",Se,Vx]}],leading:[{leading:[o,...G()]}],"list-image":[{"list-image":["none",Se,ve]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Se,ve]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...be(),"wavy"]}],"text-decoration-thickness":[{decoration:[ze,"from-font","auto",Se,Ni]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[ze,"auto",Se,ve]}],"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:[Cr,Se,ve]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Se,ve]}],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",Se,ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:z()}],"bg-repeat":[{bg:te()}],"bg-size":[{bg:M()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Cr,Se,ve],radial:["",Se,ve],conic:[Cr,Se,ve]},D5,O5]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:ge()}],"gradient-via-pos":[{via:ge()}],"gradient-to-pos":[{to:ge()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:Ee()}],"rounded-s":[{"rounded-s":Ee()}],"rounded-e":[{"rounded-e":Ee()}],"rounded-t":[{"rounded-t":Ee()}],"rounded-r":[{"rounded-r":Ee()}],"rounded-b":[{"rounded-b":Ee()}],"rounded-l":[{"rounded-l":Ee()}],"rounded-ss":[{"rounded-ss":Ee()}],"rounded-se":[{"rounded-se":Ee()}],"rounded-ee":[{"rounded-ee":Ee()}],"rounded-es":[{"rounded-es":Ee()}],"rounded-tl":[{"rounded-tl":Ee()}],"rounded-tr":[{"rounded-tr":Ee()}],"rounded-br":[{"rounded-br":Ee()}],"rounded-bl":[{"rounded-bl":Ee()}],"border-w":[{border:ye()}],"border-w-x":[{"border-x":ye()}],"border-w-y":[{"border-y":ye()}],"border-w-s":[{"border-s":ye()}],"border-w-e":[{"border-e":ye()}],"border-w-bs":[{"border-bs":ye()}],"border-w-be":[{"border-be":ye()}],"border-w-t":[{"border-t":ye()}],"border-w-r":[{"border-r":ye()}],"border-w-b":[{"border-b":ye()}],"border-w-l":[{"border-l":ye()}],"divide-x":[{"divide-x":ye()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ye()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...be(),"hidden","none"]}],"divide-style":[{divide:[...be(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...be(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ze,Se,ve]}],"outline-w":[{outline:["",ze,yl,Ni]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",p,$c,Fc]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",m,$c,Fc]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[ze,Ni]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ye()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",y,$c,Fc]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[ze,Se,ve]}],"mix-blend":[{"mix-blend":[...ke(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ke()}],"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":[ze]}],"mask-image-linear-from-pos":[{"mask-linear-from":Te()}],"mask-image-linear-to-pos":[{"mask-linear-to":Te()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":Te()}],"mask-image-t-to-pos":[{"mask-t-to":Te()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":Te()}],"mask-image-r-to-pos":[{"mask-r-to":Te()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":Te()}],"mask-image-b-to-pos":[{"mask-b-to":Te()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":Te()}],"mask-image-l-to-pos":[{"mask-l-to":Te()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":Te()}],"mask-image-x-to-pos":[{"mask-x-to":Te()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":Te()}],"mask-image-y-to-pos":[{"mask-y-to":Te()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[Se,ve]}],"mask-image-radial-from-pos":[{"mask-radial-from":Te()}],"mask-image-radial-to-pos":[{"mask-radial-to":Te()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":P()}],"mask-image-conic-pos":[{"mask-conic":[ze]}],"mask-image-conic-from-pos":[{"mask-conic-from":Te()}],"mask-image-conic-to-pos":[{"mask-conic-to":Te()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:z()}],"mask-repeat":[{mask:te()}],"mask-size":[{mask:M()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Se,ve]}],filter:[{filter:["","none",Se,ve]}],blur:[{blur:De()}],brightness:[{brightness:[ze,Se,ve]}],contrast:[{contrast:[ze,Se,ve]}],"drop-shadow":[{"drop-shadow":["","none",E,$c,Fc]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",ze,Se,ve]}],"hue-rotate":[{"hue-rotate":[ze,Se,ve]}],invert:[{invert:["",ze,Se,ve]}],saturate:[{saturate:[ze,Se,ve]}],sepia:[{sepia:["",ze,Se,ve]}],"backdrop-filter":[{"backdrop-filter":["","none",Se,ve]}],"backdrop-blur":[{"backdrop-blur":De()}],"backdrop-brightness":[{"backdrop-brightness":[ze,Se,ve]}],"backdrop-contrast":[{"backdrop-contrast":[ze,Se,ve]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ze,Se,ve]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ze,Se,ve]}],"backdrop-invert":[{"backdrop-invert":["",ze,Se,ve]}],"backdrop-opacity":[{"backdrop-opacity":[ze,Se,ve]}],"backdrop-saturate":[{"backdrop-saturate":[ze,Se,ve]}],"backdrop-sepia":[{"backdrop-sepia":["",ze,Se,ve]}],"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",Se,ve]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ze,"initial",Se,ve]}],ease:[{ease:["linear","initial",w,Se,ve]}],delay:[{delay:[ze,Se,ve]}],animate:[{animate:["none",k,Se,ve]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[S,Se,ve]}],"perspective-origin":[{"perspective-origin":B()}],rotate:[{rotate:je()}],"rotate-x":[{"rotate-x":je()}],"rotate-y":[{"rotate-y":je()}],"rotate-z":[{"rotate-z":je()}],scale:[{scale:Je()}],"scale-x":[{"scale-x":Je()}],"scale-y":[{"scale-y":Je()}],"scale-z":[{"scale-z":Je()}],"scale-3d":["scale-3d"],skew:[{skew:kt()}],"skew-x":[{"skew-x":kt()}],"skew-y":[{"skew-y":kt()}],transform:[{transform:[Se,ve,"","none","gpu","cpu"]}],"transform-origin":[{origin:B()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:it()}],"translate-x":[{"translate-x":it()}],"translate-y":[{"translate-y":it()}],"translate-z":[{"translate-z":it()}],"translate-none":["translate-none"],zoom:[{zoom:[Cr,Se,ve]}],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",Se,ve]}],"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":O()}],"scrollbar-track-color":[{"scrollbar-track":O()}],"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",Se,ve]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[ze,yl,Ni,Vx]}],stroke:[{stroke:["none",...O()]}],"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"]}},Pg=p5(B5);function we(...e){return Pg(Wf(e))}const j5=fg("inline-flex shrink-0 items-center justify-center gap-2 rounded-md text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function ln({className:e,variant:t="default",size:n="default",asChild:r=!1,...i}){const o=r?$2:"button";return _.jsx(o,{"data-slot":"button","data-variant":t,"data-size":n,className:we(j5({variant:t,size:n,className:e})),...i})}const U5={damping:.7,stiffness:.05,mass:1.25},H5=70,z5=1e3/60,F5=350;let cd=!1;globalThis.document?.addEventListener("mousedown",()=>{cd=!0});globalThis.document?.addEventListener("mouseup",()=>{cd=!1});globalThis.document?.addEventListener("click",()=>{cd=!1});const $5=(e={})=>{const[t,n]=v.useState(!1),[r,i]=v.useState(e.initial!==!1),[o,l]=v.useState(!1),c=v.useRef(null);c.current=e;const f=v.useCallback(()=>{if(!cd)return!1;const k=window.getSelection();if(!k||!k.rangeCount)return!1;const N=k.getRangeAt(0);return N.commonAncestorContainer.contains(C.current)||C.current?.contains(N.commonAncestorContainer)},[]),h=v.useCallback(k=>{m.isAtBottom=k,i(k)},[]),p=v.useCallback(k=>{m.escapedFromLock=k,n(k)},[]),m=v.useMemo(()=>{let k;return{escapedFromLock:t,isAtBottom:r,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return C.current?.scrollTop??0},set scrollTop(N){if(C.current){const{scrollBehavior:P}=getComputedStyle(C.current);P!=="auto"&&(C.current.style.scrollBehavior="auto"),C.current.scrollTop=N,m.ignoreScrollToTop=C.current.scrollTop,P!=="auto"&&(C.current.style.scrollBehavior=P)}},get targetScrollTop(){return!C.current||!w.current?0:C.current.scrollHeight-1-C.current.clientHeight},get calculatedTargetScrollTop(){if(!C.current||!w.current)return 0;const{targetScrollTop:N}=this;if(!e.targetScrollTop)return N;if(k?.targetScrollTop===N)return k.calculatedScrollTop;const P=Math.max(Math.min(e.targetScrollTop(N,{scrollElement:C.current,contentElement:w.current}),N),0);return k={targetScrollTop:N,calculatedScrollTop:P},requestAnimationFrame(()=>{k=void 0}),P},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=H5}}},[]),y=v.useCallback((k={})=>{typeof k=="string"&&(k={animation:k}),k.preserveScrollPosition||h(!0);const N=Date.now()+(Number(k.wait)||0),P=Ep(c.current,k.animation),{ignoreEscapes:B=!1}=k;let D,$=m.calculatedTargetScrollTop;k.duration instanceof Promise?k.duration.finally(()=>{D=Date.now()}):D=N+(k.duration??0);const G=async()=>{const ie=new Promise(requestAnimationFrame).then(()=>{if(!m.isAtBottom)return m.animation=void 0,!1;const{scrollTop:V}=m,X=performance.now(),J=(X-(m.lastTick??X))/z5;if(m.animation||(m.animation={behavior:P,promise:ie,ignoreEscapes:B}),m.animation.behavior===P&&(m.lastTick=X),f()||N>Date.now())return G();if(V<Math.min($,m.calculatedTargetScrollTop)){if(m.animation?.behavior===P){if(P==="instant")return m.scrollTop=m.calculatedTargetScrollTop,G();m.velocity=(P.damping*m.velocity+P.stiffness*m.scrollDifference)/P.mass,m.accumulated+=m.velocity*J,m.scrollTop+=m.accumulated,m.scrollTop!==V&&(m.accumulated=0)}return G()}return D>Date.now()?($=m.calculatedTargetScrollTop,G()):(m.animation=void 0,m.scrollTop<m.calculatedTargetScrollTop?y({animation:Ep(c.current,c.current.resize),ignoreEscapes:B,duration:Math.max(0,D-Date.now())||void 0}):m.isAtBottom)});return ie.then(V=>(requestAnimationFrame(()=>{m.animation||(m.lastTick=void 0,m.velocity=0)}),V))};return k.wait!==!0&&(m.animation=void 0),m.animation?.behavior===P?m.animation.promise:G()},[h,f,m]),E=v.useCallback(()=>{p(!0),h(!1)},[p,h]),T=v.useCallback(({target:k})=>{if(k!==C.current)return;const{scrollTop:N,ignoreScrollToTop:P}=m;let{lastScrollTop:B=N}=m;m.lastScrollTop=N,m.ignoreScrollToTop=void 0,P&&P>N&&(B=P),l(m.isNearBottom),setTimeout(()=>{if(m.resizeDifference||N===P)return;if(f()){p(!0),h(!1);return}const D=N>B,$=N<B;if(m.animation?.ignoreEscapes){m.scrollTop=B;return}$&&(p(!0),h(!1)),D&&p(!1),!m.escapedFromLock&&m.isNearBottom&&h(!0)},1)},[p,h,f,m]),S=v.useCallback(({target:k,deltaY:N})=>{let P=k;for(;!["scroll","auto"].includes(getComputedStyle(P).overflow);){if(!P.parentElement)return;P=P.parentElement}P===C.current&&N<0&&C.current.scrollHeight>C.current.clientHeight&&!m.animation?.ignoreEscapes&&(p(!0),h(!1))},[p,h,m]),C=Yx(k=>{C.current?.removeEventListener("scroll",T),C.current?.removeEventListener("wheel",S),k?.addEventListener("scroll",T,{passive:!0}),k?.addEventListener("wheel",S,{passive:!0})},[]),w=Yx(k=>{if(m.resizeObserver?.disconnect(),m.resizeObserver=void 0,!k)return;let N;m.resizeObserver=new ResizeObserver(([P])=>{const{height:B}=P.contentRect,D=B-(N??B);if(m.resizeDifference=D,m.scrollTop>m.targetScrollTop&&(m.scrollTop=m.targetScrollTop),l(m.isNearBottom),D>=0){const $=Ep(c.current,N?c.current.resize:c.current.initial);y({animation:$,wait:!0,preserveScrollPosition:!0,duration:$==="instant"?void 0:F5})}else m.isNearBottom&&(p(!1),h(!0));N=B,requestAnimationFrame(()=>{setTimeout(()=>{m.resizeDifference===D&&(m.resizeDifference=0)},1)})}),m.resizeObserver?.observe(k)},[]);return{contentRef:w,scrollRef:C,scrollToBottom:y,stopScroll:E,isAtBottom:r||o,isNearBottom:o,escapedFromLock:t,state:m}};function Yx(e,t){const n=v.useCallback(r=>(n.current=r,e(r)),t);return n}const bp=new Map;function Ep(...e){const t={...U5};let n=!1;for(const i of e){if(i==="instant"){n=!0;continue}typeof i=="object"&&(n=!1,t.damping=i.damping??t.damping,t.stiffness=i.stiffness??t.stiffness,t.mass=i.mass??t.mass)}const r=JSON.stringify(t);return bp.has(r)||bp.set(r,Object.freeze(t)),n?"instant":bp.get(r)}const ZA=v.createContext(null),V5=typeof window<"u"?v.useLayoutEffect:v.useEffect;function Cf({instance:e,children:t,resize:n,initial:r,mass:i,damping:o,stiffness:l,targetScrollTop:c,contextRef:f,...h}){const p=v.useRef(null),m=v.useCallback((B,D)=>(P?.targetScrollTop??c)?.(B,D)??B,[c]),y=$5({mass:i,damping:o,stiffness:l,resize:n,initial:r,targetScrollTop:m}),{scrollRef:E,contentRef:T,scrollToBottom:S,stopScroll:C,isAtBottom:w,escapedFromLock:k,state:N}=e??y,P=v.useMemo(()=>({scrollToBottom:S,stopScroll:C,scrollRef:E,isAtBottom:w,escapedFromLock:k,contentRef:T,state:N,get targetScrollTop(){return p.current},set targetScrollTop(B){p.current=B}}),[S,w,T,E,C,k,N]);return v.useImperativeHandle(f,()=>P,[P]),V5(()=>{E.current&&getComputedStyle(E.current).overflow==="visible"&&(E.current.style.overflow="auto")},[]),v.createElement(ZA.Provider,{value:P},v.createElement("div",{...h},typeof t=="function"?t(P):t))}(function(e){function t({children:n,scrollClassName:r,...i}){const o=JA();return v.createElement("div",{ref:o.scrollRef,style:{height:"100%",width:"100%",scrollbarGutter:"stable both-edges"},className:r},v.createElement("div",{...i,ref:o.contentRef},typeof n=="function"?n(o):n))}e.Content=t})(Cf||(Cf={}));function JA(){const e=v.useContext(ZA);if(!e)throw new Error("use-stick-to-bottom component context must be used within a StickToBottom component");return e}const G5=({className:e,...t})=>_.jsx(Cf,{className:we("relative flex-1 overflow-y-hidden",e),initial:"smooth",resize:"smooth",role:"log",...t}),q5=({className:e,...t})=>_.jsx(Cf.Content,{className:we("flex flex-col gap-8 p-4",e),...t}),Y5=({className:e,...t})=>{const{isAtBottom:n,scrollToBottom:r}=JA(),i=v.useCallback(()=>{r()},[r]);return!n&&_.jsx(ln,{className:we("absolute bottom-4 left-[50%] translate-x-[-50%] rounded-full",e),onClick:i,size:"icon",type:"button",variant:"outline",...t,children:_.jsx(fL,{className:"size-4"})})},X5=({size:e=16})=>_.jsxs("svg",{height:e,strokeLinejoin:"round",style:{color:"currentcolor"},viewBox:"0 0 16 16",width:e,children:[_.jsx("title",{children:"Loader"}),_.jsxs("g",{clipPath:"url(#clip0_2393_1490)",children:[_.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),_.jsx("defs",{children:_.jsx("clipPath",{id:"clip0_2393_1490",children:_.jsx("rect",{fill:"white",height:"16",width:"16"})})})]}),Xx=({className:e,size:t=16,...n})=>_.jsx("div",{className:we("inline-flex animate-spin items-center justify-center",e),...n,children:_.jsx(X5,{size:t})}),Q5=({children:e,as:t="p",className:n,duration:r=2,spread:i=2})=>{const o=v.useMemo(()=>(e?.length??0)*i,[e,i]);return v.createElement(t,{className:we("relative inline-block bg-[length:250%_100%,auto] bg-clip-text text-transparent","[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]","animate-shimmer",n),style:{"--spread":`${o}px`,backgroundImage:"var(--bg), linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))",animationDuration:`${r}s`}},e)},eC=v.memo(Q5),W5=({base64:e,uint8Array:t,mediaType:n,...r})=>_.jsx("img",{...r,alt:r.alt,className:we("h-auto max-w-full overflow-hidden rounded-md",r.className),src:`data:${n};base64,${e}`}),Bg=({className:e,from:t,...n})=>_.jsx("div",{className:we("group flex w-full max-w-[95%] flex-col gap-2",t==="user"?"is-user ml-auto justify-end":"is-assistant",e),...n}),jg=({children:e,className:t,...n})=>_.jsx("div",{className:we("is-user:dark 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});function tC({...e}){return _.jsx(RI,{"data-slot":"collapsible",...e})}function nC({...e}){return _.jsx(X2,{"data-slot":"collapsible-trigger",...e})}function rC({...e}){return _.jsx(Q2,{"data-slot":"collapsible-content",...e})}const K5="modulepreload",Z5=function(e){return"/"+e},Qx={},L=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let f=function(h){return Promise.all(h.map(p=>Promise.resolve(p).then(m=>({status:"fulfilled",value:m}),m=>({status:"rejected",reason:m}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=l?.nonce||l?.getAttribute("nonce");i=f(n.map(h=>{if(h=Z5(h),h in Qx)return;Qx[h]=!0;const p=h.endsWith(".css"),m=p?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${m}`))return;const y=document.createElement("link");if(y.rel=p?"stylesheet":K5,p||(y.as="script"),y.crossOrigin="",y.href=h,c&&y.setAttribute("nonce",c),document.head.appendChild(y),p)return new Promise((E,T)=>{y.addEventListener("load",E),y.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${h}`)))})}))}function o(l){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=l,window.dispatchEvent(c),!c.defaultPrevented)throw l}return i.then(l=>{for(const c of l||[])c.status==="rejected"&&o(c.reason);return t().catch(o)})},fd=(function(e){if(e==null)return nM;if(typeof e=="function")return dd(e);if(typeof e=="object")return Array.isArray(e)?J5(e):eM(e);if(typeof e=="string")return tM(e);throw new Error("Expected function, string, or object as test")});function J5(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=fd(e[n]);return dd(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function eM(e){const t=e;return dd(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function tM(e){return dd(t);function t(n){return n&&n.type===e}}function dd(e){return t;function t(n,r,i){return!!(rM(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function nM(){return!0}function rM(e){return e!==null&&typeof e=="object"&&"type"in e}const aC=[],Rl=!0,b0=!1,to="skip";function Ug(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=fd(i),l=r?-1:1;c(e,void 0,[])();function c(f,h,p){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const E=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(y,"name",{value:"node ("+(f.type+(E?"<"+E+">":""))+")"})}return y;function y(){let E=aC,T,S,C;if((!t||o(f,h,p[p.length-1]||void 0))&&(E=aM(n(f,p)),E[0]===b0))return E;if("children"in f&&f.children){const w=f;if(w.children&&E[0]!==to)for(S=(r?w.children.length:-1)+l,C=p.concat(w);S>-1&&S<w.children.length;){const k=w.children[S];if(T=c(k,S,C)(),T[0]===b0)return T;S=typeof T[1]=="number"?T[1]:S+l}}return E}}}function aM(e){return Array.isArray(e)?e:typeof e=="number"?[Rl,e]:e==null?aC:[e]}function Mr(e,t,n,r){let i,o,l;typeof t=="function"&&typeof n!="function"?(o=void 0,l=t,i=n):(o=t,l=n,i=r),Ug(e,o,c,i);function c(f,h){const p=h[h.length-1],m=p?p.children.indexOf(f):void 0;return l(f,m,p)}}const fo={indicator:"indicator",textOnly:"text-only",remove:"remove"};function iM({defaultOrigin:e="",allowedLinkPrefixes:t=[],allowedImagePrefixes:n=[],allowDataImages:r=!1,allowedProtocols:i=[],blockedImageClass:o="inline-block bg-gray-200 dark:bg-gray-700 text-gray-600 dark:text-gray-400 px-3 py-1 rounded text-sm",blockedLinkClass:l="text-gray-500",linkBlockPolicy:c=fo.indicator,imageBlockPolicy:f=fo.indicator}){const h=t.length&&!t.every(m=>m==="*"),p=n.length&&!n.every(m=>m==="*");if(!e&&(h||p))throw new Error("defaultOrigin is required when allowedLinkPrefixes or allowedImagePrefixes are provided");return m=>{const y=fM(e,t,n,r,i,o,l,c,f);iC(m),Mr(m,y)}}function Wx(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 sM(e){return typeof e!="string"?!1:e.startsWith("/")||e.startsWith("./")||e.startsWith("../")}const oM=new Set(["https:","http:","irc:","ircs:","mailto:","xmpp:","blob:"]),lM=new Set(["javascript:","data:","file:","vbscript:"]);function Kx(e,t,n,r=!1,i=!1,o=[]){if(!e)return null;if(typeof e=="string"&&e.startsWith("#")&&!i)try{if(new URL(e,"http://example.com").hash===e)return e}catch{}if(typeof e=="string"&&e.startsWith("data:"))return i&&r&&e.startsWith("data:image/")?e:null;if(typeof e=="string"&&e.startsWith("blob:")){try{if(new URL(e).protocol==="blob:"&&e.length>5){const p=e.substring(5);if(p&&p.length>0&&p!=="invalid")return e}}catch{return null}return null}const l=Wx(e,n);if(!l||lM.has(l.protocol)||!(oM.has(l.protocol)||o.includes(l.protocol)||o.includes("*")))return null;if(l.protocol==="mailto:"||!l.protocol.match(/^https?:$/))return l.href;const f=sM(e);return l&&t.some(h=>{const p=Wx(h,n);return!p||p.origin!==l.origin?!1:l.href.startsWith(p.href)})?f?l.pathname+l.search+l.hash:l.href:t.includes("*")?l.protocol!=="https:"&&l.protocol!=="http:"?null:f?l.pathname+l.search+l.hash:l.href:null}function iC(e){if("children"in e&&Array.isArray(e.children)){e.children=e.children.filter(t=>t!=null);for(const t of e.children)iC(t)}}const yp=Symbol("node-seen");function uM(e,t,n){return t===fo.remove?{type:"remove"}:t===fo.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 cM(e,t,n){if(t===fo.remove)return{type:"remove"};if(t===fo.textOnly){const r=String(e.properties.alt||"");return r?{type:"replace",element:{type:"element",tagName:"span",properties:{},children:[{type:"text",value:r}]}}:{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 fM=(e,t,n,r,i,o,l,c,f)=>{const h=(p,m,y)=>{if(p.type!=="element"||p[yp])return Rl;if(p.tagName==="a"){const E=Kx(p.properties.href,t,e,!1,!1,i);if(E===null){if(p[yp]=!0,Mr(p,h),y&&typeof m=="number"){const T=uM(p,c,l);if(T.type==="remove")return y.children.splice(m,1),[to,m];y.children[m]=T.element}return to}else return p.properties.href=E,p.properties.target="_blank",p.properties.rel="noopener noreferrer",Rl}if(p.tagName==="img"){const E=Kx(p.properties.src,n,e,r,!0,i);if(E===null){if(p[yp]=!0,Mr(p,h),y&&typeof m=="number"){const T=cM(p,f,o);if(T.type==="remove")return y.children.splice(m,1),[to,m];y.children[m]=T.element}return to}else return p.properties.src=E,Rl}return Rl};return h},sC=-1,hd=0,Ml=1,wf=2,Hg=3,zg=4,Fg=5,$g=6,oC=7,lC=8,dM=typeof self=="object"?self:globalThis,Zx=(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 dM[e](t)},hM=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,l]=t[i];switch(o){case hd:case sC:return n(l,i);case Ml:{const c=n([],i);for(const f of l)c.push(r(f));return c}case wf:{const c=n({},i);for(const[f,h]of l)c[r(f)]=r(h);return c}case Hg:return n(new Date(l),i);case zg:{const{source:c,flags:f}=l;return n(new RegExp(c,f),i)}case Fg:{const c=n(new Map,i);for(const[f,h]of l)c.set(r(f),r(h));return c}case $g:{const c=n(new Set,i);for(const f of l)c.add(r(f));return c}case oC:{const{name:c,message:f}=l;return n(Zx(c,f),i)}case lC:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:c}=new Uint8Array(l);return n(new DataView(c),l)}}return n(Zx(o,l),i)};return r},Jx=e=>hM(new Map,e)(0),Di="",{toString:mM}={},{keys:pM}=Object,_l=e=>{const t=typeof e;if(t!=="object"||!e)return[hd,t];const n=mM.call(e).slice(8,-1);switch(n){case"Array":return[Ml,Di];case"Object":return[wf,Di];case"Date":return[Hg,Di];case"RegExp":return[zg,Di];case"Map":return[Fg,Di];case"Set":return[$g,Di];case"DataView":return[Ml,n]}return n.includes("Array")?[Ml,n]:n.includes("Error")?[oC,n]:[wf,n]},Vc=([e,t])=>e===hd&&(t==="function"||t==="symbol"),gM=(e,t,n,r)=>{const i=(l,c)=>{const f=r.push(l)-1;return n.set(c,f),f},o=l=>{if(n.has(l))return n.get(l);let[c,f]=_l(l);switch(c){case hd:{let p=l;switch(f){case"bigint":c=lC,p=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);p=null;break;case"undefined":return i([sC],l)}return i([c,p],l)}case Ml:{if(f){let y=l;return f==="DataView"?y=new Uint8Array(l.buffer):f==="ArrayBuffer"&&(y=new Uint8Array(l)),i([f,[...y]],l)}const p=[],m=i([c,p],l);for(const y of l)p.push(o(y));return m}case wf:{if(f)switch(f){case"BigInt":return i([f,l.toString()],l);case"Boolean":case"Number":case"String":return i([f,l.valueOf()],l)}if(t&&"toJSON"in l)return o(l.toJSON());const p=[],m=i([c,p],l);for(const y of pM(l))(e||!Vc(_l(l[y])))&&p.push([o(y),o(l[y])]);return m}case Hg:return i([c,isNaN(l.getTime())?Di:l.toISOString()],l);case zg:{const{source:p,flags:m}=l;return i([c,{source:p,flags:m}],l)}case Fg:{const p=[],m=i([c,p],l);for(const[y,E]of l)(e||!(Vc(_l(y))||Vc(_l(E))))&&p.push([o(y),o(E)]);return m}case $g:{const p=[],m=i([c,p],l);for(const y of l)(e||!Vc(_l(y)))&&p.push(o(y));return m}}const{message:h}=l;return i([c,{name:f,message:h}],l)};return o},eT=(e,{json:t,lossy:n}={})=>{const r=[];return gM(!(t||n),!!t,new Map,r)(e),r},Yi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Jx(eT(e,t)):structuredClone(e):(e,t)=>Jx(eT(e,t));class ou{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ou.prototype.normal={};ou.prototype.property={};ou.prototype.space=void 0;function uC(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ou(n,r,t)}function Yl(e){return e.toLowerCase()}class Rn{constructor(t,n){this.attribute=n,this.property=t}}Rn.prototype.attribute="";Rn.prototype.booleanish=!1;Rn.prototype.boolean=!1;Rn.prototype.commaOrSpaceSeparated=!1;Rn.prototype.commaSeparated=!1;Rn.prototype.defined=!1;Rn.prototype.mustUseProperty=!1;Rn.prototype.number=!1;Rn.prototype.overloadedBoolean=!1;Rn.prototype.property="";Rn.prototype.spaceSeparated=!1;Rn.prototype.space=void 0;let bM=0;const Ie=ns(),Bt=ns(),E0=ns(),pe=ns(),bt=ns(),Fi=ns(),Hn=ns();function ns(){return 2**++bM}const y0=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Bt,commaOrSpaceSeparated:Hn,commaSeparated:Fi,number:pe,overloadedBoolean:E0,spaceSeparated:bt},Symbol.toStringTag,{value:"Module"})),_p=Object.keys(y0);class Vg extends Rn{constructor(t,n,r,i){let o=-1;if(super(t,n),tT(this,"space",i),typeof r=="number")for(;++o<_p.length;){const l=_p[o];tT(this,_p[o],(r&y0[l])===y0[l])}}}Vg.prototype.defined=!0;function tT(e,t,n){n&&(e[t]=n)}function bo(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new Vg(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[Yl(r)]=r,n[Yl(o.attribute)]=r}return new ou(t,n,e.space)}const cC=bo({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:bt,ariaCurrent:null,ariaDescribedBy:bt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:bt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:bt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:bt,ariaLevel:pe,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:bt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:bt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Bt,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function fC(e,t){return t in e?e[t]:t}function dC(e,t){return fC(e,t.toLowerCase())}const EM=bo({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Fi,acceptCharset:bt,accessKey:bt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alpha:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:bt,autoFocus:Ie,autoPlay:Ie,blocking:bt,capture:null,charSet:null,checked:Ie,cite:null,className:bt,closedBy:null,colorSpace:null,cols:pe,colSpan:pe,command:null,commandFor:null,content:null,contentEditable:Bt,controls:Ie,controlsList:bt,coords:pe|Fi,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:E0,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:bt,height:pe,hidden:E0,high:pe,href:null,hrefLang:null,htmlFor:bt,httpEquiv:bt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:bt,itemRef:bt,itemScope:Ie,itemType:bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ie,optimum:pe,pattern:null,ping:bt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:bt,required:Ie,reversed:Ie,rows:pe,rowSpan:pe,sandbox:bt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootCustomElementRegistry:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shadowRootSerializable:Ie,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Bt,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:bt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ie,disablePictureInPicture:Ie,disableRemotePlayback:Ie,exportParts:Fi,part:bt,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:dC}),yM=bo({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:Hn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:bt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Fi,g2:Fi,glyphName:Fi,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Hn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,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:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Hn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Hn,rev:Hn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Hn,requiredFeatures:Hn,requiredFonts:Hn,requiredFormats:Hn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Hn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Hn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Hn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:fC}),hC=bo({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()}}),mC=bo({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:dC}),pC=bo({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),_M={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"},xM=/[A-Z]/g,nT=/-[a-z]/g,TM=/^data[-\w.:]+$/i;function lu(e,t){const n=Yl(t);let r=t,i=Rn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&TM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(nT,SM);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!nT.test(o)){let l=o.replace(xM,vM);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Vg}return new i(r,t)}function vM(e){return"-"+e.toLowerCase()}function SM(e){return e.charAt(1).toUpperCase()}const Eo=uC([cC,EM,hC,mC,pC],"html"),Br=uC([cC,yM,hC,mC,pC],"svg");function rT(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,o=!1;for(;!o;){r===-1&&(r=n.length,o=!0);const l=n.slice(i,r).trim();(l||!o)&&t.push(l),i=r+1,r=n.indexOf(",",i)}return t}function Gg(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const aT=/[#.]/g;function AM(e,t){const n=e||"",r={};let i=0,o,l;for(;i<n.length;){aT.lastIndex=i;const c=aT.exec(n),f=n.slice(i,c?c.index:n.length);f&&(o?o==="#"?r.id=f:Array.isArray(r.className)?r.className.push(f):r.className=[f]:l=f,i+=f.length),c&&(o=c[0],i++)}return{type:"element",tagName:l||t||"div",properties:r,children:[]}}function iT(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function qg(e){return e.join(" ").trim()}function gC(e,t,n){const r=n?NM(n):void 0;function i(o,l,...c){let f;if(o==null){f={type:"root",children:[]};const h=l;c.unshift(h)}else{f=AM(o,t);const h=f.tagName.toLowerCase(),p=r?r.get(h):void 0;if(f.tagName=p||h,CM(l))c.unshift(l);else for(const[m,y]of Object.entries(l))wM(e,f.properties,m,y)}for(const h of c)_0(f.children,h);return f.type==="element"&&f.tagName==="template"&&(f.content={type:"root",children:f.children},f.children=[]),f}return i}function CM(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 r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const o=i;for(const l of o)if(typeof l!="number"&&typeof l!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function wM(e,t,n,r){const i=lu(e,n);let o;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;o=r}else typeof r=="boolean"?o=r:typeof r=="string"?i.spaceSeparated?o=iT(r):i.commaSeparated?o=rT(r):i.commaOrSpaceSeparated?o=iT(rT(r).join(" ")):o=sT(i,i.property,r):Array.isArray(r)?o=[...r]:o=i.property==="style"?kM(r):String(r);if(Array.isArray(o)){const l=[];for(const c of o)l.push(sT(i,i.property,c));o=l}i.property==="className"&&Array.isArray(t.className)&&(o=t.className.concat(o)),t[i.property]=o}}function _0(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)_0(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?_0(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function sT(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Yl(n)===Yl(t)))return!0}return n}function kM(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function NM(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const RM=["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"],OM=gC(Eo,"div"),LM=gC(Br,"g",RM);function IM(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(o){if(typeof o=="number"&&o>-1&&o<=t.length){let l=0;for(;;){let c=n[l];if(c===void 0){const f=oT(t,n[l-1]);c=f===-1?t.length+1:f+1,n[l]=c}if(c>o)return{line:l+1,column:o-(l>0?n[l-1]:0)+1,offset:o};l++}}}function i(o){if(o&&typeof o.line=="number"&&typeof o.column=="number"&&!Number.isNaN(o.line)&&!Number.isNaN(o.column)){for(;n.length<o.line;){const c=n[n.length-1],f=oT(t,c),h=f===-1?t.length+1:f+1;if(c===h)break;n.push(h)}const l=(o.line>1?n[o.line-2]:0)+o.column-1;if(l<n[o.line-1])return l}}}function oT(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
51
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Ui={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/"},bC={}.hasOwnProperty,DM=Object.prototype;function MM(e,t){const n=t||{};return Yg({file:n.file||void 0,location:!1,schema:n.space==="svg"?Br:Eo,verbose:n.verbose||!1},e)}function Yg(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},ff(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:EC(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const o=String(e.file),l=IM(o),c=l.toPoint(0),f=l.toPoint(o.length);n.position={start:c,end:f}}return n}case"#documentType":{const r=t;return n={type:"doctype"},ff(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},ff(e,r,n),n}default:return n=PM(e,t),n}}function EC(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=Yg(e,t[n]);r.push(i)}return r}function PM(e,t){const n=e.schema;e.schema=t.namespaceURI===Ui.svg?Br:Eo;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],f=(c.prefix?c.prefix+":":"")+c.name;bC.call(DM,f)||(i[f]=c.value)}const l=(e.schema.space==="svg"?LM:OM)(t.tagName,i,EC(e,t.childNodes));if(ff(e,t,l),l.tagName==="template"){const c=t,f=c.sourceCodeLocation,h=f&&f.startTag&&no(f.startTag),p=f&&f.endTag&&no(f.endTag),m=Yg(e,c.content);h&&p&&e.file&&(m.position={start:h.end,end:p.start}),l.content=m}return e.schema=n,l}function ff(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=BM(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function BM(e,t,n){const r=no(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const o={};let l;if(n.attrs)for(l in n.attrs)bC.call(n.attrs,l)&&(o[lu(e.schema,l).property]=no(n.attrs[l]));n.startTag;const c=no(n.startTag),f=n.endTag?no(n.endTag):void 0,h={opening:c};f&&(h.closing=f),h.properties=o,t.data={position:h}}}return r}function no(e){const t=lT({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=lT({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function lT(e){return e.line&&e.column?e:void 0}const uT={}.hasOwnProperty;function Xg(e,t){const n=t||{};function r(i,...o){let l=r.invalid;const c=r.handlers;if(i&&uT.call(i,e)){const f=String(i[e]);l=uT.call(c,f)?c[f]:r.unknown}if(l)return l.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const jM={},UM={}.hasOwnProperty,yC=Xg("type",{handlers:{root:zM,element:qM,text:VM,comment:GM,doctype:$M}});function HM(e,t){const r=(t||jM).space;return yC(e,r==="svg"?Br:Eo)}function zM(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Qg(e.children,n,t),yo(e,n),n}function FM(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Qg(e.children,n,t),yo(e,n),n}function $M(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return yo(e,t),t}function VM(e){const t={nodeName:"#text",value:e.value,parentNode:null};return yo(e,t),t}function GM(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return yo(e,t),t}function qM(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Br);const i=[];let o;if(e.properties){for(o in e.properties)if(o!=="children"&&UM.call(e.properties,o)){const f=YM(r,o,e.properties[o]);f&&i.push(f)}}const l=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Ui[l],childNodes:[],parentNode:null};return c.childNodes=Qg(e.children,c,r),yo(e,c),e.tagName==="template"&&e.content&&(c.content=FM(e.content,r)),c}function YM(e,t,n){const r=lu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?Gg(n):qg(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const o=i.name.indexOf(":");o<0?i.prefix="":(i.name=i.name.slice(o+1),i.prefix=r.attribute.slice(0,o)),i.namespace=Ui[r.space]}return i}function Qg(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const o=yC(e[r],n);o.parentNode=t,i.push(o)}return i}function yo(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 _C=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],XM=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]),vt="�";var I;(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"})(I||(I={}));const kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function xC(e){return e>=55296&&e<=57343}function QM(e){return e>=56320&&e<=57343}function WM(e,t){return(e-55296)*1024+9216+t}function TC(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function vC(e){return e>=64976&&e<=65007||XM.has(e)}var ae;(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"})(ae||(ae={}));const KM=65536;class ZM{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=KM,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:r,col:i,offset:o}=this,l=i+n,c=o+n;return{code:t,startLine:r,endLine:r,startCol:l,endCol:l,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(QM(n))return this.pos++,this._addGap(),WM(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,I.EOF;return this._err(ae.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 r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,I.EOF;const r=this.html.charCodeAt(n);return r===I.CARRIAGE_RETURN?I.LINE_FEED:r}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,I.EOF;let t=this.html.charCodeAt(this.pos);return t===I.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,I.LINE_FEED):t===I.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,xC(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===I.LINE_FEED||t===I.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){TC(t)?this._err(ae.controlCharacterInInputStream):vC(t)&&this._err(ae.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Fe;(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"})(Fe||(Fe={}));function SC(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 JM=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),e8=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 t8(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=e8.get(e))!==null&&t!==void 0?t:e}var Wt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(Wt||(Wt={}));const n8=32;var Za;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Za||(Za={}));function x0(e){return e>=Wt.ZERO&&e<=Wt.NINE}function r8(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_F||e>=Wt.LOWER_A&&e<=Wt.LOWER_F}function a8(e){return e>=Wt.UPPER_A&&e<=Wt.UPPER_Z||e>=Wt.LOWER_A&&e<=Wt.LOWER_Z||x0(e)}function i8(e){return e===Wt.EQUALS||a8(e)}var Xt;(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"})(Xt||(Xt={}));var ua;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ua||(ua={}));class s8{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Xt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ua.Strict}startEntity(t){this.decodeMode=t,this.state=Xt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Xt.EntityStart:return t.charCodeAt(n)===Wt.NUM?(this.state=Xt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Xt.NamedEntity,this.stateNamedEntity(t,n));case Xt.NumericStart:return this.stateNumericStart(t,n);case Xt.NumericDecimal:return this.stateNumericDecimal(t,n);case Xt.NumericHex:return this.stateNumericHex(t,n);case Xt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|n8)===Wt.LOWER_X?(this.state=Xt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Xt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const o=r-n;this.result=this.result*Math.pow(i,o)+Number.parseInt(t.substr(n,o),i),this.consumed+=o}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(x0(i)||r8(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(x0(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===Wt.SEMI)this.consumed+=1;else if(this.decodeMode===ua.Strict)return 0;return this.emitCodePoint(t8(this.result),this.consumed),this.errors&&(t!==Wt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],o=(i&Za.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const l=t.charCodeAt(n);if(this.treeIndex=o8(r,i,this.treeIndex+Math.max(1,o),l),this.treeIndex<0)return this.result===0||this.decodeMode===ua.Attribute&&(o===0||i8(l))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],o=(i&Za.VALUE_LENGTH)>>14,o!==0){if(l===Wt.SEMI)return this.emitNamedEntityData(this.treeIndex,o,this.consumed+this.excess);this.decodeMode!==ua.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Za.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Za.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case Xt.NamedEntity:return this.result!==0&&(this.decodeMode!==ua.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Xt.NumericDecimal:return this.emitNumericEntity(0,2);case Xt.NumericHex:return this.emitNumericEntity(0,3);case Xt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Xt.EntityStart:return 0}}}function o8(e,t,n,r){const i=(t&Za.BRANCH_LENGTH)>>7,o=t&Za.JUMP_TABLE;if(i===0)return o!==0&&r===o?n:-1;if(o){const f=r-o;return f<0||f>=i?-1:e[n+f]-1}let l=n,c=l+i-1;for(;l<=c;){const f=l+c>>>1,h=e[f];if(h<r)l=f+1;else if(h>r)c=f-1;else return e[f+i]}return-1}var de;(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/"})(de||(de={}));var $i;(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"})($i||($i={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var Q;(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"})(Q||(Q={}));var x;(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"})(x||(x={}));const l8=new Map([[Q.A,x.A],[Q.ADDRESS,x.ADDRESS],[Q.ANNOTATION_XML,x.ANNOTATION_XML],[Q.APPLET,x.APPLET],[Q.AREA,x.AREA],[Q.ARTICLE,x.ARTICLE],[Q.ASIDE,x.ASIDE],[Q.B,x.B],[Q.BASE,x.BASE],[Q.BASEFONT,x.BASEFONT],[Q.BGSOUND,x.BGSOUND],[Q.BIG,x.BIG],[Q.BLOCKQUOTE,x.BLOCKQUOTE],[Q.BODY,x.BODY],[Q.BR,x.BR],[Q.BUTTON,x.BUTTON],[Q.CAPTION,x.CAPTION],[Q.CENTER,x.CENTER],[Q.CODE,x.CODE],[Q.COL,x.COL],[Q.COLGROUP,x.COLGROUP],[Q.DD,x.DD],[Q.DESC,x.DESC],[Q.DETAILS,x.DETAILS],[Q.DIALOG,x.DIALOG],[Q.DIR,x.DIR],[Q.DIV,x.DIV],[Q.DL,x.DL],[Q.DT,x.DT],[Q.EM,x.EM],[Q.EMBED,x.EMBED],[Q.FIELDSET,x.FIELDSET],[Q.FIGCAPTION,x.FIGCAPTION],[Q.FIGURE,x.FIGURE],[Q.FONT,x.FONT],[Q.FOOTER,x.FOOTER],[Q.FOREIGN_OBJECT,x.FOREIGN_OBJECT],[Q.FORM,x.FORM],[Q.FRAME,x.FRAME],[Q.FRAMESET,x.FRAMESET],[Q.H1,x.H1],[Q.H2,x.H2],[Q.H3,x.H3],[Q.H4,x.H4],[Q.H5,x.H5],[Q.H6,x.H6],[Q.HEAD,x.HEAD],[Q.HEADER,x.HEADER],[Q.HGROUP,x.HGROUP],[Q.HR,x.HR],[Q.HTML,x.HTML],[Q.I,x.I],[Q.IMG,x.IMG],[Q.IMAGE,x.IMAGE],[Q.INPUT,x.INPUT],[Q.IFRAME,x.IFRAME],[Q.KEYGEN,x.KEYGEN],[Q.LABEL,x.LABEL],[Q.LI,x.LI],[Q.LINK,x.LINK],[Q.LISTING,x.LISTING],[Q.MAIN,x.MAIN],[Q.MALIGNMARK,x.MALIGNMARK],[Q.MARQUEE,x.MARQUEE],[Q.MATH,x.MATH],[Q.MENU,x.MENU],[Q.META,x.META],[Q.MGLYPH,x.MGLYPH],[Q.MI,x.MI],[Q.MO,x.MO],[Q.MN,x.MN],[Q.MS,x.MS],[Q.MTEXT,x.MTEXT],[Q.NAV,x.NAV],[Q.NOBR,x.NOBR],[Q.NOFRAMES,x.NOFRAMES],[Q.NOEMBED,x.NOEMBED],[Q.NOSCRIPT,x.NOSCRIPT],[Q.OBJECT,x.OBJECT],[Q.OL,x.OL],[Q.OPTGROUP,x.OPTGROUP],[Q.OPTION,x.OPTION],[Q.P,x.P],[Q.PARAM,x.PARAM],[Q.PLAINTEXT,x.PLAINTEXT],[Q.PRE,x.PRE],[Q.RB,x.RB],[Q.RP,x.RP],[Q.RT,x.RT],[Q.RTC,x.RTC],[Q.RUBY,x.RUBY],[Q.S,x.S],[Q.SCRIPT,x.SCRIPT],[Q.SEARCH,x.SEARCH],[Q.SECTION,x.SECTION],[Q.SELECT,x.SELECT],[Q.SOURCE,x.SOURCE],[Q.SMALL,x.SMALL],[Q.SPAN,x.SPAN],[Q.STRIKE,x.STRIKE],[Q.STRONG,x.STRONG],[Q.STYLE,x.STYLE],[Q.SUB,x.SUB],[Q.SUMMARY,x.SUMMARY],[Q.SUP,x.SUP],[Q.TABLE,x.TABLE],[Q.TBODY,x.TBODY],[Q.TEMPLATE,x.TEMPLATE],[Q.TEXTAREA,x.TEXTAREA],[Q.TFOOT,x.TFOOT],[Q.TD,x.TD],[Q.TH,x.TH],[Q.THEAD,x.THEAD],[Q.TITLE,x.TITLE],[Q.TR,x.TR],[Q.TRACK,x.TRACK],[Q.TT,x.TT],[Q.U,x.U],[Q.UL,x.UL],[Q.SVG,x.SVG],[Q.VAR,x.VAR],[Q.WBR,x.WBR],[Q.XMP,x.XMP]]);function _o(e){var t;return(t=l8.get(e))!==null&&t!==void 0?t:x.UNKNOWN}const me=x,u8={[de.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]),[de.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[de.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[de.XLINK]:new Set,[de.XML]:new Set,[de.XMLNS]:new Set},T0=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);Q.STYLE,Q.SCRIPT,Q.XMP,Q.IFRAME,Q.NOEMBED,Q.NOFRAMES,Q.PLAINTEXT;var j;(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"})(j||(j={}));const Lt={DATA:j.DATA,RCDATA:j.RCDATA,RAWTEXT:j.RAWTEXT,SCRIPT_DATA:j.SCRIPT_DATA,PLAINTEXT:j.PLAINTEXT,CDATA_SECTION:j.CDATA_SECTION};function c8(e){return e>=I.DIGIT_0&&e<=I.DIGIT_9}function Ol(e){return e>=I.LATIN_CAPITAL_A&&e<=I.LATIN_CAPITAL_Z}function f8(e){return e>=I.LATIN_SMALL_A&&e<=I.LATIN_SMALL_Z}function qa(e){return f8(e)||Ol(e)}function cT(e){return qa(e)||c8(e)}function Gc(e){return e+32}function AC(e){return e===I.SPACE||e===I.LINE_FEED||e===I.TABULATION||e===I.FORM_FEED}function fT(e){return AC(e)||e===I.SOLIDUS||e===I.GREATER_THAN_SIGN}function d8(e){return e===I.NULL?ae.nullCharacterReference:e>1114111?ae.characterReferenceOutsideUnicodeRange:xC(e)?ae.surrogateCharacterReference:vC(e)?ae.noncharacterCharacterReference:TC(e)||e===I.CARRIAGE_RETURN?ae.controlCharacterReference:null}class h8{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=j.DATA,this.returnState=j.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new ZM(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new s8(JM,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ae.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ae.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=d8(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,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?.())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r?.()}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:Fe.START_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Fe.END_TAG,tagName:"",tagID:x.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Fe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Fe.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 r=this.currentToken;if(SC(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ae.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=_o(t.tagName),t.type===Fe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ae.endTagWithAttributes),t.selfClosing&&this._err(ae.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 Fe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Fe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Fe.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:Fe.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=AC(t)?Fe.WHITESPACE_CHARACTER:t===I.NULL?Fe.NULL_CHARACTER:Fe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Fe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=j.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ua.Attribute:ua.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===j.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===j.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case j.DATA:{this._stateData(t);break}case j.RCDATA:{this._stateRcdata(t);break}case j.RAWTEXT:{this._stateRawtext(t);break}case j.SCRIPT_DATA:{this._stateScriptData(t);break}case j.PLAINTEXT:{this._statePlaintext(t);break}case j.TAG_OPEN:{this._stateTagOpen(t);break}case j.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case j.TAG_NAME:{this._stateTagName(t);break}case j.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case j.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case j.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case j.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case j.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case j.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case j.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case j.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case j.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case j.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case j.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case j.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case j.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case j.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case j.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case j.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case j.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case j.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case j.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case j.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case j.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case j.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case j.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case j.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case j.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case j.BOGUS_COMMENT:{this._stateBogusComment(t);break}case j.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case j.COMMENT_START:{this._stateCommentStart(t);break}case j.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case j.COMMENT:{this._stateComment(t);break}case j.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case j.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case j.COMMENT_END:{this._stateCommentEnd(t);break}case j.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case j.DOCTYPE:{this._stateDoctype(t);break}case j.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case j.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case j.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case j.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case j.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case j.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case j.CDATA_SECTION:{this._stateCdataSection(t);break}case j.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case j.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case j.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case j.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.TAG_OPEN;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitCodePoint(t);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case I.AMPERSAND:{this._startCharacterReference();break}case I.LESS_THAN_SIGN:{this.state=j.RCDATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.RAWTEXT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(qa(t))this._createStartTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.EXCLAMATION_MARK:{this.state=j.MARKUP_DECLARATION_OPEN;break}case I.SOLIDUS:{this.state=j.END_TAG_OPEN;break}case I.QUESTION_MARK:{this._err(ae.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t);break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=j.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(qa(t))this._createEndTagToken(),this.state=j.TAG_NAME,this._stateTagName(t);else switch(t){case I.GREATER_THAN_SIGN:{this._err(ae.missingEndTagName),this.state=j.DATA;break}case I.EOF:{this._err(ae.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ae.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.tagName+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateRcdataLessThanSign(t){t===I.SOLIDUS?this.state=j.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){qa(t)?(this.state=j.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=j.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=j.BEFORE_ATTRIBUTE_NAME,!1;case I.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=j.SELF_CLOSING_START_TAG,!1;case I.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=j.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===I.SOLIDUS?this.state=j.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){qa(t)?(this.state=j.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case I.SOLIDUS:{this.state=j.SCRIPT_DATA_END_TAG_OPEN;break}case I.EXCLAMATION_MARK:{this.state=j.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=j.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){qa(t)?(this.state=j.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===I.HYPHEN_MINUS?(this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=j.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===I.SOLIDUS?this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:qa(t)?(this._emitChars("<"),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){qa(t)?(this.state=j.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&fT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case I.HYPHEN_MINUS:{this._emitChars("-");break}case I.LESS_THAN_SIGN:{this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case I.GREATER_THAN_SIGN:{this.state=j.SCRIPT_DATA,this._emitChars(">");break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case I.EOF:{this._err(ae.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===I.SOLIDUS?(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(kn.SCRIPT,!1)&&fT(this.preprocessor.peek(kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<kn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=j.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=j.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._err(ae.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=j.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:case I.SOLIDUS:case I.GREATER_THAN_SIGN:case I.EOF:{this._leaveAttrName(),this.state=j.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case I.EQUALS_SIGN:{this._leaveAttrName(),this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:{this._err(ae.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateAfterAttributeName(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.SOLIDUS:{this.state=j.SELF_CLOSING_START_TAG;break}case I.EQUALS_SIGN:{this.state=j.BEFORE_ATTRIBUTE_VALUE;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=j.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{this.state=j.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this.state=j.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingAttributeValue),this.state=j.DATA,this.emitCurrentTagToken();break}default:this.state=j.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case I.APOSTROPHE:{this.state=j.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.AMPERSAND:{this._startCharacterReference();break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case I.QUOTATION_MARK:case I.APOSTROPHE:case I.LESS_THAN_SIGN:case I.EQUALS_SIGN:case I.GRAVE_ACCENT:{this._err(ae.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this._leaveAttrValue(),this.state=j.BEFORE_ATTRIBUTE_NAME;break}case I.SOLIDUS:{this._leaveAttrValue(),this.state=j.SELF_CLOSING_START_TAG;break}case I.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBetweenAttributes),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case I.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=j.DATA,this.emitCurrentTagToken();break}case I.EOF:{this._err(ae.eofInTag),this._emitEOFToken();break}default:this._err(ae.unexpectedSolidusInTag),this.state=j.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(kn.DASH_DASH,!0)?(this._createCommentToken(kn.DASH_DASH.length+1),this.state=j.COMMENT_START):this._consumeSequenceIfMatch(kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(kn.DOCTYPE.length+1),this.state=j.DOCTYPE):this._consumeSequenceIfMatch(kn.CDATA_START,!0)?this.inForeignNode?this.state=j.CDATA_SECTION:(this._err(ae.cdataInHtmlContent),this._createCommentToken(kn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=j.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ae.incorrectlyOpenedComment),this._createCommentToken(2),this.state=j.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_START_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptClosingOfEmptyComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END_DASH;break}case I.LESS_THAN_SIGN:{n.data+="<",this.state=j.COMMENT_LESS_THAN_SIGN;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.data+=vt;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case I.EXCLAMATION_MARK:{n.data+="!",this.state=j.COMMENT_LESS_THAN_SIGN_BANG;break}case I.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=j.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=j.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===I.HYPHEN_MINUS?this.state=j.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=j.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==I.GREATER_THAN_SIGN&&t!==I.EOF&&this._err(ae.nestedComment),this.state=j.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{this.state=j.COMMENT_END;break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentComment(n);break}case I.EXCLAMATION_MARK:{this.state=j.COMMENT_END_BANG;break}case I.HYPHEN_MINUS:{n.data+="-";break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=j.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case I.HYPHEN_MINUS:{n.data+="--!",this.state=j.COMMENT_END_DASH;break}case I.GREATER_THAN_SIGN:{this._err(ae.incorrectlyClosedComment),this.state=j.DATA,this.emitCurrentComment(n);break}case I.EOF:{this._err(ae.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=j.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case I.EOF:{this._err(ae.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingWhitespaceBeforeDoctypeName),this.state=j.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ol(t))this._createDoctypeToken(String.fromCharCode(Gc(t))),this.state=j.DOCTYPE_NAME;else switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.NULL:{this._err(ae.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=j.DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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=j.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.AFTER_DOCTYPE_NAME;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.name+=vt;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ol(t)?Gc(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(kn.PUBLIC,!1)?this.state=j.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(kn.SYSTEM,!1)?this.state=j.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ae.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.publicId="",this.state=j.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.publicId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case I.GREATER_THAN_SIGN:{this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:{this.state=j.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.QUOTATION_MARK:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{this._err(ae.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.QUOTATION_MARK:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case I.APOSTROPHE:{n.systemId="",this.state=j.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case I.GREATER_THAN_SIGN:{this._err(ae.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.DATA,this.emitCurrentDoctype(n);break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case I.QUOTATION_MARK:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.APOSTROPHE:{this.state=j.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case I.NULL:{this._err(ae.unexpectedNullCharacter),n.systemId+=vt;break}case I.GREATER_THAN_SIGN:{this._err(ae.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.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 I.SPACE:case I.LINE_FEED:case I.TABULATION:case I.FORM_FEED:break;case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.EOF:{this._err(ae.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ae.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=j.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case I.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=j.DATA;break}case I.NULL:{this._err(ae.unexpectedNullCharacter);break}case I.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case I.RIGHT_SQUARE_BRACKET:{this.state=j.CDATA_SECTION_BRACKET;break}case I.EOF:{this._err(ae.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===I.RIGHT_SQUARE_BRACKET?this.state=j.CDATA_SECTION_END:(this._emitChars("]"),this.state=j.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case I.GREATER_THAN_SIGN:{this.state=j.DATA;break}case I.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=j.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(I.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&cT(this.preprocessor.peek(1))?j.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){cT(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===I.SEMICOLON&&this._err(ae.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const CC=new Set([x.DD,x.DT,x.LI,x.OPTGROUP,x.OPTION,x.P,x.RB,x.RP,x.RT,x.RTC]),dT=new Set([...CC,x.CAPTION,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]),kf=new Set([x.APPLET,x.CAPTION,x.HTML,x.MARQUEE,x.OBJECT,x.TABLE,x.TD,x.TEMPLATE,x.TH]),m8=new Set([...kf,x.OL,x.UL]),p8=new Set([...kf,x.BUTTON]),hT=new Set([x.ANNOTATION_XML,x.MI,x.MN,x.MO,x.MS,x.MTEXT]),mT=new Set([x.DESC,x.FOREIGN_OBJECT,x.TITLE]),g8=new Set([x.TR,x.TEMPLATE,x.HTML]),b8=new Set([x.TBODY,x.TFOOT,x.THEAD,x.TEMPLATE,x.HTML]),E8=new Set([x.TABLE,x.TEMPLATE,x.HTML]),y8=new Set([x.TD,x.TH]);class _8{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=x.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===x.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===de.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 r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==de.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 r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(T0,de.HTML)}popUntilTableCellPopped(){this.popUntilPopped(y8,de.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(E8,de.HTML)}clearBackToTableBodyContext(){this.clearBackTo(b8,de.HTML)}clearBackToTableRowContext(){this.clearBackTo(g8,de.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]===x.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]===x.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case de.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case de.SVG:{if(mT.has(i))return!1;break}case de.MATHML:{if(hT.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,kf)}hasInListItemScope(t){return this.hasInDynamicScope(t,m8)}hasInButtonScope(t){return this.hasInDynamicScope(t,p8)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case de.HTML:{if(T0.has(n))return!0;if(kf.has(n))return!1;break}case de.SVG:{if(mT.has(n))return!1;break}case de.MATHML:{if(hT.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===de.HTML)switch(this.tagIDs[t]){case x.TBODY:case x.THEAD:case x.TFOOT:return!0;case x.TABLE:case x.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===de.HTML)switch(this.tagIDs[n]){case t:return!0;case x.OPTION:case x.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&CC.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&dT.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&dT.has(this.currentTagId);)this.pop()}}const xp=3;var Or;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Or||(Or={}));const pT={type:Or.Marker};class x8{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,o=this.treeAdapter.getTagName(t),l=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const f=this.entries[c];if(f.type===Or.Marker)break;const{element:h}=f;if(this.treeAdapter.getTagName(h)===o&&this.treeAdapter.getNamespaceURI(h)===l){const p=this.treeAdapter.getAttrList(h);p.length===i&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<xp)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<xp)return;const i=new Map(n.map(l=>[l.name,l.value]));let o=0;for(let l=0;l<r.length;l++){const c=r[l];c.attrs.every(f=>i.get(f.name)===f.value)&&(o+=1,o>=xp&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(pT)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Or.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Or.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(pT);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Or.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Or.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Or.Element&&n.element===t)}}const Ya={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 r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(o=>o.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const o={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ya.appendChild(e,o)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ya.isTextNode(n)){n.value+=t;return}}Ya.appendChild(e,Ya.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ya.isTextNode(r)?r.value+=t:Ya.insertBefore(e,Ya.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},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}}},wC="html",T8="about:legacy-compat",v8="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",kC=["+//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//"],S8=[...kC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],A8=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),NC=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],C8=[...NC,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function gT(e,t){return t.some(n=>e.startsWith(n))}function w8(e){return e.name===wC&&e.publicId===null&&(e.systemId===null||e.systemId===T8)}function k8(e){if(e.name!==wC)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===v8)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),A8.has(n))return nr.QUIRKS;let r=t===null?S8:kC;if(gT(n,r))return nr.QUIRKS;if(r=t===null?NC:C8,gT(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const bT={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},N8="definitionurl",R8="definitionURL",O8=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])),L8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:de.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:de.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:de.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:de.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:de.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:de.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:de.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:de.XML}],["xml:space",{prefix:"xml",name:"space",namespace:de.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:de.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:de.XMLNS}]]),I8=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])),D8=new Set([x.B,x.BIG,x.BLOCKQUOTE,x.BODY,x.BR,x.CENTER,x.CODE,x.DD,x.DIV,x.DL,x.DT,x.EM,x.EMBED,x.H1,x.H2,x.H3,x.H4,x.H5,x.H6,x.HEAD,x.HR,x.I,x.IMG,x.LI,x.LISTING,x.MENU,x.META,x.NOBR,x.OL,x.P,x.PRE,x.RUBY,x.S,x.SMALL,x.SPAN,x.STRONG,x.STRIKE,x.SUB,x.SUP,x.TABLE,x.TT,x.U,x.UL,x.VAR]);function M8(e){const t=e.tagID;return t===x.FONT&&e.attrs.some(({name:r})=>r===$i.COLOR||r===$i.SIZE||r===$i.FACE)||D8.has(t)}function RC(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===N8){e.attrs[t].name=R8;break}}function OC(e){for(let t=0;t<e.attrs.length;t++){const n=O8.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Wg(e){for(let t=0;t<e.attrs.length;t++){const n=L8.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 P8(e){const t=I8.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=_o(e.tagName))}function B8(e,t){return t===de.MATHML&&(e===x.MI||e===x.MO||e===x.MN||e===x.MS||e===x.MTEXT)}function j8(e,t,n){if(t===de.MATHML&&e===x.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===$i.ENCODING){const i=n[r].value.toLowerCase();return i===bT.TEXT_HTML||i===bT.APPLICATION_XML}}return t===de.SVG&&(e===x.FOREIGN_OBJECT||e===x.DESC||e===x.TITLE)}function U8(e,t,n,r){return(!r||r===de.HTML)&&j8(e,t,n)||(!r||r===de.MATHML)&&B8(e,t)}const H8="hidden",z8=8,F8=3;var H;(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"})(H||(H={}));const $8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},LC=new Set([x.TABLE,x.TBODY,x.TFOOT,x.THEAD,x.TR]),ET={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ya,onParseError:null};class yT{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=H.INITIAL,this.originalInsertionMode=H.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={...ET,...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 h8(this.options,this),this.activeFormattingElements=new x8(this.treeAdapter),this.fragmentContextID=r?_o(this.treeAdapter.getTagName(r)):x.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new _8(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...ET,...n};t??(t=r.treeAdapter.createElement(Q.TEMPLATE,de.HTML,[]));const i=r.treeAdapter.createElement("documentmock",de.HTML,[]),o=new this(r,i,t);return o.fragmentContextID===x.TEMPLATE&&o.tmplInsertionModeStack.unshift(H.IN_TEMPLATE),o._initTokenizerForFragmentParsing(),o._insertFakeRootElement(),o._resetInsertionMode(),o._findFormInFragmentContext(),o}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const o=(i=t.location)!==null&&i!==void 0?i:$8,l={code:n,startLine:o.startLine,startCol:o.startCol,startOffset:o.startOffset,endLine:r?o.startLine:o.endLine,endCol:r?o.startCol:o.endCol,endOffset:r?o.startOffset:o.endOffset};this.onParseError(l)}onItemPush(t,n,r){var i,o;(o=(i=this.treeAdapter).onItemPush)===null||o===void 0||o.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let o,l;this.openElements.stackTop===0&&this.fragmentContext?(o=this.fragmentContext,l=this.fragmentContextID):{current:o,currentTagId:l}=this.openElements,this._setContextModes(o,l)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===de.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,de.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=H.TEXT}switchToPlaintextParsing(){this.insertionMode=H.TEXT,this.originalInsertionMode=H.IN_BODY,this.tokenizer.state=Lt.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)===Q.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==de.HTML))switch(this.fragmentContextID){case x.TITLE:case x.TEXTAREA:{this.tokenizer.state=Lt.RCDATA;break}case x.STYLE:case x.XMP:case x.IFRAME:case x.NOEMBED:case x.NOFRAMES:case x.NOSCRIPT:{this.tokenizer.state=Lt.RAWTEXT;break}case x.SCRIPT:{this.tokenizer.state=Lt.SCRIPT_DATA;break}case x.PLAINTEXT:{this.tokenizer.state=Lt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const l=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));l&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,de.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,de.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(Q.HTML,de.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,x.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),o=r?i.lastIndexOf(r):i.length,l=i[o-1];if(this.treeAdapter.getNodeSourceCodeLocation(l)){const{endLine:f,endCol:h,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(l,{endLine:f,endCol:h,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(l,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),o=n.type===Fe.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,o)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===x.SVG&&this.treeAdapter.getTagName(n)===Q.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===de.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===x.MGLYPH||t.tagID===x.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,de.HTML)}_processToken(t){switch(t.type){case Fe.CHARACTER:{this.onCharacter(t);break}case Fe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Fe.COMMENT:{this.onComment(t);break}case Fe.DOCTYPE:{this.onDoctype(t);break}case Fe.START_TAG:{this._processStartTag(t);break}case Fe.END_TAG:{this.onEndTag(t);break}case Fe.EOF:{this.onEof(t);break}case Fe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),o=this.treeAdapter.getAttrList(n);return U8(t,i,o,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Or.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const o=this.activeFormattingElements.entries[i];this._insertElement(o.token,this.treeAdapter.getNamespaceURI(o.element)),o.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=H.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(x.P),this.openElements.popUntilTagNamePopped(x.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case x.TR:{this.insertionMode=H.IN_ROW;return}case x.TBODY:case x.THEAD:case x.TFOOT:{this.insertionMode=H.IN_TABLE_BODY;return}case x.CAPTION:{this.insertionMode=H.IN_CAPTION;return}case x.COLGROUP:{this.insertionMode=H.IN_COLUMN_GROUP;return}case x.TABLE:{this.insertionMode=H.IN_TABLE;return}case x.BODY:{this.insertionMode=H.IN_BODY;return}case x.FRAMESET:{this.insertionMode=H.IN_FRAMESET;return}case x.SELECT:{this._resetInsertionModeForSelect(t);return}case x.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case x.HTML:{this.insertionMode=this.headElement?H.AFTER_HEAD:H.BEFORE_HEAD;return}case x.TD:case x.TH:{if(t>0){this.insertionMode=H.IN_CELL;return}break}case x.HEAD:{if(t>0){this.insertionMode=H.IN_HEAD;return}break}}this.insertionMode=H.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===x.TEMPLATE)break;if(r===x.TABLE){this.insertionMode=H.IN_SELECT_IN_TABLE;return}}this.insertionMode=H.IN_SELECT}_isElementCausesFosterParenting(t){return LC.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 x.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===de.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case x.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,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 r=this.treeAdapter.getNamespaceURI(t);return u8[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){y9(this,t);return}switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:{DC(this,t);break}case H.TEXT:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Tp(this,t);break}case H.IN_TABLE_TEXT:{HC(this,t);break}case H.IN_COLUMN_GROUP:{Nf(this,t);break}case H.AFTER_BODY:{Rf(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){E9(this,t);return}switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.TEXT:{this._insertCharacters(t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Tp(this,t);break}case H.IN_COLUMN_GROUP:{Nf(this,t);break}case H.AFTER_BODY:{Rf(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){v0(this,t);return}switch(this.insertionMode){case H.INITIAL:case H.BEFORE_HTML:case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_TEMPLATE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{v0(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.AFTER_BODY:{W8(this,t);break}case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{K8(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case H.INITIAL:{Z8(this,t);break}case H.BEFORE_HEAD:case H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:{this._err(t,ae.misplacedDoctype);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ae.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?_9(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{J8(this,t);break}case H.BEFORE_HEAD:{tP(this,t);break}case H.IN_HEAD:{yr(this,t);break}case H.IN_HEAD_NO_SCRIPT:{aP(this,t);break}case H.AFTER_HEAD:{sP(this,t);break}case H.IN_BODY:{un(this,t);break}case H.IN_TABLE:{ho(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_CAPTION:{n9(this,t);break}case H.IN_COLUMN_GROUP:{Jg(this,t);break}case H.IN_TABLE_BODY:{gd(this,t);break}case H.IN_ROW:{bd(this,t);break}case H.IN_CELL:{i9(this,t);break}case H.IN_SELECT:{$C(this,t);break}case H.IN_SELECT_IN_TABLE:{o9(this,t);break}case H.IN_TEMPLATE:{u9(this,t);break}case H.AFTER_BODY:{f9(this,t);break}case H.IN_FRAMESET:{d9(this,t);break}case H.AFTER_FRAMESET:{m9(this,t);break}case H.AFTER_AFTER_BODY:{g9(this,t);break}case H.AFTER_AFTER_FRAMESET:{b9(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?x9(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{eP(this,t);break}case H.BEFORE_HEAD:{nP(this,t);break}case H.IN_HEAD:{rP(this,t);break}case H.IN_HEAD_NO_SCRIPT:{iP(this,t);break}case H.AFTER_HEAD:{oP(this,t);break}case H.IN_BODY:{pd(this,t);break}case H.TEXT:{qP(this,t);break}case H.IN_TABLE:{Xl(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_CAPTION:{r9(this,t);break}case H.IN_COLUMN_GROUP:{a9(this,t);break}case H.IN_TABLE_BODY:{S0(this,t);break}case H.IN_ROW:{FC(this,t);break}case H.IN_CELL:{s9(this,t);break}case H.IN_SELECT:{VC(this,t);break}case H.IN_SELECT_IN_TABLE:{l9(this,t);break}case H.IN_TEMPLATE:{c9(this,t);break}case H.AFTER_BODY:{qC(this,t);break}case H.IN_FRAMESET:{h9(this,t);break}case H.AFTER_FRAMESET:{p9(this,t);break}case H.AFTER_AFTER_BODY:{df(this,t);break}}}onEof(t){switch(this.insertionMode){case H.INITIAL:{xl(this,t);break}case H.BEFORE_HTML:{Pl(this,t);break}case H.BEFORE_HEAD:{Bl(this,t);break}case H.IN_HEAD:{jl(this,t);break}case H.IN_HEAD_NO_SCRIPT:{Ul(this,t);break}case H.AFTER_HEAD:{Hl(this,t);break}case H.IN_BODY:case H.IN_TABLE:case H.IN_CAPTION:case H.IN_COLUMN_GROUP:case H.IN_TABLE_BODY:case H.IN_ROW:case H.IN_CELL:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:{jC(this,t);break}case H.TEXT:{YP(this,t);break}case H.IN_TABLE_TEXT:{Tl(this,t);break}case H.IN_TEMPLATE:{GC(this,t);break}case H.AFTER_BODY:case H.IN_FRAMESET:case H.AFTER_FRAMESET:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{Zg(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===I.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 H.IN_HEAD:case H.IN_HEAD_NO_SCRIPT:case H.AFTER_HEAD:case H.TEXT:case H.IN_COLUMN_GROUP:case H.IN_SELECT:case H.IN_SELECT_IN_TABLE:case H.IN_FRAMESET:case H.AFTER_FRAMESET:{this._insertCharacters(t);break}case H.IN_BODY:case H.IN_CAPTION:case H.IN_CELL:case H.IN_TEMPLATE:case H.AFTER_BODY:case H.AFTER_AFTER_BODY:case H.AFTER_AFTER_FRAMESET:{IC(this,t);break}case H.IN_TABLE:case H.IN_TABLE_BODY:case H.IN_ROW:{Tp(this,t);break}case H.IN_TABLE_TEXT:{UC(this,t);break}}}}function V8(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):BC(e,t),n}function G8(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function q8(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let o=0,l=i;l!==n;o++,l=i){i=e.openElements.getCommonAncestor(l);const c=e.activeFormattingElements.getElementEntry(l),f=c&&o>=F8;!c||f?(f&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(l)):(l=Y8(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(l,r),r=l)}return r}function Y8(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function X8(e,t,n){const r=e.treeAdapter.getTagName(t),i=_o(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const o=e.treeAdapter.getNamespaceURI(t);i===x.TEMPLATE&&o===de.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function Q8(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,o=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,o),e.treeAdapter.appendChild(t,o),e.activeFormattingElements.insertElementAfterBookmark(o,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,o,i.tagID)}function Kg(e,t){for(let n=0;n<z8;n++){const r=V8(e,t);if(!r)break;const i=G8(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const o=q8(e,i,r.element),l=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(o),l&&X8(e,l,o),Q8(e,i,r)}}function v0(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function W8(e,t){e._appendCommentNode(t,e.openElements.items[0])}function K8(e,t){e._appendCommentNode(t,e.document)}function Zg(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const o=e.openElements.items[1],l=e.treeAdapter.getNodeSourceCodeLocation(o);l&&!l.endTag&&e._setEndLocation(o,t)}}}}function Z8(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:k8(t);w8(t)||e._err(t,ae.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=H.BEFORE_HTML}function xl(e,t){e._err(t,ae.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=H.BEFORE_HTML,e._processToken(t)}function J8(e,t){t.tagID===x.HTML?(e._insertElement(t,de.HTML),e.insertionMode=H.BEFORE_HEAD):Pl(e,t)}function eP(e,t){const n=t.tagID;(n===x.HTML||n===x.HEAD||n===x.BODY||n===x.BR)&&Pl(e,t)}function Pl(e,t){e._insertFakeRootElement(),e.insertionMode=H.BEFORE_HEAD,e._processToken(t)}function tP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.HEAD:{e._insertElement(t,de.HTML),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD;break}default:Bl(e,t)}}function nP(e,t){const n=t.tagID;n===x.HEAD||n===x.BODY||n===x.HTML||n===x.BR?Bl(e,t):e._err(t,ae.endTagWithoutMatchingOpenElement)}function Bl(e,t){e._insertFakeElement(Q.HEAD,x.HEAD),e.headElement=e.openElements.current,e.insertionMode=H.IN_HEAD,e._processToken(t)}function yr(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.TITLE:{e._switchToTextParsing(t,Lt.RCDATA);break}case x.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Lt.RAWTEXT):(e._insertElement(t,de.HTML),e.insertionMode=H.IN_HEAD_NO_SCRIPT);break}case x.NOFRAMES:case x.STYLE:{e._switchToTextParsing(t,Lt.RAWTEXT);break}case x.SCRIPT:{e._switchToTextParsing(t,Lt.SCRIPT_DATA);break}case x.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=H.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(H.IN_TEMPLATE);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:jl(e,t)}}function rP(e,t){switch(t.tagID){case x.HEAD:{e.openElements.pop(),e.insertionMode=H.AFTER_HEAD;break}case x.BODY:case x.BR:case x.HTML:{jl(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function rs(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==x.TEMPLATE&&e._err(t,ae.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ae.endTagWithoutMatchingOpenElement)}function jl(e,t){e.openElements.pop(),e.insertionMode=H.AFTER_HEAD,e._processToken(t)}function aP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BASEFONT:case x.BGSOUND:case x.HEAD:case x.LINK:case x.META:case x.NOFRAMES:case x.STYLE:{yr(e,t);break}case x.NOSCRIPT:{e._err(t,ae.nestedNoscriptInHead);break}default:Ul(e,t)}}function iP(e,t){switch(t.tagID){case x.NOSCRIPT:{e.openElements.pop(),e.insertionMode=H.IN_HEAD;break}case x.BR:{Ul(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Ul(e,t){const n=t.type===Fe.EOF?ae.openElementsLeftAfterEof:ae.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=H.IN_HEAD,e._processToken(t)}function sP(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.BODY:{e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=H.IN_BODY;break}case x.FRAMESET:{e._insertElement(t,de.HTML),e.insertionMode=H.IN_FRAMESET;break}case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{e._err(t,ae.abandonedHeadElementChild),e.openElements.push(e.headElement,x.HEAD),yr(e,t),e.openElements.remove(e.headElement);break}case x.HEAD:{e._err(t,ae.misplacedStartTagForHeadElement);break}default:Hl(e,t)}}function oP(e,t){switch(t.tagID){case x.BODY:case x.HTML:case x.BR:{Hl(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:e._err(t,ae.endTagWithoutMatchingOpenElement)}}function Hl(e,t){e._insertFakeElement(Q.BODY,x.BODY),e.insertionMode=H.IN_BODY,md(e,t)}function md(e,t){switch(t.type){case Fe.CHARACTER:{DC(e,t);break}case Fe.WHITESPACE_CHARACTER:{IC(e,t);break}case Fe.COMMENT:{v0(e,t);break}case Fe.START_TAG:{un(e,t);break}case Fe.END_TAG:{pd(e,t);break}case Fe.EOF:{jC(e,t);break}}}function IC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function DC(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function lP(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function uP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function cP(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_FRAMESET)}function fP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function dP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&T0.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,de.HTML)}function hP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function mP(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),n||(e.formElement=e.openElements.current))}function pP(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===x.LI&&i===x.LI||(n===x.DD||n===x.DT)&&(i===x.DD||i===x.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==x.ADDRESS&&i!==x.DIV&&i!==x.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML)}function gP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.tokenizer.state=Lt.PLAINTEXT}function bP(e,t){e.openElements.hasInScope(x.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1}function EP(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(Q.A);n&&(Kg(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function yP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function _P(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(x.NOBR)&&(Kg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,de.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function xP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function TP(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=H.IN_TABLE}function MC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function PC(e){const t=SC(e,$i.TYPE);return t!=null&&t.toLowerCase()===H8}function vP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,de.HTML),PC(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function SP(e,t){e._appendElement(t,de.HTML),t.ackSelfClosing=!0}function AP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._appendElement(t,de.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function CP(e,t){t.tagName=Q.IMG,t.tagID=x.IMG,MC(e,t)}function wP(e,t){e._insertElement(t,de.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Lt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=H.TEXT}function kP(e,t){e.openElements.hasInButtonScope(x.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function NP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Lt.RAWTEXT)}function _T(e,t){e._switchToTextParsing(t,Lt.RAWTEXT)}function RP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===H.IN_TABLE||e.insertionMode===H.IN_CAPTION||e.insertionMode===H.IN_TABLE_BODY||e.insertionMode===H.IN_ROW||e.insertionMode===H.IN_CELL?H.IN_SELECT_IN_TABLE:H.IN_SELECT}function OP(e,t){e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function LP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,de.HTML)}function IP(e,t){e.openElements.hasInScope(x.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(x.RTC),e._insertElement(t,de.HTML)}function DP(e,t){e._reconstructActiveFormattingElements(),RC(t),Wg(t),t.selfClosing?e._appendElement(t,de.MATHML):e._insertElement(t,de.MATHML),t.ackSelfClosing=!0}function MP(e,t){e._reconstructActiveFormattingElements(),OC(t),Wg(t),t.selfClosing?e._appendElement(t,de.SVG):e._insertElement(t,de.SVG),t.ackSelfClosing=!0}function xT(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,de.HTML)}function un(e,t){switch(t.tagID){case x.I:case x.S:case x.B:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.SMALL:case x.STRIKE:case x.STRONG:{yP(e,t);break}case x.A:{EP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{dP(e,t);break}case x.P:case x.DL:case x.OL:case x.UL:case x.DIV:case x.DIR:case x.NAV:case x.MAIN:case x.MENU:case x.ASIDE:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.DETAILS:case x.ADDRESS:case x.ARTICLE:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{fP(e,t);break}case x.LI:case x.DD:case x.DT:{pP(e,t);break}case x.BR:case x.IMG:case x.WBR:case x.AREA:case x.EMBED:case x.KEYGEN:{MC(e,t);break}case x.HR:{AP(e,t);break}case x.RB:case x.RTC:{LP(e,t);break}case x.RT:case x.RP:{IP(e,t);break}case x.PRE:case x.LISTING:{hP(e,t);break}case x.XMP:{kP(e,t);break}case x.SVG:{MP(e,t);break}case x.HTML:{lP(e,t);break}case x.BASE:case x.LINK:case x.META:case x.STYLE:case x.TITLE:case x.SCRIPT:case x.BGSOUND:case x.BASEFONT:case x.TEMPLATE:{yr(e,t);break}case x.BODY:{uP(e,t);break}case x.FORM:{mP(e,t);break}case x.NOBR:{_P(e,t);break}case x.MATH:{DP(e,t);break}case x.TABLE:{TP(e,t);break}case x.INPUT:{vP(e,t);break}case x.PARAM:case x.TRACK:case x.SOURCE:{SP(e,t);break}case x.IMAGE:{CP(e,t);break}case x.BUTTON:{bP(e,t);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{xP(e,t);break}case x.IFRAME:{NP(e,t);break}case x.SELECT:{RP(e,t);break}case x.OPTION:case x.OPTGROUP:{OP(e,t);break}case x.NOEMBED:case x.NOFRAMES:{_T(e,t);break}case x.FRAMESET:{cP(e,t);break}case x.TEXTAREA:{wP(e,t);break}case x.NOSCRIPT:{e.options.scriptingEnabled?_T(e,t):xT(e,t);break}case x.PLAINTEXT:{gP(e,t);break}case x.COL:case x.TH:case x.TD:case x.TR:case x.HEAD:case x.FRAME:case x.TBODY:case x.TFOOT:case x.THEAD:case x.CAPTION:case x.COLGROUP:break;default:xT(e,t)}}function PP(e,t){if(e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function BP(e,t){e.openElements.hasInScope(x.BODY)&&(e.insertionMode=H.AFTER_BODY,qC(e,t))}function jP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function UP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(x.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(x.FORM):n&&e.openElements.remove(n))}function HP(e){e.openElements.hasInButtonScope(x.P)||e._insertFakeElement(Q.P,x.P),e._closePElement()}function zP(e){e.openElements.hasInListItemScope(x.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(x.LI),e.openElements.popUntilTagNamePopped(x.LI))}function FP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function $P(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function VP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function GP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(Q.BR,x.BR),e.openElements.pop(),e.framesetOk=!1}function BC(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const o=e.openElements.items[i],l=e.openElements.tagIDs[i];if(r===l&&(r!==x.UNKNOWN||e.treeAdapter.getTagName(o)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(o,l))break}}function pd(e,t){switch(t.tagID){case x.A:case x.B:case x.I:case x.S:case x.U:case x.EM:case x.TT:case x.BIG:case x.CODE:case x.FONT:case x.NOBR:case x.SMALL:case x.STRIKE:case x.STRONG:{Kg(e,t);break}case x.P:{HP(e);break}case x.DL:case x.UL:case x.OL:case x.DIR:case x.DIV:case x.NAV:case x.PRE:case x.MAIN:case x.MENU:case x.ASIDE:case x.BUTTON:case x.CENTER:case x.FIGURE:case x.FOOTER:case x.HEADER:case x.HGROUP:case x.DIALOG:case x.ADDRESS:case x.ARTICLE:case x.DETAILS:case x.SEARCH:case x.SECTION:case x.SUMMARY:case x.LISTING:case x.FIELDSET:case x.BLOCKQUOTE:case x.FIGCAPTION:{jP(e,t);break}case x.LI:{zP(e);break}case x.DD:case x.DT:{FP(e,t);break}case x.H1:case x.H2:case x.H3:case x.H4:case x.H5:case x.H6:{$P(e);break}case x.BR:{GP(e);break}case x.BODY:{PP(e,t);break}case x.HTML:{BP(e,t);break}case x.FORM:{UP(e);break}case x.APPLET:case x.OBJECT:case x.MARQUEE:{VP(e,t);break}case x.TEMPLATE:{rs(e,t);break}default:BC(e,t)}}function jC(e,t){e.tmplInsertionModeStack.length>0?GC(e,t):Zg(e,t)}function qP(e,t){var n;t.tagID===x.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function YP(e,t){e._err(t,ae.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Tp(e,t){if(e.openElements.currentTagId!==void 0&&LC.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=H.IN_TABLE_TEXT,t.type){case Fe.CHARACTER:{HC(e,t);break}case Fe.WHITESPACE_CHARACTER:{UC(e,t);break}}else uu(e,t)}function XP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_CAPTION}function QP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_COLUMN_GROUP}function WP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.COLGROUP,x.COLGROUP),e.insertionMode=H.IN_COLUMN_GROUP,Jg(e,t)}function KP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_TABLE_BODY}function ZP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(Q.TBODY,x.TBODY),e.insertionMode=H.IN_TABLE_BODY,gd(e,t)}function JP(e,t){e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function e9(e,t){PC(t)?e._appendElement(t,de.HTML):uu(e,t),t.ackSelfClosing=!0}function t9(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,de.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ho(e,t){switch(t.tagID){case x.TD:case x.TH:case x.TR:{ZP(e,t);break}case x.STYLE:case x.SCRIPT:case x.TEMPLATE:{yr(e,t);break}case x.COL:{WP(e,t);break}case x.FORM:{t9(e,t);break}case x.TABLE:{JP(e,t);break}case x.TBODY:case x.TFOOT:case x.THEAD:{KP(e,t);break}case x.INPUT:{e9(e,t);break}case x.CAPTION:{XP(e,t);break}case x.COLGROUP:{QP(e,t);break}default:uu(e,t)}}function Xl(e,t){switch(t.tagID){case x.TABLE:{e.openElements.hasInTableScope(x.TABLE)&&(e.openElements.popUntilTagNamePopped(x.TABLE),e._resetInsertionMode());break}case x.TEMPLATE:{rs(e,t);break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:uu(e,t)}}function uu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,md(e,t),e.fosterParentingEnabled=n}function UC(e,t){e.pendingCharacterTokens.push(t)}function HC(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Tl(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)uu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const zC=new Set([x.CAPTION,x.COL,x.COLGROUP,x.TBODY,x.TD,x.TFOOT,x.TH,x.THEAD,x.TR]);function n9(e,t){const n=t.tagID;zC.has(n)?e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,ho(e,t)):un(e,t)}function r9(e,t){const n=t.tagID;switch(n){case x.CAPTION:case x.TABLE:{e.openElements.hasInTableScope(x.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(x.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_TABLE,n===x.TABLE&&Xl(e,t));break}case x.BODY:case x.COL:case x.COLGROUP:case x.HTML:case x.TBODY:case x.TD:case x.TFOOT:case x.TH:case x.THEAD:case x.TR:break;default:pd(e,t)}}function Jg(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.COL:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.TEMPLATE:{yr(e,t);break}default:Nf(e,t)}}function a9(e,t){switch(t.tagID){case x.COLGROUP:{e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TEMPLATE:{rs(e,t);break}case x.COL:break;default:Nf(e,t)}}function Nf(e,t){e.openElements.currentTagId===x.COLGROUP&&(e.openElements.pop(),e.insertionMode=H.IN_TABLE,e._processToken(t))}function gd(e,t){switch(t.tagID){case x.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_ROW;break}case x.TH:case x.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(Q.TR,x.TR),e.insertionMode=H.IN_ROW,bd(e,t);break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,ho(e,t));break}default:ho(e,t)}}function S0(e,t){const n=t.tagID;switch(t.tagID){case x.TBODY:case x.TFOOT:case x.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE);break}case x.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE,Xl(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:case x.TR:break;default:Xl(e,t)}}function bd(e,t){switch(t.tagID){case x.TH:case x.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,de.HTML),e.insertionMode=H.IN_CELL,e.activeFormattingElements.insertMarker();break}case x.CAPTION:case x.COL:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,gd(e,t));break}default:ho(e,t)}}function FC(e,t){switch(t.tagID){case x.TR:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY);break}case x.TABLE:{e.openElements.hasInTableScope(x.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,S0(e,t));break}case x.TBODY:case x.TFOOT:case x.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(x.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=H.IN_TABLE_BODY,S0(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:case x.TD:case x.TH:break;default:Xl(e,t)}}function i9(e,t){const n=t.tagID;zC.has(n)?(e.openElements.hasInTableScope(x.TD)||e.openElements.hasInTableScope(x.TH))&&(e._closeTableCell(),bd(e,t)):un(e,t)}function s9(e,t){const n=t.tagID;switch(n){case x.TD:case x.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=H.IN_ROW);break}case x.TABLE:case x.TBODY:case x.TFOOT:case x.THEAD:case x.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),FC(e,t));break}case x.BODY:case x.CAPTION:case x.COL:case x.COLGROUP:case x.HTML:break;default:pd(e,t)}}function $C(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case x.OPTGROUP:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._insertElement(t,de.HTML);break}case x.HR:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop(),e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.INPUT:case x.KEYGEN:case x.TEXTAREA:case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),t.tagID!==x.SELECT&&e._processStartTag(t));break}case x.SCRIPT:case x.TEMPLATE:{yr(e,t);break}}}function VC(e,t){switch(t.tagID){case x.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===x.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===x.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===x.OPTGROUP&&e.openElements.pop();break}case x.OPTION:{e.openElements.currentTagId===x.OPTION&&e.openElements.pop();break}case x.SELECT:{e.openElements.hasInSelectScope(x.SELECT)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode());break}case x.TEMPLATE:{rs(e,t);break}}}function o9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$C(e,t)}function l9(e,t){const n=t.tagID;n===x.CAPTION||n===x.TABLE||n===x.TBODY||n===x.TFOOT||n===x.THEAD||n===x.TR||n===x.TD||n===x.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(x.SELECT),e._resetInsertionMode(),e.onEndTag(t)):VC(e,t)}function u9(e,t){switch(t.tagID){case x.BASE:case x.BASEFONT:case x.BGSOUND:case x.LINK:case x.META:case x.NOFRAMES:case x.SCRIPT:case x.STYLE:case x.TEMPLATE:case x.TITLE:{yr(e,t);break}case x.CAPTION:case x.COLGROUP:case x.TBODY:case x.TFOOT:case x.THEAD:{e.tmplInsertionModeStack[0]=H.IN_TABLE,e.insertionMode=H.IN_TABLE,ho(e,t);break}case x.COL:{e.tmplInsertionModeStack[0]=H.IN_COLUMN_GROUP,e.insertionMode=H.IN_COLUMN_GROUP,Jg(e,t);break}case x.TR:{e.tmplInsertionModeStack[0]=H.IN_TABLE_BODY,e.insertionMode=H.IN_TABLE_BODY,gd(e,t);break}case x.TD:case x.TH:{e.tmplInsertionModeStack[0]=H.IN_ROW,e.insertionMode=H.IN_ROW,bd(e,t);break}default:e.tmplInsertionModeStack[0]=H.IN_BODY,e.insertionMode=H.IN_BODY,un(e,t)}}function c9(e,t){t.tagID===x.TEMPLATE&&rs(e,t)}function GC(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(x.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zg(e,t)}function f9(e,t){t.tagID===x.HTML?un(e,t):Rf(e,t)}function qC(e,t){var n;if(t.tagID===x.HTML){if(e.fragmentContext||(e.insertionMode=H.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===x.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Rf(e,t)}function Rf(e,t){e.insertionMode=H.IN_BODY,md(e,t)}function d9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.FRAMESET:{e._insertElement(t,de.HTML);break}case x.FRAME:{e._appendElement(t,de.HTML),t.ackSelfClosing=!0;break}case x.NOFRAMES:{yr(e,t);break}}}function h9(e,t){t.tagID===x.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==x.FRAMESET&&(e.insertionMode=H.AFTER_FRAMESET))}function m9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{yr(e,t);break}}}function p9(e,t){t.tagID===x.HTML&&(e.insertionMode=H.AFTER_AFTER_FRAMESET)}function g9(e,t){t.tagID===x.HTML?un(e,t):df(e,t)}function df(e,t){e.insertionMode=H.IN_BODY,md(e,t)}function b9(e,t){switch(t.tagID){case x.HTML:{un(e,t);break}case x.NOFRAMES:{yr(e,t);break}}}function E9(e,t){t.chars=vt,e._insertCharacters(t)}function y9(e,t){e._insertCharacters(t),e.framesetOk=!1}function YC(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==de.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function _9(e,t){if(M8(t))YC(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===de.MATHML?RC(t):r===de.SVG&&(P8(t),OC(t)),Wg(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function x9(e,t){if(t.tagID===x.P||t.tagID===x.BR){YC(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===de.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}Q.AREA,Q.BASE,Q.BASEFONT,Q.BGSOUND,Q.BR,Q.COL,Q.EMBED,Q.FRAME,Q.HR,Q.IMG,Q.INPUT,Q.KEYGEN,Q.LINK,Q.META,Q.PARAM,Q.SOURCE,Q.TRACK,Q.WBR;const Ed=XC("end"),jr=XC("start");function XC(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function QC(e){const t=jr(e),n=Ed(e);if(t&&n)return{start:t,end:n}}const T9=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,v9=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),TT={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function WC(e,t){const n=I9(e),r=Xg("type",{handlers:{root:S9,element:A9,text:C9,comment:ZC,doctype:w9,raw:N9},unknown:R9}),i={parser:n?new yT(TT):yT.getFragmentParser(void 0,TT),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),xo(i,jr());const o=n?i.parser.document:i.parser.getFragment(),l=MM(o,{file:i.options.file});return i.stitches&&Mr(l,"comment",function(c,f,h){const p=c;if(p.value.stitch&&h&&f!==void 0){const m=h.children;return m[f]=p.value.stitch,f}}),l.type==="root"&&l.children.length===1&&l.children[0].type===e.type?l.children[0]:l}function KC(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function S9(e,t){KC(e.children,t)}function A9(e,t){O9(e,t),KC(e.children,t),L9(e,t)}function C9(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Fe.CHARACTER,chars:e.value,location:cu(e)};xo(t,jr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function w9(e,t){const n={type:Fe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:cu(e)};xo(t,jr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function k9(e,t){t.stitches=!0;const n=D9(e);if("children"in e&&"children"in n){const r=WC({type:"root",children:e.children},t.options);n.children=r.children}ZC({type:"comment",value:{stitch:n}},t)}function ZC(e,t){const n=e.value,r={type:Fe.COMMENT,data:n,location:cu(e)};xo(t,jr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function N9(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,JC(t,jr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(T9,"<$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 R9(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))k9(n,t);else{let r="";throw v9.has(n.type)&&(r=". 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"+r)}}function xo(e,t){JC(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=Lt.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 JC(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 O9(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Lt.PLAINTEXT)return;xo(t,jr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Ui.html;i===Ui.html&&n==="svg"&&(i=Ui.svg);const o=HM({...e,children:[]},{space:i===Ui.svg?"svg":"html"}),l={type:Fe.START_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in o?o.attrs:[],location:cu(e)};t.parser.currentToken=l,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function L9(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&_C.includes(n)||t.parser.tokenizer.state===Lt.PLAINTEXT)return;xo(t,Ed(e));const r={type:Fe.END_TAG,tagName:n,tagID:_o(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:cu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Lt.RCDATA||t.parser.tokenizer.state===Lt.RAWTEXT||t.parser.tokenizer.state===Lt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Lt.DATA)}function I9(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function cu(e){const t=jr(e)||{line:void 0,column:void 0,offset:void 0},n=Ed(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 D9(e){return"children"in e?Yi({...e,children:[]}):Yi(e)}function A0(e){return function(t,n){return WC(t,{...e,file:n})}}const Ri=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Pi={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Ri,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Ri],h2:[["className","sr-only"]],img:[...Ri,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Ri,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Ri],table:[...Ri],ul:[...Ri,["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"]},Wa={}.hasOwnProperty;function M9(e,t){let n={type:"root",children:[]};const r={schema:t?{...Pi,...t}:Pi,stack:[]},i=ew(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function ew(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return P9(e,n);case"doctype":return B9(e,n);case"element":return j9(e,n);case"root":return U9(e,n);case"text":return H9(e,n)}}}function P9(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),o={type:"comment",value:r<0?n:n.slice(0,r)};return fu(o,t),o}}function B9(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return fu(n,t),n}}function j9(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=tw(e,t.children),i=z9(e,t.properties);e.stack.pop();let o=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(o=!0,e.schema.ancestors&&Wa.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let f=-1;for(o=!1;++f<c.length;)e.stack.includes(c[f])&&(o=!0)}if(!o)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const l={type:"element",tagName:n,properties:i,children:r};return fu(l,t),l}function U9(e,t){const r={type:"root",children:tw(e,t.children)};return fu(r,t),r}function H9(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return fu(r,t),r}function tw(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const o=ew(e,r[i]);o&&(Array.isArray(o)?n.push(...o):n.push(o))}}return n}function z9(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,o=r&&Wa.call(r,n)?r[n]:void 0,l=r&&Wa.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},f={};let h;for(h in c)if(Wa.call(c,h)){const p=c[h];let m=vT(e,ST(o,h),h,p);m==null&&(m=vT(e,ST(l,h),h,p)),m!=null&&(f[h]=m)}if(i&&Wa.call(i,n)){const p=i[n];for(h in p)Wa.call(p,h)&&!Wa.call(f,h)&&(f[h]=p[h])}return f}function vT(e,t,n,r){return t?Array.isArray(r)?F9(e,t,n,r):nw(e,t,n,r):void 0}function F9(e,t,n,r){let i=-1;const o=[];for(;++i<r.length;){const l=nw(e,t,n,r[i]);(typeof l=="number"||typeof l=="string")&&o.push(l)}return o}function nw(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&$9(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,o=0;for(;++o<t.length;){const l=t[o];if(l&&typeof l=="object"&&"flags"in l){if(l.test(String(r))){i=!0;break}}else if(l===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function $9(e,t,n){const r=e.schema.protocols&&Wa.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),o=i.indexOf(":"),l=i.indexOf("?"),c=i.indexOf("#"),f=i.indexOf("/");if(o<0||f>-1&&o>f||l>-1&&o>l||c>-1&&o>c)return!0;let h=-1;for(;++h<r.length;){const p=r[h];if(o===p.length&&i.slice(0,p.length)===p)return!0}return!1}function fu(e,t){const n=QC(t);t.data&&(e.data=Yi(t.data)),n&&(e.position=n)}function ST(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],o=typeof i=="string"?i:i[0];if(o===t)return i;o==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function rw(e){return function(t){return M9(t,e)}}function Of(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}const pn=ui(/[A-Za-z]/),on=ui(/[\dA-Za-z]/),V9=ui(/[#-'*+\--9=?A-Z^-~]/);function Lf(e){return e!==null&&(e<32||e===127)}const C0=ui(/\d/),G9=ui(/[\dA-Fa-f]/),q9=ui(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const yd=ui(new RegExp("\\p{P}|\\p{S}","u")),Xi=ui(/\s/);function ui(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Y9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function X9(e,t,n){const i=fd((n||{}).ignore||[]),o=Q9(t);let l=-1;for(;++l<o.length;)Ug(e,"text",c);function c(h,p){let m=-1,y;for(;++m<p.length;){const E=p[m],T=y?y.children:void 0;if(i(E,T?T.indexOf(E):void 0,y))return;y=E}if(y)return f(h,p)}function f(h,p){const m=p[p.length-1],y=o[l][0],E=o[l][1];let T=0;const C=m.children.indexOf(h);let w=!1,k=[];y.lastIndex=0;let N=y.exec(h.value);for(;N;){const P=N.index,B={index:N.index,input:N.input,stack:[...p,h]};let D=E(...N,B);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?y.lastIndex=P+1:(T!==P&&k.push({type:"text",value:h.value.slice(T,P)}),Array.isArray(D)?k.push(...D):D&&k.push(D),T=P+N[0].length,w=!0),!y.global)break;N=y.exec(h.value)}return w?(T<h.value.length&&k.push({type:"text",value:h.value.slice(T)}),m.children.splice(C,1,...k)):k=[h],C+k.length}}function Q9(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 r=-1;for(;++r<n.length;){const i=n[r];t.push([W9(i[0]),K9(i[1])])}return t}function W9(e){return typeof e=="string"?new RegExp(Y9(e),"g"):e}function K9(e){return typeof e=="function"?e:function(){return e}}const vp="phrasing",Sp=["autolink","link","image","label"];function Z9(){return{transforms:[iB],enter:{literalAutolink:eB,literalAutolinkEmail:Ap,literalAutolinkHttp:Ap,literalAutolinkWww:Ap},exit:{literalAutolink:aB,literalAutolinkEmail:rB,literalAutolinkHttp:tB,literalAutolinkWww:nB}}}function J9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:vp,notInConstruct:Sp},{character:":",before:"[ps]",after:"\\/",inConstruct:vp,notInConstruct:Sp}]}}function eB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Ap(e){this.config.enter.autolinkProtocol.call(this,e)}function tB(e){this.config.exit.autolinkProtocol.call(this,e)}function nB(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 rB(e){this.config.exit.autolinkEmail.call(this,e)}function aB(e){this.exit(e)}function iB(e){X9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oB]],{ignore:["link","linkReference"]})}function sB(e,t,n,r,i){let o="";if(!aw(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!lB(n)))return!1;const l=uB(n+r);if(!l[0])return!1;const c={type:"link",title:null,url:o+t+l[0],children:[{type:"text",value:t+l[0]}]};return l[1]?[c,{type:"text",value:l[1]}]:c}function oB(e,t,n,r){return!aw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function lB(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 uB(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Of(e,"(");let o=Of(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function aw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||yd(n))&&(!t||n!==47)}function mr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}iw.peek=EB;function cB(){this.buffer()}function fB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dB(){this.buffer()}function hB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function mB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pB(e){this.exit(e)}function gB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=mr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function bB(e){this.exit(e)}function EB(){return"["}function iw(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const l=n.enter("footnoteReference"),c=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),c(),l(),o+=i.move("]"),o}function yB(){return{enter:{gfmFootnoteCallString:cB,gfmFootnoteCall:fB,gfmFootnoteDefinitionLabelString:dB,gfmFootnoteDefinition:hB},exit:{gfmFootnoteCallString:mB,gfmFootnoteCall:pB,gfmFootnoteDefinitionLabelString:gB,gfmFootnoteDefinition:bB}}}function _B(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:iw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,l){const c=o.createTracker(l);let f=c.move("[^");const h=o.enter("footnoteDefinition"),p=o.enter("label");return f+=c.move(o.safe(o.associationId(r),{before:f,after:"]"})),p(),f+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),f+=c.move((t?`
|
|
52
|
+
`:" ")+o.indentLines(o.containerFlow(r,c.current()),t?sw:xB))),h(),f}}function xB(e,t,n){return t===0?e:sw(e,t,n)}function sw(e,t,n){return(n?"":" ")+e}const TB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ow.peek=wB;function vB(){return{canContainEols:["delete"],enter:{strikethrough:AB},exit:{strikethrough:CB}}}function SB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:TB}],handlers:{delete:ow}}}function AB(e){this.enter({type:"delete",children:[]},e)}function CB(e){this.exit(e)}function ow(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let l=i.move("~~");return l+=n.containerPhrasing(e,{...i.current(),before:l,after:"~"}),l+=i.move("~~"),o(),l}function wB(){return"~"}function kB(e){return e.length}function NB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||kB,o=[],l=[],c=[],f=[];let h=0,p=-1;for(;++p<e.length;){const S=[],C=[];let w=-1;for(e[p].length>h&&(h=e[p].length);++w<e[p].length;){const k=RB(e[p][w]);if(n.alignDelimiters!==!1){const N=i(k);C[w]=N,(f[w]===void 0||N>f[w])&&(f[w]=N)}S.push(k)}l[p]=S,c[p]=C}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<h;)o[m]=AT(r[m]);else{const S=AT(r);for(;++m<h;)o[m]=S}m=-1;const y=[],E=[];for(;++m<h;){const S=o[m];let C="",w="";S===99?(C=":",w=":"):S===108?C=":":S===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,f[m]-C.length-w.length);const N=C+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=C.length+k+w.length,k>f[m]&&(f[m]=k),E[m]=k),y[m]=N}l.splice(1,0,y),c.splice(1,0,E),p=-1;const T=[];for(;++p<l.length;){const S=l[p],C=c[p];m=-1;const w=[];for(;++m<h;){const k=S[m]||"";let N="",P="";if(n.alignDelimiters!==!1){const B=f[m]-(C[m]||0),D=o[m];D===114?N=" ".repeat(B):D===99?B%2?(N=" ".repeat(B/2+.5),P=" ".repeat(B/2-.5)):(N=" ".repeat(B/2),P=N):P=" ".repeat(B)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(N),w.push(k),n.alignDelimiters!==!1&&w.push(P),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==h-1)&&w.push("|")}T.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return T.join(`
|
|
53
|
+
`)}function RB(e){return e==null?"":String(e)}function AT(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 OB(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const l=n.indentLines(n.containerFlow(e,o.current()),LB);return i(),l}function LB(e,t,n){return">"+(n?"":" ")+e}function IB(e,t){return CT(e,t.inConstruct,!0)&&!CT(e,t.notInConstruct,!1)}function CT(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function wT(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
54
|
+
`&&IB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
55
|
+
`}function DB(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,l=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>l&&(l=o):o=1,i=r+t.length,r=n.indexOf(t,i);return l}function MB(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 PB(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 BB(e,t,n,r){const i=PB(n),o=e.value||"",l=i==="`"?"GraveAccent":"Tilde";if(MB(e,n)){const m=n.enter("codeIndented"),y=n.indentLines(o,jB);return m(),y}const c=n.createTracker(r),f=i.repeat(Math.max(DB(o,i)+1,3)),h=n.enter("codeFenced");let p=c.move(f);if(e.lang){const m=n.enter(`codeFencedLang${l}`);p+=c.move(n.safe(e.lang,{before:p,after:" ",encode:["`"],...c.current()})),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${l}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,{before:p,after:`
|
|
56
|
+
`,encode:["`"],...c.current()})),m()}return p+=c.move(`
|
|
57
|
+
`),o&&(p+=c.move(o+`
|
|
58
|
+
`)),p+=c.move(f),h(),p}function jB(e,t,n){return(n?"":" ")+e}function e1(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 UB(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("definition");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("[");return h+=f.move(n.safe(n.associationId(e),{before:h,after:"]",...f.current()})),h+=f.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
59
|
+
`,...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=f.move(" "+i),h+=f.move(n.safe(e.title,{before:h,after:i,...f.current()})),h+=f.move(i),c()),l(),h}function HB(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 Ql(e){return"&#x"+e.toString(16).toUpperCase()+";"}function mo(e){if(e===null||Et(e)||Xi(e))return 1;if(yd(e))return 2}function If(e,t,n){const r=mo(e),i=mo(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}lw.peek=zB;function lw(e,t,n,r){const i=HB(n),o=n.enter("emphasis"),l=n.createTracker(r),c=l.move(i);let f=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=f.charCodeAt(0),p=If(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(f=Ql(h)+f.slice(1));const m=f.charCodeAt(f.length-1),y=If(r.after.charCodeAt(0),m,i);y.inside&&(f=f.slice(0,-1)+Ql(m));const E=l.move(i);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},c+f+E}function zB(e,t,n){return n.options.emphasis||"*"}const FB={};function t1(e,t){const n=FB,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return uw(e,r,i)}function uw(e,t,n){if($B(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 kT(e.children,t,n)}return Array.isArray(e)?kT(e,t,n):""}function kT(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=uw(e[i],t,n);return r.join("")}function $B(e){return!!(e&&typeof e=="object")}function VB(e,t){let n=!1;return Mr(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,b0}),!!((!e.depth||e.depth<3)&&t1(e)&&(t.options.setext||n))}function GB(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(VB(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),y=n.containerPhrasing(e,{...o.current(),before:`
|
|
60
|
+
`,after:`
|
|
61
|
+
`});return m(),p(),y+`
|
|
62
|
+
`+(i===1?"=":"-").repeat(y.length-(Math.max(y.lastIndexOf("\r"),y.lastIndexOf(`
|
|
63
|
+
`))+1))}const l="#".repeat(i),c=n.enter("headingAtx"),f=n.enter("phrasing");o.move(l+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
64
|
+
`,...o.current()});return/^[\t ]/.test(h)&&(h=Ql(h.charCodeAt(0))+h.slice(1)),h=h?l+" "+h:l,n.options.closeAtx&&(h+=" "+l),f(),c(),h}cw.peek=qB;function cw(e){return e.value||""}function qB(){return"<"}fw.peek=YB;function fw(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.enter("image");let c=n.enter("label");const f=n.createTracker(r);let h=f.move("![");return h+=f.move(n.safe(e.alt,{before:h,after:"]",...f.current()})),h+=f.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(n.safe(e.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=n.enter("destinationRaw"),h+=f.move(n.safe(e.url,{before:h,after:e.title?" ":")",...f.current()}))),c(),e.title&&(c=n.enter(`title${o}`),h+=f.move(" "+i),h+=f.move(n.safe(e.title,{before:h,after:i,...f.current()})),h+=f.move(i),c()),h+=f.move(")"),l(),h}function YB(){return"!"}dw.peek=XB;function dw(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("![");const h=n.safe(e.alt,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?f+=c.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function XB(){return"!"}hw.peek=QB;function hw(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const l=n.unsafe[o],c=n.compilePattern(l);let f;if(l.atBreak)for(;f=c.exec(r);){let h=f.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(f.index+1)}}return i+r+i}function QB(){return"`"}function mw(e,t){const n=t1(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))}pw.peek=WB;function pw(e,t,n,r){const i=e1(n),o=i==='"'?"Quote":"Apostrophe",l=n.createTracker(r);let c,f;if(mw(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=l.move("<");return m+=l.move(n.containerPhrasing(e,{before:m,after:">",...l.current()})),m+=l.move(">"),c(),n.stack=p,m}c=n.enter("link"),f=n.enter("label");let h=l.move("[");return h+=l.move(n.containerPhrasing(e,{before:h,after:"](",...l.current()})),h+=l.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),h+=l.move("<"),h+=l.move(n.safe(e.url,{before:h,after:">",...l.current()})),h+=l.move(">")):(f=n.enter("destinationRaw"),h+=l.move(n.safe(e.url,{before:h,after:e.title?" ":")",...l.current()}))),f(),e.title&&(f=n.enter(`title${o}`),h+=l.move(" "+i),h+=l.move(n.safe(e.title,{before:h,after:i,...l.current()})),h+=l.move(i),f()),h+=l.move(")"),c(),h}function WB(e,t,n){return mw(e,n)?"<":"["}gw.peek=KB;function gw(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let l=n.enter("label");const c=n.createTracker(r);let f=c.move("[");const h=n.containerPhrasing(e,{before:f,after:"]",...c.current()});f+=c.move(h+"]["),l();const p=n.stack;n.stack=[],l=n.enter("reference");const m=n.safe(n.associationId(e),{before:f,after:"]",...c.current()});return l(),n.stack=p,o(),i==="full"||!h||h!==m?f+=c.move(m+"]"):i==="shortcut"?f=f.slice(0,-1):f+=c.move("]"),f}function KB(){return"["}function n1(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 ZB(e){const t=n1(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 JB(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 bw(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 e7(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let l=e.ordered?JB(n):n1(n);const c=e.ordered?l==="."?")":".":ZB(n);let f=t&&n.bulletLastUsed?l===n.bulletLastUsed:!1;if(!e.ordered){const p=e.children?e.children[0]:void 0;if((l==="*"||l==="-")&&p&&(!p.children||!p.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(f=!0),bw(n)===l&&p){let m=-1;for(;++m<e.children.length;){const y=e.children[m];if(y&&y.type==="listItem"&&y.children&&y.children[0]&&y.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(l=c),n.bulletCurrent=l;const h=n.containerFlow(e,r);return n.bulletLastUsed=l,n.bulletCurrent=o,i(),h}function t7(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 n7(e,t,n,r){const i=t7(n);let o=n.bulletCurrent||n1(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let l=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(l=Math.ceil(l/4)*4);const c=n.createTracker(r);c.move(o+" ".repeat(l-o.length)),c.shift(l);const f=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),p);return f(),h;function p(m,y,E){return y?(E?"":" ".repeat(l))+m:(E?o:o+" ".repeat(l-o.length))+m}}function r7(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),l=n.containerPhrasing(e,r);return o(),i(),l}const a7=fd(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function i7(e,t,n,r){return(e.children.some(function(l){return a7(l)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function s7(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Ew.peek=o7;function Ew(e,t,n,r){const i=s7(n),o=n.enter("strong"),l=n.createTracker(r),c=l.move(i+i);let f=l.move(n.containerPhrasing(e,{after:i,before:c,...l.current()}));const h=f.charCodeAt(0),p=If(r.before.charCodeAt(r.before.length-1),h,i);p.inside&&(f=Ql(h)+f.slice(1));const m=f.charCodeAt(f.length-1),y=If(r.after.charCodeAt(0),m,i);y.inside&&(f=f.slice(0,-1)+Ql(m));const E=l.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:y.outside,before:p.outside},c+f+E}function o7(e,t,n){return n.options.strong||"*"}function l7(e,t,n,r){return n.safe(e.value,r)}function u7(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 c7(e,t,n){const r=(bw(n)+(n.options.ruleSpaces?" ":"")).repeat(u7(n));return n.options.ruleSpaces?r.slice(0,-1):r}const yw={blockquote:OB,break:wT,code:BB,definition:UB,emphasis:lw,hardBreak:wT,heading:GB,html:cw,image:fw,imageReference:dw,inlineCode:hw,link:pw,linkReference:gw,list:e7,listItem:n7,paragraph:r7,root:i7,strong:Ew,text:l7,thematicBreak:c7},NT=document.createElement("i");function r1(e){const t="&"+e+";";NT.innerHTML=t;const n=NT.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function _w(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 f7=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function d7(e){return e.replace(f7,h7)}function h7(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return _w(n.slice(o?2:1),o?16:10)}return r1(n)||e}function m7(){return{enter:{table:p7,tableData:RT,tableHeader:RT,tableRow:b7},exit:{codeText:E7,table:g7,tableData:Cp,tableHeader:Cp,tableRow:Cp}}}function p7(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 g7(e){this.exit(e),this.data.inTable=void 0}function b7(e){this.enter({type:"tableRow",children:[]},e)}function Cp(e){this.exit(e)}function RT(e){this.enter({type:"tableCell",children:[]},e)}function E7(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,y7));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function y7(e,t){return t==="|"?t:e}function _7(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
65
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:y,table:l,tableCell:f,tableRow:c}};function l(E,T,S,C){return h(p(E,S,C),E.align)}function c(E,T,S,C){const w=m(E,S,C),k=h([w]);return k.slice(0,k.indexOf(`
|
|
66
|
+
`))}function f(E,T,S,C){const w=S.enter("tableCell"),k=S.enter("phrasing"),N=S.containerPhrasing(E,{...C,before:o,after:o});return k(),w(),N}function h(E,T){return NB(E,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function p(E,T,S){const C=E.children;let w=-1;const k=[],N=T.enter("table");for(;++w<C.length;)k[w]=m(C[w],T,S);return N(),k}function m(E,T,S){const C=E.children;let w=-1;const k=[],N=T.enter("tableRow");for(;++w<C.length;)k[w]=f(C[w],E,T,S);return N(),k}function y(E,T,S){let C=yw.inlineCode(E,T,S);return S.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function x7(){return{exit:{taskListCheckValueChecked:OT,taskListCheckValueUnchecked:OT,paragraph:v7}}}function T7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:S7}}}function OT(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function v7(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 r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,l;for(;++o<i.length;){const c=i[o];if(c.type==="paragraph"){l=c;break}}l===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function S7(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",l="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);o&&c.move(l);let f=yw.listItem(e,t,n,{...r,...c.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),f;function h(p){return p+l}}function A7(){return[Z9(),yB(),vB(),m7(),x7()]}function C7(e){return{extensions:[J9(),_B(e),SB(),_7(e),T7()]}}function $n(e,t,n,r){const i=e.length;let o=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);o<r.length;)l=r.slice(o,o+1e4),l.unshift(t,0),e.splice(...l),o+=1e4,t+=1e4}function rr(e,t){return e.length>0?($n(e,e.length,0,t),e):t}const LT={}.hasOwnProperty;function xw(e){const t={};let n=-1;for(;++n<e.length;)w7(t,e[n]);return t}function w7(e,t){let n;for(n in t){const i=(LT.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let l;if(o)for(l in o){LT.call(i,l)||(i[l]=[]);const c=o[l];k7(i[l],Array.isArray(c)?c:c?[c]:[])}}}function k7(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);$n(e,0,0,r)}const N7={tokenize:M7,partial:!0},Tw={tokenize:P7,partial:!0},vw={tokenize:B7,partial:!0},Sw={tokenize:j7,partial:!0},R7={tokenize:U7,partial:!0},Aw={name:"wwwAutolink",tokenize:I7,previous:ww},Cw={name:"protocolAutolink",tokenize:D7,previous:kw},ga={name:"emailAutolink",tokenize:L7,previous:Nw},Ur={};function O7(){return{text:Ur}}let Oi=48;for(;Oi<123;)Ur[Oi]=ga,Oi++,Oi===58?Oi=65:Oi===91&&(Oi=97);Ur[43]=ga;Ur[45]=ga;Ur[46]=ga;Ur[95]=ga;Ur[72]=[ga,Cw];Ur[104]=[ga,Cw];Ur[87]=[ga,Aw];Ur[119]=[ga,Aw];function L7(e,t,n){const r=this;let i,o;return l;function l(m){return!w0(m)||!Nw.call(r,r.previous)||a1(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return w0(m)?(e.consume(m),c):m===64?(e.consume(m),f):n(m)}function f(m){return m===46?e.check(R7,p,h)(m):m===45||m===95||on(m)?(o=!0,e.consume(m),f):p(m)}function h(m){return e.consume(m),i=!0,f}function p(m){return o&&i&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function I7(e,t,n){const r=this;return i;function i(l){return l!==87&&l!==119||!ww.call(r,r.previous)||a1(r.events)?n(l):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(N7,e.attempt(Tw,e.attempt(vw,o),n),n)(l))}function o(l){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(l)}}function D7(e,t,n){const r=this;let i="",o=!1;return l;function l(m){return(m===72||m===104)&&kw.call(r,r.previous)&&!a1(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(pn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const y=i.toLowerCase();if(y==="http"||y==="https")return e.consume(m),f}return n(m)}function f(m){return m===47?(e.consume(m),o?h:(o=!0,f)):n(m)}function h(m){return m===null||Lf(m)||Et(m)||Xi(m)||yd(m)?n(m):e.attempt(Tw,e.attempt(vw,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function M7(e,t,n){let r=0;return i;function i(l){return(l===87||l===119)&&r<3?(r++,e.consume(l),i):l===46&&r===3?(e.consume(l),o):n(l)}function o(l){return l===null?n(l):t(l)}}function P7(e,t,n){let r,i,o;return l;function l(h){return h===46||h===95?e.check(Sw,f,c)(h):h===null||Et(h)||Xi(h)||h!==45&&yd(h)?f(h):(o=!0,e.consume(h),l)}function c(h){return h===95?r=!0:(i=r,r=void 0),e.consume(h),l}function f(h){return i||r||!o?n(h):t(h)}}function B7(e,t){let n=0,r=0;return i;function i(l){return l===40?(n++,e.consume(l),i):l===41&&r<n?o(l):l===33||l===34||l===38||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===60||l===63||l===93||l===95||l===126?e.check(Sw,t,o)(l):l===null||Et(l)||Xi(l)?t(l):(e.consume(l),i)}function o(l){return l===41&&r++,e.consume(l),i}}function j7(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),o):c===93?(e.consume(c),i):c===60||c===null||Et(c)||Xi(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Et(c)||Xi(c)?t(c):r(c)}function o(c){return pn(c)?l(c):n(c)}function l(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),l):n(c)}}function U7(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return on(o)?n(o):t(o)}}function ww(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function kw(e){return!pn(e)}function Nw(e){return!(e===47||w0(e))}function w0(e){return e===43||e===45||e===46||e===95||on(e)}function a1(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}function To(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let l="";if(o===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(l=String.fromCharCode(o));else if(o>55295&&o<57344){const c=e.charCodeAt(n+1);o<56320&&c>56319&&c<57344?(l=String.fromCharCode(o,c),i=1):l="�"}else l=String.fromCharCode(o);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _d(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const k0={name:"attention",resolveAll:H7,tokenize:z7};function H7(e,t){let n=-1,r,i,o,l,c,f,h,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;f=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m={...e[r][1].end},y={...e[n][1].start};IT(m,-f),IT(y,f),l={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[r][1].end}},c={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:y},o={type:f>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:f>1?"strong":"emphasis",start:{...l.start},end:{...c.end}},e[r][1].end={...l.start},e[n][1].start={...c.end},h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=rr(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=rr(h,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",o,t]]),h=rr(h,_d(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=rr(h,[["exit",o,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,h=rr(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,$n(e,r-1,n-r+3,h),n=r+h.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function z7(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=mo(r);let o;return l;function l(f){return o=f,e.enter("attentionSequence"),c(f)}function c(f){if(f===o)return e.consume(f),c;const h=e.exit("attentionSequence"),p=mo(f),m=!p||p===2&&i||n.includes(f),y=!i||i===2&&p||n.includes(r);return h._open=!!(o===42?m:m&&(i||!y)),h._close=!!(o===42?y:y&&(p||!m)),t(f)}}function IT(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const F7={name:"autolink",tokenize:$7};function $7(e,t,n){let r=0;return i;function i(E){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(E){return pn(E)?(e.consume(E),l):E===64?n(E):h(E)}function l(E){return E===43||E===45||E===46||on(E)?(r=1,c(E)):h(E)}function c(E){return E===58?(e.consume(E),r=0,f):(E===43||E===45||E===46||on(E))&&r++<32?(e.consume(E),c):(r=0,h(E))}function f(E){return E===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):E===null||E===32||E===60||Lf(E)?n(E):(e.consume(E),f)}function h(E){return E===64?(e.consume(E),p):V9(E)?(e.consume(E),h):n(E)}function p(E){return on(E)?m(E):n(E)}function m(E){return E===46?(e.consume(E),r=0,p):E===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(E),e.exit("autolinkMarker"),e.exit("autolink"),t):y(E)}function y(E){if((E===45||on(E))&&r++<63){const T=E===45?y:m;return e.consume(E),T}return n(E)}}function et(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return l;function l(f){return Ye(f)?(e.enter(n),c(f)):t(f)}function c(f){return Ye(f)&&o++<i?(e.consume(f),c):(e.exit(n),t(f))}}const du={partial:!0,tokenize:V7};function V7(e,t,n){return r;function r(o){return Ye(o)?et(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Re(o)?t(o):n(o)}}const Rw={continuation:{tokenize:q7},exit:Y7,name:"blockQuote",tokenize:G7};function G7(e,t,n){const r=this;return i;function i(l){if(l===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),o}return n(l)}function o(l){return Ye(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function q7(e,t,n){const r=this;return i;function i(l){return Ye(l)?et(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):o(l)}function o(l){return e.attempt(Rw,t,n)(l)}}function Y7(e){e.exit("blockQuote")}const Ow={name:"characterEscape",tokenize:X7};function X7(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return q9(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const Lw={name:"characterReference",tokenize:Q7};function Q7(e,t,n){const r=this;let i=0,o,l;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,l=on,p(m))}function h(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,l=G9,p):(e.enter("characterReferenceValue"),o=7,l=C0,p(m))}function p(m){if(m===59&&i){const y=e.exit("characterReferenceValue");return l===on&&!r1(r.sliceSerialize(y))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(m)&&i++<o?(e.consume(m),p):n(m)}}const DT={partial:!0,tokenize:K7},MT={concrete:!0,name:"codeFenced",tokenize:W7};function W7(e,t,n){const r=this,i={partial:!0,tokenize:B};let o=0,l=0,c;return f;function f(D){return h(D)}function h(D){const $=r.events[r.events.length-1];return o=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,c=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===c?(l++,e.consume(D),p):l<3?n(D):(e.exit("codeFencedFenceSequence"),Ye(D)?et(e,m,"whitespace")(D):m(D))}function m(D){return D===null||Re(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(DT,S,P)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),y(D))}function y(D){return D===null||Re(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(D)):Ye(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),et(e,E,"whitespace")(D)):D===96&&D===c?n(D):(e.consume(D),y)}function E(D){return D===null||Re(D)?m(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||Re(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(D)):D===96&&D===c?n(D):(e.consume(D),T)}function S(D){return e.attempt(i,P,C)(D)}function C(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),w}function w(D){return o>0&&Ye(D)?et(e,k,"linePrefix",o+1)(D):k(D)}function k(D){return D===null||Re(D)?e.check(DT,S,P)(D):(e.enter("codeFlowValue"),N(D))}function N(D){return D===null||Re(D)?(e.exit("codeFlowValue"),k(D)):(e.consume(D),N)}function P(D){return e.exit("codeFenced"),t(D)}function B(D,$,G){let ie=0;return V;function V(re){return D.enter("lineEnding"),D.consume(re),D.exit("lineEnding"),X}function X(re){return D.enter("codeFencedFence"),Ye(re)?et(D,J,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(re):J(re)}function J(re){return re===c?(D.enter("codeFencedFenceSequence"),he(re)):G(re)}function he(re){return re===c?(ie++,D.consume(re),he):ie>=l?(D.exit("codeFencedFenceSequence"),Ye(re)?et(D,ue,"whitespace")(re):ue(re)):G(re)}function ue(re){return re===null||Re(re)?(D.exit("codeFencedFence"),$(re)):G(re)}}}function K7(e,t,n){const r=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const wp={name:"codeIndented",tokenize:J7},Z7={partial:!0,tokenize:ej};function J7(e,t,n){const r=this;return i;function i(h){return e.enter("codeIndented"),et(e,o,"linePrefix",5)(h)}function o(h){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?l(h):n(h)}function l(h){return h===null?f(h):Re(h)?e.attempt(Z7,l,f)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Re(h)?(e.exit("codeFlowValue"),l(h)):(e.consume(h),c)}function f(h){return e.exit("codeIndented"),t(h)}}function ej(e,t,n){const r=this;return i;function i(l){return r.parser.lazy[r.now().line]?n(l):Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):et(e,o,"linePrefix",5)(l)}function o(l){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):Re(l)?i(l):n(l)}}const tj={name:"codeText",previous:rj,resolve:nj,tokenize:aj};function nj(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function rj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aj(e,t,n){let r=0,i,o;return l;function l(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(o=e.enter("codeTextSequence"),i=0,p(m)):Re(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),h(m))}function h(m){return m===null||m===32||m===96||Re(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),h)}function p(m){return m===96?(e.consume(m),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(o.type="codeTextData",h(m))}}class ij{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 r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&vl(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),vl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),vl(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);vl(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);vl(this.left,n.reverse())}}}function vl(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 Iw(e){const t={};let n=-1,r,i,o,l,c,f,h;const p=new ij(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(f=r[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,sj(p,n)),n=t[n],h=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(l=p.get(o),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(p.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=o);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(r[1].end={...p.get(i)[1].start},c=p.slice(i,n),c.unshift(r),p.splice(i,n-i+1,c))}}return $n(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function sj(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const c=l.events,f=[],h={};let p,m,y=-1,E=n,T=0,S=0;const C=[S];for(;E;){for(;e.get(++i)[1]!==E;);o.push(i),E._tokenizer||(p=r.sliceStream(E),E.next||p.push(null),m&&l.defineSkip(E.start),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(p),E._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),m=E,E=E.next}for(E=n;++y<c.length;)c[y][0]==="exit"&&c[y-1][0]==="enter"&&c[y][1].type===c[y-1][1].type&&c[y][1].start.line!==c[y][1].end.line&&(S=y+1,C.push(S),E._tokenizer=void 0,E.previous=void 0,E=E.next);for(l.events=[],E?(E._tokenizer=void 0,E.previous=void 0):C.pop(),y=C.length;y--;){const w=c.slice(C[y],C[y+1]),k=o.pop();f.push([k,k+w.length-1]),e.splice(k,2,w)}for(f.reverse(),y=-1;++y<f.length;)h[T+f[y][0]]=T+f[y][1],T+=f[y][1]-f[y][0]-1;return h}const oj={resolve:uj,tokenize:cj},lj={partial:!0,tokenize:fj};function uj(e){return Iw(e),e}function cj(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?o(c):Re(c)?e.check(lj,l,o)(c):(e.consume(c),i)}function o(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function l(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function fj(e,t,n){const r=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),et(e,o,"linePrefix")}function o(l){if(l===null||Re(l))return n(l);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function Dw(e,t,n,r,i,o,l,c,f){const h=f||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(w),e.exit(o),y):w===null||w===32||w===41||Lf(w)?n(w):(e.enter(r),e.enter(l),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(w))}function y(w){return w===62?(e.enter(o),e.consume(w),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),E(w))}function E(w){return w===62?(e.exit("chunkString"),e.exit(c),y(w)):w===null||w===60||Re(w)?n(w):(e.consume(w),w===92?T:E)}function T(w){return w===60||w===62||w===92?(e.consume(w),E):E(w)}function S(w){return!p&&(w===null||w===41||Et(w))?(e.exit("chunkString"),e.exit(c),e.exit(l),e.exit(r),t(w)):p<h&&w===40?(e.consume(w),p++,S):w===41?(e.consume(w),p--,S):w===null||w===32||w===40||Lf(w)?n(w):(e.consume(w),w===92?C:S)}function C(w){return w===40||w===41||w===92?(e.consume(w),S):S(w)}}function Mw(e,t,n,r,i,o){const l=this;let c=0,f;return h;function h(E){return e.enter(r),e.enter(i),e.consume(E),e.exit(i),e.enter(o),p}function p(E){return c>999||E===null||E===91||E===93&&!f||E===94&&!c&&"_hiddenFootnoteSupport"in l.parser.constructs?n(E):E===93?(e.exit(o),e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):Re(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||E===91||E===93||Re(E)||c++>999?(e.exit("chunkString"),p(E)):(e.consume(E),f||(f=!Ye(E)),E===92?y:m)}function y(E){return E===91||E===92||E===93?(e.consume(E),c++,m):m(E)}}function Pw(e,t,n,r,i,o){let l;return c;function c(y){return y===34||y===39||y===40?(e.enter(r),e.enter(i),e.consume(y),e.exit(i),l=y===40?41:y,f):n(y)}function f(y){return y===l?(e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):(e.enter(o),h(y))}function h(y){return y===l?(e.exit(o),f(l)):y===null?n(y):Re(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),et(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===l||y===null||Re(y)?(e.exit("chunkString"),h(y)):(e.consume(y),y===92?m:p)}function m(y){return y===l||y===92?(e.consume(y),p):p(y)}}function zl(e,t){let n;return r;function r(i){return Re(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Ye(i)?et(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const dj={name:"definition",tokenize:mj},hj={partial:!0,tokenize:pj};function mj(e,t,n){const r=this;let i;return o;function o(E){return e.enter("definition"),l(E)}function l(E){return Mw.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(E)}function c(E){return i=mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),f):n(E)}function f(E){return Et(E)?zl(e,h)(E):h(E)}function h(E){return Dw(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(E)}function p(E){return e.attempt(hj,m,m)(E)}function m(E){return Ye(E)?et(e,y,"whitespace")(E):y(E)}function y(E){return E===null||Re(E)?(e.exit("definition"),r.parser.defined.push(i),t(E)):n(E)}}function pj(e,t,n){return r;function r(c){return Et(c)?zl(e,i)(c):n(c)}function i(c){return Pw(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function o(c){return Ye(c)?et(e,l,"whitespace")(c):l(c)}function l(c){return c===null||Re(c)?t(c):n(c)}}const gj={name:"hardBreakEscape",tokenize:bj};function bj(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Ej={name:"headingAtx",resolve:yj,tokenize:_j};function yj(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},$n(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function _j(e,t,n){let r=0;return i;function i(p){return e.enter("atxHeading"),o(p)}function o(p){return e.enter("atxHeadingSequence"),l(p)}function l(p){return p===35&&r++<6?(e.consume(p),l):p===null||Et(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),f(p)):p===null||Re(p)?(e.exit("atxHeading"),t(p)):Ye(p)?et(e,c,"whitespace")(p):(e.enter("atxHeadingText"),h(p))}function f(p){return p===35?(e.consume(p),f):(e.exit("atxHeadingSequence"),c(p))}function h(p){return p===null||p===35||Et(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),h)}}const xj=["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"],PT=["pre","script","style","textarea"],Tj={concrete:!0,name:"htmlFlow",resolveTo:Aj,tokenize:Cj},vj={partial:!0,tokenize:kj},Sj={partial:!0,tokenize:wj};function Aj(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 Cj(e,t,n){const r=this;let i,o,l,c,f;return h;function h(M){return p(M)}function p(M){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(M),m}function m(M){return M===33?(e.consume(M),y):M===47?(e.consume(M),o=!0,S):M===63?(e.consume(M),i=3,r.interrupt?t:O):pn(M)?(e.consume(M),l=String.fromCharCode(M),C):n(M)}function y(M){return M===45?(e.consume(M),i=2,E):M===91?(e.consume(M),i=5,c=0,T):pn(M)?(e.consume(M),i=4,r.interrupt?t:O):n(M)}function E(M){return M===45?(e.consume(M),r.interrupt?t:O):n(M)}function T(M){const ge="CDATA[";return M===ge.charCodeAt(c++)?(e.consume(M),c===ge.length?r.interrupt?t:J:T):n(M)}function S(M){return pn(M)?(e.consume(M),l=String.fromCharCode(M),C):n(M)}function C(M){if(M===null||M===47||M===62||Et(M)){const ge=M===47,Ee=l.toLowerCase();return!ge&&!o&&PT.includes(Ee)?(i=1,r.interrupt?t(M):J(M)):xj.includes(l.toLowerCase())?(i=6,ge?(e.consume(M),w):r.interrupt?t(M):J(M)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(M):o?k(M):N(M))}return M===45||on(M)?(e.consume(M),l+=String.fromCharCode(M),C):n(M)}function w(M){return M===62?(e.consume(M),r.interrupt?t:J):n(M)}function k(M){return Ye(M)?(e.consume(M),k):V(M)}function N(M){return M===47?(e.consume(M),V):M===58||M===95||pn(M)?(e.consume(M),P):Ye(M)?(e.consume(M),N):V(M)}function P(M){return M===45||M===46||M===58||M===95||on(M)?(e.consume(M),P):B(M)}function B(M){return M===61?(e.consume(M),D):Ye(M)?(e.consume(M),B):N(M)}function D(M){return M===null||M===60||M===61||M===62||M===96?n(M):M===34||M===39?(e.consume(M),f=M,$):Ye(M)?(e.consume(M),D):G(M)}function $(M){return M===f?(e.consume(M),f=null,ie):M===null||Re(M)?n(M):(e.consume(M),$)}function G(M){return M===null||M===34||M===39||M===47||M===60||M===61||M===62||M===96||Et(M)?B(M):(e.consume(M),G)}function ie(M){return M===47||M===62||Ye(M)?N(M):n(M)}function V(M){return M===62?(e.consume(M),X):n(M)}function X(M){return M===null||Re(M)?J(M):Ye(M)?(e.consume(M),X):n(M)}function J(M){return M===45&&i===2?(e.consume(M),U):M===60&&i===1?(e.consume(M),ee):M===62&&i===4?(e.consume(M),z):M===63&&i===3?(e.consume(M),O):M===93&&i===5?(e.consume(M),xe):Re(M)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(vj,te,he)(M)):M===null||Re(M)?(e.exit("htmlFlowData"),he(M)):(e.consume(M),J)}function he(M){return e.check(Sj,ue,te)(M)}function ue(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),re}function re(M){return M===null||Re(M)?he(M):(e.enter("htmlFlowData"),J(M))}function U(M){return M===45?(e.consume(M),O):J(M)}function ee(M){return M===47?(e.consume(M),l="",ce):J(M)}function ce(M){if(M===62){const ge=l.toLowerCase();return PT.includes(ge)?(e.consume(M),z):J(M)}return pn(M)&&l.length<8?(e.consume(M),l+=String.fromCharCode(M),ce):J(M)}function xe(M){return M===93?(e.consume(M),O):J(M)}function O(M){return M===62?(e.consume(M),z):M===45&&i===2?(e.consume(M),O):J(M)}function z(M){return M===null||Re(M)?(e.exit("htmlFlowData"),te(M)):(e.consume(M),z)}function te(M){return e.exit("htmlFlow"),t(M)}}function wj(e,t,n){const r=this;return i;function i(l){return Re(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),o):n(l)}function o(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function kj(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(du,t,n)}}const Nj={name:"htmlText",tokenize:Rj};function Rj(e,t,n){const r=this;let i,o,l;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),B):O===63?(e.consume(O),N):pn(O)?(e.consume(O),G):n(O)}function h(O){return O===45?(e.consume(O),p):O===91?(e.consume(O),o=0,T):pn(O)?(e.consume(O),k):n(O)}function p(O){return O===45?(e.consume(O),E):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),y):Re(O)?(l=m,ee(O)):(e.consume(O),m)}function y(O){return O===45?(e.consume(O),E):m(O)}function E(O){return O===62?U(O):O===45?y(O):m(O)}function T(O){const z="CDATA[";return O===z.charCodeAt(o++)?(e.consume(O),o===z.length?S:T):n(O)}function S(O){return O===null?n(O):O===93?(e.consume(O),C):Re(O)?(l=S,ee(O)):(e.consume(O),S)}function C(O){return O===93?(e.consume(O),w):S(O)}function w(O){return O===62?U(O):O===93?(e.consume(O),w):S(O)}function k(O){return O===null||O===62?U(O):Re(O)?(l=k,ee(O)):(e.consume(O),k)}function N(O){return O===null?n(O):O===63?(e.consume(O),P):Re(O)?(l=N,ee(O)):(e.consume(O),N)}function P(O){return O===62?U(O):N(O)}function B(O){return pn(O)?(e.consume(O),D):n(O)}function D(O){return O===45||on(O)?(e.consume(O),D):$(O)}function $(O){return Re(O)?(l=$,ee(O)):Ye(O)?(e.consume(O),$):U(O)}function G(O){return O===45||on(O)?(e.consume(O),G):O===47||O===62||Et(O)?ie(O):n(O)}function ie(O){return O===47?(e.consume(O),U):O===58||O===95||pn(O)?(e.consume(O),V):Re(O)?(l=ie,ee(O)):Ye(O)?(e.consume(O),ie):U(O)}function V(O){return O===45||O===46||O===58||O===95||on(O)?(e.consume(O),V):X(O)}function X(O){return O===61?(e.consume(O),J):Re(O)?(l=X,ee(O)):Ye(O)?(e.consume(O),X):ie(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,he):Re(O)?(l=J,ee(O)):Ye(O)?(e.consume(O),J):(e.consume(O),ue)}function he(O){return O===i?(e.consume(O),i=void 0,re):O===null?n(O):Re(O)?(l=he,ee(O)):(e.consume(O),he)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Et(O)?ie(O):(e.consume(O),ue)}function re(O){return O===47||O===62||Et(O)?ie(O):n(O)}function U(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ee(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ce}function ce(O){return Ye(O)?et(e,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):xe(O)}function xe(O){return e.enter("htmlTextData"),l(O)}}const i1={name:"labelEnd",resolveAll:Dj,resolveTo:Mj,tokenize:Pj},Oj={tokenize:Bj},Lj={tokenize:jj},Ij={tokenize:Uj};function Dj(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&$n(e,0,e.length,n),e}function Mj(e,t){let n=e.length,r=0,i,o,l,c;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(l=n);const f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[o][1].start},end:{...e[l][1].end}},p={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[l-2][1].start}};return c=[["enter",f,t],["enter",h,t]],c=rr(c,e.slice(o+1,o+r+3)),c=rr(c,[["enter",p,t]]),c=rr(c,_d(t.parser.constructs.insideSpan.null,e.slice(o+r+4,l-3),t)),c=rr(c,[["exit",p,t],e[l-2],e[l-1],["exit",h,t]]),c=rr(c,e.slice(l+1)),c=rr(c,[["exit",f,t]]),$n(e,o,e.length,c),e}function Pj(e,t,n){const r=this;let i=r.events.length,o,l;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return c;function c(y){return o?o._inactive?m(y):(l=r.parser.defined.includes(mr(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(y),e.exit("labelMarker"),e.exit("labelEnd"),f):n(y)}function f(y){return y===40?e.attempt(Oj,p,l?p:m)(y):y===91?e.attempt(Lj,p,l?h:m)(y):l?p(y):m(y)}function h(y){return e.attempt(Ij,p,m)(y)}function p(y){return t(y)}function m(y){return o._balanced=!0,n(y)}}function Bj(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Et(m)?zl(e,o)(m):o(m)}function o(m){return m===41?p(m):Dw(e,l,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function l(m){return Et(m)?zl(e,f)(m):p(m)}function c(m){return n(m)}function f(m){return m===34||m===39||m===40?Pw(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function h(m){return Et(m)?zl(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function jj(e,t,n){const r=this;return i;function i(c){return Mw.call(r,e,o,l,"reference","referenceMarker","referenceString")(c)}function o(c){return r.parser.defined.includes(mr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function l(c){return n(c)}}function Uj(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Hj={name:"labelStartImage",resolveAll:i1.resolveAll,tokenize:zj};function zj(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),o}function o(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),l):n(c)}function l(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Fj={name:"labelStartLink",resolveAll:i1.resolveAll,tokenize:$j};function $j(e,t,n){const r=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),o}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const kp={name:"lineEnding",tokenize:Vj};function Vj(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),et(e,t,"linePrefix")}}const hf={name:"thematicBreak",tokenize:Gj};function Gj(e,t,n){let r=0,i;return o;function o(h){return e.enter("thematicBreak"),l(h)}function l(h){return i=h,c(h)}function c(h){return h===i?(e.enter("thematicBreakSequence"),f(h)):r>=3&&(h===null||Re(h))?(e.exit("thematicBreak"),t(h)):n(h)}function f(h){return h===i?(e.consume(h),r++,f):(e.exit("thematicBreakSequence"),Ye(h)?et(e,c,"whitespace")(h):c(h))}}const Nn={continuation:{tokenize:Qj},exit:Kj,name:"list",tokenize:Xj},qj={partial:!0,tokenize:Zj},Yj={partial:!0,tokenize:Wj};function Xj(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return c;function c(E){const T=r.containerState.type||(E===42||E===43||E===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||E===r.containerState.marker:C0(E)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),E===42||E===45?e.check(hf,n,h)(E):h(E);if(!r.interrupt||E===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(E)}return n(E)}function f(E){return C0(E)&&++l<10?(e.consume(E),f):(!r.interrupt||l<2)&&(r.containerState.marker?E===r.containerState.marker:E===41||E===46)?(e.exit("listItemValue"),h(E)):n(E)}function h(E){return e.enter("listItemMarker"),e.consume(E),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||E,e.check(du,r.interrupt?n:p,e.attempt(qj,y,m))}function p(E){return r.containerState.initialBlankLine=!0,o++,y(E)}function m(E){return Ye(E)?(e.enter("listItemPrefixWhitespace"),e.consume(E),e.exit("listItemPrefixWhitespace"),y):n(E)}function y(E){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(E)}}function Qj(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(du,i,o);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,et(e,t,"listItemIndent",r.containerState.size+1)(c)}function o(c){return r.containerState.furtherBlankLines||!Ye(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Yj,t,l)(c))}function l(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,et(e,e.attempt(Nn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function Wj(e,t,n){const r=this;return et(e,i,"listItemIndent",r.containerState.size+1);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(o):n(o)}}function Kj(e){e.exit(this.containerState.type)}function Zj(e,t,n){const r=this;return et(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const l=r.events[r.events.length-1];return!Ye(o)&&l&&l[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const BT={name:"setextUnderline",resolveTo:Jj,tokenize:eU};function Jj(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",l,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function eU(e,t,n){const r=this;let i;return o;function o(h){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=h,l(h)):n(h)}function l(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===i?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ye(h)?et(e,f,"lineSuffix")(h):f(h))}function f(h){return h===null||Re(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const tU={tokenize:uU,partial:!0};function nU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:sU,continuation:{tokenize:oU},exit:lU}},text:{91:{name:"gfmFootnoteCall",tokenize:iU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:rU,resolveTo:aU}}}}function rU(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let l;for(;i--;){const f=r.events[i][1];if(f.type==="labelImage"){l=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return c;function c(f){if(!l||!l._balanced)return n(f);const h=mr(r.sliceSerialize({start:l.end,end:r.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function aU(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 r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},l={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",l,t],["exit",l,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function iU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,l;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(m){if(o>999||m===93&&!l||m===null||m===91||Et(m))return n(m);if(m===93){e.exit("chunkString");const y=e.exit("gfmFootnoteCallString");return i.includes(mr(r.sliceSerialize(y)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Et(m)||(l=!0),o++,e.consume(m),m===92?p:h}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,h):h(m)}}function sU(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,l=0,c;return f;function f(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(T)}function p(T){if(l>999||T===93&&!c||T===null||T===91||Et(T))return n(T);if(T===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return o=mr(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),y}return Et(T)||(c=!0),l++,e.consume(T),T===92?m:p}function m(T){return T===91||T===92||T===93?(e.consume(T),l++,p):p(T)}function y(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(o)||i.push(o),et(e,E,"gfmFootnoteDefinitionWhitespace")):n(T)}function E(T){return t(T)}}function oU(e,t,n){return e.check(du,t,e.attempt(tU,t,n))}function lU(e){e.exit("gfmFootnoteDefinition")}function uU(e,t,n){const r=this;return et(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const l=r.events[r.events.length-1];return l&&l[1].type==="gfmFootnoteDefinitionIndent"&&l[2].sliceSerialize(l[1],!0).length===4?t(o):n(o)}}function cU(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(l,c){let f=-1;for(;++f<l.length;)if(l[f][0]==="enter"&&l[f][1].type==="strikethroughSequenceTemporary"&&l[f][1]._close){let h=f;for(;h--;)if(l[h][0]==="exit"&&l[h][1].type==="strikethroughSequenceTemporary"&&l[h][1]._open&&l[f][1].end.offset-l[f][1].start.offset===l[h][1].end.offset-l[h][1].start.offset){l[f][1].type="strikethroughSequence",l[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},l[h][1].start),end:Object.assign({},l[f][1].end)},m={type:"strikethroughText",start:Object.assign({},l[h][1].end),end:Object.assign({},l[f][1].start)},y=[["enter",p,c],["enter",l[h][1],c],["exit",l[h][1],c],["enter",m,c]],E=c.parser.constructs.insideSpan.null;E&&$n(y,y.length,0,_d(E,l.slice(h+1,f),c)),$n(y,y.length,0,[["exit",m,c],["enter",l[f][1],c],["exit",l[f][1],c],["exit",p,c]]),$n(l,h-1,f-h+3,y),f=h+y.length-2;break}}for(f=-1;++f<l.length;)l[f][1].type==="strikethroughSequenceTemporary"&&(l[f][1].type="data");return l}function o(l,c,f){const h=this.previous,p=this.events;let m=0;return y;function y(T){return h===126&&p[p.length-1][1].type!=="characterEscape"?f(T):(l.enter("strikethroughSequenceTemporary"),E(T))}function E(T){const S=mo(h);if(T===126)return m>1?f(T):(l.consume(T),m++,E);if(m<2&&!n)return f(T);const C=l.exit("strikethroughSequenceTemporary"),w=mo(T);return C._open=!w||w===2&&!!S,C._close=!S||S===2&&!!w,c(T)}}}class fU{constructor(){this.map=[]}add(t,n,r){dU(this,t,n,r)}consume(t){if(this.map.sort(function(o,l){return o[0]-l[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function dU(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function hU(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function mU(){return{flow:{null:{name:"table",tokenize:pU,resolveAll:gU}}}}function pU(e,t,n){const r=this;let i=0,o=0,l;return c;function c(V){let X=r.events.length-1;for(;X>-1;){const ue=r.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const J=X>-1?r.events[X][1].type:null,he=J==="tableHead"||J==="tableRow"?D:f;return he===D&&r.parser.lazy[r.now().line]?n(V):he(V)}function f(V){return e.enter("tableHead"),e.enter("tableRow"),h(V)}function h(V){return V===124||(l=!0,o+=1),p(V)}function p(V){return V===null?n(V):Re(V)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),E):n(V):Ye(V)?et(e,p,"whitespace")(V):(o+=1,l&&(l=!1,i+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),l=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||Et(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?y:m)}function y(V){return V===92||V===124?(e.consume(V),m):m(V)}function E(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),l=!1,Ye(V)?et(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):T(V))}function T(V){return V===45||V===58?C(V):V===124?(l=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),S):B(V)}function S(V){return Ye(V)?et(e,C,"whitespace")(V):C(V)}function C(V){return V===58?(o+=1,l=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),w):V===45?(o+=1,w(V)):V===null||Re(V)?P(V):B(V)}function w(V){return V===45?(e.enter("tableDelimiterFiller"),k(V)):B(V)}function k(V){return V===45?(e.consume(V),k):V===58?(l=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(V))}function N(V){return Ye(V)?et(e,P,"whitespace")(V):P(V)}function P(V){return V===124?T(V):V===null||Re(V)?!l||i!==o?B(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):B(V)}function B(V){return n(V)}function D(V){return e.enter("tableRow"),$(V)}function $(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),$):V===null||Re(V)?(e.exit("tableRow"),t(V)):Ye(V)?et(e,$,"whitespace")(V):(e.enter("data"),G(V))}function G(V){return V===null||V===124||Et(V)?(e.exit("data"),$(V)):(e.consume(V),V===92?ie:G)}function ie(V){return V===92||V===124?(e.consume(V),G):G(V)}}function gU(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],l=[0,0,0,0],c=!1,f=0,h,p,m;const y=new fU;for(;++n<e.length;){const E=e[n],T=E[1];E[0]==="enter"?T.type==="tableHead"?(c=!1,f!==0&&(jT(y,t,f,h,p),p=void 0,f=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},y.add(n,0,[["enter",h,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,m=void 0,o=[0,0,0,0],l=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},y.add(n,0,[["enter",p,t]])),i=T.type==="tableDelimiterRow"?2:p?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,l[2]===0&&(o[1]!==0&&(l[0]=l[1],m=qc(y,t,o,i,void 0,m),o=[0,0,0,0]),l[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(l[0]=l[1],m=qc(y,t,o,i,void 0,m)),o=l,l=[o[1],n,0,0])):T.type==="tableHead"?(c=!0,f=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(f=n,o[1]!==0?(l[0]=l[1],m=qc(y,t,o,i,n,m)):l[1]!==0&&(m=qc(y,t,l,i,n,m)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(l[3]=n)}for(f!==0&&jT(y,t,f,h,p),y.consume(t.events),n=-1;++n<t.events.length;){const E=t.events[n];E[0]==="enter"&&E[1].type==="table"&&(E[1]._align=hU(t.events,n))}return e}function qc(e,t,n,r,i,o){const l=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(o.end=Object.assign({},Zs(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=Zs(t.events,n[1]);if(o={type:l,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=Zs(t.events,n[2]),p=Zs(t.events,n[3]),m={type:c,start:Object.assign({},h),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const y=t.events[n[2]],E=t.events[n[3]];if(y[1].end=Object.assign({},E[1].end),y[1].type="chunkText",y[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,S=n[3]-n[2]-1;e.add(T,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(o.end=Object.assign({},Zs(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function jT(e,t,n,r,i){const o=[],l=Zs(t.events,n);i&&(i.end=Object.assign({},l),o.push(["exit",i,t])),r.end=Object.assign({},l),o.push(["exit",r,t]),e.add(n+1,0,o)}function Zs(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const bU={name:"tasklistCheck",tokenize:yU};function EU(){return{text:{91:bU}}}function yU(e,t,n){const r=this;return i;function i(f){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return Et(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),l):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),l):n(f)}function l(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(f)}function c(f){return Re(f)?t(f):Ye(f)?e.check({tokenize:_U},t,n)(f):n(f)}}function _U(e,t,n){return et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function xU(e){return xw([O7(),nU(),cU(e),mU(),EU()])}const TU={};function vU(e){const t=this,n=e||TU,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),l=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xU(n)),o.push(A7()),l.push(C7(n))}var SU=Object.defineProperty,AU=Object.defineProperties,CU=Object.getOwnPropertyDescriptors,UT=Object.getOwnPropertySymbols,wU=Object.prototype.hasOwnProperty,kU=Object.prototype.propertyIsEnumerable,HT=(e,t,n)=>t in e?SU(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Bw=(e,t)=>{for(var n in t||(t={}))wU.call(t,n)&&HT(e,n,t[n]);if(UT)for(var n of UT(t))kU.call(t,n)&&HT(e,n,t[n]);return e},jw=(e,t)=>AU(e,CU(t)),bn=(e,t)=>{let n=!1,r=!1;for(let i=0;i<t;i+=1){if(e[i]==="\\"&&i+1<e.length&&e[i+1]==="`"){i+=1;continue}if(e.substring(i,i+3)==="```"){r=!r,i+=2;continue}!r&&e[i]==="`"&&(n=!n)}return n||r},NU=(e,t)=>{let n=e.substring(t,t+3)==="```",r=t>0&&e.substring(t-1,t+2)==="```",i=t>1&&e.substring(t-2,t+1)==="```";return n||r||i},RU=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]==="`"&&!NU(e,n)&&(t+=1)}return t},ai=(e,t)=>{let n=!1,r=!1,i=-1;for(let o=0;o<e.length;o+=1){if(e[o]==="\\"&&o+1<e.length&&e[o+1]==="`"){o+=1;continue}if(e.substring(o,o+3)==="```"){r=!r,o+=2;continue}if(!r&&e[o]==="`")if(n){if(i<t&&t<o)return!0;n=!1,i=-1}else n=!0,i=o}return!1},OU=/^(\s*(?:[-*+]|\d+[.)]) +)>(=?\s*[$]?\d)/gm,LU=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(OU,(t,n,r,i)=>bn(e,i)?t:`${n}\\>${r}`),IU=/(\*\*)([^*]*\*?)$/,DU=/(__)([^_]*?)$/,MU=/(\*\*\*)([^*]*?)$/,PU=/(\*)([^*]*?)$/,BU=/(_)([^_]*?)$/,jU=/(`)([^`]*?)$/,UU=/(~~)([^~]*?)$/,as=/^[\s_~*`]*$/,Uw=/^[\s]*[-*+][\s]+$/,HU=/[\p{L}\p{N}_]/u,zU=/^```[^`\n]*```?$/,FU=/^\*{4,}$/,$U=/(__)([^_]+)_$/,VU=/(~~)([^~]+)~$/,zT=/~~/g,ii=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:HU.test(e)},GU=(e,t)=>{let n=1;for(let r=t-1;r>=0;r-=1)if(e[r]==="]")n+=1;else if(e[r]==="["&&(n-=1,n===0))return r;return-1},Hw=(e,t)=>{let n=1;for(let r=t+1;r<e.length;r+=1)if(e[r]==="[")n+=1;else if(e[r]==="]"&&(n-=1,n===0))return r;return-1},xd=(e,t)=>{let n=!1,r=!1;for(let i=0;i<e.length&&i<t;i+=1){if(e[i]==="\\"&&e[i+1]==="$"){i+=1;continue}e[i]==="$"&&(e[i+1]==="$"?(r=!r,i+=1,n=!1):r||(n=!n))}return n||r},qU=(e,t)=>{for(let n=t;n<e.length;n+=1){if(e[n]===")")return!0;if(e[n]===`
|
|
67
|
+
`)return!1}return!1},zw=(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]==="]"?qU(e,t):!1;if(e[n]===`
|
|
68
|
+
`)return!1}return!1},YU=(e,t)=>{for(let n=t-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let r=n+1<e.length?e[n+1]:"";return r>="a"&&r<="z"||r>="A"&&r<="Z"||r==="/"}if(e[n]===`
|
|
69
|
+
`)return!1}return!1},s1=(e,t,n)=>{let r=0;for(let f=t-1;f>=0;f-=1)if(e[f]===`
|
|
70
|
+
`){r=f+1;break}let i=e.length;for(let f=t;f<e.length;f+=1)if(e[f]===`
|
|
71
|
+
`){i=f;break}let o=e.substring(r,i),l=0,c=!1;for(let f of o)if(f===n)l+=1;else if(f!==" "&&f!==" "){c=!0;break}return l>=3&&!c},XU=(e,t,n,r)=>n==="\\"||e.includes("$")&&xd(e,t)?!0:n!=="*"&&r==="*"?(t<e.length-2?e[t+2]:"")!=="*":!!(n==="*"||n&&r&&ii(n)&&ii(r)||(!n||n===" "||n===" "||n===`
|
|
72
|
+
`)&&(!r||r===" "||r===" "||r===`
|
|
73
|
+
`)),Fw=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="*")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";XU(e,i,o,l)||(t+=1)}return t},QU=(e,t,n,r)=>!!(n==="\\"||e.includes("$")&&xd(e,t)||zw(e,t)||YU(e,t)||n==="_"||r==="_"||n&&r&&ii(n)&&ii(r)),WU=e=>{let t=0,n=!1,r=e.length;for(let i=0;i<r;i+=1){if(e[i]==="`"&&i+2<r&&e[i+1]==="`"&&e[i+2]==="`"){n=!n,i+=2;continue}if(n||e[i]!=="_")continue;let o=i>0?e[i-1]:"",l=i<r-1?e[i+1]:"";QU(e,i,o,l)||(t+=1)}return t},KU=e=>{let t=0,n=0,r=!1;for(let i=0;i<e.length;i+=1){if(e[i]==="`"&&i+2<e.length&&e[i+1]==="`"&&e[i+2]==="`"){n>=3&&(t+=Math.floor(n/3)),n=0,r=!r,i+=2;continue}r||(e[i]==="*"?n+=1:(n>=3&&(t+=Math.floor(n/3)),n=0))}return n>=3&&(t+=Math.floor(n/3)),t},o1=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="*"&&r+1<e.length&&e[r+1]==="*"&&(t+=1,r+=1)}return t},FT=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="`"&&r+2<e.length&&e[r+1]==="`"&&e[r+2]==="`"){n=!n,r+=2;continue}n||e[r]==="_"&&r+1<e.length&&e[r+1]==="_"&&(t+=1,r+=1)}return t},ZU=(e,t,n)=>{if(!t||as.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
74
|
+
`),i=r===-1?0:r+1,o=e.substring(i,n);return Uw.test(o)&&t.includes(`
|
|
75
|
+
`)?!0:s1(e,n,"*")},JU=e=>{let t=e.match(IU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||ai(e,r)||ZU(e,n,r)?e:o1(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},eH=(e,t,n)=>{if(!t||as.test(t))return!0;let r=e.substring(0,n).lastIndexOf(`
|
|
76
|
+
`),i=r===-1?0:r+1,o=e.substring(i,n);return Uw.test(o)&&t.includes(`
|
|
77
|
+
`)?!0:s1(e,n,"_")},tH=e=>{let t=e.match(DU);if(!t){let i=e.match($U);if(i){let o=e.lastIndexOf(i[1]);if(!(bn(e,o)||ai(e,o))&&FT(e)%2===1)return`${e}_`}return e}let n=t[2],r=e.lastIndexOf(t[1]);return bn(e,r)||ai(e,r)||eH(e,n,r)?e:FT(e)%2===1?`${e}__`:e},nH=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]!=="\\"&&!xd(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if((!r||r===" "||r===" "||r===`
|
|
78
|
+
`)&&(!i||i===" "||i===" "||i===`
|
|
79
|
+
`)||r&&i&&ii(r)&&ii(i))continue;return n}}return-1},rH=e=>{if(!e.match(PU))return e;let t=nH(e);if(t===-1||bn(e,t)||ai(e,t))return e;let n=e.substring(t+1);return!n||as.test(n)?e:Fw(e)%2===1?`${e}*`:e},$w=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]!=="\\"&&!xd(e,n)&&!zw(e,n)){let r=n>0?e[n-1]:"",i=n<e.length-1?e[n+1]:"";if(r&&i&&ii(r)&&ii(i))continue;return n}}return-1},aH=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
80
|
+
`;)t-=1;if(t<e.length){let n=e.slice(0,t),r=e.slice(t);return`${n}_${r}`}return`${e}_`},iH=e=>{if(!e.endsWith("**"))return null;let t=e.slice(0,-2);if(o1(t)%2!==1)return null;let n=t.indexOf("**"),r=$w(t);return n!==-1&&r!==-1&&n<r?`${t}_**`:null},sH=e=>{if(!e.match(BU))return e;let t=$w(e);if(t===-1)return e;let n=e.substring(t+1);if(!n||as.test(n)||bn(e,t)||ai(e,t))return e;if(WU(e)%2===1){let r=iH(e);return r!==null?r:aH(e)}return e},oH=e=>{let t=o1(e),n=Fw(e);return t%2===0&&n%2===0},lH=(e,t,n)=>!t||as.test(t)||bn(e,n)||ai(e,n)?!0:s1(e,n,"*"),uH=e=>{if(FU.test(e))return e;let t=e.match(MU);if(!t)return e;let n=t[2],r=e.lastIndexOf(t[1]);return lH(e,n,r)?e:KU(e)%2===1?oH(e)?e:`${e}***`:e},cH=/<[a-zA-Z/][^>]*$/,fH=e=>{let t=e.match(cH);return!t||t.index===void 0||bn(e,t.index)?e:e.substring(0,t.index).trimEnd()},dH=e=>!e.match(zU)||e.includes(`
|
|
81
|
+
`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,hH=e=>(e.match(/```/g)||[]).length%2===1,mH=e=>{let t=dH(e);if(t!==null)return t;let n=e.match(jU);if(n&&!hH(e)){let r=n[2];if(!r||as.test(r))return e;if(RU(e)%2===1)return`${e}\``}return e},Vw=(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)==="```",pH=e=>{let t=0,n=!1;for(let r=0;r<e.length-1;r+=1)e[r]==="`"&&!Vw(e,r)&&(n=!n),!n&&e[r]==="$"&&e[r+1]==="$"&&(t+=1,r+=1);return t},gH=e=>{let t=0,n=!1;for(let r=0;r<e.length;r+=1){if(e[r]==="\\"){r+=1;continue}if(e[r]==="`"&&!Vw(e,r)){n=!n;continue}!n&&e[r]==="$"&&(r+1<e.length&&e[r+1]==="$"?r+=1:t+=1)}return t},bH=e=>{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let t=e.indexOf("$$");return t!==-1&&e.indexOf(`
|
|
82
|
+
`,t)!==-1&&!e.endsWith(`
|
|
83
|
+
`)?`${e}
|
|
84
|
+
$$`:`${e}$$`},EH=e=>pH(e)%2===0?e:bH(e),yH=e=>gH(e)%2===1?`${e}$`:e,_H=(e,t,n)=>{if(e.substring(t+2).includes(")"))return null;let r=GU(e,t);if(r===-1||bn(e,r))return null;let i=r>0&&e[r-1]==="!",o=i?r-1:r,l=e.substring(0,o);if(i)return l;let c=e.substring(r+1,t);return n==="text-only"?`${l}${c}`:`${l}[${c}](streamdown:incomplete-link)`},$T=(e,t)=>{for(let n=0;n<t;n++)if(e[n]==="["&&!bn(e,n)){if(n>0&&e[n-1]==="!")continue;let r=Hw(e,n);if(r===-1)return n;if(r+1<e.length&&e[r+1]==="("){let i=e.indexOf(")",r+2);i!==-1&&(n=i)}}return t},xH=(e,t,n)=>{let r=t>0&&e[t-1]==="!",i=r?t-1:t;if(!e.substring(t+1).includes("]")){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=$T(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}if(Hw(e,t)===-1){let o=e.substring(0,i);if(r)return o;if(n==="text-only"){let l=$T(e,t);return e.substring(0,l)+e.substring(l+1)}return`${e}](streamdown:incomplete-link)`}return null},Gw=(e,t="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!bn(e,n)){let r=_H(e,n,t);if(r!==null)return r}for(let r=e.length-1;r>=0;r-=1)if(e[r]==="["&&!bn(e,r)){let i=xH(e,r,t);if(i!==null)return i}return e},TH=/^-{1,2}$/,vH=/^[\s]*-{1,2}[\s]+$/,SH=/^={1,2}$/,AH=/^[\s]*={1,2}[\s]+$/,CH=e=>{if(!e||typeof e!="string")return e;let t=e.lastIndexOf(`
|
|
85
|
+
`);if(t===-1)return e;let n=e.substring(t+1),r=e.substring(0,t),i=n.trim();if(TH.test(i)&&!n.match(vH)){let o=r.split(`
|
|
86
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}if(SH.test(i)&&!n.match(AH)){let o=r.split(`
|
|
87
|
+
`).at(-1);if(o&&o.trim().length>0)return`${e}`}return e},wH=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),kH=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(wH,(t,n)=>bn(e,n)?t:"\\~"),NH=e=>{var t,n;let r=e.match(UU);if(r){let i=r[2];if(!i||as.test(i))return e;let o=e.lastIndexOf(r[1]);if(bn(e,o)||ai(e,o))return e;if(((t=e.match(zT))==null?void 0:t.length)%2===1)return`${e}~~`}else{let i=e.match(VU);if(i){let o=e.lastIndexOf(i[0].slice(0,2));if(bn(e,o)||ai(e,o))return e;if(((n=e.match(zT))==null?void 0:n.length)%2===1)return`${e}~`}}return e},Np=e=>e!==!1,RH=e=>e===!0,mn={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},OH=[{handler:{name:"singleTilde",handle:kH,priority:mn.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:LU,priority:mn.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:fH,priority:mn.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:CH,priority:mn.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Gw,priority:mn.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:uH,priority:mn.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:JU,priority:mn.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:tH,priority:mn.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:rH,priority:mn.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:sH,priority:mn.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:mH,priority:mn.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:NH,priority:mn.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:EH,priority:mn.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:yH,priority:mn.INLINE_KATEX},optionKey:"inlineKatex"}],LH=e=>{var t;let n=(t=e?.linkMode)!=null?t:"protocol";return OH.filter(({handler:r,optionKey:i})=>r.name==="links"?Np(e?.links)||Np(e?.images):r.name==="inlineKatex"?RH(e?.inlineKatex):Np(e?.[i])).map(({handler:r,earlyReturn:i})=>r.name==="links"?{handler:jw(Bw({},r),{handle:o=>Gw(o,n)}),earlyReturn:n==="protocol"?i:void 0}:{handler:r,earlyReturn:i})},IH=(e,t)=>{var n;if(!e||typeof e!="string")return e;let r=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,i=LH(t),o=((n=t?.handlers)!=null?n:[]).map(c=>{var f;return{handler:jw(Bw({},c),{priority:(f=c.priority)!=null?f:mn.DEFAULT}),earlyReturn:void 0}}),l=[...i,...o].sort((c,f)=>{var h,p;return((h=c.handler.priority)!=null?h:0)-((p=f.handler.priority)!=null?p:0)});for(let{handler:c,earlyReturn:f}of l)if(r=c.handle(r),f!=null&&f(r))return r;return r},DH=IH;const MH=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,PH=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BH={};function VT(e,t){return(BH.jsx?PH:MH).test(e)}const jH=/[ \t\n\f\r]/g;function Td(e){return typeof e=="object"?e.type==="text"?GT(e.value):!1:GT(e)}function GT(e){return e.replace(jH,"")===""}var Qs={},Rp,qT;function UH(){if(qT)return Rp;qT=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,l=/^[;\s]*/,c=/^\s+|\s+$/g,f=`
|
|
88
|
+
`,h="/",p="*",m="",y="comment",E="declaration";function T(C,w){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];w=w||{};var k=1,N=1;function P(ue){var re=ue.match(t);re&&(k+=re.length);var U=ue.lastIndexOf(f);N=~U?ue.length-U:N+ue.length}function B(){var ue={line:k,column:N};return function(re){return re.position=new D(ue),ie(),re}}function D(ue){this.start=ue,this.end={line:k,column:N},this.source=w.source}D.prototype.content=C;function $(ue){var re=new Error(w.source+":"+k+":"+N+": "+ue);if(re.reason=ue,re.filename=w.source,re.line=k,re.column=N,re.source=C,!w.silent)throw re}function G(ue){var re=ue.exec(C);if(re){var U=re[0];return P(U),C=C.slice(U.length),re}}function ie(){G(n)}function V(ue){var re;for(ue=ue||[];re=X();)re!==!1&&ue.push(re);return ue}function X(){var ue=B();if(!(h!=C.charAt(0)||p!=C.charAt(1))){for(var re=2;m!=C.charAt(re)&&(p!=C.charAt(re)||h!=C.charAt(re+1));)++re;if(re+=2,m===C.charAt(re-1))return $("End of comment missing");var U=C.slice(2,re-2);return N+=2,P(U),C=C.slice(re),N+=2,ue({type:y,comment:U})}}function J(){var ue=B(),re=G(r);if(re){if(X(),!G(i))return $("property missing ':'");var U=G(o),ee=ue({type:E,property:S(re[0].replace(e,m)),value:U?S(U[0].replace(e,m)):m});return G(l),ee}}function he(){var ue=[];V(ue);for(var re;re=J();)re!==!1&&(ue.push(re),V(ue));return ue}return ie(),he()}function S(C){return C?C.replace(c,m):m}return Rp=T,Rp}var YT;function HH(){if(YT)return Qs;YT=1;var e=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.default=n;const t=e(UH());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const l=(0,t.default)(r),c=typeof i=="function";return l.forEach(f=>{if(f.type!=="declaration")return;const{property:h,value:p}=f;c?i(h,p,f):p&&(o=o||{},o[h]=p)}),o}return Qs}var Sl={},XT;function zH(){if(XT)return Sl;XT=1,Object.defineProperty(Sl,"__esModule",{value:!0}),Sl.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(h){return!h||n.test(h)||e.test(h)},l=function(h,p){return p.toUpperCase()},c=function(h,p){return"".concat(p,"-")},f=function(h,p){return p===void 0&&(p={}),o(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(i,c):h=h.replace(r,c),h.replace(t,l))};return Sl.camelCase=f,Sl}var Al,QT;function FH(){if(QT)return Al;QT=1;var e=Al&&Al.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(HH()),n=zH();function r(i,o){var l={};return!i||typeof i!="string"||(0,t.default)(i,function(c,f){c&&f&&(l[(0,n.camelCase)(c,o)]=f)}),l}return r.default=r,Al=r,Al}var $H=FH();const VH=lg($H);function Fl(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?WT(e.position):"start"in e||"end"in e?WT(e):"line"in e||"column"in e?N0(e):""}function N0(e){return KT(e&&e.line)+":"+KT(e&&e.column)}function WT(e){return N0(e&&e.start)+"-"+N0(e&&e.end)}function KT(e){return e&&typeof e=="number"?e:1}class cn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},l=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(l=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const f=r.indexOf(":");f===-1?o.ruleId=r:(o.source=r.slice(0,f),o.ruleId=r.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const c=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=Fl(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=l&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}cn.prototype.file="";cn.prototype.name="";cn.prototype.reason="";cn.prototype.message="";cn.prototype.stack="";cn.prototype.column=void 0;cn.prototype.line=void 0;cn.prototype.ancestors=void 0;cn.prototype.cause=void 0;cn.prototype.fatal=void 0;cn.prototype.place=void 0;cn.prototype.ruleId=void 0;cn.prototype.source=void 0;const l1={}.hasOwnProperty,GH=new Map,qH=/[A-Z]/g,YH=new Set(["table","tbody","thead","tfoot","tr"]),XH=new Set(["td","th"]),qw="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function QH(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=rz(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");r=nz(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,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"?Br:Eo,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=Yw(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function Yw(e,t,n){if(t.type==="element")return WH(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return KH(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return JH(e,t,n);if(t.type==="mdxjsEsm")return ZH(e,t);if(t.type==="root")return ez(e,t,n);if(t.type==="text")return tz(e,t)}function WH(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Br,e.schema=i),e.ancestors.push(t);const o=Qw(e,t.tagName,!1),l=az(e,t);let c=c1(e,t);return YH.has(t.tagName)&&(c=c.filter(function(f){return typeof f=="string"?!Td(f):!0})),Xw(e,l,o,t),u1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function KH(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Wl(e,t.position)}function ZH(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Wl(e,t.position)}function JH(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Br,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:Qw(e,t.name,!0),l=iz(e,t),c=c1(e,t);return Xw(e,l,o,t),u1(l,c),e.ancestors.pop(),e.schema=r,e.create(t,o,l,n)}function ez(e,t,n){const r={};return u1(r,c1(e,t)),e.create(t,e.Fragment,r,n)}function tz(e,t){return t.value}function Xw(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function u1(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function nz(e,t,n){return r;function r(i,o,l,c){const h=Array.isArray(l.children)?n:t;return c?h(o,l,c):h(o,l)}}function rz(e,t){return n;function n(r,i,o,l){const c=Array.isArray(o.children),f=jr(r);return t(i,o,l,c,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function az(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&l1.call(t.properties,i)){const o=sz(e,i,t.properties[i]);if(o){const[l,c]=o;e.tableCellAlignToStyle&&l==="align"&&typeof c=="string"&&XH.has(t.tagName)?r=c:n[l]=c}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function iz(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const l=o.expression;l.type;const c=l.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else Wl(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,o=e.evaluater.evaluateExpression(c.expression)}else Wl(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function c1(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:GH;for(;++r<t.children.length;){const o=t.children[r];let l;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const h=i.get(f)||0;l=f+"-"+h,i.set(f,h+1)}}const c=Yw(e,o,l);c!==void 0&&n.push(c)}return n}function sz(e,t,n){const r=lu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gg(n):qg(n)),r.property==="style"){let i=typeof n=="object"?n:oz(e,String(n));return e.stylePropertyNameCase==="css"&&(i=lz(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?_M[r.property]||r.property:r.attribute,n]}}function oz(e,t){try{return VH(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new cn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=qw+"#cannot-parse-style-attribute",i}}function Qw(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,l;for(;++o<i.length;){const c=VT(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};l=l?{type:"MemberExpression",object:l,property:c,computed:!!(o&&c.type==="Literal"),optional:!1}:c}r=l}else r=VT(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return l1.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Wl(e)}function Wl(e,t){const n=new cn("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=qw+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lz(e){const t={};let n;for(n in e)l1.call(e,n)&&(t[uz(n)]=e[n]);return t}function uz(e){let t=e.replace(qH,cz);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function cz(e){return"-"+e.toLowerCase()}const Op={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"]},fz={tokenize:dz};function dz(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),et(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),o(c)}function o(c){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,l(c)}function l(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Re(c)?(e.consume(c),e.exit("chunkText"),o):(e.consume(c),l)}}const hz={tokenize:mz},ZT={tokenize:pz};function mz(e){const t=this,n=[];let r=0,i,o,l;return c;function c(N){if(r<n.length){const P=n[r];return t.containerState=P[1],e.attempt(P[0].continuation,f,h)(N)}return h(N)}function f(N){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&k();const P=t.events.length;let B=P,D;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){D=t.events[B][1].end;break}w(r);let $=P;for(;$<t.events.length;)t.events[$][1].end={...D},$++;return $n(t.events,B+1,0,t.events.slice(P)),t.events.length=$,h(N)}return c(N)}function h(N){if(r===n.length){if(!i)return y(N);if(i.currentConstruct&&i.currentConstruct.concrete)return T(N);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ZT,p,m)(N)}function p(N){return i&&k(),w(r),y(N)}function m(N){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,T(N)}function y(N){return t.containerState={},e.attempt(ZT,E,T)(N)}function E(N){return r++,n.push([t.currentConstruct,t.containerState]),y(N)}function T(N){if(N===null){i&&k(),w(0),e.consume(N);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),S(N)}function S(N){if(N===null){C(e.exit("chunkFlow"),!0),w(0),e.consume(N);return}return Re(N)?(e.consume(N),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(N),S)}function C(N,P){const B=t.sliceStream(N);if(P&&B.push(null),N.previous=o,o&&(o.next=N),o=N,i.defineSkip(N.start),i.write(B),t.parser.lazy[N.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<l&&(!i.events[D][1].end||i.events[D][1].end.offset>l))return;const $=t.events.length;let G=$,ie,V;for(;G--;)if(t.events[G][0]==="exit"&&t.events[G][1].type==="chunkFlow"){if(ie){V=t.events[G][1].end;break}ie=!0}for(w(r),D=$;D<t.events.length;)t.events[D][1].end={...V},D++;$n(t.events,G+1,0,t.events.slice($)),t.events.length=D}}function w(N){let P=n.length;for(;P-- >N;){const B=n[P];t.containerState=B[1],B[0].exit.call(t,e)}n.length=N}function k(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function pz(e,t,n){return et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}const gz={tokenize:bz};function bz(e){const t=this,n=e.attempt(du,r,e.attempt(this.parser.constructs.flowInitial,i,et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(oj,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ez={resolveAll:Kw()},yz=Ww("string"),_z=Ww("text");function Ww(e){return{resolveAll:Kw(e==="text"?xz:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,l,c);return l;function l(p){return h(p)?o(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),f}function f(p){return h(p)?(n.exit("data"),o(p)):(n.consume(p),f)}function h(p){if(p===null)return!0;const m=i[p];let y=-1;if(m)for(;++y<m.length;){const E=m[y];if(!E.previous||E.previous.call(r,r.previous))return!0}return!1}}}function Kw(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function xz(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 r=e[n-1][1],i=t.sliceStream(r);let o=i.length,l=-1,c=0,f;for(;o--;){const h=i[o];if(typeof h=="string"){for(l=h.length;h.charCodeAt(l-1)===32;)c++,l--;if(l)break;l=-1}else if(h===-2)f=!0,c++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||f||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?l:r.start._bufferIndex+l,_index:r.start._index+o,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const Tz={42:Nn,43:Nn,45:Nn,48:Nn,49:Nn,50:Nn,51:Nn,52:Nn,53:Nn,54:Nn,55:Nn,56:Nn,57:Nn,62:Rw},vz={91:dj},Sz={[-2]:wp,[-1]:wp,32:wp},Az={35:Ej,42:hf,45:[BT,hf],60:Tj,61:BT,95:hf,96:MT,126:MT},Cz={38:Lw,92:Ow},wz={[-5]:kp,[-4]:kp,[-3]:kp,33:Hj,38:Lw,42:k0,60:[F7,Nj],91:Fj,92:[gj,Ow],93:i1,95:k0,96:tj},kz={null:[k0,Ez]},Nz={null:[42,95]},Rz={null:[]},Oz=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nz,contentInitial:vz,disable:Rz,document:Tz,flow:Az,flowInitial:Sz,insideSpan:kz,string:Cz,text:wz},Symbol.toStringTag,{value:"Module"}));function Lz(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let l=[],c=[];const f={attempt:$(B),check:$(D),consume:k,enter:N,exit:P,interrupt:$(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:T,parser:e,previous:null,sliceSerialize:y,sliceStream:E,write:m};let p=t.tokenize.call(h,f);return t.resolveAll&&o.push(t),h;function m(X){return l=rr(l,X),C(),l[l.length-1]!==null?[]:(G(t,0),h.events=_d(o,h.events,h),h.events)}function y(X,J){return Dz(E(X),J)}function E(X){return Iz(l,X)}function T(){const{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}=r;return{_bufferIndex:X,_index:J,line:he,column:ue,offset:re}}function S(X){i[X.line]=X.column,V()}function C(){let X;for(;r._index<l.length;){const J=l[r._index];if(typeof J=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<J.length;)w(J.charCodeAt(r._bufferIndex));else w(J)}}function w(X){p=p(X)}function k(X){Re(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,V()):X!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=X}function N(X,J){const he=J||{};return he.type=X,he.start=T(),h.events.push(["enter",he,h]),c.push(he),he}function P(X){const J=c.pop();return J.end=T(),h.events.push(["exit",J,h]),J}function B(X,J){G(X,J.from)}function D(X,J){J.restore()}function $(X,J){return he;function he(ue,re,U){let ee,ce,xe,O;return Array.isArray(ue)?te(ue):"tokenize"in ue?te([ue]):z(ue);function z(ye){return be;function be(ke){const Te=ke!==null&&ye[ke],De=ke!==null&&ye.null,je=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(De)?De:De?[De]:[]];return te(je)(ke)}}function te(ye){return ee=ye,ce=0,ye.length===0?U:M(ye[ce])}function M(ye){return be;function be(ke){return O=ie(),xe=ye,ye.partial||(h.currentConstruct=ye),ye.name&&h.parser.constructs.disable.null.includes(ye.name)?Ee():ye.tokenize.call(J?Object.assign(Object.create(h),J):h,f,ge,Ee)(ke)}}function ge(ye){return X(xe,O),re}function Ee(ye){return O.restore(),++ce<ee.length?M(ee[ce]):U}}}function G(X,J){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&$n(h.events,J,h.events.length-J,X.resolve(h.events.slice(J),h)),X.resolveTo&&(h.events=X.resolveTo(h.events,h))}function ie(){const X=T(),J=h.previous,he=h.currentConstruct,ue=h.events.length,re=Array.from(c);return{from:ue,restore:U};function U(){r=X,h.previous=J,h.currentConstruct=he,h.events.length=ue,c=re,V()}}function V(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Iz(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let l;if(n===i)l=[e[n].slice(r,o)];else{if(l=e.slice(n,i),r>-1){const c=l[0];typeof c=="string"?l[0]=c.slice(r):l.shift()}o>0&&l.push(e[i].slice(0,o))}return l}function Dz(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let l;if(typeof o=="string")l=o;else switch(o){case-5:{l="\r";break}case-4:{l=`
|
|
89
|
+
`;break}case-3:{l=`\r
|
|
90
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(o)}i=o===-2,r.push(l)}return r.join("")}function Mz(e){const r={constructs:xw([Oz,...(e||{}).extensions||[]]),content:i(fz),defined:[],document:i(hz),flow:i(gz),lazy:{},string:i(yz),text:i(_z)};return r;function i(o){return l;function l(c){return Lz(r,o,c)}}}function Pz(e){for(;!Iw(e););return e}const JT=/[\0\t\n\r]/g;function Bz(){let e=1,t="",n=!0,r;return i;function i(o,l,c){const f=[];let h,p,m,y,E;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(l||void 0).decode(o)),m=0,t="",n&&(o.charCodeAt(0)===65279&&m++,n=void 0);m<o.length;){if(JT.lastIndex=m,h=JT.exec(o),y=h&&h.index!==void 0?h.index:o.length,E=o.charCodeAt(y),!h){t=o.slice(m);break}if(E===10&&m===y&&r)f.push(-3),r=void 0;else switch(r&&(f.push(-5),r=void 0),m<y&&(f.push(o.slice(m,y)),e+=y-m),E){case 0:{f.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,f.push(-2);e++<p;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:r=!0,e=1}m=y+1}return c&&(r&&f.push(-5),t&&f.push(t),f.push(null)),f}}const Zw={}.hasOwnProperty;function jz(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Uz(n)(Pz(Mz(n).document().write(Bz()(e,t,!0))))}function Uz(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(st),autolinkProtocol:ie,autolinkEmail:ie,atxHeading:o(On),blockQuote:o(De),characterEscape:ie,characterReference:ie,codeFenced:o(je),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:o(je,l),codeText:o(Je,l),codeTextData:ie,data:ie,codeFlowValue:ie,definition:o(kt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:o(it),hardBreakEscape:o(En),hardBreakTrailing:o(En),htmlFlow:o(xr,l),htmlFlowData:ie,htmlText:o(xr,l),htmlTextData:ie,image:o(He),label:l,link:o(st),listItem:o(yn),listItemValue:y,listOrdered:o(Gt,m),listUnordered:o(Gt),paragraph:o(Hr),reference:M,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:o(On),strong:o(Ud),thematicBreak:o(Hd)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:Te,autolinkProtocol:ke,blockQuote:f(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Ee,characterReferenceMarkerNumeric:Ee,characterReferenceValue:ye,characterReference:be,codeFenced:f(C),codeFencedFence:S,codeFencedFenceInfo:E,codeFencedFenceMeta:T,codeFlowValue:V,codeIndented:f(w),codeText:f(re),codeTextData:V,data:V,definition:f(),definitionDestinationString:P,definitionLabelString:k,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(J),hardBreakTrailing:f(J),htmlFlow:f(he),htmlFlowData:V,htmlText:f(ue),htmlTextData:V,image:f(ee),label:xe,labelText:ce,lineEnding:X,link:f(U),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ge,resourceDestinationString:O,resourceTitleString:z,resource:te,setextHeading:f(G),setextHeadingLineSequence:$,setextHeadingText:D,strong:f(),thematicBreak:f()}};Jw(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let _e={type:"root",children:[]};const Le={stack:[_e],tokenStack:[],config:t,enter:c,exit:h,buffer:l,resume:p,data:n},Ve=[];let ot=-1;for(;++ot<oe.length;)if(oe[ot][1].type==="listOrdered"||oe[ot][1].type==="listUnordered")if(oe[ot][0]==="enter")Ve.push(ot);else{const Ln=Ve.pop();ot=i(oe,Ln,ot)}for(ot=-1;++ot<oe.length;){const Ln=t[oe[ot][0]];Zw.call(Ln,oe[ot][1].type)&&Ln[oe[ot][1].type].call(Object.assign({sliceSerialize:oe[ot][2].sliceSerialize},Le),oe[ot][1])}if(Le.tokenStack.length>0){const Ln=Le.tokenStack[Le.tokenStack.length-1];(Ln[1]||ev).call(Le,void 0,Ln[0])}for(_e.position={start:Va(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Va(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},ot=-1;++ot<t.transforms.length;)_e=t.transforms[ot](_e)||_e;return _e}function i(oe,_e,Le){let Ve=_e-1,ot=-1,Ln=!1,zr,dn,jt,_n;for(;++Ve<=Le;){const pt=oe[Ve];switch(pt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{pt[0]==="enter"?ot++:ot--,_n=void 0;break}case"lineEndingBlank":{pt[0]==="enter"&&(zr&&!_n&&!ot&&!jt&&(jt=Ve),_n=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:_n=void 0}if(!ot&&pt[0]==="enter"&&pt[1].type==="listItemPrefix"||ot===-1&&pt[0]==="exit"&&(pt[1].type==="listUnordered"||pt[1].type==="listOrdered")){if(zr){let Ea=Ve;for(dn=void 0;Ea--;){const or=oe[Ea];if(or[1].type==="lineEnding"||or[1].type==="lineEndingBlank"){if(or[0]==="exit")continue;dn&&(oe[dn][1].type="lineEndingBlank",Ln=!0),or[1].type="lineEnding",dn=Ea}else if(!(or[1].type==="linePrefix"||or[1].type==="blockQuotePrefix"||or[1].type==="blockQuotePrefixWhitespace"||or[1].type==="blockQuoteMarker"||or[1].type==="listItemIndent"))break}jt&&(!dn||jt<dn)&&(zr._spread=!0),zr.end=Object.assign({},dn?oe[dn][1].start:pt[1].end),oe.splice(dn||Ve,0,["exit",zr,pt[2]]),Ve++,Le++}if(pt[1].type==="listItemPrefix"){const Ea={type:"listItem",_spread:!1,start:Object.assign({},pt[1].start),end:void 0};zr=Ea,oe.splice(Ve,0,["enter",Ea,pt[2]]),Ve++,Le++,jt=void 0,_n=!0}}}return oe[_e][1]._spread=Ln,Le}function o(oe,_e){return Le;function Le(Ve){c.call(this,oe(Ve),Ve),_e&&_e.call(this,Ve)}}function l(){this.stack.push({type:"fragment",children:[]})}function c(oe,_e,Le){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([_e,Le||void 0]),oe.position={start:Va(_e.start),end:void 0}}function f(oe){return _e;function _e(Le){oe&&oe.call(this,Le),h.call(this,Le)}}function h(oe,_e){const Le=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==oe.type&&(_e?_e.call(this,oe,Ve[0]):(Ve[1]||ev).call(this,oe,Ve[0]));else throw new Error("Cannot close `"+oe.type+"` ("+Fl({start:oe.start,end:oe.end})+"): it’s not open");Le.position.end=Va(oe.end)}function p(){return t1(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function y(oe){if(this.data.expectingFirstListItemValue){const _e=this.stack[this.stack.length-2];_e.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function E(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.lang=oe}function T(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe.replace(/(\r?\n|\r)$/g,"")}function k(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=mr(this.sliceSerialize(oe)).toLowerCase()}function N(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function P(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function B(oe){const _e=this.stack[this.stack.length-1];if(!_e.depth){const Le=this.sliceSerialize(oe).length;_e.depth=Le}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function $(oe){const _e=this.stack[this.stack.length-1];_e.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function G(){this.data.setextHeadingSlurpLineEnding=void 0}function ie(oe){const Le=this.stack[this.stack.length-1].children;let Ve=Le[Le.length-1];(!Ve||Ve.type!=="text")&&(Ve=fn(),Ve.position={start:Va(oe.start),end:void 0},Le.push(Ve)),this.stack.push(Ve)}function V(oe){const _e=this.stack.pop();_e.value+=this.sliceSerialize(oe),_e.position.end=Va(oe.end)}function X(oe){const _e=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=_e.children[_e.children.length-1];Le.position.end=Va(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(_e.type)&&(ie.call(this,oe),V.call(this,oe))}function J(){this.data.atHardBreak=!0}function he(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function ue(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function re(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.value=oe}function U(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ee(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const _e=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=_e,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ce(oe){const _e=this.sliceSerialize(oe),Le=this.stack[this.stack.length-2];Le.label=d7(_e),Le.identifier=mr(_e).toLowerCase()}function xe(){const oe=this.stack[this.stack.length-1],_e=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const Ve=oe.children;Le.children=Ve}else Le.alt=_e}function O(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.url=oe}function z(){const oe=this.resume(),_e=this.stack[this.stack.length-1];_e.title=oe}function te(){this.data.inReference=void 0}function M(){this.data.referenceType="collapsed"}function ge(oe){const _e=this.resume(),Le=this.stack[this.stack.length-1];Le.label=_e,Le.identifier=mr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function Ee(oe){this.data.characterReferenceType=oe.type}function ye(oe){const _e=this.sliceSerialize(oe),Le=this.data.characterReferenceType;let Ve;Le?(Ve=_w(_e,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=r1(_e);const ot=this.stack[this.stack.length-1];ot.value+=Ve}function be(oe){const _e=this.stack.pop();_e.position.end=Va(oe.end)}function ke(oe){V.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url=this.sliceSerialize(oe)}function Te(oe){V.call(this,oe);const _e=this.stack[this.stack.length-1];_e.url="mailto:"+this.sliceSerialize(oe)}function De(){return{type:"blockquote",children:[]}}function je(){return{type:"code",lang:null,meta:null,value:""}}function Je(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function it(){return{type:"emphasis",children:[]}}function On(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function xr(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function st(){return{type:"link",title:null,url:"",children:[]}}function Gt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function yn(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Hr(){return{type:"paragraph",children:[]}}function Ud(){return{type:"strong",children:[]}}function fn(){return{type:"text",value:""}}function Hd(){return{type:"thematicBreak"}}}function Va(e){return{line:e.line,column:e.column,offset:e.offset}}function Jw(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Jw(e,r):Hz(e,r)}}function Hz(e,t){let n;for(n in t)if(Zw.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ev(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Fl({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Fl({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Fl({start:t.start,end:t.end})+") is still open")}function zz(e){const t=this;t.parser=n;function n(r){return jz(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Fz(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 $z(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
91
|
+
`}]}function Vz(e,t){const n=t.value?t.value+`
|
|
92
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function Gz(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qz(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yz(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=To(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let l,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=o+1,c+=1,e.footnoteCounts.set(r,c);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,f);const h={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,h),e.applyData(t,h)}function Xz(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 Qz(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function ek(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const l=i[i.length-1];return l&&l.type==="text"?l.value+=r:i.push({type:"text",value:r}),i}function Wz(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ek(e,t);const i={src:To(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function Kz(e,t){const n={src:To(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 r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Zz(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function Jz(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return ek(e,t);const i={href:To(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function eF(e,t){const n={href:To(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function tF(e,t,n){const r=e.all(t),i=n?nF(n):tk(t),o={},l=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(i||c!==0||p.type!=="element"||p.tagName!=="p")&&l.push({type:"text",value:`
|
|
93
|
+
`}),p.type==="element"&&p.tagName==="p"&&!i?l.push(...p.children):l.push(p)}const f=r[r.length-1];f&&(i||f.type!=="element"||f.tagName!=="p")&&l.push({type:"text",value:`
|
|
94
|
+
`});const h={type:"element",tagName:"li",properties:o,children:l};return e.patch(t,h),e.applyData(t,h)}function nF(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=tk(n[r])}return t}function tk(e){const t=e.spread;return t??e.children.length>1}function rF(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const l=r[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function aF(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iF(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sF(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oF(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=jr(t.children[1]),f=Ed(t.children[t.children.length-1]);c&&f&&(l.position={start:c,end:f}),i.push(l)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function lF(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,c=l?l.length:t.children.length;let f=-1;const h=[];for(;++f<c;){const m=t.children[f],y={},E=l?l[f]:void 0;E&&(y.align=E);let T={type:"element",tagName:o,properties:y,children:[]};m&&(T.children=e.all(m),e.patch(m,T),T=e.applyData(m,T)),h.push(T)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,p),e.applyData(t,p)}function uF(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const tv=9,nv=32;function cF(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(rv(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(rv(t.slice(i),i>0,!1)),o.join("")}function rv(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===tv||o===nv;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===tv||o===nv;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function fF(e,t){const n={type:"text",value:cF(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function dF(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const hF={blockquote:Fz,break:$z,code:Vz,delete:Gz,emphasis:qz,footnoteReference:Yz,heading:Xz,html:Qz,imageReference:Wz,image:Kz,inlineCode:Zz,linkReference:Jz,link:eF,listItem:tF,list:rF,paragraph:aF,root:iF,strong:sF,table:oF,tableCell:uF,tableRow:lF,text:fF,thematicBreak:dF,toml:Yc,yaml:Yc,definition:Yc,footnoteDefinition:Yc};function Yc(){}function mF(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 pF(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gF(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||mF,r=e.options.footnoteBackLabel||pF,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let f=-1;for(;++f<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[f]);if(!h)continue;const p=e.all(h),m=String(h.identifier).toUpperCase(),y=To(m.toLowerCase());let E=0;const T=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++E<=S;){T.length>0&&T.push({type:"text",value:" "});let k=typeof n=="string"?n:n(f,E);typeof k=="string"&&(k={type:"text",value:k}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+y+(E>1?"-"+E:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(f,E),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const k=C.children[C.children.length-1];k&&k.type==="text"?k.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...T)}else p.push(...T);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+y},children:e.wrap(p,!0)};e.patch(h,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Yi(l),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
95
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
96
|
+
`}]}}const R0={}.hasOwnProperty,bF={};function EF(e,t){const n=t||bF,r=new Map,i=new Map,o=new Map,l={...hF,...n.handlers},c={all:h,applyData:_F,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:l,one:f,options:n,patch:yF,wrap:TF};return Mr(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:i,y=String(p.identifier).toUpperCase();m.has(y)||m.set(y,p)}}),c;function f(p,m){const y=p.type,E=c.handlers[y];if(R0.call(c.handlers,y)&&E)return E(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(y)){if("children"in p){const{children:S,...C}=p,w=Yi(C);return w.children=c.all(p),w}return Yi(p)}return(c.options.unknownHandler||xF)(c,p,m)}function h(p){const m=[];if("children"in p){const y=p.children;let E=-1;for(;++E<y.length;){const T=c.one(y[E],p);if(T){if(E&&y[E-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=av(T.value)),!Array.isArray(T)&&T.type==="element")){const S=T.children[0];S&&S.type==="text"&&(S.value=av(S.value))}Array.isArray(T)?m.push(...T):m.push(T)}}}return m}}function yF(e,t){e.position&&(t.position=QC(e))}function _F(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&o&&Object.assign(n.properties,Yi(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function xF(e,t){const n=t.data||{},r="value"in t&&!(R0.call(n,"hProperties")||R0.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function TF(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
97
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
98
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
99
|
+
`}),n}function av(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function iv(e,t){const n=EF(e,t),r=n.one(e,void 0),i=gF(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
100
|
+
`},i),o}function vF(e,t){return e&&"run"in e?async function(n,r){const i=iv(n,{file:r,...t});await e.run(i,r)}:function(n,r){return iv(n,{file:r,...e||t})}}function sv(e){if(e)throw e}var Lp,ov;function SF(){if(ov)return Lp;ov=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var p=e.call(h,"constructor"),m=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!m)return!1;var y;for(y in h);return typeof y>"u"||e.call(h,y)},l=function(h,p){n&&p.name==="__proto__"?n(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},c=function(h,p){if(p==="__proto__")if(e.call(h,p)){if(r)return r(h,p).value}else return;return h[p]};return Lp=function f(){var h,p,m,y,E,T,S=arguments[0],C=1,w=arguments.length,k=!1;for(typeof S=="boolean"&&(k=S,S=arguments[1]||{},C=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});C<w;++C)if(h=arguments[C],h!=null)for(p in h)m=c(S,p),y=c(h,p),S!==y&&(k&&y&&(o(y)||(E=i(y)))?(E?(E=!1,T=m&&i(m)?m:[]):T=m&&o(m)?m:{},l(S,{name:p,newValue:f(k,T,y)})):typeof y<"u"&&l(S,{name:p,newValue:y}));return S},Lp}var AF=SF();const Ip=lg(AF);function O0(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 CF(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);c(null,...i);function c(f,...h){const p=e[++o];let m=-1;if(f){l(f);return}for(;++m<i.length;)(h[m]===null||h[m]===void 0)&&(h[m]=i[m]);i=h,p?wF(p,c)(...h):l(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function wF(e,t){let n;return r;function r(...l){const c=e.length>l.length;let f;c&&l.push(i);try{f=e.apply(this,l)}catch(h){const p=h;if(c&&n)throw p;return i(p)}c||(f&&f.then&&typeof f.then=="function"?f.then(o,i):f instanceof Error?i(f):o(f))}function i(l,...c){n||(n=!0,t(l,...c))}function o(l){i(null,l)}}const Rr={basename:kF,dirname:NF,extname:RF,join:OF,sep:"/"};function kF(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');hu(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else l<0&&(o=!0,l=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function NF(e){if(hu(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function RF(e){hu(e);let t=e.length,n=-1,r=0,i=-1,o=0,l;for(;t--;){const c=e.codePointAt(t);if(c===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),c===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function OF(...e){let t=-1,n;for(;++t<e.length;)hu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":LF(n)}function LF(e){hu(e);const t=e.codePointAt(0)===47;let n=IF(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function IF(e,t){let n="",r=0,i=-1,o=0,l=-1,c,f;for(;++l<=e.length;){if(l<e.length)c=e.codePointAt(l);else{if(c===47)break;c=47}if(c===47){if(!(i===l-1||o===1))if(i!==l-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",r=0):(n=n.slice(0,f),r=n.length-1-n.lastIndexOf("/")),i=l,o=0;continue}}else if(n.length>0){n="",r=0,i=l,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),r=l-i-1;i=l,o=0}else c===46&&o>-1?o++:o=-1}return n}function hu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const DF={cwd:MF};function MF(){return"/"}function L0(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function PF(e){if(typeof e=="string")e=new URL(e);else if(!L0(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 BF(e)}function BF(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Dp=["history","path","basename","stem","extname","dirname"];class jF{constructor(t){let n;t?L0(t)?n={path:t}:typeof t=="string"||UF(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":DF.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Dp.length;){const o=Dp[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Dp.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){Pp(t,"basename"),Mp(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){lv(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(Mp(t,"extname"),lv(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=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){L0(t)&&(t=PF(t)),Pp(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){Pp(t,"stem"),Mp(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new cn(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mp(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function Pp(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lv(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function UF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const HF=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),zF={}.hasOwnProperty;class f1 extends HF{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=CF()}copy(){const t=new f1;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Ip(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Up("data",this.frozen),this.namespace[t]=n,this):zF.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Up("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,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Xc(t),r=this.parser||this.Parser;return Bp("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Bp("process",this.parser||this.Parser),jp("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,l){const c=Xc(t),f=r.parse(c);r.run(f,c,function(p,m,y){if(p||!m||!y)return h(p);const E=m,T=r.stringify(E,y);VF(T)?y.value=T:y.result=T,h(p,y)});function h(p,m){p||!m?l(p):o?o(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),Bp("processSync",this.parser||this.Parser),jp("processSync",this.compiler||this.Compiler),this.process(t,i),cv("processSync","process",n),r;function i(o,l){n=!0,sv(o),r=l}}run(t,n,r){uv(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(l,c){const f=Xc(n);i.run(t,f,h);function h(p,m,y){const E=m||t;p?c(p):l?l(E):r(void 0,E,y)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),cv("runSync","run",r),i;function o(l,c){sv(l),i=c,r=!0}}stringify(t,n){this.freeze();const r=Xc(n),i=this.compiler||this.Compiler;return jp("stringify",i),uv(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Up("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(h){if(typeof h=="function")f(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...m]=h;f(p,m)}else l(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function l(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(i.settings=Ip(!0,i.settings,h.settings))}function c(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const m=h[p];o(m)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function f(h,p){let m=-1,y=-1;for(;++m<r.length;)if(r[m][0]===h){y=m;break}if(y===-1)r.push([h,...p]);else if(p.length>0){let[E,...T]=p;const S=r[y][1];O0(S)&&O0(E)&&(E=Ip(!0,S,E)),r[y]=[h,E,...T]}}}}const FF=new f1().freeze();function Bp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function jp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Up(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 uv(e){if(!O0(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cv(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Xc(e){return $F(e)?e:new jF(e)}function $F(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function VF(e){return typeof e=="string"||GF(e)}function GF(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}function d1(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var is=d1();function nk(e){is=e}var Bi={exec:()=>null};function tt(e,t=""){let n=typeof e=="string"?e:e.source,r={replace:(i,o)=>{let l=typeof o=="string"?o:o.source;return l=l.replace(gn.caret,"$1"),n=n.replace(i,l),r},getRegex:()=>new RegExp(n,t)};return r}var qF=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),gn={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)}}>`)},YF=/^(?:[ \t]*(?:\n|$))+/,XF=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,QF=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,mu=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,WF=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,h1=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,rk=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ak=tt(rk).replace(/bull/g,h1).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(),KF=tt(rk).replace(/bull/g,h1).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(),m1=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ZF=/^[^\n]+/,p1=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,JF=tt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",p1).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),e$=tt(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,h1).getRegex(),vd="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",g1=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,t$=tt("^ {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",g1).replace("tag",vd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ik=tt(m1).replace("hr",mu).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",vd).getRegex(),n$=tt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ik).getRegex(),b1={blockquote:n$,code:XF,def:JF,fences:QF,heading:WF,hr:mu,html:t$,lheading:ak,list:e$,newline:YF,paragraph:ik,table:Bi,text:ZF},fv=tt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",mu).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",vd).getRegex(),r$={...b1,lheading:KF,table:fv,paragraph:tt(m1).replace("hr",mu).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",fv).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",vd).getRegex()},a$={...b1,html:tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",g1).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:tt(m1).replace("hr",mu).replace("heading",` *#{1,6} *[^
|
|
101
|
+
]`).replace("lheading",ak).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},i$=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,s$=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,sk=/^( {2,}|\\)\n(?!\s*$)/,o$=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,vo=/[\p{P}\p{S}]/u,Sd=/[\s\p{P}\p{S}]/u,E1=/[^\s\p{P}\p{S}]/u,l$=tt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Sd).getRegex(),ok=/(?!~)[\p{P}\p{S}]/u,u$=/(?!~)[\s\p{P}\p{S}]/u,c$=/(?:[^\s\p{P}\p{S}]|~)/u,f$=tt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",qF?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),lk=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,d$=tt(lk,"u").replace(/punct/g,vo).getRegex(),h$=tt(lk,"u").replace(/punct/g,ok).getRegex(),uk="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",m$=tt(uk,"gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,Sd).replace(/punct/g,vo).getRegex(),p$=tt(uk,"gu").replace(/notPunctSpace/g,c$).replace(/punctSpace/g,u$).replace(/punct/g,ok).getRegex(),g$=tt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,Sd).replace(/punct/g,vo).getRegex(),b$=tt(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,vo).getRegex(),E$="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",y$=tt(E$,"gu").replace(/notPunctSpace/g,E1).replace(/punctSpace/g,Sd).replace(/punct/g,vo).getRegex(),_$=tt(/\\(punct)/,"gu").replace(/punct/g,vo).getRegex(),x$=tt(/^<(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(),T$=tt(g1).replace("(?:-->|$)","-->").getRegex(),v$=tt("^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",T$).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Df=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,S$=tt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Df).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ck=tt(/^!?\[(label)\]\[(ref)\]/).replace("label",Df).replace("ref",p1).getRegex(),fk=tt(/^!?\[(ref)\](?:\[\])?/).replace("ref",p1).getRegex(),A$=tt("reflink|nolink(?!\\()","g").replace("reflink",ck).replace("nolink",fk).getRegex(),dv=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,y1={_backpedal:Bi,anyPunctuation:_$,autolink:x$,blockSkip:f$,br:sk,code:s$,del:Bi,delLDelim:Bi,delRDelim:Bi,emStrongLDelim:d$,emStrongRDelimAst:m$,emStrongRDelimUnd:g$,escape:i$,link:S$,nolink:fk,punctuation:l$,reflink:ck,reflinkSearch:A$,tag:v$,text:o$,url:Bi},C$={...y1,link:tt(/^!?\[(label)\]\((.*?)\)/).replace("label",Df).getRegex(),reflink:tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Df).getRegex()},I0={...y1,emStrongRDelimAst:p$,emStrongLDelim:h$,delLDelim:b$,delRDelim:y$,url:tt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",dv).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:tt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",dv).getRegex()},w$={...I0,br:tt(sk).replace("{2,}","*").getRegex(),text:tt(I0.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Qc={normal:b1,gfm:r$,pedantic:a$},Cl={normal:y1,gfm:I0,breaks:w$,pedantic:C$},k$={"&":"&","<":"<",">":">",'"':""","'":"'"},hv=e=>k$[e];function wr(e,t){if(t){if(gn.escapeTest.test(e))return e.replace(gn.escapeReplace,hv)}else if(gn.escapeTestNoEncode.test(e))return e.replace(gn.escapeReplaceNoEncode,hv);return e}function mv(e){try{e=encodeURI(e).replace(gn.percentDecode,"%")}catch{return null}return e}function pv(e,t){let n=e.replace(gn.findPipe,(o,l,c)=>{let f=!1,h=l;for(;--h>=0&&c[h]==="\\";)f=!f;return f?"|":" |"}),r=n.split(gn.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),t)if(r.length>t)r.splice(t);else for(;r.length<t;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(gn.slashPipe,"|");return r}function wl(e,t,n){let r=e.length;if(r===0)return"";let i=0;for(;i<r&&e.charAt(r-i-1)===t;)i++;return e.slice(0,r-i)}function N$(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]==="\\")r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function R$(e,t=0){let n=t,r="";for(let i of e)if(i===" "){let o=4-n%4;r+=" ".repeat(o),n+=o}else r+=i,n++;return r}function gv(e,t,n,r,i){let o=t.href,l=t.title||null,c=e[1].replace(i.other.outputLinkReplace,"$1");r.state.inLink=!0;let f={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:l,text:c,tokens:r.inlineTokens(c)};return r.state.inLink=!1,f}function O$(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
102
|
+
`).map(o=>{let l=o.match(n.other.beginningSpace);if(l===null)return o;let[c]=l;return c.length>=i.length?o.slice(i.length):o}).join(`
|
|
103
|
+
`)}var Mf=class{options;rules;lexer;constructor(t){this.options=t||is}space(t){let n=this.rules.block.newline.exec(t);if(n&&n[0].length>0)return{type:"space",raw:n[0]}}code(t){let n=this.rules.block.code.exec(t);if(n){let r=n[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?r:wl(r,`
|
|
104
|
+
`)}}}fences(t){let n=this.rules.block.fences.exec(t);if(n){let r=n[0],i=O$(r,n[3]||"",this.rules);return{type:"code",raw:r,lang:n[2]?n[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):n[2],text:i}}}heading(t){let n=this.rules.block.heading.exec(t);if(n){let r=n[2].trim();if(this.rules.other.endingHash.test(r)){let i=wl(r,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(r=i.trim())}return{type:"heading",raw:n[0],depth:n[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(t){let n=this.rules.block.hr.exec(t);if(n)return{type:"hr",raw:wl(n[0],`
|
|
105
|
+
`)}}blockquote(t){let n=this.rules.block.blockquote.exec(t);if(n){let r=wl(n[0],`
|
|
106
|
+
`).split(`
|
|
107
|
+
`),i="",o="",l=[];for(;r.length>0;){let c=!1,f=[],h;for(h=0;h<r.length;h++)if(this.rules.other.blockquoteStart.test(r[h]))f.push(r[h]),c=!0;else if(!c)f.push(r[h]);else break;r=r.slice(h);let p=f.join(`
|
|
108
|
+
`),m=p.replace(this.rules.other.blockquoteSetextReplace,`
|
|
109
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
|
|
110
|
+
${p}`:p,o=o?`${o}
|
|
111
|
+
${m}`:m;let y=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(m,l,!0),this.lexer.state.top=y,r.length===0)break;let E=l.at(-1);if(E?.type==="code")break;if(E?.type==="blockquote"){let T=E,S=T.raw+`
|
|
112
|
+
`+r.join(`
|
|
113
|
+
`),C=this.blockquote(S);l[l.length-1]=C,i=i.substring(0,i.length-T.raw.length)+C.raw,o=o.substring(0,o.length-T.text.length)+C.text;break}else if(E?.type==="list"){let T=E,S=T.raw+`
|
|
114
|
+
`+r.join(`
|
|
115
|
+
`),C=this.list(S);l[l.length-1]=C,i=i.substring(0,i.length-E.raw.length)+C.raw,o=o.substring(0,o.length-T.raw.length)+C.raw,r=S.substring(l.at(-1).raw.length).split(`
|
|
116
|
+
`);continue}}return{type:"blockquote",raw:i,tokens:l,text:o}}}list(t){let n=this.rules.block.list.exec(t);if(n){let r=n[1].trim(),i=r.length>1,o={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let l=this.rules.other.listItemRegex(r),c=!1;for(;t;){let h=!1,p="",m="";if(!(n=l.exec(t))||this.rules.block.hr.test(t))break;p=n[0],t=t.substring(p.length);let y=R$(n[2].split(`
|
|
117
|
+
`,1)[0],n[1].length),E=t.split(`
|
|
118
|
+
`,1)[0],T=!y.trim(),S=0;if(this.options.pedantic?(S=2,m=y.trimStart()):T?S=n[1].length+1:(S=y.search(this.rules.other.nonSpaceChar),S=S>4?1:S,m=y.slice(S),S+=n[1].length),T&&this.rules.other.blankLine.test(E)&&(p+=E+`
|
|
119
|
+
`,t=t.substring(E.length+1),h=!0),!h){let C=this.rules.other.nextBulletRegex(S),w=this.rules.other.hrRegex(S),k=this.rules.other.fencesBeginRegex(S),N=this.rules.other.headingBeginRegex(S),P=this.rules.other.htmlBeginRegex(S),B=this.rules.other.blockquoteBeginRegex(S);for(;t;){let D=t.split(`
|
|
120
|
+
`,1)[0],$;if(E=D,this.options.pedantic?(E=E.replace(this.rules.other.listReplaceNesting," "),$=E):$=E.replace(this.rules.other.tabCharGlobal," "),k.test(E)||N.test(E)||P.test(E)||B.test(E)||C.test(E)||w.test(E))break;if($.search(this.rules.other.nonSpaceChar)>=S||!E.trim())m+=`
|
|
121
|
+
`+$.slice(S);else{if(T||y.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||k.test(y)||N.test(y)||w.test(y))break;m+=`
|
|
122
|
+
`+E}T=!E.trim(),p+=D+`
|
|
123
|
+
`,t=t.substring(D.length+1),y=$.slice(S)}}o.loose||(c?o.loose=!0:this.rules.other.doubleBlankLine.test(p)&&(c=!0)),o.items.push({type:"list_item",raw:p,task:!!this.options.gfm&&this.rules.other.listIsTask.test(m),loose:!1,text:m,tokens:[]}),o.raw+=p}let f=o.items.at(-1);if(f)f.raw=f.raw.trimEnd(),f.text=f.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let h of o.items){if(this.lexer.state.top=!1,h.tokens=this.lexer.blockTokens(h.text,[]),h.task){if(h.text=h.text.replace(this.rules.other.listReplaceTask,""),h.tokens[0]?.type==="text"||h.tokens[0]?.type==="paragraph"){h.tokens[0].raw=h.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),h.tokens[0].text=h.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let m=this.lexer.inlineQueue.length-1;m>=0;m--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[m].src)){this.lexer.inlineQueue[m].src=this.lexer.inlineQueue[m].src.replace(this.rules.other.listReplaceTask,"");break}}let p=this.rules.other.listTaskCheckbox.exec(h.raw);if(p){let m={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};h.checked=m.checked,o.loose?h.tokens[0]&&["paragraph","text"].includes(h.tokens[0].type)&&"tokens"in h.tokens[0]&&h.tokens[0].tokens?(h.tokens[0].raw=m.raw+h.tokens[0].raw,h.tokens[0].text=m.raw+h.tokens[0].text,h.tokens[0].tokens.unshift(m)):h.tokens.unshift({type:"paragraph",raw:m.raw,text:m.raw,tokens:[m]}):h.tokens.unshift(m)}}if(!o.loose){let p=h.tokens.filter(y=>y.type==="space"),m=p.length>0&&p.some(y=>this.rules.other.anyLine.test(y.raw));o.loose=m}}if(o.loose)for(let h of o.items){h.loose=!0;for(let p of h.tokens)p.type==="text"&&(p.type="paragraph")}return o}}html(t){let n=this.rules.block.html.exec(t);if(n)return{type:"html",block:!0,raw:n[0],pre:n[1]==="pre"||n[1]==="script"||n[1]==="style",text:n[0]}}def(t){let n=this.rules.block.def.exec(t);if(n){let r=n[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=n[2]?n[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=n[3]?n[3].substring(1,n[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):n[3];return{type:"def",tag:r,raw:n[0],href:i,title:o}}}table(t){let n=this.rules.block.table.exec(t);if(!n||!this.rules.other.tableDelimiter.test(n[2]))return;let r=pv(n[1]),i=n[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=n[3]?.trim()?n[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
124
|
+
`):[],l={type:"table",raw:n[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let c of i)this.rules.other.tableAlignRight.test(c)?l.align.push("right"):this.rules.other.tableAlignCenter.test(c)?l.align.push("center"):this.rules.other.tableAlignLeft.test(c)?l.align.push("left"):l.align.push(null);for(let c=0;c<r.length;c++)l.header.push({text:r[c],tokens:this.lexer.inline(r[c]),header:!0,align:l.align[c]});for(let c of o)l.rows.push(pv(c,l.header.length).map((f,h)=>({text:f,tokens:this.lexer.inline(f),header:!1,align:l.align[h]})));return l}}lheading(t){let n=this.rules.block.lheading.exec(t);if(n){let r=n[1].trim();return{type:"heading",raw:n[0],depth:n[2].charAt(0)==="="?1:2,text:r,tokens:this.lexer.inline(r)}}}paragraph(t){let n=this.rules.block.paragraph.exec(t);if(n){let r=n[1].charAt(n[1].length-1)===`
|
|
125
|
+
`?n[1].slice(0,-1):n[1];return{type:"paragraph",raw:n[0],text:r,tokens:this.lexer.inline(r)}}}text(t){let n=this.rules.block.text.exec(t);if(n)return{type:"text",raw:n[0],text:n[0],tokens:this.lexer.inline(n[0])}}escape(t){let n=this.rules.inline.escape.exec(t);if(n)return{type:"escape",raw:n[0],text:n[1]}}tag(t){let n=this.rules.inline.tag.exec(t);if(n)return!this.lexer.state.inLink&&this.rules.other.startATag.test(n[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(n[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(n[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(n[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:n[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:n[0]}}link(t){let n=this.rules.inline.link.exec(t);if(n){let r=n[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let l=wl(r.slice(0,-1),"\\");if((r.length-l.length)%2===0)return}else{let l=N$(n[2],"()");if(l===-2)return;if(l>-1){let c=(n[0].indexOf("!")===0?5:4)+n[1].length+l;n[2]=n[2].substring(0,l),n[0]=n[0].substring(0,c).trim(),n[3]=""}}let i=n[2],o="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(i);l&&(i=l[1],o=l[3])}else o=n[3]?n[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?i=i.slice(1):i=i.slice(1,-1)),gv(n,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},n[0],this.lexer,this.rules)}}reflink(t,n){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let i=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=n[i.toLowerCase()];if(!o){let l=r[0].charAt(0);return{type:"text",raw:l,text:l}}return gv(r,o,r[0],this.lexer,this.rules)}}emStrong(t,n,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,f=o,h=0,p=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(p.lastIndex=0,n=n.slice(-1*t.length+o);(i=p.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(c=[...l].length,i[3]||i[4]){f+=c;continue}else if((i[5]||i[6])&&o%3&&!((o+c)%3)){h+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f+h);let m=[...i[0]][0].length,y=t.slice(0,o+i.index+m+c);if(Math.min(o,c)%2){let T=y.slice(1,-1);return{type:"em",raw:y,text:T,tokens:this.lexer.inlineTokens(T)}}let E=y.slice(2,-2);return{type:"strong",raw:y,text:E,tokens:this.lexer.inlineTokens(E)}}}}codespan(t){let n=this.rules.inline.code.exec(t);if(n){let r=n[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(r),o=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return i&&o&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:n[0],text:r}}}br(t){let n=this.rules.inline.br.exec(t);if(n)return{type:"br",raw:n[0]}}del(t,n,r=""){let i=this.rules.inline.delLDelim.exec(t);if(i&&(!i[1]||!r||this.rules.inline.punctuation.exec(r))){let o=[...i[0]].length-1,l,c,f=o,h=this.rules.inline.delRDelim;for(h.lastIndex=0,n=n.slice(-1*t.length+o);(i=h.exec(n))!==null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l||(c=[...l].length,c!==o))continue;if(i[3]||i[4]){f+=c;continue}if(f-=c,f>0)continue;c=Math.min(c,c+f);let p=[...i[0]][0].length,m=t.slice(0,o+i.index+p+c),y=m.slice(o,-o);return{type:"del",raw:m,text:y,tokens:this.lexer.inlineTokens(y)}}}}autolink(t){let n=this.rules.inline.autolink.exec(t);if(n){let r,i;return n[2]==="@"?(r=n[1],i="mailto:"+r):(r=n[1],i=r),{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}url(t){let n;if(n=this.rules.inline.url.exec(t)){let r,i;if(n[2]==="@")r=n[0],i="mailto:"+r;else{let o;do o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])?.[0]??"";while(o!==n[0]);r=n[0],n[1]==="www."?i="http://"+n[0]:i=n[0]}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(t){let n=this.rules.inline.text.exec(t);if(n){let r=this.lexer.state.inRawBlock;return{type:"text",raw:n[0],text:n[0],escaped:r}}}},ar=class D0{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||is,this.options.tokenizer=this.options.tokenizer||new Mf,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:gn,block:Qc.normal,inline:Cl.normal};this.options.pedantic?(n.block=Qc.pedantic,n.inline=Cl.pedantic):this.options.gfm&&(n.block=Qc.gfm,this.options.breaks?n.inline=Cl.breaks:n.inline=Cl.gfm),this.tokenizer.rules=n}static get rules(){return{block:Qc,inline:Cl}}static lex(t,n){return new D0(n).lex(t)}static lexInline(t,n){return new D0(n).inlineTokens(t)}lex(t){t=t.replace(gn.carriageReturn,`
|
|
126
|
+
`),this.blockTokens(t,this.tokens);for(let n=0;n<this.inlineQueue.length;n++){let r=this.inlineQueue[n];this.inlineTokens(r.src,r.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,n=[],r=!1){for(this.tokenizer.lexer=this,this.options.pedantic&&(t=t.replace(gn.tabCharGlobal," ").replace(gn.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(l=>(i=l.call({lexer:this},t,n))?(t=t.substring(i.raw.length),n.push(i),!0):!1))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let l=n.at(-1);i.raw.length===1&&l!==void 0?l.raw+=`
|
|
127
|
+
`:n.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
128
|
+
`)?"":`
|
|
129
|
+
`)+i.raw,l.text+=`
|
|
130
|
+
`+i.text,this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
131
|
+
`)?"":`
|
|
132
|
+
`)+i.raw,l.text+=`
|
|
133
|
+
`+i.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},n.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),n.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),n.push(i);continue}let o=t;if(this.options.extensions?.startBlock){let l=1/0,c=t.slice(1),f;this.options.extensions.startBlock.forEach(h=>{f=h.call({lexer:this},c),typeof f=="number"&&f>=0&&(l=Math.min(l,f))}),l<1/0&&l>=0&&(o=t.substring(0,l+1))}if(this.state.top&&(i=this.tokenizer.paragraph(o))){let l=n.at(-1);r&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
|
|
134
|
+
`)?"":`
|
|
135
|
+
`)+i.raw,l.text+=`
|
|
136
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i),r=o.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let l=n.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
|
|
137
|
+
`)?"":`
|
|
138
|
+
`)+i.raw,l.text+=`
|
|
139
|
+
`+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):n.push(i);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,n}inline(t,n=[]){return this.inlineQueue.push({src:t,tokens:n}),n}inlineTokens(t,n=[]){this.tokenizer.lexer=this;let r=t,i=null;if(this.tokens.links){let f=Object.keys(this.tokens.links);if(f.length>0)for(;(i=this.tokenizer.rules.inline.reflinkSearch.exec(r))!==null;)f.includes(i[0].slice(i[0].lastIndexOf("[")+1,-1))&&(r=r.slice(0,i.index)+"["+"a".repeat(i[0].length-2)+"]"+r.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(i=this.tokenizer.rules.inline.anyPunctuation.exec(r))!==null;)r=r.slice(0,i.index)+"++"+r.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let o;for(;(i=this.tokenizer.rules.inline.blockSkip.exec(r))!==null;)o=i[2]?i[2].length:0,r=r.slice(0,i.index+o)+"["+"a".repeat(i[0].length-o-2)+"]"+r.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);r=this.options.hooks?.emStrongMask?.call({lexer:this},r)??r;let l=!1,c="";for(;t;){l||(c=""),l=!1;let f;if(this.options.extensions?.inline?.some(p=>(f=p.call({lexer:this},t,n))?(t=t.substring(f.raw.length),n.push(f),!0):!1))continue;if(f=this.tokenizer.escape(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.tag(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.link(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(f.raw.length);let p=n.at(-1);f.type==="text"&&p?.type==="text"?(p.raw+=f.raw,p.text+=f.text):n.push(f);continue}if(f=this.tokenizer.emStrong(t,r,c)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.codespan(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.br(t)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.del(t,r,c)){t=t.substring(f.raw.length),n.push(f);continue}if(f=this.tokenizer.autolink(t)){t=t.substring(f.raw.length),n.push(f);continue}if(!this.state.inLink&&(f=this.tokenizer.url(t))){t=t.substring(f.raw.length),n.push(f);continue}let h=t;if(this.options.extensions?.startInline){let p=1/0,m=t.slice(1),y;this.options.extensions.startInline.forEach(E=>{y=E.call({lexer:this},m),typeof y=="number"&&y>=0&&(p=Math.min(p,y))}),p<1/0&&p>=0&&(h=t.substring(0,p+1))}if(f=this.tokenizer.inlineText(h)){t=t.substring(f.raw.length),f.raw.slice(-1)!=="_"&&(c=f.raw.slice(-1)),l=!0;let p=n.at(-1);p?.type==="text"?(p.raw+=f.raw,p.text+=f.text):n.push(f);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return n}},Pf=class{options;parser;constructor(t){this.options=t||is}space(t){return""}code({text:t,lang:n,escaped:r}){let i=(n||"").match(gn.notSpaceStart)?.[0],o=t.replace(gn.endingNewline,"")+`
|
|
140
|
+
`;return i?'<pre><code class="language-'+wr(i)+'">'+(r?o:wr(o,!0))+`</code></pre>
|
|
141
|
+
`:"<pre><code>"+(r?o:wr(o,!0))+`</code></pre>
|
|
142
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
143
|
+
${this.parser.parse(t)}</blockquote>
|
|
144
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:n}){return`<h${n}>${this.parser.parseInline(t)}</h${n}>
|
|
145
|
+
`}hr(t){return`<hr>
|
|
146
|
+
`}list(t){let n=t.ordered,r=t.start,i="";for(let c=0;c<t.items.length;c++){let f=t.items[c];i+=this.listitem(f)}let o=n?"ol":"ul",l=n&&r!==1?' start="'+r+'"':"";return"<"+o+l+`>
|
|
147
|
+
`+i+"</"+o+`>
|
|
148
|
+
`}listitem(t){return`<li>${this.parser.parse(t.tokens)}</li>
|
|
149
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
150
|
+
`}table(t){let n="",r="";for(let o=0;o<t.header.length;o++)r+=this.tablecell(t.header[o]);n+=this.tablerow({text:r});let i="";for(let o=0;o<t.rows.length;o++){let l=t.rows[o];r="";for(let c=0;c<l.length;c++)r+=this.tablecell(l[c]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
|
|
151
|
+
<thead>
|
|
152
|
+
`+n+`</thead>
|
|
153
|
+
`+i+`</table>
|
|
154
|
+
`}tablerow({text:t}){return`<tr>
|
|
155
|
+
${t}</tr>
|
|
156
|
+
`}tablecell(t){let n=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+n+`</${r}>
|
|
157
|
+
`}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>${wr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:n,tokens:r}){let i=this.parser.parseInline(r),o=mv(t);if(o===null)return i;t=o;let l='<a href="'+t+'"';return n&&(l+=' title="'+wr(n)+'"'),l+=">"+i+"</a>",l}image({href:t,title:n,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let o=mv(t);if(o===null)return wr(r);t=o;let l=`<img src="${t}" alt="${wr(r)}"`;return n&&(l+=` title="${wr(n)}"`),l+=">",l}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:wr(t.text)}},_1=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}checkbox({raw:t}){return t}},dr=class M0{options;renderer;textRenderer;constructor(t){this.options=t||is,this.options.renderer=this.options.renderer||new Pf,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new _1}static parse(t,n){return new M0(n).parse(t)}static parseInline(t,n){return new M0(n).parseInline(t)}parse(t){this.renderer.parser=this;let n="";for(let r=0;r<t.length;r++){let i=t[r];if(this.options.extensions?.renderers?.[i.type]){let l=i,c=this.options.extensions.renderers[l.type].call({parser:this},l);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(l.type)){n+=c||"";continue}}let o=i;switch(o.type){case"space":{n+=this.renderer.space(o);break}case"hr":{n+=this.renderer.hr(o);break}case"heading":{n+=this.renderer.heading(o);break}case"code":{n+=this.renderer.code(o);break}case"table":{n+=this.renderer.table(o);break}case"blockquote":{n+=this.renderer.blockquote(o);break}case"list":{n+=this.renderer.list(o);break}case"checkbox":{n+=this.renderer.checkbox(o);break}case"html":{n+=this.renderer.html(o);break}case"def":{n+=this.renderer.def(o);break}case"paragraph":{n+=this.renderer.paragraph(o);break}case"text":{n+=this.renderer.text(o);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return n}parseInline(t,n=this.renderer){this.renderer.parser=this;let r="";for(let i=0;i<t.length;i++){let o=t[i];if(this.options.extensions?.renderers?.[o.type]){let c=this.options.extensions.renderers[o.type].call({parser:this},o);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){r+=c||"";continue}}let l=o;switch(l.type){case"escape":{r+=n.text(l);break}case"html":{r+=n.html(l);break}case"link":{r+=n.link(l);break}case"image":{r+=n.image(l);break}case"checkbox":{r+=n.checkbox(l);break}case"strong":{r+=n.strong(l);break}case"em":{r+=n.em(l);break}case"codespan":{r+=n.codespan(l);break}case"br":{r+=n.br(l);break}case"del":{r+=n.del(l);break}case"text":{r+=n.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return r}},Ll=class{options;block;constructor(t){this.options=t||is}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(t=this.block){return t?ar.lex:ar.lexInline}provideParser(t=this.block){return t?dr.parse:dr.parseInline}},L$=class{defaults=d1();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=dr;Renderer=Pf;TextRenderer=_1;Lexer=ar;Tokenizer=Mf;Hooks=Ll;constructor(...t){this.use(...t)}walkTokens(t,n){let r=[];for(let i of t)switch(r=r.concat(n.call(this,i)),i.type){case"table":{let o=i;for(let l of o.header)r=r.concat(this.walkTokens(l.tokens,n));for(let l of o.rows)for(let c of l)r=r.concat(this.walkTokens(c.tokens,n));break}case"list":{let o=i;r=r.concat(this.walkTokens(o.items,n));break}default:{let o=i;this.defaults.extensions?.childTokens?.[o.type]?this.defaults.extensions.childTokens[o.type].forEach(l=>{let c=o[l].flat(1/0);r=r.concat(this.walkTokens(c,n))}):o.tokens&&(r=r.concat(this.walkTokens(o.tokens,n)))}}return r}use(...t){let n=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(r=>{let i={...r};if(i.async=this.defaults.async||i.async||!1,r.extensions&&(r.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let l=n.renderers[o.name];l?n.renderers[o.name]=function(...c){let f=o.renderer.apply(this,c);return f===!1&&(f=l.apply(this,c)),f}:n.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=n[o.level];l?l.unshift(o.tokenizer):n[o.level]=[o.tokenizer],o.start&&(o.level==="block"?n.startBlock?n.startBlock.push(o.start):n.startBlock=[o.start]:o.level==="inline"&&(n.startInline?n.startInline.push(o.start):n.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(n.childTokens[o.name]=o.childTokens)}),i.extensions=n),r.renderer){let o=this.defaults.renderer||new Pf(this.defaults);for(let l in r.renderer){if(!(l in o))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let c=l,f=r.renderer[c],h=o[c];o[c]=(...p)=>{let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m||""}}i.renderer=o}if(r.tokenizer){let o=this.defaults.tokenizer||new Mf(this.defaults);for(let l in r.tokenizer){if(!(l in o))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let c=l,f=r.tokenizer[c],h=o[c];o[c]=(...p)=>{let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.tokenizer=o}if(r.hooks){let o=this.defaults.hooks||new Ll;for(let l in r.hooks){if(!(l in o))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let c=l,f=r.hooks[c],h=o[c];Ll.passThroughHooks.has(l)?o[c]=p=>{if(this.defaults.async&&Ll.passThroughHooksRespectAsync.has(l))return(async()=>{let y=await f.call(o,p);return h.call(o,y)})();let m=f.call(o,p);return h.call(o,m)}:o[c]=(...p)=>{if(this.defaults.async)return(async()=>{let y=await f.apply(o,p);return y===!1&&(y=await h.apply(o,p)),y})();let m=f.apply(o,p);return m===!1&&(m=h.apply(o,p)),m}}i.hooks=o}if(r.walkTokens){let o=this.defaults.walkTokens,l=r.walkTokens;i.walkTokens=function(c){let f=[];return f.push(l.call(this,c)),o&&(f=f.concat(o.call(this,c))),f}}this.defaults={...this.defaults,...i}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,n){return ar.lex(t,n??this.defaults)}parser(t,n){return dr.parse(t,n??this.defaults)}parseMarkdown(t){return(n,r)=>{let i={...r},o={...this.defaults,...i},l=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&i.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof n>"u"||n===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let c=o.hooks?await o.hooks.preprocess(n):n,f=await(o.hooks?await o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(c,o),h=o.hooks?await o.hooks.processAllTokens(f):f;o.walkTokens&&await Promise.all(this.walkTokens(h,o.walkTokens));let p=await(o.hooks?await o.hooks.provideParser(t):t?dr.parse:dr.parseInline)(h,o);return o.hooks?await o.hooks.postprocess(p):p})().catch(l);try{o.hooks&&(n=o.hooks.preprocess(n));let c=(o.hooks?o.hooks.provideLexer(t):t?ar.lex:ar.lexInline)(n,o);o.hooks&&(c=o.hooks.processAllTokens(c)),o.walkTokens&&this.walkTokens(c,o.walkTokens);let f=(o.hooks?o.hooks.provideParser(t):t?dr.parse:dr.parseInline)(c,o);return o.hooks&&(f=o.hooks.postprocess(f)),f}catch(c){return l(c)}}}onError(t,n){return r=>{if(r.message+=`
|
|
158
|
+
Please report this to https://github.com/markedjs/marked.`,t){let i="<p>An error occurred:</p><pre>"+wr(r.message+"",!0)+"</pre>";return n?Promise.resolve(i):i}if(n)return Promise.reject(r);throw r}}},Qi=new L$;function mt(e,t){return Qi.parse(e,t)}mt.options=mt.setOptions=function(e){return Qi.setOptions(e),mt.defaults=Qi.defaults,nk(mt.defaults),mt};mt.getDefaults=d1;mt.defaults=is;mt.use=function(...e){return Qi.use(...e),mt.defaults=Qi.defaults,nk(mt.defaults),mt};mt.walkTokens=function(e,t){return Qi.walkTokens(e,t)};mt.parseInline=Qi.parseInline;mt.Parser=dr;mt.parser=dr.parse;mt.Renderer=Pf;mt.TextRenderer=_1;mt.Lexer=ar;mt.lexer=ar.lex;mt.Tokenizer=Mf;mt.Hooks=Ll;mt.parse=mt;mt.options;mt.setOptions;mt.use;mt.walkTokens;mt.parseInline;dr.parse;ar.lex;var I$=300,D$="300px",M$=500;function P$(e={}){let{immediate:t=!1,debounceDelay:n=I$,rootMargin:r=D$,idleTimeout:i=M$}=e,[o,l]=v.useState(!1),c=v.useRef(null),f=v.useRef(null),h=v.useRef(null),p=v.useMemo(()=>E=>{let T=Date.now();return window.setTimeout(()=>{E({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-T))})},1)},[]),m=v.useMemo(()=>typeof window<"u"&&window.requestIdleCallback?(E,T)=>window.requestIdleCallback(E,T):p,[p]),y=v.useMemo(()=>typeof window<"u"&&window.cancelIdleCallback?E=>window.cancelIdleCallback(E):E=>{clearTimeout(E)},[]);return v.useEffect(()=>{if(t){l(!0);return}let E=c.current;if(!E)return;f.current&&(clearTimeout(f.current),f.current=null),h.current&&(y(h.current),h.current=null);let T=()=>{f.current&&(clearTimeout(f.current),f.current=null),h.current&&(y(h.current),h.current=null)},S=N=>{h.current=m(P=>{P.timeRemaining()>0||P.didTimeout?(l(!0),N.disconnect()):h.current=m(()=>{l(!0),N.disconnect()},{timeout:i/2})},{timeout:i})},C=N=>{T(),f.current=window.setTimeout(()=>{var P,B;let D=N.takeRecords();(D.length===0||(B=(P=D.at(-1))==null?void 0:P.isIntersecting)!=null&&B)&&S(N)},n)},w=(N,P)=>{N.isIntersecting?C(P):T()},k=new IntersectionObserver(N=>{for(let P of N)w(P,k)},{rootMargin:r,threshold:0});return k.observe(E),()=>{f.current&&clearTimeout(f.current),h.current&&y(h.current),k.disconnect()}},[t,n,r,i,y,m]),{shouldRender:o,containerRef:c}}var dk=/\s/,B$=/^\s+$/,j$=new Set(["code","pre","svg","math","annotation"]),U$=e=>typeof e=="object"&&e!==null&&"type"in e&&e.type==="element",H$=e=>e.some(t=>U$(t)&&j$.has(t.tagName)),z$=e=>{let t=[],n="",r=!1;for(let i of e){let o=dk.test(i);o!==r&&n&&(t.push(n),n=""),n+=i,r=o}return n&&t.push(n),t},F$=e=>{let t=[],n="";for(let r of e)dk.test(r)?n+=r:(n&&(t.push(n),n=""),t.push(r));return n&&t.push(n),t},$$=(e,t,n,r,i,o)=>{let l=`--sd-animation:sd-${t};--sd-duration:${i?0:n}ms;--sd-easing:${r}`;return o&&(l+=`;--sd-delay:${o}ms`),{type:"element",tagName:"span",properties:{"data-sd-animate":!0,style:l},children:[{type:"text",value:e}]}},V$=(e,t,n,r,i)=>{let o=t.at(-1);if(!(o&&"children"in o))return;if(H$(t))return to;let l=o,c=l.children.indexOf(e);if(c===-1)return;let f=e.value;if(!f.trim()){i.count+=f.length;return}let h=n.sep==="char"?F$(f):z$(f),p=r.prevContentLength,m=h.map(y=>{let E=i.count;if(i.count+=y.length,B$.test(y))return{type:"text",value:y};let T=p>0&&E<p,S=T?0:i.newIndex++*n.stagger;return $$(y,n.animation,n.duration,n.easing,T,S)});return l.children.splice(c,1,...m),c+m.length},G$=0;function P0(e){var t,n,r,i,o;let l={animation:(t=e?.animation)!=null?t:"fadeIn",duration:(n=e?.duration)!=null?n:150,easing:(r=e?.easing)!=null?r:"ease",sep:(i=e?.sep)!=null?i:"word",stagger:(o=e?.stagger)!=null?o:40},c={prevContentLength:0,lastRenderCharCount:0},f=G$++,h=()=>p=>{let m={count:0,newIndex:0};Ug(p,"text",(y,E)=>V$(y,E,l,c,m)),c.lastRenderCharCount=m.count,c.prevContentLength=0};return Object.defineProperty(h,"name",{value:`rehypeAnimate$${f}`}),{name:"animate",type:"animate",rehypePlugin:h,setPrevContentLength(p){c.prevContentLength=p},getLastRenderCharCount(){let p=c.lastRenderCharCount;return c.lastRenderCharCount=0,p}}}P0();var hk=v.createContext(!1),q$=()=>v.useContext(hk),x1=(...e)=>Pg(Wf(e)),Y$=(e,t)=>{if(!e||!t)return t;let n=`${e}:`;return t.split(/\s+/).filter(Boolean).map(r=>r.startsWith(n)?r:`${e}:${r}`).join(" ")},X$=e=>e?(...t)=>Y$(e,Pg(Wf(t))):x1,io=(e,t,n)=>{let r=typeof t=="string"&&n.startsWith("text/csv")?"\uFEFF":"",i=typeof t=="string"?new Blob([r+t],{type:n}):t,o=URL.createObjectURL(i),l=document.createElement("a");l.href=o,l.download=e,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)},B0=v.createContext(x1),$e=()=>v.useContext(B0),Q$=x1("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"),W$=e=>{let t={};for(let n of e.split(";")){let r=n.indexOf(":");if(r>0){let i=n.slice(0,r).trim(),o=n.slice(r+1).trim();i&&o&&(t[i]=o)}}return t},K$=v.memo(({children:e,result:t,language:n,className:r,startLine:i,lineNumbers:o=!0,...l})=>{let c=$e(),f=v.useMemo(()=>c(Q$),[c]),h=v.useMemo(()=>{let p={};return t.bg&&(p["--sdm-bg"]=t.bg),t.fg&&(p["--sdm-fg"]=t.fg),t.rootStyle&&Object.assign(p,W$(t.rootStyle)),p},[t.bg,t.fg,t.rootStyle]);return _.jsx("div",{className:c(r,"overflow-x-auto rounded-md border border-border bg-background p-4 text-sm"),"data-language":n,"data-streamdown":"code-block-body",...l,children:_.jsx("pre",{className:c(r,"bg-[var(--sdm-bg,inherit]","dark:bg-[var(--shiki-dark-bg,var(--sdm-bg,inherit)]"),style:h,children:_.jsx("code",{className:o?c("[counter-increment:line_0] [counter-reset:line]"):void 0,style:o&&i&&i>1?{counterReset:`line ${i-1}`}:void 0,children:t.tokens.map((p,m)=>_.jsx("span",{className:o?f:void 0,children:p.length===0||p.length===1&&p[0].content===""?`
|
|
159
|
+
`:p.map((y,E)=>{let T={},S=!!y.bgColor;if(y.color&&(T["--sdm-c"]=y.color),y.bgColor&&(T["--sdm-tbg"]=y.bgColor),y.htmlStyle)for(let[C,w]of Object.entries(y.htmlStyle))C==="color"?T["--sdm-c"]=w:C==="background-color"?(T["--sdm-tbg"]=w,S=!0):T[C]=w;return _.jsx("span",{className:c("text-[var(--sdm-c,inherit)]","dark:text-[var(--shiki-dark,var(--sdm-c,inherit))]",S&&"bg-[var(--sdm-tbg)]",S&&"dark:bg-[var(--shiki-dark-bg,var(--sdm-tbg))]"),style:T,...y.htmlAttrs,children:y.content},E)})},m))})})})},(e,t)=>e.result===t.result&&e.language===t.language&&e.className===t.className&&e.startLine===t.startLine&&e.lineNumbers===t.lineNumbers),Z$=({className:e,language:t,style:n,isIncomplete:r,...i})=>{let o=$e();return _.jsx("div",{className:o("my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",e),"data-incomplete":r||void 0,"data-language":t,"data-streamdown":"code-block",style:{contentVisibility:"auto",containIntrinsicSize:"auto 200px",...n},...i})},mk=v.createContext({code:""}),pk=()=>v.useContext(mk),J$=({language:e})=>{let t=$e();return _.jsx("div",{className:t("flex h-8 items-center text-muted-foreground text-xs"),"data-language":e,"data-streamdown":"code-block-header",children:_.jsx("span",{className:t("ml-1 font-mono lowercase"),children:e})})},eV=e=>{let t=e.length;for(;t>0&&e[t-1]===`
|
|
160
|
+
`;)t--;return e.slice(0,t)},tV=v.lazy(()=>L(()=>import("./highlighted-body-OFNGDK62-CCrJakL3.js"),[]).then(e=>({default:e.HighlightedCodeBlockBody}))),nV=({code:e,language:t,className:n,children:r,isIncomplete:i=!1,startLine:o,lineNumbers:l,...c})=>{let f=$e(),h=v.useMemo(()=>eV(e),[e]),p=v.useMemo(()=>({bg:"transparent",fg:"inherit",tokens:h.split(`
|
|
161
|
+
`).map(m=>[{content:m,color:"inherit",bgColor:"transparent",htmlStyle:{},offset:0}])}),[h]);return _.jsx(mk.Provider,{value:{code:e},children:_.jsxs(Z$,{isIncomplete:i,language:t,children:[_.jsx(J$,{language:t}),r?_.jsx("div",{className:f("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsx("div",{className:f("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"code-block-actions",children:r})}):null,_.jsx(v.Suspense,{fallback:_.jsx(K$,{className:n,language:t,lineNumbers:l,result:p,startLine:o,...c}),children:_.jsx(tV,{className:n,code:h,language:t,lineNumbers:l,raw:p,startLine:o,...c})})]})})},rV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),aV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),iV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),sV=e=>_.jsxs("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:[_.jsx("path",{d:"M8 0V4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M8 16V12",opacity:"0.5",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 1.52783L5.64887 4.7639",opacity:"0.9",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 1.52783L10.3511 4.7639",opacity:"0.1",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M12.7023 14.472L10.3511 11.236",opacity:"0.4",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M3.29773 14.472L5.64887 11.236",opacity:"0.6",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 5.52783L11.8043 6.7639",opacity:"0.2",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 10.472L4.19583 9.23598",opacity:"0.7",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M15.6085 10.4722L11.8043 9.2361",opacity:"0.3",stroke:"currentColor",strokeWidth:"1.5"}),_.jsx("path",{d:"M0.391602 5.52783L4.19583 6.7639",opacity:"0.8",stroke:"currentColor",strokeWidth:"1.5"})]}),oV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),lV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),uV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),cV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),fV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),dV=e=>_.jsx("svg",{color:"currentColor",height:16,strokeLinejoin:"round",viewBox:"0 0 16 16",width:16,...e,children:_.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"})}),Il={CheckIcon:rV,CopyIcon:aV,DownloadIcon:iV,ExternalLinkIcon:cV,Loader2Icon:sV,Maximize2Icon:oV,RotateCcwIcon:lV,XIcon:uV,ZoomInIcon:fV,ZoomOutIcon:dV},gk=v.createContext(Il),hV=(e,t)=>{if(e===t)return!0;if(!(e&&t))return e===t;let n=Object.keys(e),r=Object.keys(t);return n.length!==r.length?!1:n.every(i=>e[i]===t[i])},bv=({icons:e,children:t})=>{let n=v.useRef(e),r=v.useRef(e?{...Il,...e}:Il);hV(n.current,e)||(n.current=e,r.current=e?{...Il,...e}:Il);let i=r.current;return _.jsx(gk.Provider,{value:i,children:t})},_r=()=>v.useContext(gk),bk={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"},j0=v.createContext(bk),ba=()=>v.useContext(j0),Ev=({onCopy:e,onError:t,timeout:n=2e3,children:r,className:i,code:o,...l})=>{let c=$e(),[f,h]=v.useState(!1),p=v.useRef(0),{code:m}=pk(),{isAnimating:y}=v.useContext(Vn),E=ba(),T=o??m,S=async()=>{var k;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.writeText)){t?.(new Error("Clipboard API not available"));return}try{f||(await navigator.clipboard.writeText(T),h(!0),e?.(),p.current=window.setTimeout(()=>h(!1),n))}catch(N){t?.(N)}};v.useEffect(()=>()=>{window.clearTimeout(p.current)},[]);let C=_r(),w=f?C.CheckIcon:C.CopyIcon;return _.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-copy-button",disabled:y,onClick:S,title:E.copyCode,type:"button",...l,children:r??_.jsx(w,{size:14})})},yv={"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"},mV=({onDownload:e,onError:t,language:n,children:r,className:i,code:o,...l})=>{let c=$e(),{code:f}=pk(),{isAnimating:h}=v.useContext(Vn),p=ba(),m=_r(),y=o??f,E=`file.${n&&n in yv?yv[n]:"txt"}`,T="text/plain",S=()=>{try{io(E,y,T),e?.()}catch(C){t?.(C)}};return _.jsx("button",{className:c("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),"data-streamdown":"code-block-download-button",disabled:h,onClick:S,title:p.downloadFile,type:"button",...l,children:r??_.jsx(m.DownloadIcon,{size:14})})},_v=()=>{let{Loader2Icon:e}=_r(),t=$e();return _.jsxs("div",{className:t("w-full divide-y divide-border overflow-hidden rounded-xl border border-border"),children:[_.jsx("div",{className:t("h-[46px] w-full bg-muted/80")}),_.jsx("div",{className:t("flex w-full items-center justify-center p-4"),children:_.jsx(e,{className:t("size-4 animate-spin")})})]})},pV=/\.[^/.]+$/,gV=({node:e,className:t,src:n,alt:r,onLoad:i,onError:o,...l})=>{let{DownloadIcon:c}=_r(),f=$e(),h=v.useRef(null),[p,m]=v.useState(!1),[y,E]=v.useState(!1),T=ba(),S=l.width!=null||l.height!=null,C=(p||S)&&!y,w=y&&!S;v.useEffect(()=>{let B=h.current;if(B!=null&&B.complete){let D=B.naturalWidth>0;m(D),E(!D)}},[]);let k=v.useCallback(B=>{m(!0),E(!1),i?.(B)},[i]),N=v.useCallback(B=>{m(!1),E(!0),o?.(B)},[o]),P=async()=>{if(n)try{let B=await(await fetch(n)).blob(),D=new URL(n,window.location.origin).pathname.split("/").pop()||"",$=D.split(".").pop(),G=D.includes(".")&&$!==void 0&&$.length<=4,ie="";if(G)ie=D;else{let V=B.type,X="png";V.includes("jpeg")||V.includes("jpg")?X="jpg":V.includes("png")?X="png":V.includes("svg")?X="svg":V.includes("gif")?X="gif":V.includes("webp")&&(X="webp"),ie=`${(r||D||"image").replace(pV,"")}.${X}`}io(ie,B,B.type)}catch{window.open(n,"_blank")}};return n?_.jsxs("div",{className:f("group relative my-4 inline-block"),"data-streamdown":"image-wrapper",children:[_.jsx("img",{alt:r,className:f("max-w-full rounded-lg",w&&"hidden",t),"data-streamdown":"image",onError:N,onLoad:k,ref:h,src:n,...l}),w&&_.jsx("span",{className:f("text-muted-foreground text-xs italic"),"data-streamdown":"image-fallback",children:T.imageNotAvailable}),_.jsx("div",{className:f("pointer-events-none absolute inset-0 hidden rounded-lg bg-black/10 group-hover:block")}),C&&_.jsx("button",{className:f("absolute right-2 bottom-2 flex h-8 w-8 cursor-pointer items-center justify-center rounded-md border border-border bg-background/90 shadow-sm backdrop-blur-sm transition-all duration-200 hover:bg-background","opacity-0 group-hover:opacity-100"),onClick:P,title:T.downloadImage,type:"button",children:_.jsx(c,{size:14})})]}):null},$l=0,T1=()=>{$l+=1,$l===1&&(document.body.style.overflow="hidden")},v1=()=>{$l=Math.max(0,$l-1),$l===0&&(document.body.style.overflow="")},bV=({url:e,isOpen:t,onClose:n,onConfirm:r})=>{let{CheckIcon:i,CopyIcon:o,ExternalLinkIcon:l,XIcon:c}=_r(),f=$e(),[h,p]=v.useState(!1),m=ba(),y=v.useCallback(async()=>{try{await navigator.clipboard.writeText(e),p(!0),setTimeout(()=>p(!1),2e3)}catch{}},[e]),E=v.useCallback(()=>{r(),n()},[r,n]);return v.useEffect(()=>{if(t){T1();let T=S=>{S.key==="Escape"&&n()};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T),v1()}}},[t,n]),t?_.jsx("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/50 backdrop-blur-sm"),"data-streamdown":"link-safety-modal",onClick:n,onKeyDown:T=>{T.key==="Escape"&&n()},role:"button",tabIndex:0,children:_.jsxs("div",{className:f("relative mx-4 flex w-full max-w-md flex-col gap-4 rounded-xl border bg-background p-6 shadow-lg"),onClick:T=>T.stopPropagation(),onKeyDown:T=>T.stopPropagation(),role:"presentation",children:[_.jsx("button",{className:f("absolute top-4 right-4 rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:n,title:m.close,type:"button",children:_.jsx(c,{size:16})}),_.jsxs("div",{className:f("flex flex-col gap-2"),children:[_.jsxs("div",{className:f("flex items-center gap-2 font-semibold text-lg"),children:[_.jsx(l,{size:20}),_.jsx("span",{children:m.openExternalLink})]}),_.jsx("p",{className:f("text-muted-foreground text-sm"),children:m.externalLinkWarning})]}),_.jsx("div",{className:f("break-all rounded-md bg-muted p-3 font-mono text-sm",e.length>100&&"max-h-32 overflow-y-auto"),children:e}),_.jsxs("div",{className:f("flex gap-2"),children:[_.jsx("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md border bg-background px-4 py-2 font-medium text-sm transition-all hover:bg-muted"),onClick:y,type:"button",children:h?_.jsxs(_.Fragment,{children:[_.jsx(i,{size:14}),_.jsx("span",{children:m.copied})]}):_.jsxs(_.Fragment,{children:[_.jsx(o,{size:14}),_.jsx("span",{children:m.copyLink})]})}),_.jsxs("button",{className:f("flex flex-1 items-center justify-center gap-2 rounded-md bg-primary px-4 py-2 font-medium text-primary-foreground text-sm transition-all hover:bg-primary/90"),onClick:E,type:"button",children:[_.jsx(l,{size:14}),_.jsx("span",{children:m.openLink})]})]})]})}):null},U0=v.createContext(null),S1=()=>v.useContext(U0),tZ=()=>{var e;let t=S1();return(e=t?.code)!=null?e:null},A1=()=>{var e;let t=S1();return(e=t?.mermaid)!=null?e:null},EV=e=>{var t;let n=S1();return n!=null&&n.renderers&&e&&(t=n.renderers.find(r=>Array.isArray(r.language)?r.language.includes(e):r.language===e))!=null?t:null},yV=(e,t)=>{var n;let r=(n=void 0)!=null?n:5;return new Promise((i,o)=>{let l="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(e))),c=new Image;c.crossOrigin="anonymous",c.onload=()=>{let f=document.createElement("canvas"),h=c.width*r,p=c.height*r;f.width=h,f.height=p;let m=f.getContext("2d");if(!m){o(new Error("Failed to create 2D canvas context for PNG export"));return}m.drawImage(c,0,0,h,p),f.toBlob(y=>{if(!y){o(new Error("Failed to create PNG blob"));return}i(y)},"image/png")},c.onerror=()=>o(new Error("Failed to load SVG image")),c.src=l})},_V=({chart:e,children:t,className:n,onDownload:r,config:i,onError:o})=>{let l=$e(),[c,f]=v.useState(!1),h=v.useRef(null),{isAnimating:p}=v.useContext(Vn),m=_r(),y=A1(),E=ba(),T=async S=>{try{if(S==="mmd"){io("diagram.mmd",e,"text/plain"),f(!1),r?.(S);return}if(!y){o?.(new Error("Mermaid plugin not available"));return}let C=y.getMermaid(i),w=e.split("").reduce((P,B)=>(P<<5)-P+B.charCodeAt(0)|0,0),k=`mermaid-${Math.abs(w)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:N}=await C.render(k,e);if(!N){o?.(new Error("SVG not found. Please wait for the diagram to render."));return}if(S==="svg"){io("diagram.svg",N,"image/svg+xml"),f(!1),r?.(S);return}if(S==="png"){let P=await yV(N);io("diagram.png",P,"image/png"),r?.(S),f(!1);return}}catch(C){o?.(C)}};return v.useEffect(()=>{let S=C=>{let w=C.composedPath();h.current&&!w.includes(h.current)&&f(!1)};return document.addEventListener("mousedown",S),()=>{document.removeEventListener("mousedown",S)}},[]),_.jsxs("div",{className:l("relative"),ref:h,children:[_.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",n),disabled:p,onClick:()=>f(!c),title:E.downloadDiagram,type:"button",children:t??_.jsx(m.DownloadIcon,{size:14})}),c?_.jsxs("div",{className:l("absolute top-full right-0 z-10 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("svg"),title:E.downloadDiagramAsSvg,type:"button",children:E.mermaidFormatSvg}),_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("png"),title:E.downloadDiagramAsPng,type:"button",children:E.mermaidFormatPng}),_.jsx("button",{className:l("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("mmd"),title:E.downloadDiagramAsMmd,type:"button",children:E.mermaidFormatMmd})]}):null]})},xV=({chart:e,config:t,onFullscreen:n,onExit:r,className:i,...o})=>{let{Maximize2Icon:l,XIcon:c}=_r(),f=$e(),[h,p]=v.useState(!1),{isAnimating:m,controls:y}=v.useContext(Vn),E=ba(),T=(()=>{if(typeof y=="boolean")return y;let C=y.mermaid;return C===!1?!1:C===!0||C===void 0?!0:C.panZoom!==!1})(),S=()=>{p(!h)};return v.useEffect(()=>{if(h){T1();let C=w=>{w.key==="Escape"&&p(!1)};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C),v1()}}},[h]),v.useEffect(()=>{h?n?.():r&&r()},[h,n,r]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:f("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",i),disabled:m,onClick:S,title:E.viewFullscreen,type:"button",...o,children:_.jsx(l,{size:14})}),h?Ki.createPortal(_.jsxs("div",{className:f("fixed inset-0 z-50 flex items-center justify-center bg-background/95 backdrop-blur-sm"),onClick:S,onKeyDown:C=>{C.key==="Escape"&&S()},role:"button",tabIndex:0,children:[_.jsx("button",{className:f("absolute top-4 right-4 z-10 rounded-md p-2 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:S,title:E.exitFullscreen,type:"button",children:_.jsx(c,{size:20})}),_.jsx("div",{className:f("flex size-full items-center justify-center p-4"),onClick:C=>C.stopPropagation(),onKeyDown:C=>C.stopPropagation(),role:"presentation",children:_.jsx(Kk,{chart:e,className:f("size-full [&_svg]:h-auto [&_svg]:w-auto"),config:t,fullscreen:!0,showControls:T})})]}),document.body):null]})},Ek=e=>{var t,n;let r=[],i=[],o=e.querySelectorAll("thead th");for(let c of o)r.push(((t=c.textContent)==null?void 0:t.trim())||"");let l=e.querySelectorAll("tbody tr");for(let c of l){let f=[],h=c.querySelectorAll("td");for(let p of h)f.push(((n=p.textContent)==null?void 0:n.trim())||"");i.push(f)}return{headers:r,rows:i}},yk=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1,h=!1;for(let p of c){if(p==='"'){f=!0,h=!0;break}(p===","||p===`
|
|
162
|
+
`)&&(f=!0)}return f?h?`"${c.replace(/"/g,'""')}"`:`"${c}"`:c},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(","),l+=1);for(let c of n)o[l]=c.map(r).join(","),l+=1;return o.join(`
|
|
163
|
+
`)},TV=e=>{let{headers:t,rows:n}=e,r=c=>{let f=!1;for(let p of c)if(p===" "||p===`
|
|
164
|
+
`||p==="\r"){f=!0;break}if(!f)return c;let h=[];for(let p of c)p===" "?h.push("\\t"):p===`
|
|
165
|
+
`?h.push("\\n"):p==="\r"?h.push("\\r"):h.push(p);return h.join("")},i=t.length>0?n.length+1:n.length,o=new Array(i),l=0;t.length>0&&(o[l]=t.map(r).join(" "),l+=1);for(let c of n)o[l]=c.map(r).join(" "),l+=1;return o.join(`
|
|
166
|
+
`)},Hp=e=>{let t=!1;for(let r of e)if(r==="\\"||r==="|"){t=!0;break}if(!t)return e;let n=[];for(let r of e)r==="\\"?n.push("\\\\"):r==="|"?n.push("\\|"):n.push(r);return n.join("")},H0=e=>{let{headers:t,rows:n}=e;if(t.length===0)return"";let r=new Array(n.length+2),i=0,o=t.map(c=>Hp(c));r[i]=`| ${o.join(" | ")} |`,i+=1;let l=new Array(t.length);for(let c=0;c<t.length;c+=1)l[c]="---";r[i]=`| ${l.join(" | ")} |`,i+=1;for(let c of n)if(c.length<t.length){let f=new Array(t.length);for(let h=0;h<t.length;h+=1)f[h]=h<c.length?Hp(c[h]):"";r[i]=`| ${f.join(" | ")} |`,i+=1}else{let f=c.map(h=>Hp(h));r[i]=`| ${f.join(" | ")} |`,i+=1}return r.join(`
|
|
167
|
+
`)},_k=({children:e,className:t,onCopy:n,onError:r,timeout:i=2e3})=>{let o=$e(),[l,c]=v.useState(!1),[f,h]=v.useState(!1),p=v.useRef(null),m=v.useRef(0),{isAnimating:y}=v.useContext(Vn),E=ba(),T=async w=>{var k,N;if(typeof window>"u"||!((k=navigator?.clipboard)!=null&&k.write)){r?.(new Error("Clipboard API not available"));return}try{let P=(N=p.current)==null?void 0:N.closest('[data-streamdown="table-wrapper"]'),B=P?.querySelector("table");if(!B){r?.(new Error("Table not found"));return}let D=Ek(B),$=({csv:yk,tsv:TV,md:H0}[w]||H0)(D),G=new ClipboardItem({"text/plain":new Blob([$],{type:"text/plain"}),"text/html":new Blob([B.outerHTML],{type:"text/html"})});await navigator.clipboard.write([G]),h(!0),c(!1),n?.(w),m.current=window.setTimeout(()=>h(!1),i)}catch(P){r?.(P)}};v.useEffect(()=>{let w=k=>{let N=k.composedPath();p.current&&!N.includes(p.current)&&c(!1)};return document.addEventListener("mousedown",w),()=>{document.removeEventListener("mousedown",w),window.clearTimeout(m.current)}},[]);let S=_r(),C=f?S.CheckIcon:S.CopyIcon;return _.jsxs("div",{className:o("relative"),ref:p,children:[_.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:y,onClick:()=>c(!l),title:E.copyTable,type:"button",children:e??_.jsx(C,{height:14,width:14})}),l?_.jsxs("div",{className:o("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("md"),title:E.copyTableAsMarkdown,type:"button",children:E.tableFormatMarkdown}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("csv"),title:E.copyTableAsCsv,type:"button",children:E.tableFormatCsv}),_.jsx("button",{className:o("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>T("tsv"),title:E.copyTableAsTsv,type:"button",children:E.tableFormatTsv})]}):null]})},xk=({children:e,className:t,onDownload:n,onError:r})=>{let i=$e(),[o,l]=v.useState(!1),c=v.useRef(null),{isAnimating:f}=v.useContext(Vn),h=ba(),p=_r(),m=y=>{var E;try{let T=(E=c.current)==null?void 0:E.closest('[data-streamdown="table-wrapper"]'),S=T?.querySelector("table");if(!S){r?.(new Error("Table not found"));return}let C=Ek(S),w=y==="csv"?yk(C):H0(C);io(`table.${y==="csv"?"csv":"md"}`,w,y==="csv"?"text/csv":"text/markdown"),l(!1),n?.(y)}catch(T){r?.(T)}};return v.useEffect(()=>{let y=E=>{let T=E.composedPath();c.current&&!T.includes(c.current)&&l(!1)};return document.addEventListener("mousedown",y),()=>{document.removeEventListener("mousedown",y)}},[]),_.jsxs("div",{className:i("relative"),ref:c,children:[_.jsx("button",{className:i("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:f,onClick:()=>l(!o),title:h.downloadTable,type:"button",children:e??_.jsx(p.DownloadIcon,{size:14})}),o?_.jsxs("div",{className:i("absolute top-full right-0 z-20 mt-1 min-w-[120px] overflow-hidden rounded-md border border-border bg-background shadow-lg"),children:[_.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("csv"),title:h.downloadTableAsCsv,type:"button",children:h.tableFormatCsv}),_.jsx("button",{className:i("w-full px-3 py-2 text-left text-sm transition-colors hover:bg-muted/40"),onClick:()=>m("markdown"),title:h.downloadTableAsMarkdown,type:"button",children:h.tableFormatMarkdown})]}):null]})},vV=({children:e,className:t,showCopy:n=!0,showDownload:r=!0})=>{let{Maximize2Icon:i,XIcon:o}=_r(),l=$e(),[c,f]=v.useState(!1),{isAnimating:h}=v.useContext(Vn),p=ba(),m=()=>{f(!0)},y=()=>{f(!1)};return v.useEffect(()=>{if(c){T1();let E=T=>{T.key==="Escape"&&f(!1)};return document.addEventListener("keydown",E),()=>{document.removeEventListener("keydown",E),v1()}}},[c]),_.jsxs(_.Fragment,{children:[_.jsx("button",{className:l("cursor-pointer p-1 text-muted-foreground transition-all hover:text-foreground disabled:cursor-not-allowed disabled:opacity-50",t),disabled:h,onClick:m,title:p.viewFullscreen,type:"button",children:_.jsx(i,{size:14})}),c?Ki.createPortal(_.jsx("div",{"aria-label":p.viewFullscreen,"aria-modal":"true",className:l("fixed inset-0 z-50 flex flex-col bg-background"),"data-streamdown":"table-fullscreen",onClick:y,onKeyDown:E=>{E.key==="Escape"&&y()},role:"dialog",children:_.jsxs("div",{className:l("flex h-full flex-col"),onClick:E=>E.stopPropagation(),onKeyDown:E=>E.stopPropagation(),role:"presentation",children:[_.jsxs("div",{className:l("flex items-center justify-end gap-1 p-4"),children:[n?_.jsx(_k,{}):null,r?_.jsx(xk,{}):null,_.jsx("button",{className:l("rounded-md p-1 text-muted-foreground transition-all hover:bg-muted hover:text-foreground"),onClick:y,title:p.exitFullscreen,type:"button",children:_.jsx(o,{size:20})})]}),_.jsx("div",{className:l("flex-1 overflow-auto p-4 pt-0 [&_thead]:sticky [&_thead]:top-0 [&_thead]:z-10"),children:_.jsx("table",{className:l("w-full border-collapse border border-border"),"data-streamdown":"table",children:e})})]})}),document.body):null]})},SV=({children:e,className:t,showControls:n,showCopy:r=!0,showDownload:i=!0,showFullscreen:o=!0,...l})=>{let c=$e(),f=n&&r,h=n&&i,p=n&&o,m=f||h||p;return _.jsxs("div",{className:c("my-4 flex flex-col gap-2 rounded-lg border border-border bg-sidebar p-2"),"data-streamdown":"table-wrapper",children:[m?_.jsxs("div",{className:c("flex items-center justify-end gap-1"),children:[f?_.jsx(_k,{}):null,h?_.jsx(xk,{}):null,p?_.jsx(vV,{showCopy:f,showDownload:h,children:e}):null]}):null,_.jsx("div",{className:c("border-collapse overflow-x-auto overflow-y-auto rounded-md border border-border bg-background"),children:_.jsx("table",{className:c("w-full divide-y divide-border",t),"data-streamdown":"table",...l,children:e})})]})},AV=/startLine=(\d+)/,CV=/\bnoLineNumbers\b/,wV=v.lazy(()=>L(()=>Promise.resolve().then(()=>QK),void 0).then(e=>({default:e.Mermaid}))),kV=/language-([^\s]+)/;function Ad(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,r=t.position.start,i=e.position.end,o=t.position.end;return n?.line===r?.line&&n?.column===r?.column&&i?.line===o?.line&&i?.column===o?.column}function wt(e,t){return e.className===t.className&&Ad(e.node,t.node)}var z0=(e,t)=>typeof e=="boolean"?e:e[t]!==!1,zp=(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},xv=(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},Wc=(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},C1=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("ol",{className:i("list-inside list-decimal whitespace-normal [li_&]:pl-6",t),"data-streamdown":"ordered-list",...r,children:e})},(e,t)=>wt(e,t));C1.displayName="MarkdownOl";var Tk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("li",{className:i("py-1 [&>p]:inline",t),"data-streamdown":"list-item",...r,children:e})},(e,t)=>e.className===t.className&&Ad(e.node,t.node));Tk.displayName="MarkdownLi";var vk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("ul",{className:i("list-inside list-disc whitespace-normal [li_&]:pl-6",t),"data-streamdown":"unordered-list",...r,children:e})},(e,t)=>wt(e,t));vk.displayName="MarkdownUl";var Sk=v.memo(({className:e,node:t,...n})=>{let r=$e();return _.jsx("hr",{className:r("my-6 border-border",e),"data-streamdown":"horizontal-rule",...n})},(e,t)=>wt(e,t));Sk.displayName="MarkdownHr";var Ak=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("span",{className:i("font-semibold",t),"data-streamdown":"strong",...r,children:e})},(e,t)=>wt(e,t));Ak.displayName="MarkdownStrong";var NV=({children:e,className:t,href:n,node:r,...i})=>{let o=$e(),{linkSafety:l}=v.useContext(Vn),[c,f]=v.useState(!1),h=n==="streamdown:incomplete-link",p=v.useCallback(async T=>{if(!(!(l!=null&&l.enabled&&n)||h)){if(T.preventDefault(),l.onLinkCheck&&await l.onLinkCheck(n)){window.open(n,"_blank","noreferrer");return}f(!0)}},[l,n,h]),m=v.useCallback(()=>{n&&window.open(n,"_blank","noreferrer")},[n]),y=v.useCallback(()=>{f(!1)},[]),E={url:n??"",isOpen:c,onClose:y,onConfirm:m};return l!=null&&l.enabled&&n?_.jsxs(_.Fragment,{children:[_.jsx("button",{className:o("wrap-anywhere appearance-none text-left font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",onClick:p,type:"button",children:e}),l.renderModal?l.renderModal(E):_.jsx(bV,{...E})]}):_.jsx("a",{className:o("wrap-anywhere font-medium text-primary underline",t),"data-incomplete":h,"data-streamdown":"link",href:n,rel:"noreferrer",target:"_blank",...i,children:e})},Ck=v.memo(NV,(e,t)=>wt(e,t)&&e.href===t.href);Ck.displayName="MarkdownA";var wk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h1",{className:i("mt-6 mb-2 font-semibold text-3xl",t),"data-streamdown":"heading-1",...r,children:e})},(e,t)=>wt(e,t));wk.displayName="MarkdownH1";var kk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h2",{className:i("mt-6 mb-2 font-semibold text-2xl",t),"data-streamdown":"heading-2",...r,children:e})},(e,t)=>wt(e,t));kk.displayName="MarkdownH2";var Nk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h3",{className:i("mt-6 mb-2 font-semibold text-xl",t),"data-streamdown":"heading-3",...r,children:e})},(e,t)=>wt(e,t));Nk.displayName="MarkdownH3";var Rk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h4",{className:i("mt-6 mb-2 font-semibold text-lg",t),"data-streamdown":"heading-4",...r,children:e})},(e,t)=>wt(e,t));Rk.displayName="MarkdownH4";var Ok=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h5",{className:i("mt-6 mb-2 font-semibold text-base",t),"data-streamdown":"heading-5",...r,children:e})},(e,t)=>wt(e,t));Ok.displayName="MarkdownH5";var Lk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("h6",{className:i("mt-6 mb-2 font-semibold text-sm",t),"data-streamdown":"heading-6",...r,children:e})},(e,t)=>wt(e,t));Lk.displayName="MarkdownH6";var Ik=v.memo(({children:e,className:t,node:n,...r})=>{let{controls:i}=v.useContext(Vn),o=z0(i,"table"),l=zp(i,"copy"),c=zp(i,"download"),f=zp(i,"fullscreen");return _.jsx(SV,{className:t,showControls:o,showCopy:l,showDownload:c,showFullscreen:f,...r,children:e})},(e,t)=>wt(e,t));Ik.displayName="MarkdownTable";var Dk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("thead",{className:i("bg-muted/80",t),"data-streamdown":"table-header",...r,children:e})},(e,t)=>wt(e,t));Dk.displayName="MarkdownThead";var Mk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("tbody",{className:i("divide-y divide-border",t),"data-streamdown":"table-body",...r,children:e})},(e,t)=>wt(e,t));Mk.displayName="MarkdownTbody";var Pk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("tr",{className:i("border-border",t),"data-streamdown":"table-row",...r,children:e})},(e,t)=>wt(e,t));Pk.displayName="MarkdownTr";var Bk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("th",{className:i("whitespace-nowrap px-4 py-2 text-left font-semibold text-sm",t),"data-streamdown":"table-header-cell",...r,children:e})},(e,t)=>wt(e,t));Bk.displayName="MarkdownTh";var jk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("td",{className:i("px-4 py-2 text-sm",t),"data-streamdown":"table-cell",...r,children:e})},(e,t)=>wt(e,t));jk.displayName="MarkdownTd";var Uk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("blockquote",{className:i("my-4 border-muted-foreground/30 border-l-4 pl-4 text-muted-foreground italic",t),"data-streamdown":"blockquote",...r,children:e})},(e,t)=>wt(e,t));Uk.displayName="MarkdownBlockquote";var Hk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("sup",{className:i("text-sm",t),"data-streamdown":"superscript",...r,children:e})},(e,t)=>wt(e,t));Hk.displayName="MarkdownSup";var zk=v.memo(({children:e,className:t,node:n,...r})=>{let i=$e();return _.jsx("sub",{className:i("text-sm",t),"data-streamdown":"subscript",...r,children:e})},(e,t)=>wt(e,t));zk.displayName="MarkdownSub";var Fk=v.memo(({children:e,className:t,node:n,...r})=>{if("data-footnotes"in r){let i=l=>{var c,f;if(!v.isValidElement(l))return!1;let h=Array.isArray(l.props.children)?l.props.children:[l.props.children],p=!1,m=!1;for(let y of h)if(y){if(typeof y=="string")y.trim()!==""&&(p=!0);else if(v.isValidElement(y))if(((c=y.props)==null?void 0:c["data-footnote-backref"])!==void 0)m=!0;else{let E=Array.isArray(y.props.children)?y.props.children:[y.props.children];for(let T of E){if(typeof T=="string"&&T.trim()!==""){p=!0;break}if(v.isValidElement(T)&&((f=T.props)==null?void 0:f["data-footnote-backref"])===void 0){p=!0;break}}}}return m&&!p},o=Array.isArray(e)?e.map(l=>{if(!v.isValidElement(l))return l;if(l.type===C1){let c=(Array.isArray(l.props.children)?l.props.children:[l.props.children]).filter(f=>!i(f));return c.length===0?null:{...l,props:{...l.props,children:c}}}return l}):e;return(Array.isArray(o)?o.some(l=>l!==null):o!==null)?_.jsx("section",{className:t,...r,children:o}):null}return _.jsx("section",{className:t,...r,children:e})},(e,t)=>wt(e,t));Fk.displayName="MarkdownSection";var RV=({node:e,className:t,children:n,...r})=>{var i,o;let l=$e(),c=!("data-block"in r),{mermaid:f,controls:h,lineNumbers:p}=v.useContext(Vn),m=A1(),y=q$(),E=t?.match(kV),T=(i=E?.at(1))!=null?i:"",S=EV(T);if(c)return _.jsx("code",{className:l("rounded bg-muted px-1.5 py-0.5 font-mono text-sm",t),"data-streamdown":"inline-code",...r,children:n});let C=(o=e?.properties)==null?void 0:o.metastring,w=C?.match(AV),k=w?Number.parseInt(w[1],10):void 0,N=k!==void 0&&k>=1?k:void 0,P=!(C&&CV.test(C))&&p!==!1,B="";if(v.isValidElement(n)&&n.props&&typeof n.props=="object"&&"children"in n.props&&typeof n.props.children=="string"?B=n.props.children:typeof n=="string"&&(B=n),S){let ie=S.component;return _.jsx(v.Suspense,{fallback:_.jsx(_v,{}),children:_.jsx(ie,{code:B,isIncomplete:y,language:T,meta:C})})}if(T==="mermaid"&&m){let ie=z0(h,"mermaid"),V=Wc(h,"download"),X=Wc(h,"copy"),J=Wc(h,"fullscreen"),he=Wc(h,"panZoom"),ue=ie&&(V||X||J);return _.jsx(v.Suspense,{fallback:_.jsx(_v,{}),children:_.jsxs("div",{className:l("group relative my-4 flex w-full flex-col gap-2 rounded-xl border border-border bg-sidebar p-2",t),"data-streamdown":"mermaid-block",children:[_.jsx("div",{className:l("flex h-8 items-center text-muted-foreground text-xs"),children:_.jsx("span",{className:l("ml-1 font-mono lowercase"),children:"mermaid"})}),ue?_.jsx("div",{className:l("pointer-events-none sticky top-2 z-10 -mt-10 flex h-8 items-center justify-end"),children:_.jsxs("div",{className:l("pointer-events-auto flex shrink-0 items-center gap-2 rounded-md border border-sidebar bg-sidebar/80 px-1.5 py-1 supports-[backdrop-filter]:bg-sidebar/70 supports-[backdrop-filter]:backdrop-blur"),"data-streamdown":"mermaid-block-actions",children:[V?_.jsx(_V,{chart:B,config:f?.config}):null,X?_.jsx(Ev,{code:B}):null,J?_.jsx(xV,{chart:B,config:f?.config}):null]})}):null,_.jsx("div",{className:l("rounded-md border border-border bg-background"),children:_.jsx(wV,{chart:B,config:f?.config,showControls:he})})]})})}let D=z0(h,"code"),$=xv(h,"download"),G=xv(h,"copy");return _.jsx(nV,{className:t,code:B,isIncomplete:y,language:T,lineNumbers:P,startLine:N,children:D?_.jsxs(_.Fragment,{children:[$?_.jsx(mV,{code:B,language:T}):null,G?_.jsx(Ev,{}):null]}):null})},$k=v.memo(RV,(e,t)=>e.className===t.className&&Ad(e.node,t.node));$k.displayName="MarkdownCode";var Vk=v.memo(gV,(e,t)=>e.className===t.className&&Ad(e.node,t.node));Vk.displayName="MarkdownImg";var Gk=v.memo(({children:e,node:t,...n})=>{let r=(Array.isArray(e)?e:[e]).filter(i=>i!=null&&i!=="");if(r.length===1&&v.isValidElement(r[0])){let i=r[0].props.node,o=i?.tagName;if(o==="img")return _.jsx(_.Fragment,{children:e});if(o==="code"&&"data-block"in r[0].props)return _.jsx(_.Fragment,{children:e})}return _.jsx("p",{...n,children:e})},(e,t)=>wt(e,t));Gk.displayName="MarkdownParagraph";var OV={ol:C1,li:Tk,ul:vk,hr:Sk,strong:Ak,a:Ck,h1:wk,h2:kk,h3:Nk,h4:Rk,h5:Ok,h6:Lk,table:Ik,thead:Dk,tbody:Mk,tr:Pk,th:Bk,td:jk,blockquote:Uk,code:$k,img:Vk,pre:({children:e})=>v.isValidElement(e)?v.cloneElement(e,{"data-block":"true"}):e,sup:Hk,sub:zk,p:Gk,section:Fk},LV=/[\u0590-\u08FF\uFB1D-\uFDFF\uFE70-\uFEFF]/,IV=new RegExp("\\p{L}","u");function Tv(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(LV.test(n))return"rtl";if(IV.test(n))return"ltr"}return"ltr"}var DV=/^[ \t]{0,3}(`{3,}|~{3,})/,MV=/^\|?[ \t]*:?-{1,}:?[ \t]*(\|[ \t]*:?-{1,}:?[ \t]*)*\|?$/,vv=e=>{let t=e.split(`
|
|
168
|
+
`),n=null,r=0;for(let i of t){let o=DV.exec(i);if(n===null){if(o){let l=o[1];n=l[0],r=l.length}}else if(o){let l=o[1],c=l[0],f=l.length;c===n&&f>=r&&(n=null,r=0)}}return n!==null},PV=e=>{let t=e.split(`
|
|
169
|
+
`);for(let n of t){let r=n.trim();if(r.length>0&&r.includes("|")&&MV.test(r))return!0}return!1},BV=()=>e=>{Mr(e,"html",(t,n,r)=>{!r||typeof n!="number"||(r.children[n]={type:"text",value:t.value})})},Sv=[],Av={allowDangerousHtml:!0},Kc=new WeakMap,jV=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,r=e.remarkPlugins,i=e.remarkRehypeOptions;if(!(n||r||i)){let p="default";return this.keyCache.set(e,p),p}let o=p=>{if(!p||p.length===0)return"";let m="";for(let y=0;y<p.length;y+=1){let E=p[y];if(y>0&&(m+=","),Array.isArray(E)){let[T,S]=E;if(typeof T=="function"){let C=Kc.get(T);C||(C=T.name,Kc.set(T,C)),m+=C}else m+=String(T);m+=":",m+=JSON.stringify(S)}else if(typeof E=="function"){let T=Kc.get(E);T||(T=E.name,Kc.set(E,T)),m+=T}else m+=String(E)}return m},l=o(n),c=o(r),f=i?JSON.stringify(i):"",h=`${c}::${l}::${f}`;return this.keyCache.set(e,h),h}get(e){let t=this.generateCacheKey(e),n=this.cache.get(t);return n&&(this.cache.delete(t),this.cache.set(t,n)),n}set(e,t){let n=this.generateCacheKey(e);if(this.cache.size>=this.maxSize){let r=this.cache.keys().next().value;r&&this.cache.delete(r)}this.cache.set(n,t)}clear(){this.cache.clear()}},Cv=new jV,qk=e=>{let t=UV(e),n=e.children||"",r=t.runSync(t.parse(n),n);return qV(r,e)},UV=e=>{let t=Cv.get(e);if(t)return t;let n=zV(e);return Cv.set(e,n),n},HV=e=>e.some(t=>Array.isArray(t)?t[0]===A0:t===A0),zV=e=>{let t=e.rehypePlugins||Sv,n=e.remarkPlugins||Sv,r=HV(t)?n:[...n,BV],i=e.remarkRehypeOptions?{...Av,...e.remarkRehypeOptions}:Av;return FF().use(zz).use(r).use(vF,i).use(t)},FV=e=>e,$V=(e,t,n,r)=>{n?e.children.splice(t,1):e.children[t]={type:"text",value:r}},VV=(e,t)=>{var n;for(let r in Op)if(Object.hasOwn(Op,r)&&Object.hasOwn(e.properties,r)){let i=e.properties[r],o=Op[r];(o===null||o.includes(e.tagName))&&(e.properties[r]=(n=t(String(i||""),r,e))!=null?n:void 0)}},GV=(e,t,n,r,i,o)=>{let l=!1;return r?l=!r.includes(e.tagName):i&&(l=i.includes(e.tagName)),!l&&o&&typeof t=="number"&&(l=!o(e,t,n)),l},qV=(e,t)=>{let{allowElement:n,allowedElements:r,disallowedElements:i,skipHtml:o,unwrapDisallowed:l,urlTransform:c}=t;if(n||r||i||o||c){let f=c||FV;Mr(e,(h,p,m)=>{if(h.type==="raw"&&m&&typeof p=="number")return $V(m,p,o,h.value),p;if(h.type==="element"&&(VV(h,f),GV(h,p,m,r,i,n)&&m&&typeof p=="number"))return l&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p})}return QH(e,{Fragment:_.Fragment,components:t.components,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0})},YV=/\[\^[\w-]{1,200}\](?!:)/,XV=/\[\^[\w-]{1,200}\]:/,QV=/<(\w+)[\s>]/,WV=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),wv=new Map,kv=new Map,KV=e=>{let t=e.toLowerCase(),n=wv.get(t);if(n)return n;let r=new RegExp(`<${t}(?=[\\s>/])[^>]*>`,"gi");return wv.set(t,r),r},ZV=e=>{let t=e.toLowerCase(),n=kv.get(t);if(n)return n;let r=new RegExp(`</${t}(?=[\\s>])[^>]*>`,"gi");return kv.set(t,r),r},Nv=(e,t)=>{if(WV.has(t.toLowerCase()))return 0;let n=e.match(KV(t));if(!n)return 0;let r=0;for(let i of n)i.trimEnd().endsWith("/>")||(r+=1);return r},Rv=(e,t)=>{let n=e.match(ZV(t));return n?n.length:0},JV=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},eG=e=>{let t=YV.test(e),n=XV.test(e);if(t||n)return[e];let r=ar.lex(e,{gfm:!0}),i=[],o=[],l=!1;for(let c of r){let f=c.raw,h=i.length;if(o.length>0){i[h-1]+=f;let p=o.at(-1),m=Nv(f,p),y=Rv(f,p);for(let E=0;E<m;E+=1)o.push(p);for(let E=0;E<y;E+=1)o.length>0&&o.at(-1)===p&&o.pop();continue}if(c.type==="html"&&c.block){let p=f.match(QV);if(p){let m=p[1],y=Nv(f,m),E=Rv(f,m);y>E&&o.push(m)}}if(h>0&&!l){let p=i[h-1];if(JV(p)%2===1){i[h-1]=p+f;continue}}i.push(f),c.type!=="space"&&(l=c.type==="code")}return i},tG=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,f)=>{if(!c.includes(`
|
|
170
|
+
|
|
171
|
+
`))return l+c+f;let h=c.replace(/\n\n/g,`
|
|
172
|
+
<!---->
|
|
173
|
+
`),p=(h.startsWith(`
|
|
174
|
+
`)?"":`
|
|
175
|
+
`)+h+(h.endsWith(`
|
|
176
|
+
`)?"":`
|
|
177
|
+
`);return`${l}${p}${f}
|
|
178
|
+
|
|
179
|
+
`})}return n},nG=/([\\`*_~[\]|])/g,rG=e=>e.replace(nG,"\\$1"),aG=(e,t)=>{if(!t.length)return e;let n=e;for(let r of t){let i=new RegExp(`(<${r}(?=[\\s>/])[^>]*>)([\\s\\S]*?)(</${r}\\s*>)`,"gi");n=n.replace(i,(o,l,c,f)=>{let h=rG(c).replace(/\n\n/g," ");return l+h+f})}return n},Yk=e=>e.type==="text"?e.value:"children"in e&&Array.isArray(e.children)?e.children.map(Yk).join(""):"",iG=e=>t=>{if(!e||e.length===0)return;let n=new Set(e.map(r=>r.toLowerCase()));Mr(t,"element",r=>{if(n.has(r.tagName.toLowerCase())){let i=Yk(r);r.children=i?[{type:"text",value:i}]:[]}})},sG=()=>e=>{Mr(e,"code",t=>{var n,r;t.meta&&(t.data=(n=t.data)!=null?n:{},t.data.hProperties={...(r=t.data.hProperties)!=null?r:{},metastring:t.meta})})},oG=/^[ \t]*<[\w!/?-]/,lG=/(^|\n)[ \t]{4,}(?=<[\w!/?-])/g,uG=e=>typeof e!="string"||e.length===0||!oG.test(e)?e:e.replace(lG,"$1"),Ov,Lv,Iv,Dv,mf={...Pi,protocols:{...Pi.protocols,href:[...(Lv=(Ov=Pi.protocols)==null?void 0:Ov.href)!=null?Lv:[],"tel"]},attributes:{...Pi.attributes,code:[...(Dv=(Iv=Pi.attributes)==null?void 0:Iv.code)!=null?Dv:[],"metastring"]}},F0={raw:A0,sanitize:[rw,mf],harden:[iM,{allowedImagePrefixes:["*"],allowedLinkPrefixes:["*"],allowedProtocols:["*"],defaultOrigin:void 0,allowDataImages:!0}]},cG={gfm:[vU,{}],codeMeta:sG},Mv=Object.values(F0),fG=Object.values(cG),dG={block:" ▋",circle:" ●"},Xk=["github-light","github-dark"],Qk={enabled:!0},hG={shikiTheme:Xk,controls:!0,isAnimating:!1,lineNumbers:!0,mode:"streaming",mermaid:void 0,linkSafety:Qk},Vn=v.createContext(hG),Wk=v.memo(({content:e,shouldParseIncompleteMarkdown:t,shouldNormalizeHtmlIndentation:n,index:r,isIncomplete:i,dir:o,animatePlugin:l,...c})=>{if(l){let p=l.getLastRenderCharCount();l.setPrevContentLength(p)}let f=typeof e=="string"&&n?uG(e):e,h=_.jsx(qk,{...c,children:f});return _.jsx(hk.Provider,{value:i,children:o?_.jsx("div",{dir:o,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||{}),r=Object.keys(t.components||{});if(n.length!==r.length||n.some(i=>{var o,l;return((o=e.components)==null?void 0:o[i])!==((l=t.components)==null?void 0:l[i])}))return!1}return!(e.rehypePlugins!==t.rehypePlugins||e.remarkPlugins!==t.remarkPlugins)});Wk.displayName="Block";var w1=v.memo(({children:e,mode:t="streaming",dir:n,parseIncompleteMarkdown:r=!0,normalizeHtmlIndentation:i=!1,components:o,rehypePlugins:l=Mv,remarkPlugins:c=fG,className:f,shikiTheme:h=Xk,mermaid:p,controls:m=!0,isAnimating:y=!1,animated:E,BlockComponent:T=Wk,parseMarkdownIntoBlocksFn:S=eG,caret:C,plugins:w,remend:k,linkSafety:N=Qk,lineNumbers:P=!0,allowedTags:B,literalTagContent:D,translations:$,icons:G,prefix:ie,onAnimationStart:V,onAnimationEnd:X,...J})=>{let he=v.useId(),[ue,re]=v.useTransition(),U=v.useMemo(()=>X$(ie),[ie]),ee=v.useRef(null),ce=v.useRef(V),xe=v.useRef(X);ce.current=V,xe.current=X,v.useEffect(()=>{var He,st,Gt;if(t==="static")return;let yn=ee.current;if(ee.current=y,yn===null){y&&((He=ce.current)==null||He.call(ce));return}y&&!yn?(st=ce.current)==null||st.call(ce):!y&&yn&&((Gt=xe.current)==null||Gt.call(xe))},[y,t]);let O=v.useMemo(()=>B?Object.keys(B):[],[B]),z=v.useMemo(()=>{if(typeof e!="string")return"";let He=t==="streaming"&&r?DH(e,k):e;return D&&D.length>0&&(He=aG(He,D)),O.length>0&&(He=tG(He,O)),He},[e,t,r,k,O,D]),te=v.useMemo(()=>S(z),[z,S]),[M,ge]=v.useState(te);v.useEffect(()=>{t==="streaming"&&!Te?re(()=>{ge(te)}):ge(te)},[te,t]);let Ee=t==="streaming"?M:te,ye=v.useMemo(()=>n==="auto"?Ee.map(Tv):void 0,[Ee,n]),be=v.useMemo(()=>Ee.map((He,st)=>`${he}-${st}`),[Ee.length,he]),ke=v.useMemo(()=>E===!0?"true":E?JSON.stringify(E):"",[E]),Te=v.useMemo(()=>ke?ke==="true"?P0():P0(E):null,[ke]),De=v.useMemo(()=>{var He,st;return{shikiTheme:(st=(He=w?.code)==null?void 0:He.getThemes())!=null?st:h,controls:m,isAnimating:y,lineNumbers:P,mode:t,mermaid:p,linkSafety:N}},[h,m,y,P,t,p,N,w?.code]),je=v.useMemo(()=>$?JSON.stringify($):"",[$]),Je=v.useMemo(()=>({...bk,...$}),[je]),kt=v.useMemo(()=>{let{inlineCode:He,...st}=o??{},Gt={...OV,...st};if(He){let yn=Gt.code;Gt.code=Hr=>"data-block"in Hr?yn?v.createElement(yn,Hr):null:v.createElement(He,Hr)}return Gt},[o]),it=v.useMemo(()=>{let He=[];return w!=null&&w.cjk&&(He=[...He,...w.cjk.remarkPluginsBefore]),He=[...He,...c],w!=null&&w.cjk&&(He=[...He,...w.cjk.remarkPluginsAfter]),w!=null&&w.math&&(He=[...He,w.math.remarkPlugin]),He},[c,w?.math,w?.cjk]),On=v.useMemo(()=>{var He;let st=l;if(B&&Object.keys(B).length>0&&l===Mv){let Gt={...mf,tagNames:[...(He=mf.tagNames)!=null?He:[],...Object.keys(B)],attributes:{...mf.attributes,...B}};st=[F0.raw,[rw,Gt],F0.harden]}return D&&D.length>0&&(st=[...st,[iG,D]]),w!=null&&w.math&&(st=[...st,w.math.rehypePlugin]),Te&&y&&(st=[...st,Te.rehypePlugin]),st},[l,w?.math,Te,y,B,D]),En=v.useMemo(()=>{if(!y||Ee.length===0)return!1;let He=Ee.at(-1);return vv(He)||PV(He)},[y,Ee]),xr=v.useMemo(()=>C&&y&&!En?{"--streamdown-caret":`"${dG[C]}"`}:void 0,[C,y,En]);return t==="static"?_.jsx(j0.Provider,{value:Je,children:_.jsx(U0.Provider,{value:w??null,children:_.jsx(Vn.Provider,{value:De,children:_.jsx(bv,{icons:G,children:_.jsx(B0.Provider,{value:U,children:_.jsx("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",f),dir:n==="auto"?Tv(z):n,children:_.jsx(qk,{components:kt,rehypePlugins:On,remarkPlugins:it,...J,children:z})})})})})})}):_.jsx(j0.Provider,{value:Je,children:_.jsx(U0.Provider,{value:w??null,children:_.jsx(Vn.Provider,{value:De,children:_.jsx(bv,{icons:G,children:_.jsx(B0.Provider,{value:U,children:_.jsxs("div",{className:U("space-y-4 whitespace-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",C&&!En?"[&>*:last-child]:after:inline [&>*:last-child]:after:align-baseline [&>*:last-child]:after:content-[var(--streamdown-caret)]":null,f),style:xr,children:[Ee.length===0&&C&&y&&_.jsx("span",{}),Ee.map((He,st)=>{var Gt;let yn=st===Ee.length-1,Hr=y&&yn&&vv(He);return _.jsx(T,{animatePlugin:Te,components:kt,content:He,dir:(Gt=ye?.[st])!=null?Gt:n!=="auto"?n:void 0,index:st,isIncomplete:Hr,rehypePlugins:On,remarkPlugins:it,shouldNormalizeHtmlIndentation:i,shouldParseIncompleteMarkdown:r,...J},be[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);w1.displayName="Streamdown";var mG=({children:e,className:t,minZoom:n=.5,maxZoom:r=3,zoomStep:i=.1,showControls:o=!0,initialZoom:l=1,fullscreen:c=!1})=>{let{RotateCcwIcon:f,ZoomInIcon:h,ZoomOutIcon:p}=_r(),m=$e(),y=v.useRef(null),E=v.useRef(null),[T,S]=v.useState(l),[C,w]=v.useState({x:0,y:0}),[k,N]=v.useState(!1),[P,B]=v.useState({x:0,y:0}),[D,$]=v.useState({x:0,y:0}),G=v.useCallback(U=>{S(ee=>Math.max(n,Math.min(r,ee+U)))},[n,r]),ie=v.useCallback(()=>{G(i)},[G,i]),V=v.useCallback(()=>{G(-i)},[G,i]),X=v.useCallback(()=>{S(l),w({x:0,y:0})},[l]),J=v.useCallback(U=>{U.preventDefault();let ee=U.deltaY>0?-i:i;G(ee)},[G,i]),he=v.useCallback(U=>{if(U.button!==0||U.isPrimary===!1)return;N(!0),B({x:U.clientX,y:U.clientY}),$(C);let ee=U.currentTarget;ee instanceof HTMLElement&&ee.setPointerCapture(U.pointerId)},[C]),ue=v.useCallback(U=>{if(!k)return;U.preventDefault();let ee=U.clientX-P.x,ce=U.clientY-P.y;w({x:D.x+ee,y:D.y+ce})},[k,P,D]),re=v.useCallback(U=>{N(!1);let ee=U.currentTarget;ee instanceof HTMLElement&&ee.releasePointerCapture(U.pointerId)},[]);return v.useEffect(()=>{let U=y.current;if(U)return U.addEventListener("wheel",J,{passive:!1}),()=>{U.removeEventListener("wheel",J)}},[J]),v.useEffect(()=>{let U=E.current;if(U&&k)return document.body.style.userSelect="none",U.addEventListener("pointermove",ue,{passive:!1}),U.addEventListener("pointerup",re),U.addEventListener("pointercancel",re),()=>{document.body.style.userSelect="",U.removeEventListener("pointermove",ue),U.removeEventListener("pointerup",re),U.removeEventListener("pointercancel",re)}},[k,ue,re]),_.jsxs("div",{className:m("relative flex flex-col",c?"h-full w-full":"min-h-28 w-full",t),ref:y,style:{cursor:k?"grabbing":"grab"},children:[o?_.jsxs("div",{className:m("absolute z-10 flex flex-col gap-1 rounded-md border border-border bg-background/80 p-1 supports-[backdrop-filter]:bg-background/70 supports-[backdrop-filter]:backdrop-blur-sm",c?"bottom-4 left-4":"bottom-2 left-2"),children:[_.jsx("button",{className:m("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:T>=r,onClick:ie,title:"Zoom in",type:"button",children:_.jsx(h,{size:16})}),_.jsx("button",{className:m("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:T<=n,onClick:V,title:"Zoom out",type:"button",children:_.jsx(p,{size:16})}),_.jsx("button",{className:m("flex items-center justify-center rounded p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground"),onClick:X,title:"Reset zoom and pan",type:"button",children:_.jsx(f,{size:16})})]}):null,_.jsx("div",{className:m("flex-1 origin-center transition-transform duration-150 ease-out",c?"flex h-full w-full items-center justify-center":"flex w-full items-center justify-center"),onPointerDown:he,ref:E,role:"application",style:{transform:`translate(${C.x}px, ${C.y}px) scale(${T})`,transformOrigin:"center center",touchAction:"none",willChange:"transform"},children:e})]})},Kk=({chart:e,className:t,config:n,fullscreen:r=!1,showControls:i=!0})=>{let o=$e(),[l,c]=v.useState(null),[f,h]=v.useState(!1),[p,m]=v.useState(""),[y,E]=v.useState(""),[T,S]=v.useState(0),{mermaid:C}=v.useContext(Vn),w=A1(),k=C?.errorComponent,{shouldRender:N,containerRef:P}=P$({immediate:r});if(v.useEffect(()=>{if(N){if(!w){c("Mermaid plugin not available. Please add the mermaid plugin to enable diagram rendering.");return}(async()=>{try{c(null),h(!0);let D=w.getMermaid(n),$=e.split("").reduce((V,X)=>(V<<5)-V+X.charCodeAt(0)|0,0),G=`mermaid-${Math.abs($)}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`,{svg:ie}=await D.render(G,e);m(ie),E(ie)}catch(D){if(!(y||p)){let $=D instanceof Error?D.message:"Failed to render Mermaid chart";c($)}}finally{h(!1)}})()}},[e,n,T,N,w]),!(N||p||y))return _.jsx("div",{className:o("my-4 min-h-[200px]",t),ref:P});if(f&&!p&&!y)return _.jsx("div",{className:o("my-4 flex justify-center p-4",t),ref:P,children:_.jsxs("div",{className:o("flex items-center space-x-2 text-muted-foreground"),children:[_.jsx("div",{className:o("h-4 w-4 animate-spin rounded-full border-current border-b-2")}),_.jsx("span",{className:o("text-sm"),children:"Loading diagram..."})]})});if(l&&!p&&!y){let D=()=>S($=>$+1);return k?_.jsx("div",{ref:P,children:_.jsx(k,{chart:e,error:l,retry:D})}):_.jsxs("div",{className:o("rounded-md bg-red-50 p-4",t),ref:P,children:[_.jsxs("p",{className:o("font-mono text-red-700 text-sm"),children:["Mermaid Error: ",l]}),_.jsxs("details",{className:o("mt-2"),children:[_.jsx("summary",{className:o("cursor-pointer text-red-600 text-xs"),children:"Show Code"}),_.jsx("pre",{className:o("mt-2 overflow-x-auto rounded bg-red-100 p-2 text-red-800 text-xs"),children:e})]})]})}let B=p||y;return _.jsx("div",{className:o("size-full",t),"data-streamdown":"mermaid",ref:P,children:_.jsx(mG,{className:o(r?"size-full overflow-hidden":"overflow-hidden",t),fullscreen:r,maxZoom:3,minZoom:.5,showControls:i,zoomStep:.1,children:_.jsx("div",{"aria-label":"Mermaid chart",className:o("flex justify-center",r?"size-full items-center":null),dangerouslySetInnerHTML:{__html:B},role:"img"})})})};const Zk=v.createContext(null),pG=()=>{const e=v.useContext(Zk);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},gG=1e3,bG=1e3,k1=v.memo(({className:e,isStreaming:t=!1,open:n,defaultOpen:r=!0,onOpenChange:i,duration:o,children:l,...c})=>{const[f,h]=ei({prop:n,defaultProp:r,...i?{onChange:i}:{}}),[p,m]=ei({prop:o,defaultProp:void 0}),[y,E]=v.useState(!1),[T,S]=v.useState(null);v.useEffect(()=>{t?T===null&&S(Date.now()):T!==null&&(m(Math.ceil((Date.now()-T)/bG)),S(null))},[t,T,m]),v.useEffect(()=>{if(r&&!t&&f&&!y){const w=setTimeout(()=>{h(!1),E(!0)},gG);return()=>clearTimeout(w)}},[t,f,r,h,y]);const C=w=>{h(w)};return _.jsx(Zk.Provider,{value:{isStreaming:t,isOpen:f,setIsOpen:h,duration:p},children:_.jsx(tC,{className:we("not-prose mb-4",e),onOpenChange:C,open:f,...c,children:l})})}),EG=(e,t)=>e||t===0?_.jsx(eC,{duration:1,children:"Thinking…"}):t===void 0?_.jsx("p",{children:"Thought for a few seconds"}):_.jsxs("p",{children:["Thought for ",t," seconds"]}),N1=v.memo(({className:e,children:t,getThinkingMessage:n=EG,...r})=>{const{isStreaming:i,isOpen:o,duration:l}=pG();return _.jsx(nC,{className:we("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...r,children:t??_.jsxs(_.Fragment,{children:[_.jsx(gL,{className:"size-4"}),n(i,l),_.jsx(Xf,{className:we("size-4 transition-transform",o?"rotate-180":"rotate-0")})]})})}),R1=v.memo(({className:e,children:t,...n})=>_.jsx(rC,{className:we("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...n,children:_.jsx(w1,{children:t})}));k1.displayName="Reasoning";N1.displayName="ReasoningTrigger";R1.displayName="ReasoningContent";const O1=v.memo(({className:e,...t})=>_.jsx(w1,{className:we("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);O1.displayName="Response";const yG=fg("inline-flex w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white focus-visible:ring-destructive/20 dark:bg-destructive/60 dark:focus-visible:ring-destructive/40 [a&]:hover:bg-destructive/90",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function Jk({className:e,variant:t="default",asChild:n=!1,...r}){const i=n?$2:"span";return _.jsx(i,{"data-slot":"badge","data-variant":t,className:we(yG({variant:t}),e),...r})}var $0=Object.defineProperty,_G=Object.getOwnPropertyDescriptor,xG=Object.getOwnPropertyNames,TG=Object.prototype.hasOwnProperty,L1=(e,t)=>{let n={};for(var r in e)$0(n,r,{get:e[r],enumerable:!0});return $0(n,Symbol.toStringTag,{value:"Module"}),n},vG=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=xG(t),o=0,l=i.length,c;o<l;o++)c=i[o],!TG.call(e,c)&&c!==n&&$0(e,c,{get:(f=>t[f]).bind(null,c),enumerable:!(r=_G(t,c))||r.enumerable});return e},eN=(e,t,n)=>(vG(e,t,"default"),n);const Cd=[{id:"abap",name:"ABAP",import:(()=>L(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>L(()=>import("./actionscript-3-CoDkCxhg.js"),[]))},{id:"ada",name:"Ada",import:(()=>L(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>L(()=>import("./angular-html-DA-rfuFy.js").then(e=>e.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>L(()=>import("./angular-ts-BrjP3tb8.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>L(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>L(()=>import("./apex-Dqspr-GT.js"),[]))},{id:"apl",name:"APL",import:(()=>L(()=>import("./apl-CORt7UWP.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>L(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>L(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>L(()=>import("./asciidoc-Ve4PFQV2.js"),[]))},{id:"asm",name:"Assembly",import:(()=>L(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>L(()=>import("./astro-HNnZUWAn.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>L(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>L(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>L(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>L(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>L(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>L(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>L(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"bird2",name:"BIRD2 Configuration",aliases:["bird"],import:(()=>L(()=>import("./bird2-BIv1doCn.js"),[]))},{id:"blade",name:"Blade",import:(()=>L(()=>import("./blade-2xfisSek.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>L(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>L(()=>import("./c-BIGW1oBm.js"),[]))},{id:"c3",name:"C3",import:(()=>L(()=>import("./c3-MRO5bC_T.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>L(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>L(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>L(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>L(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>L(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>L(()=>import("./cobol-nBiQ_Alo.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>L(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>L(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>L(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>L(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>L(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>L(()=>import("./cpp-UfJy6YNI.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>L(()=>import("./crystal-DGywbUpC.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>L(()=>import("./csharp-DSvCPggb.js"),[]))},{id:"css",name:"CSS",import:(()=>L(()=>import("./css-CLj8gQPS.js"),[]))},{id:"csv",name:"CSV",import:(()=>L(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>L(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>L(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>L(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>L(()=>import("./dart-bE4Kk8sk.js"),[]))},{id:"dax",name:"DAX",import:(()=>L(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>L(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>L(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>L(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>L(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>L(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>L(()=>import("./edge-FbVlp4U3.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>L(()=>import("./elixir-CkH2-t6x.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>L(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>L(()=>import("./emacs-lisp-CXvaQtF9.js"),[]))},{id:"erb",name:"ERB",import:(()=>L(()=>import("./erb-Dm6A9KJ5.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>L(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>L(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>L(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>L(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>L(()=>import("./fortran-fixed-form-CkoXwp7k.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>L(()=>import("./fortran-free-form-BxgE0vQu.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>L(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",aliases:["tscn","tres"],import:(()=>L(()=>import("./gdresource-BOOCDP_w.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",aliases:["gd"],import:(()=>L(()=>import("./gdscript-C5YyOfLZ.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>L(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>L(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>L(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>L(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>L(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>L(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>L(()=>import("./glimmer-js-ByusRIyA.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>L(()=>import("./glimmer-ts-BfAWNZQY.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>L(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gn",name:"GN",import:(()=>L(()=>import("./gn-n2N0HUVH.js"),[]))},{id:"gnuplot",name:"Gnuplot",import:(()=>L(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>L(()=>import("./go-C27-OAKa.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>L(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>L(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>L(()=>import("./hack-DbPARsA_.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>L(()=>import("./haml-D5jkg6IW.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>L(()=>import("./handlebars-BpdQsYii.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>L(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>L(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>L(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>L(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>L(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>L(()=>import("./html-pp8916En.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>L(()=>import("./html-derivative-DlHx6ybY.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>L(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>L(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>L(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>L(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>L(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>L(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>L(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>L(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>L(()=>import("./jinja-f2NsQr07.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>L(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>L(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>L(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>L(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>L(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>L(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>L(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>L(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>L(()=>import("./julia-D7OTSIA_.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"just",name:"Just",import:(()=>L(()=>import("./just-CUsbIsdP.js"),__vite__mapDeps([63,28,2,11,64,1,3,7,8,16,20,33,34,35,36,13,23,24,25,26,37,38])))},{id:"kdl",name:"KDL",import:(()=>L(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>L(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>L(()=>import("./kusto-wEQ09or8.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>L(()=>import("./latex-CaSxy8MP.js"),__vite__mapDeps([65,66,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>L(()=>import("./lean-BZvkOJ9d.js"),[]))},{id:"less",name:"Less",import:(()=>L(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>L(()=>import("./liquid-C0sCDyMI.js"),__vite__mapDeps([67,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>L(()=>import("./llvm-DjAJT7YJ.js"),[]))},{id:"log",name:"Log file",import:(()=>L(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>L(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>L(()=>import("./lua-BaeVxFsk.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>L(()=>import("./luau-KW6xsasC.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>L(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>L(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>L(()=>import("./marko-DjSrsDqO.js"),__vite__mapDeps([68,3,69,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>L(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>L(()=>import("./mdc-DTYItulj.js"),__vite__mapDeps([70,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>L(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>L(()=>import("./mermaid-mWjccvbQ.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>L(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>L(()=>import("./mojo-rZm6bMo-.js"),[]))},{id:"moonbit",name:"MoonBit",aliases:["mbt","mbti"],import:(()=>L(()=>import("./moonbit-_H4v1dQx.js"),[]))},{id:"move",name:"Move",import:(()=>L(()=>import("./move-IF9eRakj.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>L(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>L(()=>import("./nextflow-C-mBbutL.js"),__vite__mapDeps([71,72])))},{id:"nextflow-groovy",name:"Nextflow Groovy",import:(()=>L(()=>import("./nextflow-groovy-vE_lwT2v.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>L(()=>import("./nginx-BpAMiNFr.js"),__vite__mapDeps([73,37,26])))},{id:"nim",name:"Nim",import:(()=>L(()=>import("./nim-BIad80T-.js"),__vite__mapDeps([74,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>L(()=>import("./nix-CwoSXNpI.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>L(()=>import("./nushell-Cz2AlsmD.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>L(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>L(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>L(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"odin",name:"Odin",import:(()=>L(()=>import("./odin-BBf5iR-q.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>L(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>L(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>L(()=>import("./perl-B9cMNwum.js"),__vite__mapDeps([64,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>L(()=>import("./php-Csjmro_R.js"),__vite__mapDeps([75,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>L(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>L(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>L(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>L(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>L(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>L(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>L(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>L(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>L(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>L(()=>import("./proto-C7zT0LnQ.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>L(()=>import("./pug-DKIMFp6K.js"),__vite__mapDeps([76,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>L(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>L(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>L(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>L(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([77,2])))},{id:"qmldir",name:"QML Directory",import:(()=>L(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>L(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>L(()=>import("./r-Dspwwk_N.js"),[]))},{id:"racket",name:"Racket",import:(()=>L(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>L(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>L(()=>import("./razor-BjBPvh-w.js"),__vite__mapDeps([78,1,2,3,79])))},{id:"reg",name:"Windows Registry Script",import:(()=>L(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>L(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>L(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>L(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"ron",name:"RON",import:(()=>L(()=>import("./ron-D8l8udqQ.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>L(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>L(()=>import("./rst-CpCqk9r5.js"),__vite__mapDeps([80,15,1,2,3,23,24,25,26,16,20,28,38,81,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>L(()=>import("./ruby-DyJCeAvU.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>L(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>L(()=>import("./sas-DEy46yEz.js"),__vite__mapDeps([82,16])))},{id:"sass",name:"Sass",import:(()=>L(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>L(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>L(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>L(()=>import("./scss-D5BDwBP9.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>L(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>L(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([83,84])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>L(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>L(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([85,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>L(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>L(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>L(()=>import("./soy-8wufbnw4.js"),__vite__mapDeps([86,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>L(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([87,88])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>L(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>L(()=>import("./sql-CRqJ_cUM.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>L(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>L(()=>import("./stata-DI20mbqo.js"),__vite__mapDeps([89,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>L(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"surrealql",name:"SurrealQL",aliases:["surql"],import:(()=>L(()=>import("./surrealql-Bq5Q-fJD.js"),__vite__mapDeps([90,2])))},{id:"svelte",name:"Svelte",import:(()=>L(()=>import("./svelte-Cy7k_4gC.js"),__vite__mapDeps([91,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>L(()=>import("./swift-D82vCrfD.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>L(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>L(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>L(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>L(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>L(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>L(()=>import("./templ-DhtptRzy.js"),__vite__mapDeps([92,93,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>L(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>L(()=>import("./tex-idrVyKtj.js"),__vite__mapDeps([66,62])))},{id:"toml",name:"TOML",import:(()=>L(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>L(()=>import("./ts-tags-D351s5mN.js"),__vite__mapDeps([94,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>L(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>L(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>L(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>L(()=>import("./twig-CW1WmMYd.js"),__vite__mapDeps([95,3,2,5,75,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>L(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>L(()=>import("./typespec-CAFt9gP4.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>L(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>L(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>L(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>L(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>L(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>L(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>L(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>L(()=>import("./vue-D2xRrEX4.js"),__vite__mapDeps([96,3,2,11,9,1,15])))},{id:"vue-html",name:"Vue HTML",import:(()=>L(()=>import("./vue-html-AaS7Mt5G.js"),__vite__mapDeps([97,2])))},{id:"vue-vine",name:"Vue Vine",import:(()=>L(()=>import("./vue-vine-BoDAl6tE.js"),__vite__mapDeps([98,3,5,69,99,12,2])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>L(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>L(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>L(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>L(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>L(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>L(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>L(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>L(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>L(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([100,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>L(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>L(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>L(()=>import("./zig-VOosw3JB.js"),[]))}],I1=Object.fromEntries(Cd.map(e=>[e.id,e.import])),D1=Object.fromEntries(Cd.flatMap(e=>e.aliases?.map(t=>[t,e.import])||[])),M1={...I1,...D1},P1=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>L(()=>import("./andromeeda-C4gqWexZ.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>L(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>L(()=>import("./ayu-dark-DYE7WIF3.js"),[]))},{id:"ayu-light",displayName:"Ayu Light",type:"light",import:(()=>L(()=>import("./ayu-light-BA47KaF1.js"),[]))},{id:"ayu-mirage",displayName:"Ayu Mirage",type:"dark",import:(()=>L(()=>import("./ayu-mirage-32ctXXKs.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>L(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>L(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>L(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>L(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>L(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>L(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>L(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>L(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>L(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>L(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>L(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>L(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>L(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>L(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>L(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>L(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>L(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>L(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>L(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>L(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"horizon",displayName:"Horizon",type:"dark",import:(()=>L(()=>import("./horizon-BUw7H-hv.js"),[]))},{id:"horizon-bright",displayName:"Horizon Bright",type:"light",import:(()=>L(()=>import("./horizon-bright-CUuTKBJd.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>L(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>L(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>L(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>L(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>L(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>L(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>L(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>L(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>L(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>L(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>L(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>L(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>L(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>L(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>L(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"night-owl-light",displayName:"Night Owl Light",type:"light",import:(()=>L(()=>import("./night-owl-light-CMTm3GFP.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>L(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>L(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>L(()=>import("./one-light-C3Wv6jpd.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>L(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>L(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>L(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>L(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>L(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>L(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>L(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>L(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>L(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>L(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>L(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>L(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>L(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>L(()=>import("./vesper-DRje8inN.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>L(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>L(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>L(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],B1=Object.fromEntries(P1.map(e=>[e.id,e.import]));var j1=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function SG(){return 2147483648}function AG(){return typeof performance<"u"?performance.now():Date.now()}const CG=(e,t)=>e+(t-e%t)%t;async function wG(e){let t,n;const r={};function i(E){n=E,r.HEAPU8=new Uint8Array(E),r.HEAPU32=new Uint32Array(E)}function o(E,T,S){r.HEAPU8.copyWithin(E,T,T+S)}function l(E){try{return t.grow(E-n.byteLength+65535>>>16),i(t.buffer),1}catch{}}function c(E){const T=r.HEAPU8.length;E=E>>>0;const S=SG();if(E>S)return!1;for(let C=1;C<=4;C*=2){let w=T*(1+.2/C);w=Math.min(w,E+100663296);const k=Math.min(S,CG(Math.max(E,w),65536));if(l(k))return!0}return!1}const f=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(E,T,S=1024){const C=T+S;let w=T;for(;E[w]&&!(w>=C);)++w;if(w-T>16&&E.buffer&&f)return f.decode(E.subarray(T,w));let k="";for(;T<w;){let N=E[T++];if(!(N&128)){k+=String.fromCharCode(N);continue}const P=E[T++]&63;if((N&224)===192){k+=String.fromCharCode((N&31)<<6|P);continue}const B=E[T++]&63;if((N&240)===224?N=(N&15)<<12|P<<6|B:N=(N&7)<<18|P<<12|B<<6|E[T++]&63,N<65536)k+=String.fromCharCode(N);else{const D=N-65536;k+=String.fromCharCode(55296|D>>10,56320|D&1023)}}return k}function p(E,T){return E?h(r.HEAPU8,E,T):""}const m={emscripten_get_now:AG,emscripten_memcpy_big:o,emscripten_resize_heap:c,fd_write:()=>0};async function y(){const T=await e({env:m,wasi_snapshot_preview1:m});t=T.memory,i(t.buffer),Object.assign(r,T),r.UTF8ToString=p}return await y(),r}var kG=Object.defineProperty,NG=(e,t,n)=>t in e?kG(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,zt=(e,t,n)=>NG(e,typeof t!="symbol"?t+"":t,n);let Qt=null;function RG(e){throw new j1(e.UTF8ToString(e.getLastOnigError()))}class wd{constructor(t){zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16Value"),zt(this,"utf8Value"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16");const n=t.length,r=wd._utf8ByteLength(t),i=r!==n,o=i?new Uint32Array(n+1):null;i&&(o[n]=r);const l=i?new Uint32Array(r+1):null;i&&(l[r]=n);const c=new Uint8Array(r);let f=0;for(let h=0;h<n;h++){const p=t.charCodeAt(h);let m=p,y=!1;if(p>=55296&&p<=56319&&h+1<n){const E=t.charCodeAt(h+1);E>=56320&&E<=57343&&(m=(p-55296<<10)+65536|E-56320,y=!0)}i&&(o[h]=f,y&&(o[h+1]=f),m<=127?l[f+0]=h:m<=2047?(l[f+0]=h,l[f+1]=h):m<=65535?(l[f+0]=h,l[f+1]=h,l[f+2]=h):(l[f+0]=h,l[f+1]=h,l[f+2]=h,l[f+3]=h)),m<=127?c[f++]=m:m<=2047?(c[f++]=192|(m&1984)>>>6,c[f++]=128|(m&63)>>>0):m<=65535?(c[f++]=224|(m&61440)>>>12,c[f++]=128|(m&4032)>>>6,c[f++]=128|(m&63)>>>0):(c[f++]=240|(m&1835008)>>>18,c[f++]=128|(m&258048)>>>12,c[f++]=128|(m&4032)>>>6,c[f++]=128|(m&63)>>>0),y&&h++}this.utf16Length=n,this.utf8Length=r,this.utf16Value=t,this.utf8Value=c,this.utf16OffsetToUtf8=o,this.utf8OffsetToUtf16=l}static _utf8ByteLength(t){let n=0;for(let r=0,i=t.length;r<i;r++){const o=t.charCodeAt(r);let l=o,c=!1;if(o>=55296&&o<=56319&&r+1<i){const f=t.charCodeAt(r+1);f>=56320&&f<=57343&&(l=(o-55296<<10)+65536|f-56320,c=!0)}l<=127?n+=1:l<=2047?n+=2:l<=65535?n+=3:n+=4,c&&r++}return n}createString(t){const n=t.omalloc(this.utf8Length);return t.HEAPU8.set(this.utf8Value,n),n}}const kd=class kr{constructor(t){if(zt(this,"id",++kr.LAST_ID),zt(this,"_onigBinding"),zt(this,"content"),zt(this,"utf16Length"),zt(this,"utf8Length"),zt(this,"utf16OffsetToUtf8"),zt(this,"utf8OffsetToUtf16"),zt(this,"ptr"),!Qt)throw new j1("Must invoke loadWasm first.");this._onigBinding=Qt,this.content=t;const n=new wd(t);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!kr._sharedPtrInUse?(kr._sharedPtr||(kr._sharedPtr=Qt.omalloc(1e4)),kr._sharedPtrInUse=!0,Qt.HEAPU8.set(n.utf8Value,kr._sharedPtr),this.ptr=kr._sharedPtr):this.ptr=n.createString(Qt)}convertUtf8OffsetToUtf16(t){return this.utf8OffsetToUtf16?t<0?0:t>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[t]:t}convertUtf16OffsetToUtf8(t){return this.utf16OffsetToUtf8?t<0?0:t>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[t]:t}dispose(){this.ptr===kr._sharedPtr?kr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};zt(kd,"LAST_ID",0);zt(kd,"_sharedPtr",0);zt(kd,"_sharedPtrInUse",!1);let tN=kd;class OG{constructor(t){if(zt(this,"_onigBinding"),zt(this,"_ptr"),!Qt)throw new j1("Must invoke loadWasm first.");const n=[],r=[];for(let c=0,f=t.length;c<f;c++){const h=new wd(t[c]);n[c]=h.createString(Qt),r[c]=h.utf8Length}const i=Qt.omalloc(4*t.length);Qt.HEAPU32.set(n,i/4);const o=Qt.omalloc(4*t.length);Qt.HEAPU32.set(r,o/4);const l=Qt.createOnigScanner(i,o,t.length);for(let c=0,f=t.length;c<f;c++)Qt.ofree(n[c]);Qt.ofree(o),Qt.ofree(i),l===0&&RG(Qt),this._onigBinding=Qt,this._ptr=l}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(t,n,r){let i=0;if(typeof r=="number"&&(i=r),typeof t=="string"){t=new tN(t);const o=this._findNextMatchSync(t,n,!1,i);return t.dispose(),o}return this._findNextMatchSync(t,n,!1,i)}_findNextMatchSync(t,n,r,i){const o=this._onigBinding,l=o.findNextOnigScannerMatch(this._ptr,t.id,t.ptr,t.utf8Length,t.convertUtf16OffsetToUtf8(n),i);if(l===0)return null;const c=o.HEAPU32;let f=l/4;const h=c[f++],p=c[f++],m=[];for(let y=0;y<p;y++){const E=t.convertUtf8OffsetToUtf16(c[f++]),T=t.convertUtf8OffsetToUtf16(c[f++]);m[y]={start:E,end:T,length:T-E}}return{index:h,captureIndices:m}}}function LG(e){return typeof e.instantiator=="function"}function IG(e){return typeof e.default=="function"}function DG(e){return typeof e.data<"u"}function MG(e){return typeof Response<"u"&&e instanceof Response}function PG(e){return typeof ArrayBuffer<"u"&&(e instanceof ArrayBuffer||ArrayBuffer.isView(e))||typeof Buffer<"u"&&Buffer.isBuffer?.(e)||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&e instanceof Uint32Array}let Zc;function U1(e){if(Zc)return Zc;async function t(){Qt=await wG(async n=>{let r=e;return r=await r,typeof r=="function"&&(r=await r(n)),typeof r=="function"&&(r=await r(n)),LG(r)?r=await r.instantiator(n):IG(r)?r=await r.default(n):(DG(r)&&(r=r.data),MG(r)?typeof WebAssembly.instantiateStreaming=="function"?r=await BG(r)(n):r=await jG(r)(n):PG(r)?r=await Fp(r)(n):r instanceof WebAssembly.Module?r=await Fp(r)(n):"default"in r&&r.default instanceof WebAssembly.Module&&(r=await Fp(r.default)(n))),"instance"in r&&(r=r.instance),"exports"in r&&(r=r.exports),r})}return Zc=t(),Zc}function Fp(e){return t=>WebAssembly.instantiate(e,t)}function BG(e){return t=>WebAssembly.instantiateStreaming(e,t)}function jG(e){return async t=>{const n=await e.arrayBuffer();return WebAssembly.instantiate(n,t)}}let nN;function UG(e){nN=e}function HG(){return nN}async function rN(e){return e&&await U1(e),{createScanner(t){return new OG(t.map(n=>typeof n=="string"?n:n.source))},createString(t){return new tN(t)}}}const zG=Object.freeze(Object.defineProperty({__proto__:null,createOnigurumaEngine:rN,getDefaultWasmLoader:HG,loadWasm:U1,setDefaultWasmLoader:UG},Symbol.toStringTag,{value:"Module"}));var aN=L1({});eN(aN,zG);var yt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function FG(e){return H1(e)}function H1(e){return Array.isArray(e)?$G(e):e instanceof RegExp?e:typeof e=="object"?VG(e):e}function $G(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=H1(e[n]);return t}function VG(e){let t={};for(let n in e)t[n]=H1(e[n]);return t}function iN(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function sN(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?sN(e.substring(0,e.length-1)):e.substr(~t+1)}var $p=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Jc=class{static hasCaptures(e){return e===null?!1:($p.lastIndex=0,$p.test(e))}static replaceCaptures(e,t,n){return e.replace($p,(r,i,o,l)=>{let c=n[parseInt(i||o,10)];if(c){let f=t.substring(c.start,c.end);for(;f[0]===".";)f=f.substring(1);switch(l){case"downcase":return f.toLowerCase();case"upcase":return f.toUpperCase();default:return f}}else return r})}};function oN(e,t){return e<t?-1:e>t?1:0}function lN(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=oN(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function Pv(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function uN(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var cN=class{constructor(e){this.fn=e}cache=new Map;get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Bf=class{constructor(e,t,n){this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(YG(e),t)}static createFromParsedTheme(e,t){return QG(e,t)}_cachedMatchRoot=new cN(e=>this._root.match(e));getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>GG(e.parent,i.parentScopes));return r?new fN(r.fontStyle,r.foreground,r.background):null}},Vp=class pf{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new pf(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new pf(n,t[r]);return n}push(t){return new pf(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function GG(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!qG(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function qG(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var fN=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function YG(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let l=t[i];if(!l.settings)continue;let c;if(typeof l.scope=="string"){let m=l.scope;m=m.replace(/^[,]+/,""),m=m.replace(/[,]+$/,""),c=m.split(",")}else Array.isArray(l.scope)?c=l.scope:c=[""];let f=-1;if(typeof l.settings.fontStyle=="string"){f=0;let m=l.settings.fontStyle.split(" ");for(let y=0,E=m.length;y<E;y++)switch(m[y]){case"italic":f=f|1;break;case"bold":f=f|2;break;case"underline":f=f|4;break;case"strikethrough":f=f|8;break}}let h=null;typeof l.settings.foreground=="string"&&Pv(l.settings.foreground)&&(h=l.settings.foreground);let p=null;typeof l.settings.background=="string"&&Pv(l.settings.background)&&(p=l.settings.background);for(let m=0,y=c.length;m<y;m++){let T=c[m].trim().split(" "),S=T[T.length-1],C=null;T.length>1&&(C=T.slice(0,T.length-1),C.reverse()),n[r++]=new XG(S,C,i,f,h,p)}}return n}var XG=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},sn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(sn||{});function QG(e,t){e.sort((f,h)=>{let p=oN(f.scope,h.scope);return p!==0||(p=lN(f.parentScopes,h.parentScopes),p!==0)?p:f.index-h.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let f=e.shift();f.fontStyle!==-1&&(n=f.fontStyle),f.foreground!==null&&(r=f.foreground),f.background!==null&&(i=f.background)}let o=new WG(t),l=new fN(n,o.getId(r),o.getId(i)),c=new ZG(new V0(0,null,-1,0,0),[]);for(let f=0,h=e.length;f<h;f++){let p=e[f];c.insert(0,p.scope,p.parentScopes,p.fontStyle,o.getId(p.foreground),o.getId(p.background))}return new Bf(o,l,c)}var WG=class{_isFrozen;_lastColorId;_id2color;_color2id;constructor(e){if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},KG=Object.freeze([]),V0=class dN{scopeDepth;parentScopes;fontStyle;foreground;background;constructor(t,n,r,i,o){this.scopeDepth=t,this.parentScopes=n||KG,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new dN(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},ZG=class G0{constructor(t,n=[],r={}){this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}_rulesWithParentScopes;static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(G0._cmpBySpecificity),n}insert(t,n,r,i,o,l){if(n===""){this._doInsertHere(t,r,i,o,l);return}let c=n.indexOf("."),f,h;c===-1?(f=n,h=""):(f=n.substring(0,c),h=n.substring(c+1));let p;this._children.hasOwnProperty(f)?p=this._children[f]:(p=new G0(this._mainRule.clone(),V0.cloneArr(this._rulesWithParentScopes)),this._children[f]=p),p.insert(t+1,h,r,i,o,l)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let l=0,c=this._rulesWithParentScopes.length;l<c;l++){let f=this._rulesWithParentScopes[l];if(lN(f.parentScopes,n)===0){f.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new V0(t,n,r,i,o))}},Vi=class tr{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=tr.getLanguageId(t),r=tr.getTokenType(t),i=tr.getFontStyle(t),o=tr.getForeground(t),l=tr.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:l})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,l,c){let f=tr.getLanguageId(t),h=tr.getTokenType(t),p=tr.containsBalancedBrackets(t)?1:0,m=tr.getFontStyle(t),y=tr.getForeground(t),E=tr.getBackground(t);return n!==0&&(f=n),r!==8&&(h=r),i!==null&&(p=i?1:0),o!==-1&&(m=o),l!==0&&(y=l),c!==0&&(E=c),(f<<0|h<<8|p<<10|m<<11|y<<15|E<<24)>>>0}};function jf(e,t){const n=[],r=JG(e);let i=r.next();for(;i!==null;){let f=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":f=1;break;case"L":f=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let h=l();if(n.push({matcher:h,priority:f}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const f=o();return h=>!!f&&!f(h)}if(i==="("){i=r.next();const f=c();return i===")"&&(i=r.next()),f}if(Bv(i)){const f=[];do f.push(i),i=r.next();while(Bv(i));return h=>t(f,h)}return null}function l(){const f=[];let h=o();for(;h;)f.push(h),h=o();return p=>f.every(m=>m(p))}function c(){const f=[];let h=l();for(;h&&(f.push(h),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");h=l()}return p=>f.some(m=>m(p))}}function Bv(e){return!!e&&!!e.match(/[\w\.:]+/)}function JG(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function hN(e){typeof e.dispose=="function"&&e.dispose()}var Kl=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},eq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},tq=class{_references=[];_seenReferenceKeys=new Set;get references(){return this._references}visitedRule=new Set;add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},nq=class{constructor(e,t){this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new Kl(this.initialScopeName)]}seenFullScopeRequests=new Set;seenPartialScopeRequests=new Set;Q;processQueue(){const e=this.Q;this.Q=[];const t=new tq;for(const n of e)rq(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof Kl){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function rq(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof Kl?gf({baseGrammar:o,selfGrammar:i},r):q0(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const l=n.injections(e.scopeName);if(l)for(const c of l)r.add(new Kl(c))}function q0(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Uf([r],t,n)}}function gf(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Uf(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Uf(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Uf(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?iN({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Uf(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const l=mN(o);switch(l.kind){case 0:gf({...t,selfGrammar:t.baseGrammar},n);break;case 1:gf(t,n);break;case 2:q0(l.ruleName,{...t,repository:i},n);break;case 3:case 4:const c=l.scopeName===t.selfGrammar.scopeName?t.selfGrammar:l.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(c){const f={baseGrammar:t.baseGrammar,selfGrammar:c,repository:i};l.kind===4?q0(l.ruleName,f,n):gf(f,n)}else l.kind===4?n.add(new eq(l.scopeName,l.ruleName)):n.add(new Kl(l.scopeName));break}}}var aq=class{kind=0},iq=class{kind=1},sq=class{constructor(e){this.ruleName=e}kind=2},oq=class{constructor(e){this.scopeName=e}kind=3},lq=class{constructor(e,t){this.scopeName=e,this.ruleName=t}kind=4};function mN(e){if(e==="$base")return new aq;if(e==="$self")return new iq;const t=e.indexOf("#");if(t===-1)return new oq(e);if(t===0)return new sq(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new lq(n,r)}}var uq=/\\(\d+)/,jv=/\\(\d+)/g,cq=-1,pN=-2;var pu=class{$location;id;_nameIsCapturing;_name;_contentNameIsCapturing;_contentName;constructor(e,t,n,r){this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Jc.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Jc.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${sN(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Jc.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Jc.replaceCaptures(this._contentName,e,t)}},fq=class extends pu{retokenizeCapturedWithRuleId;constructor(e,t,n,r,i){super(e,t,n,r),this.retokenizeCapturedWithRuleId=i}dispose(){}collectPatterns(e,t){throw new Error("Not supported!")}compile(e,t){throw new Error("Not supported!")}compileAG(e,t,n,r){throw new Error("Not supported!")}},dq=class extends pu{_match;captures;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,null),this._match=new Zl(r,this.id),this.captures=i,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,t){t.push(this._match)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Uv=class extends pu{hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i){super(e,t,n,r),this.patterns=i.patterns,this.hasMissingPatterns=i.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,t){for(const n of this.patterns)e.getRule(n).collectPatterns(e,t)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new Jl,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Y0=class extends pu{_begin;beginCaptures;_end;endHasBackReferences;endCaptures;applyEndPatternLast;hasMissingPatterns;patterns;_cachedCompiledPatterns;constructor(e,t,n,r,i,o,l,c,f,h){super(e,t,n,r),this._begin=new Zl(i,this.id),this.beginCaptures=o,this._end=new Zl(l||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(e,t){return this._end.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e,t).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e,t).compileAG(e,n,r)}_getCachedCompiledPatterns(e,t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,t):this._cachedCompiledPatterns.setSource(0,t)),this._cachedCompiledPatterns}},Hf=class extends pu{_begin;beginCaptures;whileCaptures;_while;whileHasBackReferences;hasMissingPatterns;patterns;_cachedCompiledPatterns;_cachedCompiledWhilePatterns;constructor(e,t,n,r,i,o,l,c,f){super(e,t,n,r),this._begin=new Zl(i,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new Zl(l,pN),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(e,t){return this._while.resolveBackReferences(e,t)}collectPatterns(e,t){t.push(this._begin)}compile(e,t){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,t,n,r){return this._getCachedCompiledPatterns(e).compileAG(e,n,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new Jl;for(const t of this.patterns)e.getRule(t).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,t){return this._getCachedCompiledWhilePatterns(e,t).compile(e)}compileWhileAG(e,t,n,r){return this._getCachedCompiledWhilePatterns(e,t).compileAG(e,n,r)}_getCachedCompiledWhilePatterns(e,t){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new Jl,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,t||""),this._cachedCompiledWhilePatterns}},gN=class an{static createCaptureRule(t,n,r,i,o){return t.registerRule(l=>new fq(n,l,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new dq(t.$vscodeTextmateLocation,t.id,t.name,t.match,an._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=iN({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new Uv(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,an._compilePatterns(o,n,r))}return t.while?new Hf(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,an._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,an._compileCaptures(t.whileCaptures||t.captures,n,r),an._compilePatterns(t.patterns,n,r)):new Y0(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,an._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,an._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,an._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);c>o&&(o=c)}for(let l=0;l<=o;l++)i[l]=null;for(const l in t){if(l==="$vscodeTextmateLocation")continue;const c=parseInt(l,10);let f=0;t[l].patterns&&(f=an.getCompiledRuleId(t[l],n,r)),i[c]=an.createCaptureRule(n,t[l].$vscodeTextmateLocation,t[l].name,t[l].contentName,f)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,l=t.length;o<l;o++){const c=t[o];let f=-1;if(c.include){const h=mN(c.include);switch(h.kind){case 0:case 1:f=an.getCompiledRuleId(r[c.include],n,r);break;case 2:let p=r[h.ruleName];p&&(f=an.getCompiledRuleId(p,n,r));break;case 3:case 4:const m=h.scopeName,y=h.kind===4?h.ruleName:null,E=n.getExternalGrammar(m,r);if(E)if(y){let T=E.repository[y];T&&(f=an.getCompiledRuleId(T,n,E.repository))}else f=an.getCompiledRuleId(E.repository.$self,n,E.repository);break}}else f=an.getCompiledRuleId(c,n,r);if(f!==-1){const h=n.getRule(f);let p=!1;if((h instanceof Uv||h instanceof Y0||h instanceof Hf)&&h.hasMissingPatterns&&h.patterns.length===0&&(p=!0),p)continue;i.push(f)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},Zl=class bN{source;ruleId;hasAnchor;hasBackReferences;_anchorCache;constructor(t,n){if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],l=!1;for(let c=0;c<r;c++)if(t.charAt(c)==="\\"&&c+1<r){const h=t.charAt(c+1);h==="z"?(o.push(t.substring(i,c)),o.push("$(?!\\n)(?<!\\n)"),i=c+2):(h==="A"||h==="G")&&(l=!0),c++}this.hasAnchor=l,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=uq.test(this.source):this.hasBackReferences=!1}clone(){return new bN(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return jv.lastIndex=0,this.source.replace(jv,(i,o)=>uN(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,l,c,f;for(o=0,l=this.source.length;o<l;o++)c=this.source.charAt(o),t[o]=c,n[o]=c,r[o]=c,i[o]=c,c==="\\"&&o+1<l&&(f=this.source.charAt(o+1),f==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):f==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(t[o+1]=f,n[o+1]=f,r[o+1]=f,i[o+1]=f),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},Jl=class{_items;_hasAnchors;_cached;_anchorCache;constructor(){this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new Hv(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new Hv(e,r,this._items.map(i=>i.ruleId))}},Hv=class{constructor(e,t,n){this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}scanner;dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
180
|
+
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},Gp=class{constructor(e,t){this.languageId=e,this.tokenType=t}},hq=class X0{_defaultAttributes;_embeddedLanguagesMatcher;constructor(t,n){this._defaultAttributes=new Gp(t,8),this._embeddedLanguagesMatcher=new mq(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?X0._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}static _NULL_SCOPE_METADATA=new Gp(0,0);_getBasicScopeAttributes=new cN(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new Gp(n,r)});_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(X0.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}static STANDARD_TOKEN_TYPE_REGEXP=/\b(comment|string|regex|meta\.embedded)\b/},mq=class{values;scopesRegExp;constructor(e){if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>uN(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},zv=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function EN(e,t,n,r,i,o,l,c){const f=t.content.length;let h=!1,p=-1;if(l){const E=pq(e,t,n,r,i,o);i=E.stack,r=E.linePos,n=E.isFirstLine,p=E.anchorPosition}const m=Date.now();for(;!h;){if(c!==0&&Date.now()-m>c)return new zv(i,!0);y()}return new zv(i,!1);function y(){const E=gq(e,t,n,r,i,p);if(!E){o.produce(i,f),h=!0;return}const T=E.captureIndices,S=E.matchedRuleId,C=T&&T.length>0?T[0].end>r:!1;if(S===cq){const w=i.getRule(e);o.produce(i,T[0].start),i=i.withContentNameScopesList(i.nameScopesList),Dl(e,t,n,i,o,w.endCaptures,T),o.produce(i,T[0].end);const k=i;if(i=i.parent,p=k.getAnchorPos(),!C&&k.getEnterPos()===r){i=k,o.produce(i,f),h=!0;return}}else{const w=e.getRule(S);o.produce(i,T[0].start);const k=i,N=w.getName(t.content,T),P=i.contentNameScopesList.pushAttributed(N,e);if(i=i.push(S,r,p,T[0].end===f,null,P,P),w instanceof Y0){const B=w;Dl(e,t,n,i,o,B.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const D=B.getContentName(t.content,T),$=P.pushAttributed(D,e);if(i=i.withContentNameScopesList($),B.endHasBackReferences&&(i=i.withEndRule(B.getEndWithResolvedBackReferences(t.content,T))),!C&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,f),h=!0;return}}else if(w instanceof Hf){const B=w;Dl(e,t,n,i,o,B.beginCaptures,T),o.produce(i,T[0].end),p=T[0].end;const D=B.getContentName(t.content,T),$=P.pushAttributed(D,e);if(i=i.withContentNameScopesList($),B.whileHasBackReferences&&(i=i.withEndRule(B.getWhileWithResolvedBackReferences(t.content,T))),!C&&k.hasSameRuleAs(i)){i=i.pop(),o.produce(i,f),h=!0;return}}else if(Dl(e,t,n,i,o,w.captures,T),o.produce(i,T[0].end),i=i.pop(),!C){i=i.safePop(),o.produce(i,f),h=!0;return}}T[0].end>r&&(r=T[0].end,n=!1)}}function pq(e,t,n,r,i,o){let l=i.beginRuleCapturedEOL?0:-1;const c=[];for(let f=i;f;f=f.pop()){const h=f.getRule(e);h instanceof Hf&&c.push({rule:h,stack:f})}for(let f=c.pop();f;f=c.pop()){const{ruleScanner:h,findOptions:p}=yq(f.rule,e,f.stack.endRule,n,r===l),m=h.findNextMatchSync(t,r,p);if(m){if(m.ruleId!==pN){i=f.stack.pop();break}m.captureIndices&&m.captureIndices.length&&(o.produce(f.stack,m.captureIndices[0].start),Dl(e,t,n,f.stack,o,f.rule.whileCaptures,m.captureIndices),o.produce(f.stack,m.captureIndices[0].end),l=m.captureIndices[0].end,m.captureIndices[0].end>r&&(r=m.captureIndices[0].end,n=!1))}else{i=f.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:l,isFirstLine:n}}function gq(e,t,n,r,i,o){const l=bq(e,t,n,r,i,o),c=e.getInjections();if(c.length===0)return l;const f=Eq(c,e,t,n,r,i,o);if(!f)return l;if(!l)return f;const h=l.captureIndices[0].start,p=f.captureIndices[0].start;return p<h||f.priorityMatch&&p===h?f:l}function bq(e,t,n,r,i,o){const l=i.getRule(e),{ruleScanner:c,findOptions:f}=yN(l,e,i.endRule,n,r===o),h=c.findNextMatchSync(t,r,f);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function Eq(e,t,n,r,i,o,l){let c=Number.MAX_VALUE,f=null,h,p=0;const m=o.contentNameScopesList.getScopeNames();for(let y=0,E=e.length;y<E;y++){const T=e[y];if(!T.matcher(m))continue;const S=t.getRule(T.ruleId),{ruleScanner:C,findOptions:w}=yN(S,t,null,r,i===l),k=C.findNextMatchSync(n,i,w);if(!k)continue;const N=k.captureIndices[0].start;if(!(N>=c)&&(c=N,f=k.captureIndices,h=k.ruleId,p=T.priority,c===i))break}return f?{priorityMatch:p===-1,captureIndices:f,matchedRuleId:h}:null}function yN(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function yq(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function Dl(e,t,n,r,i,o,l){if(o.length===0)return;const c=t.content,f=Math.min(o.length,l.length),h=[],p=l[0].end;for(let m=0;m<f;m++){const y=o[m];if(y===null)continue;const E=l[m];if(E.length===0)continue;if(E.start>p)break;for(;h.length>0&&h[h.length-1].endPos<=E.start;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?i.produceFromScopes(h[h.length-1].scopes,E.start):i.produce(r,E.start),y.retokenizeCapturedWithRuleId){const S=y.getName(c,l),C=r.contentNameScopesList.pushAttributed(S,e),w=y.getContentName(c,l),k=C.pushAttributed(w,e),N=r.push(y.retokenizeCapturedWithRuleId,E.start,-1,!1,null,C,k),P=e.createOnigString(c.substring(0,E.end));EN(e,P,n&&E.start===0,E.start,N,i,!1,0),hN(P);continue}const T=y.getName(c,l);if(T!==null){const C=(h.length>0?h[h.length-1].scopes:r.contentNameScopesList).pushAttributed(T,e);h.push(new _q(C,E.end))}}for(;h.length>0;)i.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var _q=class{scopes;endPos;constructor(e,t){this.scopes=e,this.endPos=t}};function xq(e,t,n,r,i,o,l,c){return new vq(e,t,n,r,i,o,l,c)}function Fv(e,t,n,r,i){const o=jf(t,zf),l=gN.getCompiledRuleId(n,r,i.repository);for(const c of o)e.push({debugSelector:t,matcher:c.matcher,ruleId:l,grammar:i,priority:c.priority})}function zf(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(Tq(t[i],r))return n=i+1,!0;return!1})}function Tq(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var vq=class{constructor(e,t,n,r,i,o,l,c){if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=c,this._basicScopeAttributesProvider=new hq(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=l,this._grammar=$v(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const f of Object.keys(i)){const h=jf(f,zf);for(const p of h)this._tokenTypeMatchers.push({matcher:p.matcher,type:i[f]})}}_rootId;_lastRuleId;_ruleId2desc;_includedGrammars;_grammarRepository;_grammar;_injections;_basicScopeAttributesProvider;_tokenTypeMatchers;get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let l in i)Fv(t,l,i[l],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(l=>{const c=this.getExternalGrammar(l);if(c){const f=c.injectionSelector;f&&Fv(t,f,c,this,c)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=$v(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=gN.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===Q0.NULL){i=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),p=this.themeProvider.getDefaults(),m=Vi.set(0,h.languageId,h.tokenType,null,p.fontStyle,p.foregroundId,p.backgroundId),y=this.getRule(this._rootId).getName(null,null);let E;y?E=Vl.createRootAndLookUpScopeName(y,m,this):E=Vl.createRoot("unknown",m),t=new Q0(null,this._rootId,-1,-1,!1,null,E,E)}else i=!1,t.reset();e=e+`
|
|
181
|
+
`;const o=this.createOnigString(e),l=o.content.length,c=new Aq(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),f=EN(this,o,i,0,t,c,!0,r);return hN(o),{lineLength:l,lineTokens:c,ruleStack:f.stack,stoppedEarly:f.stoppedEarly}}};function $v(e,t){return e=FG(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Vl=class Nr{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=t?.scopePath??null;for(const o of n)i=Vp.push(i,o.scopeNames),r=new Nr(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Nr(null,new Vp(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new Vp(null,t),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(n,i,l);return new Nr(null,o,c)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Nr.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,l=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,l=r.backgroundId),Vi.set(t,n.languageId,n.tokenType,null,i,o,l)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Nr._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Nr._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),l=r.themeProvider.themeMatch(o),c=Nr.mergeAttributes(t.tokenAttributes,i,l);return new Nr(t,o,c)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(r.parent?.scopePath??null)}),r=r.parent;return r===t?n.reverse():void 0}},Q0=class Mi{constructor(t,n,r,i,o,l,c,f){this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=l,this.nameScopesList=c,this.contentNameScopesList=f,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}_stackElementBrand=void 0;static NULL=new Mi(null,0,0,0,!1,null,null,null);_enterPos;_anchorPos;depth;equals(t){return t===null?!1:Mi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Vl.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){Mi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,l,c){return new Mi(this,t,n,r,i,o,l,c)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${this.nameScopesList?.toString()}, ${this.contentNameScopesList?.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new Mi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:this.nameScopesList?.getExtensionIfDefined(this.parent?.nameScopesList??null)??[],contentNameScopesList:this.contentNameScopesList?.getExtensionIfDefined(this.nameScopesList)??[]}}static pushFrame(t,n){const r=Vl.fromExtension(t?.nameScopesList??null,n.nameScopesList);return new Mi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Vl.fromExtension(r,n.contentNameScopesList))}},Sq=class{balancedBracketScopes;unbalancedBracketScopes;allowAny=!1;constructor(e,t){this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):jf(n,zf).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>jf(n,zf).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},Aq=class{constructor(e,t,n,r){this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}_emitBinaryTokens;_lineText;_tokens;_binaryTokens;_lastTokenEndIndex;_tokenTypeOverrides;produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let r=e?.tokenAttributes??0,i=!1;if(this.balancedBracketSelectors?.matchesAlways&&(i=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=e?.getScopeNames()??[];for(const l of this._tokenTypeOverrides)l.matcher(o)&&(r=Vi.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(i=this.balancedBracketSelectors.match(o))}if(i&&(r=Vi.set(r,0,8,i,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=t;return}const n=e?.getScopeNames()??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},Cq=class{constructor(e,t){this._onigLib=t,this._theme=e}_grammars=new Map;_rawGrammars=new Map;_injectionGrammars=new Map;_theme;dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,xq(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},wq=class{_options;_syncRegistry;_ensureGrammarCache;constructor(t){this._options=t,this._syncRegistry=new Cq(Bf.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Bf.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new Sq(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const l=new nq(this._syncRegistry,t);for(;l.Q.length>0;)l.Q.map(c=>this._loadSingleGrammar(c.scopeName)),l.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},W0=Q0.NULL;function Ff(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries(t?.colorReplacements||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function Ja(e,t){return e&&(t?.[e?.toLowerCase()]||e)}function kq(e){return Array.isArray(e)?e:[e]}async function _N(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function Nd(e){return!e||["plaintext","txt","text","plain"].includes(e)}function xN(e){return e==="ansi"||Nd(e)}function Rd(e){return e==="none"}function TN(e){return Rd(e)}const Nq=/(\r?\n)/g;function Od(e,t=!1){if(e.length===0)return[["",0]];const n=e.split(Nq);let r=0;const i=[];for(let o=0;o<n.length;o+=2){const l=t?n[o]+(n[o+1]||""):n[o];i.push([l,r]),r+=n[o].length,r+=n[o+1]?.length||0}return i}const Vv={light:"#333333",dark:"#bbbbbb"},Gv={light:"#fffffe",dark:"#1e1e1e"},qv="__shiki_resolved";function z1(e){if(e?.[qv])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||="dark",t.colorReplacements={...t.colorReplacements},t.settings||=[];let{bg:n,fg:r}=t;if(!n||!r){const c=t.settings?t.settings.find(f=>!f.name&&!f.scope):void 0;c?.settings?.foreground&&(r=c.settings.foreground),c?.settings?.background&&(n=c.settings.background),!r&&t?.colors?.["editor.foreground"]&&(r=t.colors["editor.foreground"]),!n&&t?.colors?.["editor.background"]&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?Vv.light:Vv.dark),n||(n=t.type==="light"?Gv.light:Gv.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function l(c){if(o.has(c))return o.get(c);i+=1;const f=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return t.colorReplacements?.[`#${f}`]?l(c):(o.set(c,f),f)}t.settings=t.settings.map(c=>{const f=c.settings?.foreground&&!c.settings.foreground.startsWith("#"),h=c.settings?.background&&!c.settings.background.startsWith("#");if(!f&&!h)return c;const p={...c,settings:{...c.settings}};if(f){const m=l(c.settings.foreground);t.colorReplacements[m]=c.settings.foreground,p.settings.foreground=m}if(h){const m=l(c.settings.background);t.colorReplacements[m]=c.settings.background,p.settings.background=m}return p});for(const c of Object.keys(t.colors||{}))if((c==="editor.foreground"||c==="editor.background"||c.startsWith("terminal.ansi"))&&!t.colors[c]?.startsWith("#")){const f=l(t.colors[c]);t.colorReplacements[f]=t.colors[c],t.colors[c]=f}return Object.defineProperty(t,qv,{enumerable:!1,writable:!1,value:!0}),t}async function vN(e){return[...new Set((await Promise.all(e.filter(t=>!xN(t)).map(async t=>await _N(t).then(n=>Array.isArray(n)?n:[n])))).flat())]}async function SN(e){return(await Promise.all(e.map(async t=>TN(t)?null:z1(await _N(t))))).filter(t=>!!t)}function AN(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new yt(`Circular alias \`${[...n].join(" -> ")} -> ${e}\``);n.add(e)}}return e}var Rq=class extends wq{_resolver;_themes;_langs;_alias;_resolvedThemes=new Map;_resolvedGrammars=new Map;_langMap=new Map;_langGraph=new Map;_textmateThemeCache=new WeakMap;_loadedThemesCache=null;_loadedLanguagesCache=null;constructor(e,t,n,r={}){super(e),this._resolver=e,this._themes=t,this._langs=n,this._alias=r,this._themes.map(i=>this.loadTheme(i)),this.loadLanguages(this._langs)}getTheme(e){return typeof e=="string"?this._resolvedThemes.get(e):this.loadTheme(e)}loadTheme(e){const t=z1(e);return t.name&&(this._resolvedThemes.set(t.name,t),this._loadedThemesCache=null),t}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(e){let t=this._textmateThemeCache.get(e);t||(t=Bf.createFromRawTheme(e),this._textmateThemeCache.set(e,t)),this._syncRegistry.setTheme(t)}getGrammar(e){return e=AN(e,this._alias),this._resolvedGrammars.get(e)}loadLanguage(e){if(this.getGrammar(e.name))return;const t=new Set([...this._langMap.values()].filter(i=>i.embeddedLangsLazy?.includes(e.name)));this._resolver.addLanguage(e);const n={balancedBracketSelectors:e.balancedBracketSelectors||["*"],unbalancedBracketSelectors:e.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(e.scopeName,e);const r=this.loadGrammarWithConfiguration(e.scopeName,1,n);if(r.name=e.name,this._resolvedGrammars.set(e.name,r),e.aliases&&e.aliases.forEach(i=>{this._alias[i]=e.name}),this._loadedLanguagesCache=null,t.size)for(const i of t)this._resolvedGrammars.delete(i.name),this._loadedLanguagesCache=null,this._syncRegistry?._injectionGrammars?.delete(i.scopeName),this._syncRegistry?._grammars?.delete(i.scopeName),this.loadLanguage(this._langMap.get(i.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(e){for(const r of e)this.resolveEmbeddedLanguages(r);const t=[...this._langGraph.entries()],n=t.filter(([r,i])=>!i);if(n.length){const r=t.filter(([i,o])=>o?(o.embeddedLanguages||o.embeddedLangs)?.some(l=>n.map(([c])=>c).includes(l)):!1).filter(i=>!n.includes(i));throw new yt(`Missing languages ${n.map(([i])=>`\`${i}\``).join(", ")}, required by ${r.map(([i])=>`\`${i}\``).join(", ")}`)}for(const[r,i]of t)this._resolver.addLanguage(i);for(const[r,i]of t)this.loadLanguage(i)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(e){this._langMap.set(e.name,e),this._langGraph.set(e.name,e);const t=e.embeddedLanguages??e.embeddedLangs;if(t)for(const n of t)this._langGraph.set(n,this._langMap.get(n))}},Oq=class{_langs=new Map;_scopeToLang=new Map;_injections=new Map;_onigLib;constructor(e,t){this._onigLib={createOnigScanner:n=>e.createScanner(n),createOnigString:n=>e.createString(n)},t.forEach(n=>this.addLanguage(n))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(t=>{this._langs.set(t,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(t=>{this._injections.get(t)||this._injections.set(t,[]),this._injections.get(t).push(e.scopeName)})}getInjections(e){const t=e.split(".");let n=[];for(let r=1;r<=t.length;r++){const i=t.slice(0,r).join(".");n=[...n,...this._injections.get(i)||[]]}return n}};let kl=0;function Lq(e){kl+=1,e.warnings!==!1&&kl>=10&&kl%10===0&&console.warn(`[Shiki] ${kl} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new yt("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(z1),i=new Rq(new Oq(e.engine,n),r,n,e.langAlias);let o;function l(k){return AN(k,e.langAlias)}function c(k){C();const N=i.getGrammar(typeof k=="string"?k:k.name);if(!N)throw new yt(`Language \`${k}\` not found, you may need to load it first`);return N}function f(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};C();const N=i.getTheme(k);if(!N)throw new yt(`Theme \`${k}\` not found, you may need to load it first`);return N}function h(k){C();const N=f(k);return o!==k&&(i.setTheme(N),o=k),{theme:N,colorMap:i.getColorMap()}}function p(){return C(),i.getLoadedThemes()}function m(){return C(),i.getLoadedLanguages()}function y(...k){C(),i.loadLanguages(k.flat(1))}async function E(...k){return y(await vN(k))}function T(...k){C();for(const N of k.flat(1))i.loadTheme(N)}async function S(...k){return C(),T(await SN(k))}function C(){if(t)throw new yt("Shiki instance has been disposed")}function w(){t||(t=!0,i.dispose(),kl-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:l,loadLanguage:E,loadLanguageSync:y,loadTheme:S,loadThemeSync:T,dispose:w,[Symbol.dispose]:w}}async function Iq(e){e.engine||console.warn("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([SN(e.themes||[]),vN(e.langs||[]),e.engine]);return Lq({...e,themes:t,langs:n,engine:r})}const CN=new WeakMap;function Ld(e,t){CN.set(e,t)}function eu(e){return CN.get(e)}var Id=class wN{_stacks={};lang;get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new wN(Object.fromEntries(kq(n).map(r=>[r,W0])),t)}constructor(...t){if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return Dq(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}};function Dq(e){const t=[],n=new Set;function r(i){if(n.has(i))return;n.add(i);const o=i?.nameScopesList?.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function Mq(e,t){if(!(e instanceof Id))throw new yt("Invalid grammar state");return e.getInternalStack(t)}const Pq=/,/,Bq=/ /;function kN(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n;if(Nd(e.resolveLangAlias(n.lang||"text"))||Rd(r))return Od(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:i,colorMap:o}=e.setTheme(r),l=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==l.name)throw new yt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(i.name))throw new yt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${i.name}"`)}return Uq(t,l,i,o,n)}function jq(...e){if(e.length===2)return eu(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(Nd(i)||Rd(o))throw new yt("Plain language does not have grammar state");if(i==="ansi")throw new yt("ANSI language does not have grammar state");const{theme:l,colorMap:c}=t.setTheme(o),f=t.getLanguage(i);return new Id(F1(n,f,l,c,r).stateStack,f.name,l.name)}function Uq(e,t,n,r,i){const o=F1(e,t,n,r,i),l=new Id(o.stateStack,t.name,n.name);return Ld(o.tokens,l),o.tokens}function F1(e,t,n,r,i){const o=Ff(n,i),{tokenizeMaxLineLength:l=0,tokenizeTimeLimit:c=500,includeExplanation:f=!1}=i,h=Od(e);let p=i.grammarState?Mq(i.grammarState,n.name)??W0:i.grammarContextCode!=null?F1(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:W0,m=[];const y=[];for(let E=0,T=h.length;E<T;E++){const[S,C]=h[E];if(S===""){m=[],y.push([]);continue}if(l>0&&S.length>=l){m=[],y.push([{content:S,offset:C,color:"",fontStyle:0}]);continue}let w,k,N;f&&f!=="tokenType"&&(w=t.tokenizeLine(S,p,c),k=w.tokens,N=0);const P=t.tokenizeLine2(S,p,c),B=P.tokens.length/2;for(let D=0;D<B;D++){const $=P.tokens[2*D],G=D+1<B?P.tokens[2*D+2]:S.length;if($===G)continue;const ie=P.tokens[2*D+1],V=Ja(r[Vi.getForeground(ie)],o),X=Vi.getFontStyle(ie),J={content:S.substring($,G),offset:C+$,color:V,fontStyle:X};if(f==="tokenType")J.type=Vi.getTokenType(ie);else if(f){const he=[];if(f!=="scopeName")for(const re of n.settings){let U;switch(typeof re.scope){case"string":U=re.scope.split(Pq).map(ee=>ee.trim());break;case"object":U=re.scope;break;default:continue}he.push({settings:re,selectors:U.map(ee=>ee.split(Bq))})}J.explanation=[];let ue=0;for(;$+ue<G;){const re=k[N],U=S.substring(re.startIndex,re.endIndex);ue+=U.length,J.explanation.push({content:U,scopes:f==="scopeName"?Hq(re.scopes):zq(he,re.scopes)}),N+=1}}m.push(J)}y.push(m),m=[],p=P.ruleStack}return{tokens:y,stateStack:p}}function Hq(e){return e.map(t=>({scopeName:t}))}function zq(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:$q(e,o,t.slice(0,r))}}return n}function Yv(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function Fq(e,t,n){if(!Yv(e.at(-1),t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)Yv(e[r],n[i])&&(r-=1),i-=1;return r===-1}function $q(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const l of i)if(Fq(l,t,n)){r.push(o);break}return r}function NN(e,t,n,r=kN){const i=Object.entries(n.themes).filter(h=>h[1]).map(h=>({color:h[0],theme:h[1]})),o=i.map(h=>{const p=r(e,t,{...n,theme:h.theme});return{tokens:p,state:eu(p),theme:typeof h.theme=="string"?h.theme:h.theme.name}}),l=Vq(...o.map(h=>h.tokens)),c=l[0].map((h,p)=>h.map((m,y)=>{const E={content:m.content,variants:{},offset:m.offset};return"includeExplanation"in n&&n.includeExplanation&&(E.explanation=m.explanation),l.forEach((T,S)=>{const{content:C,explanation:w,offset:k,...N}=T[p][y];E.variants[i[S].color]=N}),E})),f=o[0].state?new Id(Object.fromEntries(o.map(h=>[h.theme,h.state?.getInternalStack(h.theme)])),o[0].state.lang):void 0;return f&&Ld(c,f),c}function Vq(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(f=>f[r]),o=t.map(()=>[]);t.forEach((f,h)=>f.push(o[h]));const l=i.map(()=>0),c=i.map(f=>f[0]);for(;c.every(f=>f);){const f=Math.min(...c.map(h=>h.content.length));for(let h=0;h<n;h++){const p=c[h];p.content.length===f?(o[h].push(p),l[h]+=1,c[h]=i[h][l[h]]):(o[h].push({...p,content:p.content.slice(0,f)}),c[h]={...p,content:p.content.slice(f),offset:p.offset+f})}}}return t}const Gq=/["&'<>`]/g,qq=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Yq=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,Xq=/[|\\{}()[\]^$+*?.]/g,Xv=new WeakMap;function Qq(e,t){if(e=e.replace(t.subset?Wq(t.subset):Gq,r),t.subset||t.escapeOnly)return e;return e.replace(qq,n).replace(Yq,r);function n(i,o,l){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,l.charCodeAt(o+2),t)}function r(i,o,l){return t.format(i.charCodeAt(0),l.charCodeAt(o+1),t)}}function Wq(e){let t=Xv.get(e);return t||(t=Kq(e),Xv.set(e,t)),t}function Kq(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(Xq,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const Zq=/[\dA-Fa-f]/;function Jq(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!Zq.test(String.fromCharCode(t))?r:r+";"}const eY=/\d/;function tY(e,t,n){const r="&#"+String(e);return n&&t&&!eY.test(String.fromCharCode(t))?r:r+";"}const nY=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],qp={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},rY=["cent","copy","divide","gt","lt","not","para","times"],RN={}.hasOwnProperty,K0={};let ef;for(ef in qp)RN.call(qp,ef)&&(K0[qp[ef]]=ef);const aY=/[^\dA-Za-z]/;function iY(e,t,n,r){const i=String.fromCharCode(e);if(RN.call(K0,i)){const o=K0[i],l="&"+o;return n&&nY.includes(o)&&!rY.includes(o)&&(!r||t&&t!==61&&aY.test(String.fromCharCode(t)))?l:l+";"}return""}function sY(e,t,n){let r=Jq(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=iY(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=tY(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function so(e,t){return Qq(e,Object.assign({format:sY},t))}const oY=/^>|^->|<!--|-->|--!>|<!-$/g,lY=[">"],uY=["<",">"];function cY(e,t,n,r){return r.settings.bogusComments?"<?"+so(e.value,Object.assign({},r.settings.characterReferences,{subset:lY}))+">":"<!--"+e.value.replace(oY,i)+"-->";function i(o){return so(o,Object.assign({},r.settings.characterReferences,{subset:uY}))}}function fY(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}const Vt=LN(1),ON=LN(-1),dY=[];function LN(e){return t;function t(n,r,i){const o=n?n.children:dY;let l=(r||0)+e,c=o[l];if(!i)for(;c&&Td(c);)l+=e,c=o[l];return c}}const hY={}.hasOwnProperty;function IN(e){return t;function t(n,r,i){return hY.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const $1=IN({body:pY,caption:Yp,colgroup:Yp,dd:yY,dt:EY,head:Yp,html:mY,li:bY,optgroup:_Y,option:xY,p:gY,rp:Qv,rt:Qv,tbody:vY,td:Wv,tfoot:SY,th:Wv,thead:TY,tr:AY});function Yp(e,t,n){const r=Vt(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&Td(r.value.charAt(0)))}function mY(e,t,n){const r=Vt(n,t);return!r||r.type!=="comment"}function pY(e,t,n){const r=Vt(n,t);return!r||r.type!=="comment"}function gY(e,t,n){const r=Vt(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function bY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="li"}function EY(e,t,n){const r=Vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function yY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function Qv(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function _Y(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function xY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function TY(e,t,n){const r=Vt(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function vY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function SY(e,t,n){return!Vt(n,t)}function AY(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function Wv(e,t,n){const r=Vt(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const CY=IN({body:NY,colgroup:RY,head:kY,html:wY,tbody:OY});function wY(e){const t=Vt(e,-1);return!t||t.type!=="comment"}function kY(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function NY(e){const t=Vt(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&Td(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function RY(e,t,n){const r=ON(n,t),i=Vt(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&$1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function OY(e,t,n){const r=ON(n,t),i=Vt(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&$1(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const tf={name:[[`
|
|
182
|
+
\f\r &/=>`.split(""),`
|
|
183
|
+
\f\r "&'/=>\``.split("")],[`\0
|
|
184
|
+
\f\r "&'/<=>`.split(""),`\0
|
|
185
|
+
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
186
|
+
\f\r &>`.split(""),`\0
|
|
187
|
+
\f\r "&'<=>\``.split("")],[`\0
|
|
188
|
+
\f\r "&'<=>\``.split(""),`\0
|
|
189
|
+
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function LY(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let l=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const c=[];let f;i.space==="html"&&e.tagName==="svg"&&(r.schema=Br);const h=IY(r,e.properties),p=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,p&&(l=!1),(h||!o||!CY(e,t,n))&&(c.push("<",e.tagName,h?" "+h:""),l&&(i.space==="svg"||r.settings.closeSelfClosing)&&(f=h.charAt(h.length-1),(!r.settings.tightSelfClosing||f==="/"||f&&f!=='"'&&f!=="'")&&c.push(" "),c.push("/")),c.push(">")),c.push(p),!l&&(!o||!$1(e,t,n))&&c.push("</"+e.tagName+">"),c.join("")}function IY(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=DY(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function DY(e,t,n){const r=lu(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let l=e.quote,c;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const f=so(r.attribute,Object.assign({},e.settings.characterReferences,{subset:tf.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?Gg:qg)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?f:(e.settings.preferUnquoted&&(c=so(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:tf.unquoted[i][o]}))),c!==n&&(e.settings.quoteSmart&&Of(n,l)>Of(n,e.alternative)&&(l=e.alternative),c=l+so(n,Object.assign({},e.settings.characterReferences,{subset:(l==="'"?tf.single:tf.double)[i][o],attribute:!0}))+l),f+(c&&"="+c))}const MY=["<","&"];function DN(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:so(e.value,Object.assign({},r.settings.characterReferences,{subset:MY}))}function PY(e,t,n,r){return r.settings.allowDangerousHtml?e.value:DN(e,t,n,r)}function BY(e,t,n,r){return r.all(e)}const jY=Xg("type",{invalid:UY,unknown:HY,handlers:{comment:cY,doctype:fY,element:LY,raw:PY,root:BY,text:DN}});function UY(e){throw new Error("Expected node, not `"+e+"`")}function HY(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const zY={},FY={},$Y=[];function VY(e,t){const n=t||zY,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:GY,all:qY,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||_C,characterReferences:n.characterReferences||FY,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Br:Eo,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function GY(e,t,n){return jY(e,t,n,this)}function qY(e){const t=[],n=e&&e.children||$Y;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}const Kv=/\s+/g;function MN(e,t){if(!t)return e;e.properties||={},e.properties.class||=[],typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(Kv)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(Kv);for(const r of n)r&&!e.properties.class.includes(r)&&e.properties.class.push(r);return e}const YY=/:?lang=["']([^"']+)["']/g,XY=/(?:```|~~~)([\w-]+)/g,QY=/\\begin\{([\w-]+)\}/g,WY=/<script\s+(?:type|lang)=["']([^"']+)["']/gi;function KY(e){const t=Od(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t.at(-1).length};let o=i,l=0;for(const c of t){if(o<c.length)break;o-=c.length,l++}return{line:l,character:o}}function r(i,o){let l=0;for(let c=0;c<i;c++)l+=t[c].length;return l+=o,l}return{lines:t,indexToPos:n,posToIndex:r}}function ZY(e,t,n){const r=new Set;for(const o of e.matchAll(YY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(XY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(QY)){const l=o[1].toLowerCase().trim();l&&r.add(l)}for(const o of e.matchAll(WY)){const l=o[1].toLowerCase().trim(),c=l.includes("/")?l.split("/").pop():l;c&&r.add(c)}if(!n)return[...r];const i=n.getBundledLanguages();return[...r].filter(o=>o&&i[o])}const JY=["color","background-color"];function eX(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function tX(e,t){const n=[...t instanceof Set?t:new Set(t)].sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(l=>i.offset<l&&l<i.offset+i.content.length).map(l=>l-i.offset).sort((l,c)=>l-c);return o.length?eX(i,o):i})):e}function nX(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},l=t.map(p=>$f(e.variants[p])),c=new Set(l.flatMap(p=>Object.keys(p))),f={},h=(p,m)=>{const y=m==="color"?"":m==="background-color"?"-bg":`-${m}`;return n+t[p]+(m==="color"?"":y)};return l.forEach((p,m)=>{for(const y of c){const E=p[y]||"inherit";if(m===0&&r&&JY.includes(y))if(r==="light-dark()"&&l.length>1){const T=t.findIndex(C=>C==="light"),S=t.findIndex(C=>C==="dark");if(T===-1||S===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');f[y]=`light-dark(${l[T][y]||"inherit"}, ${l[S][y]||"inherit"})`,i==="css-vars"&&(f[h(m,y)]=E)}else f[y]=E;else i==="css-vars"&&(f[h(m,y)]=E)}}),o.htmlStyle=f,o}function $f(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&sn.Italic&&(t["font-style"]="italic"),e.fontStyle&sn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&sn.Underline&&n.push("underline"),e.fontStyle&sn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function Z0(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}function rX(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let i=function(l){if(typeof l=="number"){if(l<0||l>n.source.length)throw new yt(`Invalid decoration offset: ${l}. Code length: ${n.source.length}`);return{...r.indexToPos(l),offset:l}}else{const c=r.lines[l.line];if(c===void 0)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Lines length: ${r.lines.length}`);let f=l.character;if(f<0&&(f=c.length+f),f<0||f>c.length)throw new yt(`Invalid decoration position ${JSON.stringify(l)}. Line ${l.line} length: ${c.length}`);return{...l,character:f,offset:r.posToIndex(l.line,f)}}};const r=KY(n.source),o=(n.options.decorations||[]).map(l=>({...l,start:i(l.start),end:i(l.end)}));aX(o),e.set(n.meta,{decorations:o,converter:r,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){if(this.options.decorations?.length)return tX(n,t(this).decorations.flatMap(r=>[r.start.offset,r.end.offset]))},code(n){if(!this.options.decorations?.length)return;const r=t(this),i=[...n.children].filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new yt(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,m,y,E){const T=i[p];let S="",C=-1,w=-1;if(m===0&&(C=0),y===0&&(w=0),y===Number.POSITIVE_INFINITY&&(w=T.children.length),C===-1||w===-1)for(let N=0;N<T.children.length;N++)S+=PN(T.children[N]),C===-1&&S.length===m&&(C=N+1),w===-1&&S.length===y&&(w=N+1);if(C===-1)throw new yt(`Failed to find start index for decoration ${JSON.stringify(E.start)}`);if(w===-1)throw new yt(`Failed to find end index for decoration ${JSON.stringify(E.end)}`);const k=T.children.slice(C,w);if(!E.alwaysWrap&&k.length===T.children.length)c(T,E,"line");else if(!E.alwaysWrap&&k.length===1&&k[0].type==="element")c(k[0],E,"token");else{const N={type:"element",tagName:"span",properties:{},children:k};c(N,E,"wrapper"),T.children.splice(C,k.length,N)}}function l(p,m){i[p]=c(i[p],m,"line")}function c(p,m,y){const E=m.properties||{},T=m.transform||(S=>S);return p.tagName=m.tagName||"span",p.properties={...p.properties,...E,class:p.properties.class},m.properties?.class&&MN(p,m.properties.class),p=T(p,y)||p,p}const f=[],h=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of h){const{start:m,end:y}=p;if(m.line===y.line)o(m.line,m.character,y.character,p);else if(m.line<y.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let E=m.line+1;E<y.line;E++)f.unshift(()=>l(E,p));o(y.line,0,y.character,p)}}f.forEach(p=>p())}}}function aX(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new yt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,l=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,c=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,f=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||l||c||f){if(o&&l||c&&f||c&&n.start.offset===n.end.offset||l&&i.start.offset===i.end.offset)continue;throw new yt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function PN(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(PN).join(""):""}const iX=[rX()];function Vf(e){const t=sX(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...iX]}function sX(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var Hi=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],Xp={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function oX(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function Zv(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function lX(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)Xp[r]&&t.push({type:"setDecoration",value:Xp[r]});else if(r<=29){const i=Xp[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:Hi[r-30]}});else if(r===38){const i=Zv(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:Hi[r-40]}});else if(r===48){const i=Zv(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:Hi[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:Hi[r-100+8]}})}return t}function uX(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const l=oX(r,o),c=l.sequence?r.substring(o,l.startPosition):r.substring(o);if(c.length>0&&i.push({value:c,foreground:e,background:t,decorations:new Set(n)}),l.sequence){const f=lX(l.sequence);for(const h of f)h.type==="resetAll"?(e=null,t=null,n.clear()):h.type==="resetForegroundColor"?e=null:h.type==="resetBackgroundColor"?t=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of f)h.type==="setForegroundColor"?e=h.value:h.type==="setBackgroundColor"?t=h.value:h.type==="setDecoration"&&n.add(h.value)}o=l.position}while(o<r.length);return i}}}var cX={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function fX(e=cX){function t(c){return e[c]}function n(c){return`#${c.map(f=>Math.max(0,Math.min(f,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let h=0;h<Hi.length;h++)r.push(t(Hi[h]));let c=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let p=0;p<6;p++)for(let m=0;m<6;m++)r.push(n([c[h],c[p],c[m]]));let f=8;for(let h=0;h<24;h++,f+=10)r.push(n([f,f,f]));return r}function o(c){return i()[c]}function l(c){switch(c.type){case"named":return t(c.name);case"rgb":return n(c.rgb);case"table":return o(c.index)}}return{value:l}}const dX=/#([0-9a-f]{3,8})/i,hX=/var\((--[\w-]+-ansi-[\w-]+)\)/,mX={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function pX(e,t,n){const r=Ff(e,n),i=Od(t),o=fX(Object.fromEntries(Hi.map(c=>{const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`;return[c,e.colors?.[f]||mX[c]]}))),l=uX();return i.map(c=>l.parse(c[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?o.value(f.background):e.bg,p=f.foreground?o.value(f.foreground):e.fg):(h=f.foreground?o.value(f.foreground):e.fg,p=f.background?o.value(f.background):void 0),h=Ja(h,r),p=Ja(p,r),f.decorations.has("dim")&&(h=gX(h));let m=sn.None;return f.decorations.has("bold")&&(m|=sn.Bold),f.decorations.has("italic")&&(m|=sn.Italic),f.decorations.has("underline")&&(m|=sn.Underline),f.decorations.has("strikethrough")&&(m|=sn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function gX(e){const t=e.match(dX);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],l=r[2],c=r[3];return`#${i}${i}${o}${o}${l}${l}${Math.round(Number.parseInt(`${c}${c}`,16)/2).toString(16).padStart(2,"0")}`}else if(r.length===3){const i=r[0],o=r[1],l=r[2];return`#${i}${i}${o}${o}${l}${l}80`}}}const n=e.match(hX);return n?`var(${n[1]}-dim)`:e}function J0(e,t,n={}){const r=e.resolveLangAlias(n.lang||"text"),{theme:i=e.getLoadedThemes()[0]}=n;if(!Nd(r)&&!Rd(i)&&r==="ansi"){const{theme:o}=e.setTheme(i);return pX(o,t,n)}return kN(e,t,n)}function Gf(e,t,n){let r,i,o,l,c,f;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:p="--shiki-",colorsRendering:m="css-vars"}=n,y=Object.entries(n.themes).filter(w=>w[1]).map(w=>({color:w[0],theme:w[1]})).sort((w,k)=>w.color===h?-1:k.color===h?1:0);if(y.length===0)throw new yt("`themes` option must not be empty");const E=NN(e,t,n,J0);if(f=eu(E),h&&h!=="light-dark()"&&!y.some(w=>w.color===h))throw new yt(`\`themes\` option must contain the defaultColor key \`${h}\``);const T=y.map(w=>e.getTheme(w.theme)),S=y.map(w=>w.color);o=E.map(w=>w.map(k=>nX(k,S,p,h,m))),f&&Ld(o,f);const C=y.map(w=>Ff(w.theme,n));i=Jv(y,T,C,p,h,"fg",m),r=Jv(y,T,C,p,h,"bg",m),l=`shiki-themes ${T.map(w=>w.name).join(" ")}`,c=h?void 0:[i,r].join(";")}else if("theme"in n){const h=Ff(n.theme,n);o=J0(e,t,n);const p=e.getTheme(n.theme);r=Ja(p.bg,h),i=Ja(p.fg,h),l=p.name,f=eu(o)}else throw new yt("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:l,rootStyle:c,grammarState:f}}function Jv(e,t,n,r,i,o,l){return e.map((c,f)=>{const h=Ja(t[f][o],n[f])||"inherit",p=`${r+c.color}${o==="bg"?"-bg":""}:${h}`;if(f===0&&i){if(i==="light-dark()"&&e.length>1){const m=e.findIndex(E=>E.color==="light"),y=e.findIndex(E=>E.color==="dark");if(m===-1||y===-1)throw new yt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');return`light-dark(${Ja(t[m][o],n[m])||"inherit"}, ${Ja(t[y][o],n[y])||"inherit"});${p}`}return h}return l==="css-vars"?p:null}).filter(c=>!!c).join(";")}const BN=/^\s+$/,bX=/^(\s*)(.*?)(\s*)$/;function qf(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>qf(e,i,o),codeToTokens:(i,o)=>Gf(e,i,o)}){let i=t;for(const T of Vf(n))i=T.preprocess?.call(r,i,n)||i;let{tokens:o,fg:l,bg:c,themeName:f,rootStyle:h,grammarState:p}=Gf(e,i,n);const{mergeWhitespaces:m=!0,mergeSameStyleTokens:y=!1}=n;m===!0?o=yX(o):m==="never"&&(o=_X(o)),y&&(o=xX(o));const E={...r,get source(){return i}};for(const T of Vf(n))o=T.tokens?.call(E,o)||o;return EX(o,{...n,fg:l,bg:c,themeName:f,rootStyle:n.rootStyle===!1?!1:n.rootStyle??h},E,p)}function EX(e,t,n,r=eu(e)){const i=Vf(t),o=[],l={type:"root",children:[]},{structure:c="classic",tabindex:f="0"}=t,h={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?h.style=t.rootStyle:h.style=`background-color:${t.bg};color:${t.fg}`),f!==!1&&f!=null&&(h.tabindex=f.toString());for(const[S,C]of Object.entries(t.meta||{}))S.startsWith("_")||(h[S]=C);let p={type:"element",tagName:"pre",properties:h,children:[],data:t.data},m={type:"element",tagName:"code",properties:{},children:o};const y=[],E={...n,structure:c,addClassToHast:MN,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return l},get pre(){return p},get code(){return m},get lines(){return y}};if(e.forEach((S,C)=>{C&&(c==="inline"?l.children.push({type:"element",tagName:"br",properties:{},children:[]}):c==="classic"&&o.push({type:"text",value:`
|
|
190
|
+
`}));let w={type:"element",tagName:"span",properties:{class:"line"},children:[]},k=0;for(const N of S){let P={type:"element",tagName:"span",properties:{...N.htmlAttrs},children:[{type:"text",value:N.content}]};const B=Z0(N.htmlStyle||$f(N));B&&(P.properties.style=B);for(const D of i)P=D?.span?.call(E,P,C+1,k,w,N)||P;c==="inline"?l.children.push(P):c==="classic"&&w.children.push(P),k+=N.content.length}if(c==="classic"){for(const N of i)w=N?.line?.call(E,w,C+1)||w;y.push(w),o.push(w)}else c==="inline"&&y.push(w)}),c==="classic"){for(const S of i)m=S?.code?.call(E,m)||m;p.children.push(m);for(const S of i)p=S?.pre?.call(E,p)||p;l.children.push(p)}else if(c==="inline"){const S=[];let C={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const k of l.children)k.type==="element"&&k.tagName==="br"?(S.push(C),C={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(k.type==="element"||k.type==="text")&&C.children.push(k);S.push(C);let w={type:"element",tagName:"code",properties:{},children:S};for(const k of i)w=k?.code?.call(E,w)||w;l.children=[];for(let k=0;k<w.children.length;k++){k>0&&l.children.push({type:"element",tagName:"br",properties:{},children:[]});const N=w.children[k];N.type==="element"&&l.children.push(...N.children)}}let T=l;for(const S of i)T=S?.root?.call(E,T)||T;return r&&Ld(T,r),T}function yX(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,l)=>{const c=!(o.fontStyle&&(o.fontStyle&sn.Underline||o.fontStyle&sn.Strikethrough));c&&BN.test(o.content)&&t[l+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function _X(e){return e.map(t=>t.flatMap(n=>{if(BN.test(n.content))return n;const r=n.content.match(bX);if(!r)return n;const[,i,o,l]=r;if(!i&&!l)return n;const c=[{...n,offset:n.offset+i.length,content:o}];return i&&c.unshift({content:i,offset:n.offset}),l&&c.push({content:l,offset:n.offset+i.length+o.length}),c}))}function xX(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n.at(-1),o=Z0(i.htmlStyle||$f(i)),l=Z0(r.htmlStyle||$f(r)),c=i.fontStyle&&(i.fontStyle&sn.Underline||i.fontStyle&sn.Strikethrough),f=r.fontStyle&&(r.fontStyle&sn.Underline||r.fontStyle&sn.Strikethrough);!c&&!f&&o===l?i.content+=r.content:n.push({...r})}return n})}const TX=VY;function vX(e,t,n){const r={meta:{},options:n,codeToHast:(o,l)=>qf(e,o,l),codeToTokens:(o,l)=>Gf(e,o,l)};let i=TX(qf(e,t,n,r));for(const o of Vf(n))i=o.postprocess?.call(r,i,n)||i;return i}async function SX(e){const t=await Iq(e);return{getLastGrammarState:(...n)=>jq(t,...n),codeToTokensBase:(n,r)=>J0(t,n,r),codeToTokensWithThemes:(n,r)=>NN(t,n,r),codeToTokens:(n,r)=>Gf(t,n,r),codeToHast:(n,r)=>qf(t,n,r),codeToHtml:(n,r)=>vX(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function AX(e){const t=e.langs,n=e.themes,r=e.engine;async function i(o){function l(m){if(typeof m=="string"){if(m=o.langAlias?.[m]||m,xN(m))return[];const y=t[m];if(!y)throw new yt(`Language \`${m}\` is not included in this bundle. You may want to load it from external source.`);return y}return m}function c(m){if(TN(m))return"none";if(typeof m=="string"){const y=n[m];if(!y)throw new yt(`Theme \`${m}\` is not included in this bundle. You may want to load it from external source.`);return y}return m}const f=(o.themes??[]).map(m=>c(m)),h=(o.langs??[]).map(m=>l(m)),p=await SX({engine:o.engine??r(),...o,themes:f,langs:h});return{...p,loadLanguage(...m){return p.loadLanguage(...m.map(l))},loadTheme(...m){return p.loadTheme(...m.map(c))},getBundledLanguages(){return t},getBundledThemes(){return n}}}return i}function CX(e){let t;async function n(r={}){if(t){const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}else{t=e({...r,themes:[],langs:[]});const i=await t;return await Promise.all([i.loadTheme(...r.themes||[]),i.loadLanguage(...r.langs||[])]),i}}return n}function wX(e,t){const n=CX(e);async function r(i,o){const l=await n({langs:[o.lang],themes:"theme"in o?[o.theme]:Object.values(o.themes)}),c=await t?.guessEmbeddedLanguages?.(i,o.lang,l);return c&&await l.loadLanguage(...c),l}return{getSingletonHighlighter(i){return n(i)},async codeToHtml(i,o){return(await r(i,o)).codeToHtml(i,o)},async codeToHast(i,o){return(await r(i,o)).codeToHast(i,o)},async codeToTokens(i,o){return(await r(i,o)).codeToTokens(i,o)},async codeToTokensBase(i,o){return(await r(i,o)).codeToTokensBase(i,o)},async codeToTokensWithThemes(i,o){return(await r(i,o)).codeToTokensWithThemes(i,o)},async getLastGrammarState(i,o){return(await n({langs:[o.lang],themes:[o.theme]})).getLastGrammarState(i,o)}}}var kX=L1({bundledLanguages:()=>M1,bundledLanguagesAlias:()=>D1,bundledLanguagesBase:()=>I1,bundledLanguagesInfo:()=>Cd,bundledThemes:()=>B1,bundledThemesInfo:()=>P1,codeToHast:()=>jN,codeToHtml:()=>G1,codeToTokens:()=>UN,codeToTokensBase:()=>HN,codeToTokensWithThemes:()=>zN,createHighlighter:()=>V1,getLastGrammarState:()=>$N,getSingletonHighlighter:()=>FN});const V1=AX({langs:M1,themes:B1,engine:()=>(0,aN.createOnigurumaEngine)(L(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:G1,codeToHast:jN,codeToTokens:UN,codeToTokensBase:HN,codeToTokensWithThemes:zN,getSingletonHighlighter:FN,getLastGrammarState:$N}=wX(V1,{guessEmbeddedLanguages:ZY}),e2=4294967295;var NX=class{patterns;options;regexps;constructor(e,t={}){this.patterns=e,this.options=t;const{forgiving:n=!1,cache:r,regexConstructor:i}=t;if(!i)throw new Error("Option `regexConstructor` is not provided");this.regexps=e.map(o=>{if(typeof o!="string")return o;const l=r?.get(o);if(l){if(l instanceof RegExp)return l;if(n)return null;throw l}try{const c=i(o);return r?.set(o,c),c}catch(c){if(r?.set(o,c),n)return null;throw c}})}findNextMatchSync(e,t,n){const r=typeof e=="string"?e:e.content,i=[];function o(l,c,f=0){return{index:l,captureIndices:c.indices.map(h=>h==null?{start:e2,end:e2,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let l=0;l<this.regexps.length;l++){const c=this.regexps[l];if(c)try{c.lastIndex=t;const f=c.exec(r);if(!f)continue;if(f.index===t)return o(l,f,0);i.push([l,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(i.length){const l=Math.min(...i.map(c=>c[1].index));for(const[c,f,h]of i)if(f.index===l)return o(c,f,h)}return null}};function So(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function RX(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const q1=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),Kt=String.raw;function Ao(e,t){if(e==null)throw new Error(t??"Value expected");return e}const VN=Kt`\[\^?`,GN=`c.? | C(?:-.?)?|${Kt`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${Kt`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${Kt`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${Kt`o\{[^\}]*\}?`}|${Kt`\d{1,3}`}`,Y1=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,nf=new RegExp(Kt`
|
|
191
|
+
\\ (?:
|
|
192
|
+
${GN}
|
|
193
|
+
| [gk]<[^>]*>?
|
|
194
|
+
| [gk]'[^']*'?
|
|
195
|
+
| .
|
|
196
|
+
)
|
|
197
|
+
| \( (?:
|
|
198
|
+
\? (?:
|
|
199
|
+
[:=!>({]
|
|
200
|
+
| <[=!]
|
|
201
|
+
| <[^>]*>
|
|
202
|
+
| '[^']*'
|
|
203
|
+
| ~\|?
|
|
204
|
+
| #(?:[^)\\]|\\.?)*
|
|
205
|
+
| [^:)]*[:)]
|
|
206
|
+
)?
|
|
207
|
+
| \*[^\)]*\)?
|
|
208
|
+
)?
|
|
209
|
+
| (?:${Y1.source})+
|
|
210
|
+
| ${VN}
|
|
211
|
+
| .
|
|
212
|
+
`.replace(/\s+/g,""),"gsu"),Qp=new RegExp(Kt`
|
|
213
|
+
\\ (?:
|
|
214
|
+
${GN}
|
|
215
|
+
| .
|
|
216
|
+
)
|
|
217
|
+
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
218
|
+
| ${VN}
|
|
219
|
+
| &&
|
|
220
|
+
| .
|
|
221
|
+
`.replace(/\s+/g,""),"gsu");function OX(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=WX(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(m){i.push(m)},replaceCurrentModX(m){i[i.length-1]=m},singleline:n.rules.singleline};let l=[],c;for(nf.lastIndex=0;c=nf.exec(e);){const m=LX(o,e,c[0],nf.lastIndex);m.tokens?l.push(...m.tokens):m.token&&l.push(m.token),m.lastIndex!==void 0&&(nf.lastIndex=m.lastIndex)}const f=[];let h=0;l.filter(m=>m.type==="GroupOpen").forEach(m=>{m.kind==="capturing"?m.number=++h:m.raw==="("&&f.push(m)}),h||f.forEach((m,y)=>{m.kind="capturing",m.number=y+1});const p=h||f.length;return{tokens:l.map(m=>m.type==="EscapedNumber"?ZX(m,p):m).flat(),flags:r}}function LX(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const l=IX(t,n,r);return{tokens:l.tokens,lastIndex:l.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:t2(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:$X(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:YN(n)}}if(o==="K")return{token:XN("keep",n)};if(o==="N"||o==="R")return{token:zi("newline",n,{negate:o==="N"})};if(o==="O")return{token:zi("any",n)};if(o==="X")return{token:zi("text_segment",n)};const l=qN(n,{inCharClass:!1});return Array.isArray(l)?{tokens:l}:{token:l}}if(i==="("){if(o==="*")return{token:YX(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:qX(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:Js("group",n)};if(n==="(?>")return{token:Js("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:Js(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:Js("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:Js("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:HX(n)}}if(e.getCurrentModX()){if(n==="#"){const l=t.indexOf(`
|
|
222
|
+
`,r);return{lastIndex:l===-1?t.length:l}}if(/^\s$/.test(n)){const l=/\s+/y;return l.lastIndex=r,{lastIndex:l.exec(t)?l.lastIndex:r}}}if(n===".")return{token:zi("dot",n)};if(n==="^"||n==="$"){const l=e.singleline?{"^":Kt`\A`,$:Kt`\Z`}[n]:n;return{token:t2(l,n)}}return n==="|"?{token:MX(n)}:Y1.test(n)?{tokens:JX(n)}:{token:ca(So(n),n)}}function IX(e,t,n){const r=[n2(t[1]==="^",t)];let i=1,o;for(Qp.lastIndex=n;o=Qp.exec(e);){const l=o[0];if(l[0]==="["&&l[1]!==":")i++,r.push(n2(l[1]==="^",l));else if(l==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(ca(93,l));else if(i--,r.push(PX(l)),!i)break}else{const c=DX(l);Array.isArray(c)?r.push(...c):r.push(c)}}return{tokens:r,lastIndex:Qp.lastIndex||e.length}}function DX(e){if(e[0]==="\\")return qN(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!q1.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return zi("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?BX(e):e==="&&"?jX(e):ca(So(e),e)}function qN(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return GX(e);if("dDhHsSwW".includes(n))return XX(e);if(e.startsWith(Kt`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return QX(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(l=>parseInt(l,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(l=>{const c=[...o.encode(l)].map(f=>`\\x${f.toString(16)}`).join("");return ca(So(l),c)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return ca(KX(e),e);if(r2.has(n))return ca(r2.get(n),e);if(/\d/.test(n))return UX(t,e);if(e==="\\")throw new Error(Kt`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return ca(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function MX(e){return{type:"Alternator",raw:e}}function t2(e,t){return{type:"Assertion",kind:e,raw:t}}function YN(e){return{type:"Backreference",raw:e}}function ca(e,t){return{type:"Character",value:e,raw:t}}function PX(e){return{type:"CharacterClassClose",raw:e}}function BX(e){return{type:"CharacterClassHyphen",raw:e}}function jX(e){return{type:"CharacterClassIntersector",raw:e}}function n2(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function zi(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function XN(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:Ao(n.flags),raw:t}}function UX(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function HX(e){return{type:"GroupClose",raw:e}}function Js(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function zX(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function FX(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function $X(e){return{type:"Subroutine",raw:e}}const VX=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),r2=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function GX(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return ca(So(t.toUpperCase())-64,e)}function qX(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??="";const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=i2(n),l=i2(r),c={};if(o&&(c.enable=o),l&&(c.disable=l),e.endsWith(")"))return t.replaceCurrentModX(i),XN("flags",e,{flags:c});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,Js("group",e,{...(o||l)&&{flags:c}});throw new Error(`Unexpected flag modifier "${e}"`)}function YX(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(p=>p!=="").map(p=>/^[+-]?\d+$/.test(p)?+p:p):[],[l,c,f]=o,h=VX.has(n)?n.toLowerCase():"custom";switch(h){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof l=="string")throw new Error(`Named callout argument must be a number "${l}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(o.length===2&&(typeof c=="number"||!/^[<>X]$/.test(c)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${c}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof l=="number"||!/^[<>X]$/.test(l)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${l}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof l=="string"&&!/^[A-Za-z_]\w*$/.test(l))throw new Error(`Named callout argument one must be a tag or number "${l}"`);if(typeof c=="number"||!/^(?:[<>!=]=|[<>])$/.test(c))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${c}"`);if(typeof f=="string"&&!/^[A-Za-z_]\w*$/.test(f))throw new Error(`Named callout argument three must be a tag or number "${f}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${h}"`)}return zX(h,r??null,i?.split(",")??null,e)}function a2(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,l=1e5;if(+i>l||o&&+o>l)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return FX(t,n,r,e)}function XX(e){const t=e[1].toLowerCase();return zi({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function QX(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return zi("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function i2(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function WX(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function KX(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function ZX(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[YN(n)];const o=[],l=i.match(/^[0-7]+|\d/g);for(let c=0;c<l.length;c++){const f=l[c];let h;if(c===0&&f!=="8"&&f!=="9"){if(h=parseInt(f,8),h>127)throw new Error(Kt`Octal encoded byte above 177 unsupported "${n}"`)}else h=So(f);o.push(ca(h,(c===0?"\\":"")+f))}return o}function JX(e){const t=[],n=new RegExp(Y1,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:l,max:c}=o.groups;if(+l>+c&&i.endsWith("?")){n.lastIndex--,t.push(a2(i.slice(0,-1)));continue}}}t.push(a2(i))}return t}function QN(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function eQ(e){return tQ.has(e.type)}const tQ=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function WN(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=OX(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(y,E)=>{const T=r.tokens[o.nextIndex];switch(o.parent=y,o.nextIndex++,T.type){case"Alternator":return Wi();case"Assertion":return nQ(T);case"Backreference":return rQ(T,o);case"Character":return Dd(T.value,{useLastValid:!!E.isCheckingRangeEnd});case"CharacterClassHyphen":return aQ(T,o,E);case"CharacterClassOpen":return iQ(T,o,E);case"CharacterSet":return sQ(T,o);case"Directive":return dQ(T.kind,{flags:T.flags});case"GroupOpen":return oQ(T,o,E);case"NamedCallout":return mQ(T.kind,T.tag,T.arguments);case"Quantifier":return lQ(T,o);case"Subroutine":return uQ(T,o);default:throw new Error(`Unexpected token type "${T.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},l=gQ(hQ(r.flags));let c=l.body[0];for(;o.nextIndex<r.tokens.length;){const y=i(c,{});y.type==="Alternative"?(l.body.push(y),c=y):c.body.push(y)}const{capturingGroups:f,hasNumberedRef:h,namedGroupsByName:p,subroutines:m}=o;if(h&&p.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:y}of m)if(typeof y=="number"){if(y>f.length)throw new Error("Subroutine uses a group number that's not defined");y&&(f[y-1].isSubroutined=!0)}else if(p.has(y)){if(p.get(y).length>1)throw new Error(Kt`Subroutine uses a duplicate group name "\g<${y}>"`);p.get(y)[0].isSubroutined=!0}else throw new Error(Kt`Subroutine uses a group name that's not defined "\g<${y}>"`);return l}function nQ({kind:e}){return eg(Ao({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===Kt`\B`||e===Kt`\Y`})}function rQ({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,l=!1)=>{const c=t.capturingGroups.length;let f=!1;if(o>c)if(t.skipBackrefValidation)f=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,tg(l?c+1-o:o,{orphan:f})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return tg(r)}return i(+r)}function aQ(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,l=o.body.at(-1),c=r[t.nextIndex];if(!n.isCheckingRangeEnd&&l&&l.type!=="CharacterClass"&&l.type!=="CharacterClassRange"&&c&&c.type!=="CharacterClassOpen"&&c.type!=="CharacterClassClose"&&c.type!=="CharacterClassIntersector"){const f=i(o,{...n,isCheckingRangeEnd:!0});if(l.type==="Character"&&f.type==="Character")return o.body.pop(),fQ(l,f);throw new Error("Invalid character class range")}return Dd(So("-"))}function iQ({negate:e},t,n){const{tokens:r,walk:i}=t,o=[bf()],l=r[t.nextIndex];let c=l2(l);for(;c.type!=="CharacterClassClose";){if(c.type==="CharacterClassIntersector")o.push(bf()),t.nextIndex++;else{const h=o.at(-1);h.body.push(i(h,n))}c=l2(r[t.nextIndex],l)}const f=bf({negate:e});return o.length===1?f.body=o[0].body:(f.kind="intersection",f.body=o.map(h=>h.body.length===1?h.body[0]:h)),t.nextIndex++,f}function sQ({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l}=r;if(e==="property"){const c=Md(n);if(q1.has(c)&&!l?.has(c))e="posix",n=c;else return eo(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:l})}return e==="posix"?pQ(n,{negate:t}):ng(e,{negate:t})}function oQ(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:l,walk:c}=t,f=bQ(e),h=f.type==="AbsenceFunction",p=o2(f),m=p&&f.negate;if(f.type==="CapturingGroup"&&(i.push(f),f.name&&RX(o,f.name,[]).push(f)),h&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let y=u2(r[t.nextIndex]);for(;y.type!=="GroupClose";){if(y.type==="Alternator")f.body.push(Wi()),t.nextIndex++;else{const E=f.body.at(-1),T=c(E,{...n,isInAbsenceFunction:n.isInAbsenceFunction||h,isInLookbehind:n.isInLookbehind||p,isInNegLookbehind:n.isInNegLookbehind||m});if(E.body.push(T),(p||n.isInLookbehind)&&!l){const S="Lookbehind includes a pattern not allowed by Oniguruma";if(m||n.isInNegLookbehind){if(s2(T)||T.type==="CapturingGroup")throw new Error(S)}else if(s2(T)||o2(T)&&T.negate)throw new Error(S)}}y=u2(r[t.nextIndex])}return t.nextIndex++,f}function lQ({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!eQ(o))throw new Error("Quantifier requires a repeatable token");const l=ZN(e,t,n,o);return i.body.pop(),l}function uQ({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const c=+o.groups.num,f=n.length;if(t.hasNumberedRef=!0,i={"":c,"+":f+c,"-":f+1-c}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const l=JN(i);return r.push(l),l}function cQ(e,t){return{type:"AbsenceFunction",kind:e,body:gu(t?.body)}}function Wi(e){return{type:"Alternative",body:e3(e?.body)}}function eg(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!t?.negate),n}function tg(e,t){const n=!!t?.orphan;return{type:"Backreference",ref:e,...n&&{orphan:n}}}function KN(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!EQ(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:gu(t?.body)}}function Dd(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function bf(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:e3(e?.body)}}function fQ(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function ng(e,t){const n=!!t?.negate,r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function dQ(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:Ao(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function hQ(e){return{type:"Flags",...e}}function hr(e){const t=e?.atomic,n=e?.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:gu(e?.body)}}function ji(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:gu(e?.body)}}function mQ(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function pQ(e,t){const n=!!t?.negate;if(!q1.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function ZN(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function gQ(e,t){return{type:"Regex",body:gu(t?.body),flags:e}}function JN(e){return{type:"Subroutine",ref:e}}function eo(e,t){const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=n.unicodePropertyMap?.get(Md(e));if(!r){if(n.normalizeUnknownPropertyNames)r=yQ(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(Kt`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function bQ({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return cQ("repeater");case"atomic":return hr({atomic:!0});case"capturing":return KN(i,{name:n});case"group":return hr({flags:e});case"lookahead":case"lookbehind":return ji({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function gu(e){if(e===void 0)e=[Wi()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function e3(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function s2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function o2(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function EQ(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function yQ(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Md(e){return e.replace(/[- _]+/g,"").toLowerCase()}function l2(e,t){const n=t;return Ao(e,`Unclosed character class${n?.type==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function u2(e){return Ao(e,"Unclosed group")}function Gl(e,t,n=null){function r(o,l){for(let c=0;c<o.length;c++){const f=i(o[c],l,c,o);c=Math.max(-1,c+f)}}function i(o,l=null,c=null,f=null){let h=0,p=!1;const m={node:o,parent:l,key:c,container:f,root:e,remove(){rf(f).splice(Math.max(0,Ws(c)+h),1),h--,p=!0},removeAllNextSiblings(){return rf(f).splice(Ws(c)+1)},removeAllPrevSiblings(){const w=Ws(c)+h;return h-=w,rf(f).splice(0,Math.max(0,w))},replaceWith(w,k={}){const N=!!k.traverse;f?f[Math.max(0,Ws(c)+h)]=w:Ao(l,"Can't replace root node")[c]=w,N&&i(w,l,c,f),p=!0},replaceWithMultiple(w,k={}){const N=!!k.traverse;if(rf(f).splice(Math.max(0,Ws(c)+h),1,...w),h+=w.length-1,N){let P=0;for(let B=0;B<w.length;B++)P+=i(w[B],l,Ws(c)+B+P,f)}p=!0},skip(){p=!0}},{type:y}=o,E=t["*"],T=t[y],S=typeof E=="function"?E:E?.enter,C=typeof T=="function"?T:T?.enter;if(S?.(m,n),C?.(m,n),!p)switch(y){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${y}"`)}return T?.exit?.(m,n),E?.exit?.(m,n),h}return i(e),e}function rf(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ws(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const _Q=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function xQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function TQ(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const sr=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function X1(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let l=0,c="";for(const f of e.matchAll(i)){const{0:h,groups:{$skip:p}}=f;if(!p&&(!r||r===sr.DEFAULT==!l)){n instanceof Function?c+=n(f,{context:l?sr.CHAR_CLASS:sr.DEFAULT,negated:o[o.length-1]}):c+=n;continue}h[0]==="["?(l++,o.push(h[1]==="^")):h==="]"&&l&&(l--,o.pop()),c+=h}return c}function t3(e,t,n,r){X1(e,t,n,r)}function vQ(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,l;for(;l=i.exec(e);){const{0:c,groups:{$skip:f}}=l;if(!f&&(!r||r===sr.DEFAULT==!o))return l;c==="["?o++:c==="]"&&o&&o--,i.lastIndex==l.index&&i.lastIndex++}return null}function af(e,t,n){return!!vQ(e,t,0,n)}function SQ(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,l;for(;l=n.exec(e);){const[c]=l;if(c==="[")i++;else if(i)c==="]"&&i--;else if(c==="(")o++;else if(c===")"&&(o--,!o)){r=l.index;break}}return e.slice(t,r)}const c2=new RegExp(String.raw`(?<noncapturingStart>${_Q})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function AQ(e,t){const n=t?.hiddenCaptures??[];let r=t?.captureTransfers??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",l=[0],c=[];let f=0,h=0,p=NaN,m;do{m=!1;let y=0,E=0,T=!1,S;for(c2.lastIndex=Number.isNaN(p)?0:p+o.length;S=c2.exec(e);){const{0:C,index:w,groups:{capturingStart:k,noncapturingStart:N}}=S;if(C==="[")y++;else if(y)C==="]"&&y--;else if(C===i&&!T)p=w,T=!0;else if(T&&N)E++;else if(k)T?E++:(f++,l.push(f+h));else if(C===")"&&T){if(!E){h++;const P=f+h;if(e=`${e.slice(0,p)}${o}${e.slice(p+i.length,w)}))<$$${P}>)${e.slice(w+1)}`,m=!0,c.push(P),xQ(n,P),r.size){const B=new Map;r.forEach((D,$)=>{B.set($>=P?$+1:$,D.map(G=>G>=P?G+1:G))}),r=B}break}E--}}}while(m);return n.push(...c),e=X1(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:y,groups:{backrefNum:E,wrappedBackrefNum:T}})=>{if(E){const S=+E;if(S>l.length-1)throw new Error(`Backref "${y}" greater than number of captures`);return`\\${l[S]}`}return`\\${T}`},sr.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const n3=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,Wp=new RegExp(String.raw`
|
|
223
|
+
\\(?: \d+
|
|
224
|
+
| c[A-Za-z]
|
|
225
|
+
| [gk]<[^>]+>
|
|
226
|
+
| [pPu]\{[^\}]+\}
|
|
227
|
+
| u[A-Fa-f\d]{4}
|
|
228
|
+
| x[A-Fa-f\d]{2}
|
|
229
|
+
)
|
|
230
|
+
| \((?: \? (?: [:=!>]
|
|
231
|
+
| <(?:[=!]|[^>]+>)
|
|
232
|
+
| [A-Za-z\-]+:
|
|
233
|
+
| \(DEFINE\)
|
|
234
|
+
))?
|
|
235
|
+
| (?<qBase>${n3})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
236
|
+
| \\?.
|
|
237
|
+
`.replace(/\s+/g,""),"gsu");function CQ(e){if(!new RegExp(`${n3}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,l;for(Wp.lastIndex=0;l=Wp.exec(e);){const{0:c,index:f,groups:{qBase:h,qMod:p,invalidQ:m}}=l;if(c==="[")o||(r=f),o++;else if(c==="]")o?o--:r=null;else if(!o)if(p==="+"&&i&&!i.startsWith("(")){if(m)throw new Error(`Invalid quantifier "${c}"`);let y=-1;if(/^\{\d+\}$/.test(h))e=TQ(e,f+h.length,p,"");else{if(i===")"||i==="]"){const E=i===")"?n:r;if(E===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,E)}(?>${e.slice(E,f)}${h})${e.slice(f+c.length)}`}else e=`${e.slice(0,f-i.length)}(?>${i}${h})${e.slice(f+c.length)}`;y+=4}Wp.lastIndex+=y}else c[0]==="("?t.push(f):c===")"&&(n=t.length?t.pop():null);i=c}return{pattern:e}}const ir=String.raw,wQ=ir`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,rg=ir`\(\?R=(?<rDepth>[^\)]+)\)|${wQ}`,Pd=ir`\(\?<(?![=!])(?<captureName>[^>]+)>`,r3=ir`${Pd}|(?<unnamed>\()(?!\?)`,Li=new RegExp(ir`${Pd}|${rg}|\(\?|\\?.`,"gsu"),Kp="Cannot use multiple overlapping recursions";function kQ(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=t?.captureTransfers??new Map;if(!new RegExp(rg,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&af(e,ir`\(\?\(DEFINE\)`,sr.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],l=af(e,ir`\\[1-9]`,sr.DEFAULT),c=new Map,f=[];let h=!1,p=0,m=0,y;for(Li.lastIndex=0;y=Li.exec(e);){const{0:E,groups:{captureName:T,rDepth:S,gRNameOrNum:C,gRDepth:w}}=y;if(E==="[")p++;else if(p)E==="]"&&p--;else if(S){if(f2(S),h)throw new Error(Kp);if(l)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const k=e.slice(0,y.index),N=e.slice(Li.lastIndex);if(af(N,rg,sr.DEFAULT))throw new Error(Kp);const P=+S-1;e=d2(k,N,P,!1,n,o,m),i=m2(i,k,P,o.length,0,m);break}else if(C){f2(w);let k=!1;for(const J of f)if(J.name===C||J.num===+C){if(k=!0,J.hasRecursedWithin)throw new Error(Kp);break}if(!k)throw new Error(ir`Recursive \g cannot be used outside the referenced group "${r==="external"?C:ir`\g<${C}&R=${w}>`}"`);const N=c.get(C),P=SQ(e,N);if(l&&af(P,ir`${Pd}|\((?!\?)`,sr.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const B=e.slice(N,y.index),D=P.slice(B.length+E.length),$=o.length,G=+w-1,ie=d2(B,D,G,!0,n,o,m);i=m2(i,B,G,o.length-$,$,m);const V=e.slice(0,N),X=e.slice(N+P.length);e=`${V}${ie}${X}`,Li.lastIndex+=ie.length-E.length-B.length-D.length,f.forEach(J=>J.hasRecursedWithin=!0),h=!0}else if(T)m++,c.set(String(m),Li.lastIndex),c.set(T,Li.lastIndex),f.push({num:m,name:T});else if(E[0]==="("){const k=E==="(";k&&(m++,c.set(String(m),Li.lastIndex)),f.push(k?{num:m}:{})}else E===")"&&f.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function f2(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function d2(e,t,n,r,i,o,l){const c=new Set;r&&t3(e+t,Pd,({groups:{captureName:h}})=>{c.add(h)},sr.DEFAULT);const f=[n,r?c:null,i,o,l];return`${e}${h2(`(?:${e}`,"forward",...f)}(?:)${h2(`${t})`,"backward",...f)}${t}`}function h2(e,t,n,r,i,o,l){const f=p=>t==="forward"?p+2:n-p+2-1;let h="";for(let p=0;p<n;p++){const m=f(p);h+=X1(e,ir`${r3}|\\k<(?<backref>[^>]+)>`,({0:y,groups:{captureName:E,unnamed:T,backref:S}})=>{if(S&&r&&!r.has(S))return y;const C=`_$${m}`;if(T||E){const w=l+o.length+1;return o.push(w),NQ(i,w),T?y:`(?<${E}${C}>`}return ir`\k<${S}${C}>`},sr.DEFAULT)}return h}function NQ(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function m2(e,t,n,r,i,o){if(e.size&&r){let l=0;t3(t,r3,()=>l++,sr.DEFAULT);const c=o-l+i,f=new Map;return e.forEach((h,p)=>{const m=(r-l*n)/n,y=l*n,E=p>c+l?p+r:p,T=[];for(const S of h)if(S<=c)T.push(S);else if(S>c+l+m)T.push(S+r);else if(S<=c+l)for(let C=0;C<=n;C++)T.push(S+l*C);else for(let C=0;C<=n;C++)T.push(S+y+m*C);f.set(E,T)}),f}return e}var Ft=String.fromCodePoint,Pe=String.raw,pr={},Bd=globalThis.RegExp;pr.flagGroups=(()=>{try{new Bd("(?i:)")}catch{return!1}return!0})();pr.unicodeSets=(()=>{try{new Bd("[[]]","v")}catch{return!1}return!0})();pr.bugFlagVLiteralHyphenIsRange=pr.unicodeSets?(()=>{try{new Bd(Pe`[\d\-a]`,"v")}catch{return!0}return!1})():!1;pr.bugNestedClassIgnoresNegation=pr.unicodeSets&&new Bd("[[^a]]","v").test("a");function Yf(e,{enable:t,disable:n}){return{dotAll:!n?.dotAll&&!!(t?.dotAll||e.dotAll),ignoreCase:!n?.ignoreCase&&!!(t?.ignoreCase||e.ignoreCase)}}function tu(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function ag(e,t){return p2[e]>=p2[t]}function RQ(e,t){if(e==null)throw new Error(t??"Value expected");return e}var p2={ES2025:2025,ES2024:2024,ES2018:2018},OQ={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function a3(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!OQ[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=pr.flagGroups?"ES2025":pr.unicodeSets?"ES2024":"ES2018"),t}var LQ="[ -\r ]",IQ=new Set([Ft(304),Ft(305)]),oa=Pe`[\p{L}\p{M}\p{N}\p{Pc}]`;function i3(e){if(IQ.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=PQ.get(n),o=DQ.get(n),l=MQ.get(n);return[...r].length===1&&t.add(r),l&&t.add(l),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var Q1=new Map(`C Other
|
|
238
|
+
Cc Control cntrl
|
|
239
|
+
Cf Format
|
|
240
|
+
Cn Unassigned
|
|
241
|
+
Co Private_Use
|
|
242
|
+
Cs Surrogate
|
|
243
|
+
L Letter
|
|
244
|
+
LC Cased_Letter
|
|
245
|
+
Ll Lowercase_Letter
|
|
246
|
+
Lm Modifier_Letter
|
|
247
|
+
Lo Other_Letter
|
|
248
|
+
Lt Titlecase_Letter
|
|
249
|
+
Lu Uppercase_Letter
|
|
250
|
+
M Mark Combining_Mark
|
|
251
|
+
Mc Spacing_Mark
|
|
252
|
+
Me Enclosing_Mark
|
|
253
|
+
Mn Nonspacing_Mark
|
|
254
|
+
N Number
|
|
255
|
+
Nd Decimal_Number digit
|
|
256
|
+
Nl Letter_Number
|
|
257
|
+
No Other_Number
|
|
258
|
+
P Punctuation punct
|
|
259
|
+
Pc Connector_Punctuation
|
|
260
|
+
Pd Dash_Punctuation
|
|
261
|
+
Pe Close_Punctuation
|
|
262
|
+
Pf Final_Punctuation
|
|
263
|
+
Pi Initial_Punctuation
|
|
264
|
+
Po Other_Punctuation
|
|
265
|
+
Ps Open_Punctuation
|
|
266
|
+
S Symbol
|
|
267
|
+
Sc Currency_Symbol
|
|
268
|
+
Sk Modifier_Symbol
|
|
269
|
+
Sm Math_Symbol
|
|
270
|
+
So Other_Symbol
|
|
271
|
+
Z Separator
|
|
272
|
+
Zl Line_Separator
|
|
273
|
+
Zp Paragraph_Separator
|
|
274
|
+
Zs Space_Separator
|
|
275
|
+
ASCII
|
|
276
|
+
ASCII_Hex_Digit AHex
|
|
277
|
+
Alphabetic Alpha
|
|
278
|
+
Any
|
|
279
|
+
Assigned
|
|
280
|
+
Bidi_Control Bidi_C
|
|
281
|
+
Bidi_Mirrored Bidi_M
|
|
282
|
+
Case_Ignorable CI
|
|
283
|
+
Cased
|
|
284
|
+
Changes_When_Casefolded CWCF
|
|
285
|
+
Changes_When_Casemapped CWCM
|
|
286
|
+
Changes_When_Lowercased CWL
|
|
287
|
+
Changes_When_NFKC_Casefolded CWKCF
|
|
288
|
+
Changes_When_Titlecased CWT
|
|
289
|
+
Changes_When_Uppercased CWU
|
|
290
|
+
Dash
|
|
291
|
+
Default_Ignorable_Code_Point DI
|
|
292
|
+
Deprecated Dep
|
|
293
|
+
Diacritic Dia
|
|
294
|
+
Emoji
|
|
295
|
+
Emoji_Component EComp
|
|
296
|
+
Emoji_Modifier EMod
|
|
297
|
+
Emoji_Modifier_Base EBase
|
|
298
|
+
Emoji_Presentation EPres
|
|
299
|
+
Extended_Pictographic ExtPict
|
|
300
|
+
Extender Ext
|
|
301
|
+
Grapheme_Base Gr_Base
|
|
302
|
+
Grapheme_Extend Gr_Ext
|
|
303
|
+
Hex_Digit Hex
|
|
304
|
+
IDS_Binary_Operator IDSB
|
|
305
|
+
IDS_Trinary_Operator IDST
|
|
306
|
+
ID_Continue IDC
|
|
307
|
+
ID_Start IDS
|
|
308
|
+
Ideographic Ideo
|
|
309
|
+
Join_Control Join_C
|
|
310
|
+
Logical_Order_Exception LOE
|
|
311
|
+
Lowercase Lower
|
|
312
|
+
Math
|
|
313
|
+
Noncharacter_Code_Point NChar
|
|
314
|
+
Pattern_Syntax Pat_Syn
|
|
315
|
+
Pattern_White_Space Pat_WS
|
|
316
|
+
Quotation_Mark QMark
|
|
317
|
+
Radical
|
|
318
|
+
Regional_Indicator RI
|
|
319
|
+
Sentence_Terminal STerm
|
|
320
|
+
Soft_Dotted SD
|
|
321
|
+
Terminal_Punctuation Term
|
|
322
|
+
Unified_Ideograph UIdeo
|
|
323
|
+
Uppercase Upper
|
|
324
|
+
Variation_Selector VS
|
|
325
|
+
White_Space space
|
|
326
|
+
XID_Continue XIDC
|
|
327
|
+
XID_Start XIDS`.split(/\s/).map(e=>[Md(e),e])),DQ=new Map([["s",Ft(383)],[Ft(383),"s"]]),MQ=new Map([[Ft(223),Ft(7838)],[Ft(107),Ft(8490)],[Ft(229),Ft(8491)],[Ft(969),Ft(8486)]]),PQ=new Map([Xa(453),Xa(456),Xa(459),Xa(498),...Zp(8072,8079),...Zp(8088,8095),...Zp(8104,8111),Xa(8124),Xa(8140),Xa(8188)]),BQ=new Map([["alnum",Pe`[\p{Alpha}\p{Nd}]`],["alpha",Pe`\p{Alpha}`],["ascii",Pe`\p{ASCII}`],["blank",Pe`[\p{Zs}\t]`],["cntrl",Pe`\p{Cc}`],["digit",Pe`\p{Nd}`],["graph",Pe`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",Pe`\p{Lower}`],["print",Pe`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",Pe`[\p{P}\p{S}]`],["space",Pe`\p{space}`],["upper",Pe`\p{Upper}`],["word",Pe`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",Pe`\p{AHex}`]]);function jQ(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Xa(e){const t=Ft(e);return[t.toLowerCase(),t]}function Zp(e,t){return jQ(e,t).map(n=>Xa(n))}var s3=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function UQ(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};o3(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:ag(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Gl(e,HQ,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Gl(e,zQ,o);const l={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Gl(e,FQ,l),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var HQ={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=hr();o.body[0].body.push(ji({negate:!0,body:r}),eo("Any"));const l=hr();l.body[0].body.push(ZN("greedy",0,1/0,o)),n(Ot(l,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const l=t.body[o];tu(r,l,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){if(t.get(e)?.length){const n=u3(t.get(e));if(n){const r=hr({flags:n});r.body[0].body=e.body,e.body=[Ot(r,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:l},c){const{kind:f,negate:h}=e,{asciiWordBoundaries:p,avoidSubclass:m,supportedGNodes:y,wordIsAscii:E}=c;if(f==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${h?"Y":"y"}"`);if(f==="line_end")l(Ot(ji({body:[Wi({body:[eg("string_end")]}),Wi({body:[Dd(10)]})]}),t));else if(f==="line_start")l(Ot(la(Pe`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(f==="search_start")if(y.has(e))i.flags.sticky=!0,o();else{const T=r[n-1];if(T&&XQ(T))l(Ot(ji({negate:!0}),t));else{if(m)throw new Error(Pe`Uses "\G" in a way that requires a subclass`);l(Qa(eg("string_start"),t)),c.strategy="clip_search"}}else if(!(f==="string_end"||f==="string_start"))if(f==="string_end_newline")l(Ot(la(Pe`(?=\n?\z)`),t));else if(f==="word_boundary"){if(!E&&!p){const T=`(?:(?<=${oa})(?!${oa})|(?<!${oa})(?=${oa}))`,S=`(?:(?<=${oa})(?=${oa})|(?<!${oa})(?!${oa}))`;l(Ot(la(h?S:T),t))}}else throw new Error(`Unexpected assertion kind "${f}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!e0(n)&&(n=Jp(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!e0(r)&&(r=Jp(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=bf({body:[e]});n(Ot(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:l,wordIsAscii:c}){const{kind:f,negate:h,value:p}=e;if(o&&(f==="digit"||p==="digit")){n(Qa(ng("digit",{negate:h}),t));return}if(l&&(f==="space"||p==="space")){n(Ot(t0(la(LQ),h),t));return}if(c&&(f==="word"||p==="word")){n(Qa(ng("word",{negate:h}),t));return}if(f==="any")n(Qa(eo("Any"),t));else if(f==="digit")n(Qa(eo("Nd",{negate:h}),t));else if(f!=="dot")if(f==="text_segment"){if(r==="strict")throw new Error(Pe`Use of "\X" requires non-strict accuracy`);const m="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",y=Pe`\p{RI}{2}|${m}(?:\u200D${m})*`;n(Ot(la(Pe`(?>\r\n|${i?Pe`\p{RGI_Emoji}`:y}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(f==="hex")n(Qa(eo("AHex",{negate:h}),t));else if(f==="newline")n(Ot(la(h?`[^
|
|
328
|
+
]`:`(?>\r
|
|
329
|
+
?|[
|
|
330
|
+
\v\f
\u2028\u2029])`),t));else if(f==="posix")if(!i&&(p==="graph"||p==="print")){if(r==="strict")throw new Error(`POSIX class "${p}" requires min target ES2024 or non-strict accuracy`);let m={graph:"!-~",print:" -~"}[p];h&&(m=`\0-${Ft(m.codePointAt(0)-1)}${Ft(m.codePointAt(2)+1)}-`),n(Ot(la(`[${m}]`),t))}else n(Ot(t0(la(BQ.get(p)),h),t));else if(f==="property")Q1.has(Md(p))||(e.key="sc");else if(f==="space")n(Qa(eo("space",{negate:h}),t));else if(f==="word")n(Ot(t0(la(oa),h),t));else throw new Error(`Unexpected character set kind "${f}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:l}){const{kind:c,flags:f}=e;if(c==="flags")if(!f.enable&&!f.disable)r();else{const h=hr({flags:f});h.body[0].body=l(),i(Ot(h,t),{traverse:!0})}else if(c==="keep"){const h=n.body[0],m=n.body.length===1&&QN(h,{type:"Group"})&&h.body[0].body.length===1?h.body[0]:n;if(t.parent!==m||m.body.length>1)throw new Error(Pe`Uses "\K" in a way that's unsupported`);const y=ji({behind:!0});y.body[0].body=o(),i(Ot(y,t))}else throw new Error(`Unexpected directive kind "${c}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t?.extended&&delete t.extended,n?.extended&&delete n.extended,t?.dotAll&&n?.dotAll&&delete t.dotAll,t?.ignoreCase&&n?.ignoreCase&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(Ot(ji({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=hr();t.body[0].body.push(e.body),e.body=Ot(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const l=f3(o.body);l?(r=!0,Array.isArray(l)?n.push(...l):n.push(l)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(Pe`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!e0(n)&&(n=Jp(n,t),e.ref=n)}},zQ={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:l,openRefs:c,reffedNodesByReferencer:f}){const h=i.get(e);if(h&&c.has(e.number)){const m=Qa(g2(e.number),t);f.set(m,c.get(e.number)),n(m);return}c.set(e.number,e),l.set(e.number,[]),e.name&&tu(l,e.name,[]);const p=l.get(e.name??e.number);for(let m=0;m<p.length;m++){const y=p[m];if(h===y.node||h&&h===y.origin||e===y.origin){p.splice(m,1);break}}if(l.get(e.number).push({node:e,origin:h}),e.name&&l.get(e.name).push({node:e,origin:h}),e.name){const m=tu(o,e.name,new Map);let y=!1;if(h)y=!0;else for(const E of m.values())if(!E.hasDuplicateNameToRemove){y=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:y})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=Yf(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let p=t;for(;(p=p.parent)&&!(p.type==="CapturingGroup"&&(p.name===o||p.number===o)););r.reffedNodesByReferencer.set(e,p);return}const l=r.subroutineRefMap.get(o),c=o===0,f=c?g2(0):l3(l,r.groupOriginByCopy,null);let h=f;if(!c){const p=u3(GQ(l,y=>y.type==="Group"&&!!y.flags)),m=p?Yf(r.globalFlags,p):r.globalFlags;$Q(m,r.currentFlags)||(h=hr({flags:qQ(m)}),h.body[0].body.push(f))}n(Ot(h,t),{traverse:!c})}},FQ={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(l=>VQ(l,e));if(!o.length)n(Ot(ji({negate:!0}),t));else if(o.length>1){const l=hr({atomic:!0,body:o.reverse().map(c=>Wi({body:[tg(c.number)]}))});n(Ot(l,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=KN();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function o3(e){Gl(e,{"*"({node:t,parent:n}){t.parent=n}})}function $Q(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function VQ(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=c3(n.parent);for(const i of r){if(i===n)break;if(i===e||d3(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function l3(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,l]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:l&&typeof l=="object"?i[o]=l3(l,t,i,n):(o==="type"&&l==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=l);return i}function g2(e){const t=JN(e);return t.isRecursive=!0,t}function GQ(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function Jp(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function u3(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{r.enable?.[i]&&(delete n.disable[i],n.enable[i]=!0),r.disable?.[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function qQ({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function c3(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function f3(e){const t=e.find(n=>n.kind==="search_start"||QQ(n,{negate:!1})||!YQ(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=f3(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function d3(e,t){const n=c3(e)??[];for(const r of n)if(r===t||d3(r,t))return!0;return!1}function YQ({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function XQ(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function QQ(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&QN(e.body[0],{type:"Assertion",kind:"search_start"})}function e0(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function la(e,t){const r=WN(e,{...t,unicodePropertyMap:Q1}).body;return r.length>1||r[0].body.length>1?hr({body:r}):r[0].body[0]}function t0(e,t){return e.negate=t,e}function Qa(e,t){return e.parent=t,e}function Ot(e,t){return o3(e),e.parent=t,e}function WQ(e,t){const n=a3(t),r=ag(n.target,"ES2024"),i=ag(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let l=null,c=null;if(!i){const E=[e.flags.ignoreCase];Gl(e,KQ,{getCurrentModI:()=>E.at(-1),popModI(){E.pop()},pushModI(T){E.push(T)},setHasCasedChar(){E.at(-1)?l=!0:c=!0}})}const f={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||l)&&!c)};let h=e;const p={accuracy:n.accuracy,appliedGlobalFlags:f,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:h,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&l&&c),useFlagMods:i,useFlagV:r,verbose:n.verbose};function m(E){return p.lastNode=h,h=E,RQ(ZQ[E.type],`Unexpected node type "${E.type}"`)(E,p,m)}const y={pattern:e.body.map(m).join("|"),flags:m(e.flags),options:{...e.options}};return r||(delete y.options.force.v,y.options.disable.v=!0,y.options.unicodeSetsPlugin=null),y._captureTransfers=new Map,y._hiddenCaptures=[],p.captureMap.forEach((E,T)=>{E.hidden&&y._hiddenCaptures.push(T),E.transferTo&&tu(y._captureTransfers,E.transferTo,[]).push(T)}),y}var KQ={"*":{enter({node:e},t){if(E2(e)){const n=t.getCurrentModI();t.pushModI(e.flags?Yf({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){E2(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){W1(Ft(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),h3(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&s3.has(e.value)&&t.setHasCasedChar()}},ZQ={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?Pe`\B`:Pe`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,l={ignoreCase:t.currentFlags.ignoreCase},c=t.originMap.get(e);return c&&(l.hidden=!0,o>c.number&&(l.transferTo=c.number)),t.captureMap.set(o,l),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Ft(e),r=Ks(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&W1(n)){const i=i3(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:l}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");pr.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&l.some(y2)&&(l=[Dd(45),...l.filter(h=>!y2(h))]);const c=()=>`[${i?"^":""}${l.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||pr.bugNestedClassIgnoresNegation)&&!i){const p=l.filter(m=>m.type==="CharacterClass"&&m.kind==="union"&&m.negate);if(p.length){const m=hr(),y=m.body[0];return m.parent=o,y.parent=m,l=l.filter(E=>!p.includes(E)),e.body=l,l.length?(e.parent=y,y.body.push(e)):m.body.pop(),p.forEach(E=>{const T=Wi({body:[E]});E.parent=T,T.parent=m,m.body.push(T)}),n(m)}}t.inCharClass=!0;const h=c();return t.inCharClass=!1,h}const f=l[0];if(r==="union"&&!i&&f&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(pr.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&l.length===1&&f.type!=="CharacterClassRange"))return l.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return c()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Ks(n,i),l=Ks(r,i),c=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const f=h3(e);rW(f).forEach(p=>{c.add(Array.isArray(p)?`${Ks(p[0],i)}-${Ks(p[1],i)}`:Ks(p,i))})}return`${o}-${l}${[...c].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":Pe`[^\n]`;if(e==="digit")return t?Pe`\D`:Pe`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&s3.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?Pe`\P`:Pe`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?Pe`\W`:Pe`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const l=i.currentFlags;n&&(i.currentFlags=Yf(l,n));const c=t.map(o).join("|"),f=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?c:`(?${aW(e,n,i.useFlagMods)}${c})`;return i.currentFlags=l,f},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+iW(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:Pe`\g<${t}&R=${r}>`}},JQ=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),eW=new Set(["-","\\","]","^","["]),tW=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),b2=new Map([[9,Pe`\t`],[10,Pe`\n`],[11,Pe`\v`],[12,Pe`\f`],[13,Pe`\r`],[8232,Pe`\u2028`],[8233,Pe`\u2029`],[65279,Pe`\uFEFF`]]),nW=new RegExp("^\\p{Cased}$","u");function W1(e){return nW.test(e)}function h3(e,t){const n=!!t?.firstOnly,r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let l=r;l<=i;l++){const c=Ft(l);if(!W1(c))continue;const f=i3(c).filter(h=>{const p=h.codePointAt(0);return p<r||p>i});if(f.length&&(o.push(...f),n))break}return o}function Ks(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(b2.has(e))return b2.get(e);if(e<32||e>126&&e<160||e>262143||t&&sW(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?tW:eW:JQ,o=Ft(e);return(i.has(o)?"\\":"")+o}function rW(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??=t[i]:r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function aW(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i?.ignoreCase?"i":"")+(i?.dotAll?"s":"")+(o?"-":"")+(o?.ignoreCase?"i":"")+(o?.dotAll?"s":"")}return`${r}:`}function iW({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function E2({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function sW(e){return e>47&&e<58}function y2({type:e,value:t}){return e==="Character"&&t===45}var oW=class ig extends RegExp{#t=new Map;#e=null;#r;#n=null;#a=null;rawOptions={};get source(){return this.#r||"(?:)"}constructor(t,n,r){const i=!!r?.lazyCompile;if(t instanceof RegExp){if(r)throw new Error("Cannot provide options when copying a regexp");const o=t;super(o,n),this.#r=o.source,o instanceof ig&&(this.#t=o.#t,this.#n=o.#n,this.#a=o.#a,this.rawOptions=o.rawOptions)}else{const o={hiddenCaptures:[],strategy:null,transfers:[],...r};super(i?"":t,n),this.#r=t,this.#t=uW(o.hiddenCaptures,o.transfers),this.#a=o.strategy,this.rawOptions=r??{}}i||(this.#e=this)}exec(t){if(!this.#e){const{lazyCompile:i,...o}=this.rawOptions;this.#e=new ig(this.#r,this.flags,o)}const n=this.global||this.sticky,r=this.lastIndex;if(this.#a==="clip_search"&&n&&r){this.lastIndex=0;const i=this.#i(t.slice(r));return i&&(lW(i,r,t,this.hasIndices),this.lastIndex+=r),i}return this.#i(t)}#i(t){this.#e.lastIndex=this.lastIndex;const n=super.exec.call(this.#e,t);if(this.lastIndex=this.#e.lastIndex,!n||!this.#t.size)return n;const r=[...n];n.length=1;let i;this.hasIndices&&(i=[...n.indices],n.indices.length=1);const o=[0];for(let l=1;l<r.length;l++){const{hidden:c,transferTo:f}=this.#t.get(l)??{};if(c?o.push(null):(o.push(n.length),n.push(r[l]),this.hasIndices&&n.indices.push(i[l])),f&&r[l]!==void 0){const h=o[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(n[h]=r[l],this.hasIndices&&(n.indices[h]=i[l]),n.groups){this.#n||(this.#n=cW(this.source));const p=this.#n.get(f);p&&(n.groups[p]=r[l],this.hasIndices&&(n.indices.groups[p]=i[l]))}}}return n}};function lW(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let l=0;l<i.length;l++){const c=i[l];c&&(i[l]=[c[0]+t,c[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(l=>{const c=o[l];c&&(o[l]=[c[0]+t,c[1]+t])})}}function uW(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)tu(n,o,{}).transferTo=r;return n}function cW(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:l,groups:{capture:c,name:f}}=o;l==="["?r++:r?l==="]"&&r--:c&&(i++,f&&n.set(i,f))}return n}function fW(e,t){const n=dW(e,t);return n.options?new oW(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function dW(e,t){const n=a3(t),r=WN(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:Q1}),i=UQ(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=WQ(i,n),l=kQ(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),c=CQ(l.pattern),f=AQ(c.pattern,{captureTransfers:l.captureTransfers,hiddenCaptures:l.hiddenCaptures}),h={pattern:f.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const p=f.hiddenCaptures.sort((T,S)=>T-S),m=Array.from(f.captureTransfers),y=i._strategy,E=h.pattern.length>=n.lazyCompileLength;(p.length||m.length||y||E)&&(h.options={...p.length&&{hiddenCaptures:p},...m.length&&{transfers:m},...y&&{strategy:y},...E&&{lazyCompile:E}})}return h}function m3(e,t){return fW(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function hW(e={}){const t={target:"auto",cache:new Map,...e};return t.regexConstructor||=n=>m3(n,{target:t.target}),{createScanner(n){return new NX(n,t)},createString(n){return{content:n}}}}eN(L1({bundledLanguages:()=>M1,bundledLanguagesAlias:()=>D1,bundledLanguagesBase:()=>I1,bundledLanguagesInfo:()=>Cd,bundledThemes:()=>B1,bundledThemesInfo:()=>P1,codeToHast:()=>jN,codeToHtml:()=>G1,codeToTokens:()=>UN,codeToTokensBase:()=>HN,codeToTokensWithThemes:()=>zN,createHighlighter:()=>V1,createJavaScriptRegexEngine:()=>hW,createOnigurumaEngine:()=>rN,defaultJavaScriptRegexConstructor:()=>m3,getLastGrammarState:()=>$N,getSingletonHighlighter:()=>FN,loadWasm:()=>U1}),kX);const mW=v.createContext({code:""}),pW={name:"line-numbers",line(e,t){e.children.unshift({type:"element",tagName:"span",properties:{className:["inline-block","min-w-10","mr-4","text-right","select-none","text-muted-foreground"]},children:[{type:"text",value:String(t)}]})}};async function gW(e,t,n=!1){return await G1(e,{lang:t,theme:"one-dark-pro",transformers:n?[pW]:[]})}const sg=({code:e,language:t,showLineNumbers:n=!1,className:r,children:i,...o})=>{const[l,c]=v.useState("");return v.useEffect(()=>{let f=!1;return gW(e,t,n).then(h=>{f||c(h)}),()=>{f=!0}},[e,t,n]),_.jsx(mW.Provider,{value:{code:e},children:_.jsx("div",{className:we("group relative w-full overflow-hidden rounded-md border bg-background text-foreground",r),...o,children:_.jsxs("div",{className:"relative",children:[_.jsx("div",{className:"overflow-auto [&>pre]:m-0 [&>pre]:bg-background! [&>pre]:p-4 [&>pre]:text-foreground! [&>pre]:text-sm [&_code]:font-mono [&_code]:text-sm",dangerouslySetInnerHTML:{__html:l}}),i&&_.jsx("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:i})]})})})},bW=({className:e,...t})=>_.jsx(tC,{className:we("not-prose mb-4 w-full rounded-md border",e),...t}),EW=e=>{const t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error",interrupted:"Interrupted"},n={"input-streaming":_.jsx(OL,{className:"size-4"}),"input-available":_.jsx(IL,{className:"size-4 animate-pulse"}),"output-available":_.jsx(AL,{className:"size-4 text-emerald-400"}),"output-error":_.jsx(P2,{className:"size-4 text-red-400"}),interrupted:_.jsx(M2,{className:"size-4 text-muted-foreground"})};return _.jsxs(Jk,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[n[e],t[e]]})},yW=({className:e,title:t,state:n,...r})=>_.jsxs(nC,{className:we("group flex w-full items-center justify-between gap-4 p-3",e),...r,children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx(z2,{className:"size-4 text-muted-foreground"}),_.jsx("span",{className:"font-medium font-mono text-sm",children:t}),EW(n)]}),_.jsx(Xf,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),_W=({className:e,...t})=>_.jsx(rC,{className:we("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),xW=({className:e,input:t,...n})=>_.jsxs("div",{className:we("space-y-2 overflow-hidden p-4",e),...n,children:[_.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),_.jsx("div",{className:"rounded-md bg-muted/50",children:_.jsx(sg,{code:JSON.stringify(t,null,2),language:"json"})})]}),_2=({className:e,output:t,errorText:n,language:r="txt",...i})=>{if(!(t||n))return null;let o=_.jsx("div",{children:t});return typeof t=="object"&&!v.isValidElement(t)?o=_.jsx(sg,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(o=_.jsx(sg,{code:t,language:r})),_.jsxs("div",{className:we("space-y-2 p-4",e),...i,children:[_.jsx("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:n?"Error":"Result"}),_.jsxs("div",{className:we("overflow-x-auto rounded-md text-xs [&_table]:w-full",n?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[n&&_.jsx("div",{children:n}),o]})]})};function TW(e,t,n){return e!==void 0?e.isError===!0?"output-error":"output-available":t?"input-streaming":n?"input-available":"interrupted"}function p3({args:e,isSessionRunning:t=!0,isStreamingArgs:n=!1,name:r,onOpenSubagent:i,result:o,subagent:l}){const c=TW(o,n,t),f=o?.rendered.filter(y=>y.type==="text").map(y=>y.text).join(`
|
|
331
|
+
|
|
332
|
+
`)??"",h=o?.rendered.filter(y=>y.type==="image")??[],p=o?.isError===!0?o.display||"The tool reported an error.":void 0,m=f!==""?f:void 0;return _.jsxs(bW,{className:"mb-0 w-full",children:[_.jsx(yW,{state:c,title:r==="Agent"?"Subagent":r}),o!==void 0&&o.display!==""&&_.jsx("div",{className:"border-t px-3 py-2 font-mono text-muted-foreground text-xs",children:o.display}),l!==void 0&&i!==void 0&&_.jsxs("div",{className:"flex items-center justify-between gap-3 border-t px-3 py-2",children:[_.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",children:l.description}),_.jsxs(ln,{className:"shrink-0 gap-1.5",onClick:()=>i(l.id),size:"sm",type:"button",variant:"ghost",children:["View history",_.jsx(mL,{className:"size-3.5"})]})]}),_.jsxs(_W,{children:[_.jsx(xW,{className:"border-t",input:e}),p!==void 0?_.jsx(_2,{errorText:p,output:m}):m!==void 0&&_.jsx(_2,{output:m}),h.length>0&&_.jsx("div",{className:"flex flex-wrap gap-2 p-4 pt-0",children:h.map((y,E)=>_.jsx("img",{alt:`Tool result ${E+1}`,className:"max-h-64 rounded-md border object-contain",src:`data:${y.mediaType};base64,${y.data}`},E))})]})]})}function vW({isSessionRunning:e,message:t,onOpenSubagent:n,subagentsByToolCallId:r,toolResults:i}){const o=t.blocks.filter(l=>l.type!=="tool_result");return o.length===0?null:_.jsx(Bg,{from:"assistant",children:_.jsx(jg,{className:"w-full gap-3",children:o.map((l,c)=>{switch(l.type){case"text":return _.jsx(O1,{children:l.text},c);case"image":return _.jsx(W5,{alt:"Image from the agent",base64:l.data,className:"max-w-sm",mediaType:l.mediaType},c);case"thinking":return _.jsxs(k1,{className:"mb-0",defaultOpen:!1,children:[_.jsx(N1,{}),_.jsx(R1,{children:l.thinking!==""?l.thinking:"The model's reasoning was redacted."})]},c);case"tool_call":return _.jsx(p3,{args:l.arguments,isSessionRunning:e,name:l.name,onOpenSubagent:n,result:i.get(l.id),subagent:r?.get(l.id)},l.id)}})})})}function g3(e){const t=new Map;for(const n of e)if(n.role==="agent")for(const r of n.blocks)r.type==="tool_result"&&t.set(r.toolCallId,r);return t}function SW({className:e,...t}){return _.jsx("textarea",{"data-slot":"textarea",className:we("flex field-sizing-content min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",e),...t})}const b3=v.createContext(null),bu=()=>{const e=v.useContext(b3);if(!e)throw new Error("usePromptInputAttachments must be used within a PromptInput");return e};function AW({data:e,className:t,...n}){const r=bu(),i=e.filename||"",o=!!(e.mediaType?.startsWith("image/")&&e.url);return _.jsxs("div",{className:we("group relative size-14 overflow-hidden rounded-md border",t),...n,children:[o?_.jsx("img",{alt:i||"attachment",className:"size-full object-cover",height:56,src:e.url,width:56}):_.jsx("div",{className:"flex size-full items-center justify-center bg-muted text-muted-foreground",children:_.jsx(U2,{className:"size-4"})}),_.jsxs(ln,{"aria-label":"Remove attachment",className:"absolute top-0.5 right-0.5 size-5 rounded-full bg-background/80 p-0 opacity-0 backdrop-blur-sm transition-opacity hover:bg-background group-hover:opacity-100 [&>svg]:size-3",onClick:l=>{l.stopPropagation(),r.remove(e.id)},type:"button",variant:"ghost",children:[_.jsx(cg,{}),_.jsx("span",{className:"sr-only",children:"Remove"})]})]})}function CW({children:e,className:t,...n}){const r=bu();return r.files.length?_.jsx("div",{className:we("flex w-full flex-wrap items-center gap-2 p-3 pb-0",t),...n,children:r.files.map(i=>_.jsx(v.Fragment,{children:e(i)},i.id))}):null}const wW=({label:e="Attach image",className:t,...n})=>{const r=bu();return _.jsxs(IW,{"aria-label":e,className:t,onClick:i=>{i.preventDefault(),r.openFileDialog()},...n,children:[_.jsx(U2,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:e})]})},kW=({className:e,accept:t,multiple:n,maxFiles:r,maxFileSize:i,onError:o,onSubmit:l,children:c,...f})=>{const h=v.useRef(null),p=v.useRef(null),[m,y]=v.useState([]),E=v.useRef(m);E.current=m;const T=v.useCallback(()=>{h.current?.click()},[]),S=v.useCallback($=>!t||t.trim()===""?!0:t.split(",").map(ie=>ie.trim()).filter(Boolean).some(ie=>{if(ie.endsWith("/*")){const V=ie.slice(0,-1);return $.type.startsWith(V)}return $.type===ie}),[t]),C=v.useCallback($=>{const G=Array.from($),ie=G.filter(J=>S(J));if(G.length&&ie.length===0){o?.({code:"accept",message:"No files match the accepted types."});return}const V=J=>i?J.size<=i:!0,X=ie.filter(V);if(ie.length>0&&X.length===0){o?.({code:"max_file_size",message:"All files exceed the maximum size."});return}y(J=>{const he=typeof r=="number"?Math.max(0,r-J.length):void 0,ue=typeof he=="number"?X.slice(0,he):X;typeof he=="number"&&X.length>he&&o?.({code:"max_files",message:"Too many files. Some were not added."});const re=[];for(const U of ue)re.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(U),mediaType:U.type,filename:U.name});return J.concat(re)})},[S,r,i,o]),w=v.useCallback($=>y(G=>{const ie=G.find(V=>V.id===$);return ie?.url&&URL.revokeObjectURL(ie.url),G.filter(V=>V.id!==$)}),[]),k=v.useCallback(()=>y($=>{for(const G of $)G.url&&URL.revokeObjectURL(G.url);return[]}),[]);v.useEffect(()=>{const $=p.current;if(!$)return;const G=V=>{V.dataTransfer?.types?.includes("Files")&&V.preventDefault()},ie=V=>{V.dataTransfer?.types?.includes("Files")&&V.preventDefault(),V.dataTransfer?.files&&V.dataTransfer.files.length>0&&C(V.dataTransfer.files)};return $.addEventListener("dragover",G),$.addEventListener("drop",ie),()=>{$.removeEventListener("dragover",G),$.removeEventListener("drop",ie)}},[C]),v.useEffect(()=>()=>{for(const $ of E.current)$.url&&URL.revokeObjectURL($.url)},[]);const N=$=>{$.currentTarget.files&&C($.currentTarget.files),$.currentTarget.value=""},P=async $=>{try{const ie=await(await fetch($)).blob();return new Promise(V=>{const X=new FileReader;X.onloadend=()=>V(X.result),X.onerror=()=>V(null),X.readAsDataURL(ie)})}catch{return null}},B=v.useMemo(()=>({files:m,add:C,remove:w,clear:k,openFileDialog:T,fileInputRef:h}),[m,C,w,k,T]),D=$=>{$.preventDefault();const G=$.currentTarget,V=new FormData(G).get("message")||"";G.reset();const X=()=>{const J=G.elements.namedItem("message");if(!(J instanceof HTMLTextAreaElement)||J.value!=="")return;Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value")?.set?.call(J,V),J.dispatchEvent(new Event("input",{bubbles:!0}))};Promise.all(m.map(async({id:J,...he})=>{if(he.url?.startsWith("blob:")){const ue=await P(he.url);return{...he,url:ue??he.url}}return he})).then(J=>{try{const he=l({text:V,files:J},$);he instanceof Promise?he.then(()=>k()).catch(()=>{X()}):k()}catch{X()}}).catch(()=>{X()})};return _.jsxs(b3.Provider,{value:B,children:[_.jsx("input",{accept:t,"aria-label":"Upload files",className:"hidden",multiple:n,onChange:N,ref:h,title:"Upload files",type:"file"}),_.jsx("form",{className:we("relative flex w-full flex-col overflow-hidden rounded-xl border bg-background shadow-xs transition-[color,box-shadow] focus-within:border-ring focus-within:ring-[3px] focus-within:ring-ring/50",e),onSubmit:D,ref:p,...f,children:c})]})},NW=({className:e,...t})=>_.jsx("div",{className:we("contents",e),...t}),RW=({onChange:e,onKeyDown:t,className:n,placeholder:r="What would you like to know?",...i})=>{const o=bu(),[l,c]=v.useState(!1),f=p=>{if(t?.(p),!p.defaultPrevented){if(p.key==="Enter"){if(l||p.nativeEvent.isComposing||p.shiftKey)return;p.preventDefault();const m=p.currentTarget.form;if(m?.querySelector('button[type="submit"]')?.disabled)return;m?.requestSubmit()}if(p.key==="Backspace"&&p.currentTarget.value===""&&o.files.length>0){p.preventDefault();const m=o.files.at(-1);m&&o.remove(m.id)}}},h=p=>{const m=p.clipboardData?.items;if(!m)return;const y=[];for(const E of m)if(E.kind==="file"){const T=E.getAsFile();T&&y.push(T)}y.length>0&&(p.preventDefault(),o.add(y))};return _.jsx(SW,{className:we("field-sizing-content max-h-48 min-h-16 w-full resize-none rounded-none border-none bg-transparent shadow-none focus-visible:ring-0 dark:bg-transparent",n),name:"message",onChange:e,onCompositionEnd:()=>c(!1),onCompositionStart:()=>c(!0),onKeyDown:f,onPaste:h,placeholder:r,...i})},OW=({className:e,...t})=>_.jsx("div",{className:we("flex items-center justify-between gap-1 p-1",e),...t}),LW=({className:e,...t})=>_.jsx("div",{className:we("flex items-center gap-1",e),...t}),IW=({variant:e="ghost",className:t,size:n,...r})=>{const i=n??(v.Children.count(r.children)>1?"sm":"icon-sm");return _.jsx(ln,{className:we("shrink-0 gap-1.5 rounded-lg",t),size:i,type:"button",variant:e,...r})},DW=({className:e,variant:t="default",size:n="icon-sm",status:r,children:i,...o})=>{let l=_.jsx(ML,{className:"size-4"});return r==="submitted"?l=_.jsx(Qf,{className:"size-4 animate-spin"}):r==="streaming"?l=_.jsx(H2,{className:"size-4"}):r==="error"&&(l=_.jsx(cg,{className:"size-4"})),_.jsx(ln,{"aria-label":"Submit",className:we("shrink-0 rounded-lg",e),size:n,type:"submit",variant:t,...o,children:i??l})};function MW(e){const t=e.url;if(t===void 0||!t.startsWith("data:"))return;const n=t.indexOf(",");if(n<0)return;const i=t.slice(5,n).split(";")[0]||e.mediaType||"";if(i.startsWith("image/"))return{type:"image",mediaType:i,data:t.slice(n+1)}}const E3="/api",PW=300;async function BW(e){try{const t=await e.text();if(t.length===0)return e.statusText;try{const n=JSON.parse(t);if(typeof n.error=="string")return n.error;if(typeof n.message=="string")return n.message}catch{}return t}catch{return e.statusText}}async function ss(e,t){const n=await fetch(`${E3}${e}`,t);if(!n.ok){const r=await BW(n);throw new Error(`Request to ${e} failed (${n.status}): ${r}`)}return await n.json()}function jd(e,t){return ss(e,{method:"POST",...t!==void 0?{body:JSON.stringify(t),headers:{"Content-Type":"application/json"}}:{}})}function y3(e,t){return ss(e,{method:"PATCH",body:JSON.stringify(t),headers:{"Content-Type":"application/json"}})}function jW(){return ss("/health")}function UW(e){return ss("/sessions")}function x2(e){return ss(`/sessions/${encodeURIComponent(e)}/subagents`)}function HW(e,t,n=20,r){const i=new URLSearchParams({limit:String(n),query:t});return ss(`/sessions/${encodeURIComponent(e)}/files?${i.toString()}`,r===void 0?void 0:{signal:r})}function zW(e){return jd("/sessions",e)}function T2(e){return ss(`/sessions/${encodeURIComponent(e)}`)}function FW(e,t){return jd(`/sessions/${encodeURIComponent(e)}/messages`,t)}function $W(e){return jd(`/sessions/${encodeURIComponent(e)}/abort`)}function VW(e){return jd(`/sessions/${encodeURIComponent(e)}/reset`)}function GW(e,t){return y3(`/sessions/${encodeURIComponent(e)}/model`,t)}function qW(e,t){return y3(`/sessions/${encodeURIComponent(e)}/effort`,t)}function YW(e){const t=[];for(const n of e.split(`
|
|
333
|
+
`)){const r=n.endsWith("\r")?n.slice(0,-1):n;r.startsWith("data:")&&t.push(r.slice(5).trimStart())}if(t.length!==0)try{return JSON.parse(t.join(`
|
|
334
|
+
`))}catch{return}}function XW(e,t){return new Promise(n=>{if(t.aborted){n();return}const r=window.setTimeout(()=>{t.removeEventListener("abort",i),n()},e),i=()=>{window.clearTimeout(r),n()};t.addEventListener("abort",i,{once:!0})})}async function QW(e,t,n,r,i){let o=t;for(;!r.aborted;){let l=!1;try{const c=o!==void 0?`?after=${encodeURIComponent(o)}`:"",f=await fetch(`${E3}/sessions/${encodeURIComponent(e)}/stream${c}`,{headers:{Accept:"text/event-stream"},signal:r});if(f.status===409)o=i?.onCursorInvalid!==void 0?await i.onCursorInvalid():void 0;else{if(!f.ok||f.body===null)throw f.status>=400&&f.status<500&&(l=!0,i?.onStreamRejected?.(f.status)),new Error(`Stream request failed (${f.status})`);{const h=f.body.getReader(),p=new TextDecoder;let m="";for(;;){const{done:y,value:E}=await h.read();if(y)break;m+=p.decode(E,{stream:!0});let T=m.indexOf(`
|
|
335
|
+
|
|
336
|
+
`);for(;T!==-1;){const S=m.slice(0,T);m=m.slice(T+2);const C=YW(S);C!==void 0&&(o=C.id,n(C)),T=m.indexOf(`
|
|
337
|
+
|
|
338
|
+
`)}}}}}catch{}if(l||r.aborted)return;await XW(PW,r)}}function WW({files:e,id:t,isLoading:n,onSelect:r,selectedIndex:i}){return _.jsxs("div",{"aria-label":"Workspace files",className:"border-border/70 max-h-56 overflow-y-auto border-b bg-muted/25 p-1.5",id:t,role:"listbox",children:[e.map((o,l)=>{const c=o.path.lastIndexOf("/"),f=c===-1?"Workspace root":o.path.slice(0,c),h=l===i;return _.jsxs("button",{"aria-selected":h,className:we("flex w-full items-center gap-2 rounded-md px-2.5 py-1.5 text-left text-sm transition-colors",h?"bg-accent text-accent-foreground":"text-foreground hover:bg-accent/60"),id:`${t}-option-${l}`,onMouseDown:p=>p.preventDefault(),onClick:()=>r(o),role:"option",type:"button",children:[_.jsx(BL,{className:"size-3.5 shrink-0 text-muted-foreground"}),_.jsx("span",{className:"min-w-0 flex-1 truncate font-medium",children:o.fileName}),_.jsx("span",{className:"max-w-1/2 truncate text-muted-foreground text-xs",children:f})]},o.path)}),n&&e.length===0&&_.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-2 text-muted-foreground text-sm",children:[_.jsx(Qf,{className:"size-3.5 animate-spin"}),_.jsx("span",{children:"Searching workspace files…"})]}),!n&&e.length===0&&_.jsx("p",{className:"px-2.5 py-2 text-muted-foreground text-sm",children:"No matching files found."})]})}function v2(e){return`${e.start}:${e.end}:${e.prefix}`}function KW(e,t){const n=e.slice(0,t),i=/(?:^|\s)(@"([^"]*))$/u.exec(n)??/(?:^|\s)(@([^\s"]*))$/u.exec(n);if(i?.[1]!==void 0)return{end:t,prefix:i[1],query:i[2]??"",start:t-i[1].length}}function ZW(e){return/[\s"]/u.test(e)?`@"${e.replaceAll('"','\\"')}"`:`@${e}`}const JW=10,eK=80;function tK({disabled:e,onTextChange:t,placeholder:n,sessionId:r}){const i=v.useRef(null),o=v.useRef(void 0),l=v.useId(),[c,f]=v.useState([]),[h,p]=v.useState(!1),[m,y]=v.useState(void 0),[E,T]=v.useState(0),S=()=>{f([]),p(!1),y(void 0),T(0)},C=(B,D)=>{const $=KW(B,D);if($===void 0){o.current=void 0,S();return}const G=v2($);if(o.current===G){S();return}o.current=void 0,f([]),y($),T(0)};v.useEffect(()=>{if(m===void 0||e)return;const B=new AbortController;p(!0);const D=window.setTimeout(()=>{HW(r,m.query,JW,B.signal).then($=>{B.signal.aborted||(f($.files),p(!1),T(0))},()=>{B.signal.aborted||(f([]),p(!1))})},eK);return()=>{window.clearTimeout(D),B.abort()}},[e,m,r]),v.useEffect(()=>{const B=i.current?.form;if(B!=null)return B.addEventListener("reset",S),()=>B.removeEventListener("reset",S)},[]);const w=B=>{const D=i.current;if(D===null||m===void 0)return;const $=D.value.slice(m.end),G=$.length===0||!/^\s/u.test($)?" ":"";D.setRangeText(`${ZW(B.path)}${G}`,m.start,m.end,"end"),D.dispatchEvent(new Event("input",{bubbles:!0})),D.focus(),o.current=void 0,S()},k=B=>{t(B.currentTarget.value.trim()!==""),C(B.currentTarget.value,B.currentTarget.selectionStart)},N=B=>{if(m!==void 0){if(B.key==="Escape"){B.preventDefault(),o.current=v2(m),S();return}if(c.length!==0){if(B.key==="ArrowUp"){B.preventDefault(),T(D=>(D+c.length-1)%c.length);return}if(B.key==="ArrowDown"){B.preventDefault(),T(D=>(D+1)%c.length);return}if(B.key==="Enter"||B.key==="Tab"){B.preventDefault();const D=c[E]??c[0];D!==void 0&&w(D)}}}},P=m!==void 0;return _.jsxs(_.Fragment,{children:[P&&_.jsx(WW,{files:c,id:l,isLoading:h,onSelect:w,selectedIndex:E}),_.jsx(RW,{"aria-activedescendant":c.length>0?`${l}-option-${E}`:void 0,"aria-controls":P?l:void 0,"aria-expanded":P,"aria-haspopup":"listbox",disabled:e,onChange:k,onKeyDown:N,onSelect:B=>C(B.currentTarget.value,B.currentTarget.selectionStart),placeholder:n,ref:i})]})}function nK({daemonReady:e,hasText:t,isAborting:n,isRunning:r,onAbort:i,readOnly:o}){const l=bu();if(o)return _.jsx(ln,{"aria-label":"Subagent history is read-only",className:"rounded-lg",disabled:!0,size:"icon-sm",type:"button",variant:"outline",children:_.jsx(zL,{className:"size-4"})});if(r)return _.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx("button",{"aria-hidden":!0,className:"hidden",disabled:!0,type:"submit"}),_.jsx(ln,{"aria-label":"Stop the run",className:"rounded-lg",disabled:n,onClick:i,size:"icon-sm",type:"button",variant:"outline",children:n?_.jsx(Qf,{className:"size-4 animate-spin"}):_.jsx(H2,{className:"size-4"})})]});const c=e&&(t||l.files.length>0);return _.jsx(DW,{disabled:!c})}function rK({daemonReady:e,isAborting:t,isRunning:n,onAbort:r,onSubmit:i,readOnly:o,sessionId:l}){const[c,f]=v.useState(!1),[h,p]=v.useState(void 0),m=v.useCallback(async E=>{if(n||o)return;const T=E.text.trim(),S=[];for(const w of E.files){const k=MW(w);k!==void 0&&S.push(k)}if(T===""&&S.length===0)return;if(f(!1),p(void 0),!await i(T,S))throw new Error("The message could not be sent.")},[n,i,o]),y=v.useCallback(E=>{p(E.code==="accept"?"Only image files can be attached.":E.message)},[]);return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsxs(kW,{accept:"image/*",multiple:!0,onError:y,onSubmit:m,children:[_.jsxs(NW,{children:[_.jsx(CW,{children:E=>_.jsx(AW,{data:E})}),_.jsx(tK,{disabled:!e||o,onTextChange:f,placeholder:o?"Subagent history is read-only.":e?"Message the agent…":"Waiting for the daemon to become ready…",sessionId:l})]}),_.jsxs(OW,{children:[_.jsx(LW,{children:_.jsx(wW,{disabled:!e||o})}),_.jsx(nK,{daemonReady:e,hasText:c,isAborting:t,isRunning:n,onAbort:r,readOnly:o})]})]}),_.jsxs("div",{className:"flex items-center justify-between px-1",children:[_.jsx("p",{className:"text-muted-foreground/70 text-xs",children:o?"Subagent histories cannot receive follow-up messages.":"Enter to send · Shift+Enter for a new line · type @ to mention files"}),h!==void 0&&_.jsx("p",{className:"text-destructive text-xs",children:h})]})]})}function aK({partial:e}){const t=e.content.length-1;return _.jsx(Bg,{from:"assistant",children:_.jsx(jg,{className:"w-full gap-3",children:e.content.map((n,r)=>{const i=r===t;switch(n.type){case"text":return _.jsx(O1,{children:n.text},r);case"thinking":return _.jsxs(k1,{className:"mb-0",defaultOpen:i,isStreaming:i,children:[_.jsx(N1,{}),_.jsx(R1,{children:n.thinking})]},r);case"toolCall":return _.jsx(p3,{args:n.arguments,isStreamingArgs:i,name:n.name,result:void 0},n.id!==""?n.id:r)}})})})}function n0(e){return _.jsxs("header",{className:"flex h-12 shrink-0 items-center gap-3 border-b border-border/60 px-4",children:[_.jsx(ln,{"aria-label":"Back to the parent conversation",className:"shrink-0",onClick:e.onBack,size:"icon-sm",type:"button",variant:"ghost",children:_.jsx(I2,{className:"size-4"})}),_.jsxs("div",{className:"flex min-w-0 items-center gap-2.5",children:[_.jsx(B2,{className:"size-4 shrink-0 text-muted-foreground"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"truncate text-[13px] font-medium",children:e.description}),_.jsxs("p",{className:"text-[11px] text-muted-foreground",children:["Subagent history · Level ",e.depth]})]})]})]})}function iK({message:e}){const t=e.id.startsWith("optimistic-"),n=e.blocks.filter(i=>i.type==="image"),r=e.blocks.filter(i=>i.type==="text").map(i=>i.text).join(`
|
|
339
|
+
`);return _.jsxs(Bg,{className:t?"opacity-70":void 0,from:"user",children:[n.length>0&&_.jsx("div",{className:"ml-auto flex flex-wrap justify-end gap-2",children:n.map((i,o)=>_.jsx("img",{alt:`Attached image ${o+1}`,className:"size-24 rounded-lg border object-cover",src:`data:${i.mediaType};base64,${i.data}`},o))}),r!==""&&_.jsx(jg,{children:_.jsx("span",{className:"whitespace-pre-wrap break-words",children:r})})]})}function sK(e){return e.reason==="crash"?"The daemon crashed during a run":"The daemon was shut down during a run"}function oK({activeSession:e,daemonReady:t,historyDepth:n,onBackToParent:r,onOpenSubagent:i,sessionId:o}){const l=v.useMemo(()=>g3(e.messages),[e.messages]),c=v.useMemo(()=>e.messages.filter(C=>C.role!=="system"),[e.messages]),f=v.useMemo(()=>new Map(e.subagents.flatMap(C=>C.parentToolCallId===void 0?[]:[[C.parentToolCallId,C]])),[e.subagents]);if(o===void 0)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx(j2,{className:"size-6 text-muted-foreground"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"No session selected"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Pick a session from the list or create a new one to start chatting."})]})]});if(e.isLoading)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&_.jsx(n0,{depth:n,description:"Subagent history",onBack:r}),_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3",children:[_.jsx(Xx,{className:"text-muted-foreground",size:20}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Loading conversation…"})]})]});if(e.loadError!==void 0)return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[n>0&&_.jsx(n0,{depth:n,description:"Subagent history",onBack:r}),_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx(i0,{className:"size-6 text-destructive"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"The session could not be loaded"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:e.loadError})]})]})]});const h=e.streamingPartial,p=h!==void 0&&h.content.length>0,m=e.isRunning&&!p,y=e.session?.interruption,E=e.session,T=n>0||E?.agent.type==="subagent",S=c.length===0&&!p&&!m&&e.runError===void 0&&e.streamError===void 0&&y===void 0;return _.jsxs("section",{className:"flex min-w-0 flex-1 flex-col",children:[T&&E!==void 0&&_.jsx(n0,{depth:E.agent.depth,description:E.agent.description??E.title??"Delegated task",onBack:r}),S?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-8 text-center",children:[_.jsx($L,{className:"size-6 text-muted-foreground"}),_.jsxs("div",{className:"space-y-1",children:[_.jsx("h2",{className:"font-medium text-sm",children:"No messages yet"}),_.jsx("p",{className:"text-muted-foreground text-sm",children:"Send a message below to start the conversation."})]})]}):_.jsxs(G5,{className:"flex-1",initial:"instant",children:[_.jsxs(q5,{className:"mx-auto w-full max-w-3xl gap-6 px-6 py-8",children:[c.map(C=>C.role==="user"?_.jsx(iK,{message:C},C.id):_.jsx(vW,{isSessionRunning:e.isRunning,message:C,onOpenSubagent:i,subagentsByToolCallId:f,toolResults:l},C.id)),p&&_.jsx(aK,{partial:h}),m&&_.jsxs("div",{className:"flex items-center gap-2.5",children:[_.jsx(Xx,{className:"text-muted-foreground",size:14}),_.jsx(eC,{className:"text-sm",duration:1.5,children:"Working…"})]}),e.runError!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-destructive/40 bg-destructive/10 px-4 py-3 text-destructive text-sm",children:[_.jsx(i0,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:"The run failed"}),_.jsx("p",{className:"mt-0.5 break-words",children:e.runError})]})]}),e.streamError!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[_.jsx(lx,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:"Live updates stopped"}),_.jsxs("p",{className:"mt-0.5 break-words",children:[e.streamError," Refresh the page to reconnect."]})]})]}),y!==void 0&&_.jsxs("div",{className:"flex items-start gap-2.5 rounded-lg border border-amber-500/30 bg-amber-500/10 px-4 py-3 text-amber-400 text-sm",children:[_.jsx(lx,{className:"mt-0.5 size-4 shrink-0"}),_.jsxs("div",{className:"min-w-0",children:[_.jsx("p",{className:"font-medium",children:sK(y)}),_.jsx("p",{className:"mt-0.5 break-words",children:y.message})]})]})]}),_.jsx(Y5,{})]}),_.jsx("div",{className:"border-border/60 border-t",children:_.jsx("div",{className:"mx-auto w-full max-w-3xl px-6 pt-4 pb-5",children:_.jsx(rK,{daemonReady:t,isAborting:e.isAborting,isRunning:e.isRunning,onAbort:()=>{e.abort()},onSubmit:e.submit,readOnly:T,sessionId:o})})})]})}function Ka({className:e,...t}){return _.jsx("div",{"data-slot":"skeleton",className:we("animate-pulse rounded-md bg-accent",e),...t})}function lK({className:e,orientation:t="horizontal",...n}){return _.jsx(V4,{"data-slot":"tabs","data-orientation":t,orientation:t,className:we("group/tabs flex gap-2 data-[orientation=horizontal]:flex-col",e),...n})}const uK=fg("group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none",{variants:{variant:{default:"bg-muted",line:"gap-1 bg-transparent"}},defaultVariants:{variant:"default"}});function cK({className:e,variant:t="default",...n}){return _.jsx(G4,{"data-slot":"tabs-list","data-variant":t,className:we(uK({variant:t}),e),...n})}function S2({className:e,...t}){return _.jsx(q4,{"data-slot":"tabs-trigger",className:we("relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4","group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent","data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground","after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100",e),...t})}function A2({className:e,...t}){return _.jsx(Y4,{"data-slot":"tabs-content",className:we("flex-1 outline-none",e),...t})}function _3(e){switch(e.status){case"completed":return _.jsx(wL,{"aria-label":"Completed",className:"size-3.5 text-zinc-500"});case"error":return _.jsx(P2,{"aria-label":"Failed",className:"size-3.5 text-red-400"});case"interrupted":return _.jsx(M2,{"aria-label":"Interrupted",className:"size-3.5 text-zinc-500"});case"running":return _.jsx(Qf,{"aria-label":"Running",className:"size-3.5 animate-spin text-emerald-400"})}}function fK(e){switch(e.status){case"completed":return"Completed";case"error":return"Failed";case"interrupted":return"Interrupted";case"running":return"Running…"}}function dK(e){if(e===void 0)return"No arguments";if(typeof e=="string")return e;try{return JSON.stringify(e,null,2)}catch{return String(e)}}function hK(e){const{entry:t}=e,n=t.result?.rendered.filter(i=>i.type==="text").map(i=>i.text).join(`
|
|
340
|
+
`)??"",r=t.result?.rendered.filter(i=>i.type==="image").length??0;return _.jsxs("div",{className:"flex flex-col gap-3 p-3",children:[_.jsx("div",{children:_.jsxs(ln,{className:"-ml-1 h-7 gap-1.5 px-2 text-xs text-muted-foreground",onClick:e.onBack,size:"sm",variant:"ghost",children:[_.jsx(I2,{className:"size-3.5"}),"All activity"]})}),_.jsxs("div",{className:"flex items-center gap-2 px-1",children:[_.jsx(_3,{status:t.status}),_.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs font-medium text-foreground",children:t.name}),_.jsx("span",{className:we("text-xs",t.status==="error"?"text-red-400":t.status==="running"?"text-emerald-400":"text-muted-foreground"),children:fK(t)})]}),_.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Arguments"}),_.jsx("pre",{className:"max-h-64 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:dK(t.arguments)})]}),_.jsxs("div",{className:"flex flex-col gap-1 px-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:"Result"}),t.result===void 0?_.jsx("p",{className:"text-xs text-muted-foreground",children:t.status==="running"?"Waiting for the tool to finish…":"No result was recorded."}):_.jsxs(_.Fragment,{children:[t.result.display!==""&&_.jsx("p",{className:we("text-xs leading-snug",t.result.isError===!0?"text-red-400":"text-foreground/90"),children:t.result.display}),n!==""&&_.jsx("pre",{className:"max-h-72 overflow-auto rounded-lg border border-border/60 bg-zinc-900/60 p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-foreground/90",children:n}),r>0&&_.jsx("p",{className:"text-xs text-muted-foreground",children:r===1?"The result includes 1 image.":`The result includes ${r} images.`})]})]})]})}function mK(e){const{entry:t}=e,n=t.result!==void 0&&t.result.display!==""?t.result.display:t.status==="running"?"Running…":void 0;return _.jsxs("button",{className:"group flex w-full items-start gap-2.5 rounded-lg px-2.5 py-2 text-left transition-colors hover:bg-accent/60 focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-none",onClick:()=>e.onSelect(t.id),type:"button",children:[_.jsx("span",{className:"mt-0.5 shrink-0",children:_.jsx(_3,{status:t.status})}),_.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[_.jsx("span",{className:"truncate font-mono text-xs text-foreground/90",children:t.name}),n!==void 0&&_.jsx("span",{className:"line-clamp-2 text-xs leading-snug text-muted-foreground",children:n})]}),_.jsx(D2,{className:"mt-0.5 size-3.5 shrink-0 text-muted-foreground/40 transition-colors group-hover:text-muted-foreground"})]})}function pK(e){const[t,n]=v.useState(void 0),r=e.entries.find(i=>i.id===t);return r!==void 0?_.jsx(hK,{entry:r,onBack:()=>{n(void 0)}}):e.entries.length===0?_.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-6 text-center",children:[_.jsx(z2,{className:"size-5 text-muted-foreground/50"}),_.jsx("p",{className:"text-xs text-muted-foreground",children:"Tool calls made by the agent will appear here."})]}):_.jsx("div",{className:"flex flex-col gap-0.5 p-2",children:e.entries.map(i=>_.jsx(mK,{entry:i,onSelect:n},i.id))})}function gK(e,t,n){const r=g3(e),i=[],o=new Set;for(const l of e)if(l.role==="agent")for(const c of l.blocks){if(c.type!=="tool_call"||o.has(c.id))continue;o.add(c.id);const f=r.get(c.id);i.push({arguments:c.arguments,id:c.id,name:c.name,result:f,status:f===void 0?n?"running":"interrupted":f.isError===!0?"error":"completed"})}if(t!==void 0)for(const l of t.content)l.type!=="toolCall"||o.has(l.id)||(o.add(l.id),i.push({arguments:l.arguments,id:l.id,name:l.name,result:void 0,status:"running"}));return i}function sf({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return _.jsx(z4,{"data-slot":"separator",decorative:n,orientation:t,className:we("shrink-0 bg-border data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function og(e){if(e===void 0)return"No activity yet";const t=Math.max(0,Math.floor((Date.now()-e)/1e3));if(t<60)return"Just now";const n=Math.floor(t/60);if(n<60)return`${n} ${n===1?"minute":"minutes"} ago`;const r=Math.floor(n/60);if(r<24)return`${r} ${r===1?"hour":"hours"} ago`;const i=Math.floor(r/24);return`${i} ${i===1?"day":"days"} ago`}function Ii(e){return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsx("span",{className:"text-xs font-medium tracking-wide text-muted-foreground",children:e.label}),e.children]})}function K1({...e}){return _.jsx(WS,{"data-slot":"select",...e})}function bK({...e}){return _.jsx(fA,{"data-slot":"select-group",...e})}function Z1({...e}){return _.jsx(eA,{"data-slot":"select-value",...e})}function J1({className:e,size:t="default",children:n,...r}){return _.jsxs(ZS,{"data-slot":"select-trigger","data-size":t,className:we("flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,_.jsx(tA,{asChild:!0,children:_.jsx(Xf,{className:"size-4 opacity-50"})})]})}function eb({className:e,children:t,position:n="item-aligned",align:r="center",...i}){return _.jsx(rA,{children:_.jsxs(aA,{"data-slot":"select-content",className:we("relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,align:r,...i,children:[_.jsx(yK,{}),_.jsx(uA,{className:we("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),_.jsx(_K,{})]})})}function EK({className:e,...t}){return _.jsx(hA,{"data-slot":"select-label",className:we("px-2 py-1.5 text-xs text-muted-foreground",e),...t})}function oo({className:e,children:t,...n}){return _.jsxs(pA,{"data-slot":"select-item",className:we("relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",e),...n,children:[_.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:_.jsx(EA,{children:_.jsx(EL,{className:"size-4"})})}),_.jsx(gA,{children:t})]})}function yK({className:e,...t}){return _.jsx(yA,{"data-slot":"select-scroll-up-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(TL,{className:"size-4"})})}function _K({className:e,...t}){return _.jsx(_A,{"data-slot":"select-scroll-down-button",className:we("flex cursor-default items-center justify-center py-1",e),...t,children:_.jsx(Xf,{className:"size-4"})})}function r0(e){return e.replace(/[-_]+/g," ").replace(/\b([a-z])/g,t=>t.toUpperCase())}const a0="__model-default__";function xK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.effort??a0,l=f=>{f!==o&&(n(!0),i(void 0),e.onChangeEffort(f===a0?void 0:f).catch(h=>{i(h instanceof Error?h.message:"The effort could not be changed.")}).finally(()=>{n(!1)}))},c=e.levels.length>0;return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsxs(K1,{disabled:e.disabled||t||!c,onValueChange:l,value:o,children:[_.jsx(J1,{className:"h-8 w-full text-xs",size:"sm",children:_.jsx(Z1,{placeholder:e.effort!==void 0?r0(e.effort):"Model default"})}),_.jsxs(eb,{position:"popper",children:[_.jsx(oo,{value:a0,children:"Model default"}),e.levels.map(f=>_.jsx(oo,{value:f,children:r0(f)},f)),e.effort!==void 0&&!e.levels.includes(e.effort)&&_.jsx(oo,{value:e.effort,children:r0(e.effort)})]})]}),r!==void 0&&_.jsx("p",{className:"text-xs text-red-400",children:r})]})}function nu(e){return(e.includes("/")?e.split("/").at(-1)??e:e).replace(/[-_]+/g," ").replace(/\bgpt\b/gi,"GPT").replace(/\bapi\b/gi,"API").replace(/\b([a-z])/g,n=>n.toUpperCase())}function ru(e,t){return JSON.stringify([e,t])}function x3(e){if(e.catalog.providers.length>1)return _.jsx(_.Fragment,{children:e.catalog.providers.map(i=>_.jsxs(bK,{children:[_.jsx(EK,{children:nu(i.providerId)}),i.models.map(o=>_.jsx(oo,{value:ru(i.providerId,o.id),children:o.name},`${i.providerId}:${o.id}`))]},i.providerId))});const t=e.catalog.providers[0],n=t?.providerId??e.catalog.defaultProviderId,r=t?.models??e.catalog.models;return _.jsx(_.Fragment,{children:r.map(i=>_.jsx(oo,{value:ru(n,i.id),children:i.name},`${n}:${i.id}`))})}function T3(e){try{const t=JSON.parse(e);if(Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&typeof t[1]=="string")return{providerId:t[0],modelId:t[1]}}catch{return}}function TK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(void 0),o=e.catalog?.providers??[],l=new Set(o.flatMap(h=>h.models.map(p=>ru(h.providerId,p.id)))),c=ru(e.providerId,e.modelId),f=h=>{const p=T3(h);p===void 0||p.modelId===e.modelId&&p.providerId===e.providerId||(n(!0),i(void 0),e.onChangeModel(p.providerId,p.modelId).catch(m=>{i(m instanceof Error?m.message:"The model could not be changed.")}).finally(()=>{n(!1)}))};return _.jsxs("div",{className:"flex flex-col gap-1",children:[_.jsxs(K1,{disabled:e.disabled||t||e.catalog===void 0,onValueChange:f,value:c,children:[_.jsx(J1,{className:"h-8 w-full font-mono text-xs",size:"sm",children:_.jsx(Z1,{placeholder:nu(e.modelId)})}),_.jsxs(eb,{position:"popper",children:[e.catalog!==void 0&&_.jsx(x3,{catalog:e.catalog}),!l.has(c)&&_.jsx(oo,{value:c,children:nu(e.modelId)})]})]}),r!==void 0&&_.jsx("p",{className:"text-xs text-red-400",children:r})]})}function v3({...e}){return _.jsx(uS,{"data-slot":"dialog",...e})}function S3({...e}){return _.jsx(fS,{"data-slot":"dialog-trigger",...e})}function vK({...e}){return _.jsx(hS,{"data-slot":"dialog-portal",...e})}function SK({...e}){return _.jsx(ed,{"data-slot":"dialog-close",...e})}function AK({className:e,...t}){return _.jsx(mS,{"data-slot":"dialog-overlay",className:we("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:animate-in data-[state=open]:fade-in-0",e),...t})}function A3({className:e,children:t,showCloseButton:n=!0,...r}){return _.jsxs(vK,{"data-slot":"dialog-portal",children:[_.jsx(AK,{}),_.jsxs(pS,{"data-slot":"dialog-content",className:we("fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border bg-background p-6 shadow-lg duration-200 outline-none data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg",e),...r,children:[t,n&&_.jsxs(ed,{"data-slot":"dialog-close",className:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[_.jsx(cg,{}),_.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function C3({className:e,...t}){return _.jsx("div",{"data-slot":"dialog-header",className:we("flex flex-col gap-2 text-center sm:text-left",e),...t})}function w3({className:e,showCloseButton:t=!1,children:n,...r}){return _.jsxs("div",{"data-slot":"dialog-footer",className:we("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...r,children:[n,t&&_.jsx(ed,{asChild:!0,children:_.jsx(ln,{variant:"outline",children:"Close"})})]})}function k3({className:e,...t}){return _.jsx(ES,{"data-slot":"dialog-title",className:we("text-lg leading-none font-semibold",e),...t})}function N3({className:e,...t}){return _.jsx(_S,{"data-slot":"dialog-description",className:we("text-sm text-muted-foreground",e),...t})}function CK(e){const[t,n]=v.useState(!1),[r,i]=v.useState(!1),[o,l]=v.useState(void 0),c=h=>{n(h),h||l(void 0)},f=()=>{i(!0),l(void 0),e.onReset().then(()=>{n(!1)}).catch(h=>{l(h instanceof Error?h.message:"The conversation could not be reset.")}).finally(()=>{i(!1)})};return _.jsxs(v3,{onOpenChange:c,open:t,children:[_.jsx(S3,{asChild:!0,children:_.jsxs(ln,{className:"w-full justify-center gap-2",disabled:e.disabled,size:"sm",variant:"outline",children:[_.jsx(KL,{className:"size-3.5"}),"Reset conversation"]})}),_.jsxs(A3,{className:"sm:max-w-sm",children:[_.jsxs(C3,{children:[_.jsx(k3,{children:"Reset this conversation?"}),_.jsx(N3,{children:"All messages in this session will be cleared. The session itself, its working directory, and its model settings are kept."})]}),o!==void 0&&_.jsx("p",{className:"text-sm text-red-400",children:o}),_.jsxs(w3,{children:[_.jsx(SK,{asChild:!0,children:_.jsx(ln,{disabled:r,size:"sm",variant:"ghost",children:"Cancel"})}),_.jsx(ln,{disabled:r,onClick:f,size:"sm",variant:"destructive",children:r?"Resetting…":"Reset conversation"})]})]})]})}const wK={aborted:"bg-amber-400",completed:"bg-zinc-400",error:"bg-red-400",idle:"bg-zinc-500",queued:"bg-emerald-400/70 animate-pulse",running:"bg-emerald-400 animate-pulse"};function R3(e){return wK[e]}function O3(e){switch(e){case"aborted":return"Stopped";case"completed":return"Complete";case"error":return"Needs attention";case"idle":return"Idle";case"queued":return"Queued";case"running":return"Running"}}function kK(e){return _.jsxs(Jk,{variant:"outline",className:"gap-1.5 border-border/80 text-muted-foreground",children:[_.jsx("span",{"aria-hidden":!0,className:we("size-1.5 rounded-full",R3(e.status))}),O3(e.status)]})}function L3(e){return _.jsx("span",{"aria-hidden":"true",className:we("inline-block size-1.5 shrink-0 rounded-full",R3(e.status),e.className)})}function NK(e){return e.subagents.length===0?null:_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsxs("div",{className:"flex items-center gap-1.5 text-muted-foreground",children:[_.jsx(B2,{className:"size-3.5"}),_.jsx("h3",{className:"text-xs font-medium uppercase tracking-wide",children:"Delegated work"})]}),_.jsx("div",{className:"overflow-hidden rounded-md border border-border/60",children:e.subagents.map(t=>_.jsxs("button",{className:"group flex w-full items-center gap-2.5 border-border/60 border-b px-3 py-2.5 text-left outline-none transition-colors last:border-b-0 hover:bg-accent/50 focus-visible:bg-accent/50",onClick:()=>e.onOpenSubagent(t.id),type:"button",children:[_.jsx(L3,{status:t.status}),_.jsxs("span",{className:"min-w-0 flex-1",children:[_.jsx("span",{className:"block truncate text-xs font-medium text-foreground/90",children:t.description}),_.jsxs("span",{className:"block truncate text-[11px] text-muted-foreground",children:["Level ",t.depth," · ",nu(t.modelId)]})]}),_.jsx(D2,{className:"size-3.5 shrink-0 text-muted-foreground transition-transform group-hover:translate-x-0.5"})]},t.id))})]})}function C2(e){return new Date(e).toLocaleString()}function RK(e){const{catalog:t,session:n,summary:r}=e,i=n.agent.type==="subagent",o=t?.models.find(l=>l.id===n.modelId)??n.models.find(l=>l.id===n.modelId);return _.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[_.jsxs("div",{className:"flex flex-col gap-2",children:[_.jsx("h2",{className:"text-sm leading-snug font-medium break-words text-foreground",children:n.title!==void 0&&n.title!==""?n.title:"Untitled session"}),_.jsx(kK,{status:n.status}),i&&_.jsxs("p",{className:"text-xs text-muted-foreground",children:["Subagent history · Level ",n.agent.depth]})]}),_.jsx(sf,{className:"bg-border/60"}),_.jsx(Ii,{label:"Working directory",children:_.jsx("p",{className:"font-mono text-xs leading-relaxed break-all text-foreground/90",children:n.cwd})}),_.jsxs(Ii,{label:"Model",children:[_.jsx(TK,{catalog:t,disabled:n.modelLocked||i,modelId:n.modelId,onChangeModel:e.changeModel,providerId:n.providerId}),(n.modelLocked||i)&&_.jsx("p",{className:"text-xs text-muted-foreground",children:i?"The model cannot be changed for a completed subagent step.":"The model is locked for this session."})]}),_.jsx(Ii,{label:"Reasoning effort",children:_.jsx(xK,{disabled:i,effort:n.effort,levels:o?.thinkingLevels??[],onChangeEffort:e.changeEffort})}),_.jsx(sf,{className:"bg-border/60"}),_.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[_.jsx(Ii,{label:"Created",children:_.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?C2(r.createdAt):void 0,children:r!==void 0?og(r.createdAt):"Not available yet"})}),_.jsx(Ii,{label:"Last updated",children:_.jsx("p",{className:"text-xs text-foreground/90",title:r!==void 0?C2(r.updatedAt):void 0,children:r!==void 0?og(r.updatedAt):"Not available yet"})}),_.jsx(Ii,{label:"Messages",children:_.jsx("p",{className:"text-xs text-foreground/90",children:e.messageCount})}),_.jsx(Ii,{label:"Tool calls",children:_.jsx("p",{className:"text-xs text-foreground/90",children:e.toolCallCount})})]}),_.jsx(sf,{className:"bg-border/60"}),e.subagents.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(NK,{onOpenSubagent:e.onOpenSubagent,subagents:e.subagents}),_.jsx(sf,{className:"bg-border/60"})]}),i?_.jsx("p",{className:"text-xs leading-relaxed text-muted-foreground",children:"This subagent history is read-only and cannot be resumed or reset."}):_.jsx(CK,{disabled:e.isRunning,onReset:e.reset})]})}function of(e){return _.jsx("aside",{className:"flex h-full w-[340px] shrink-0 flex-col border-l border-border/60 bg-background",children:e.children})}function w2(e){return _.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 p-6 text-center",children:[e.icon,_.jsx("p",{className:"text-xs text-muted-foreground",children:e.text})]})}function OK(e){const{activeSession:t}=e,{isRunning:n,messages:r,session:i,streamingPartial:o}=t,l=v.useMemo(()=>gK(r,o,n),[n,r,o]),c=v.useMemo(()=>r.filter(f=>f.role!=="system").length,[r]);return e.sessionId===void 0?_.jsx(of,{children:_.jsx(w2,{icon:_.jsx(qL,{className:"size-5 text-muted-foreground/50"}),text:"Select a session to inspect its details and activity."})}):t.loadError!==void 0?_.jsx(of,{children:_.jsx(w2,{icon:_.jsx(i0,{className:"size-5 text-red-400"}),text:t.loadError})}):t.isLoading||i===void 0?_.jsx(of,{children:_.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[_.jsx(Ka,{className:"h-8 w-full"}),_.jsx(Ka,{className:"h-4 w-2/3"}),_.jsx(Ka,{className:"h-4 w-1/2"}),_.jsx(Ka,{className:"h-8 w-full"}),_.jsx(Ka,{className:"h-8 w-full"})]})}):_.jsx(of,{children:_.jsxs(lK,{className:"flex h-full min-h-0 flex-col gap-0",defaultValue:"details",children:[_.jsx("div",{className:"shrink-0 border-b border-border/60 p-2",children:_.jsxs(cK,{className:"grid w-full grid-cols-2",children:[_.jsx(S2,{value:"details",children:"Details"}),_.jsx(S2,{value:"activity",children:l.length>0?`Activity (${l.length})`:"Activity"})]})}),_.jsx(A2,{className:"min-h-0 flex-1 overflow-y-auto",value:"details",children:_.jsx(RK,{catalog:e.catalog,changeEffort:t.changeEffort,changeModel:t.changeModel,isRunning:t.isRunning,messageCount:c,onOpenSubagent:e.onOpenSubagent,reset:t.reset,session:i,subagents:t.subagents,summary:e.summary,toolCallCount:l.length})}),_.jsx(A2,{className:"min-h-0 flex-1 overflow-y-auto",value:"activity",children:_.jsx(pK,{entries:l})})]},e.sessionId)})}function LK(e){return e.healthError!==void 0?{dotClass:"bg-red-400",label:"Daemon unreachable"}:e.health?.ready===!0?{dotClass:"bg-emerald-400",label:"Daemon ready"}:e.health?.status==="error"?{dotClass:"bg-red-400",label:e.health.errorMessage??"Daemon failed to start"}:{dotClass:"bg-amber-400 animate-pulse",label:"Daemon starting…"}}function IK(e){const t=LK(e);return _.jsxs("div",{className:"flex items-center gap-2 border-t border-border/60 px-4 py-3",children:[_.jsx("span",{"aria-hidden":"true",className:we("size-1.5 shrink-0 rounded-full",t.dotClass)}),_.jsx("span",{className:"min-w-0 truncate text-xs text-muted-foreground",title:e.healthError??e.health?.errorMessage,children:t.label})]})}function DK({className:e,type:t,...n}){return _.jsx("input",{type:t,"data-slot":"input",className:we("h-9 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",e),...n})}function MK(e){const{catalog:t,defaultCwd:n,onSessionCreated:r,refreshSessions:i}=e,[o,l]=v.useState(!1),[c,f]=v.useState(""),[h,p]=v.useState(""),[m,y]=v.useState(!1),[E,T]=v.useState(void 0),S=v.useCallback(k=>{l(k),k&&(f(n??""),p(t===void 0?"":ru(t.defaultProviderId,t.defaultModelId)),T(void 0),y(!1))},[t,n]),C=v.useCallback(async()=>{const k=c.trim();if(!(k.length===0||m)){y(!0),T(void 0);try{const N=T3(h),P=await zW({cwd:k,...N!==void 0?{modelId:N.modelId,providerId:N.providerId}:{}});l(!1),i(),r(P.session)}catch(N){T(N instanceof Error?N.message:"Could not create the session."),y(!1)}}},[c,m,h,r,i]),w=c.trim().length>0&&!m;return _.jsxs(v3,{open:o,onOpenChange:S,children:[_.jsx(S3,{asChild:!0,children:_.jsxs(ln,{variant:"ghost",size:"icon",className:"size-7 text-muted-foreground hover:text-foreground",disabled:!e.daemonReady,title:"New session",children:[_.jsx(QL,{className:"size-4"}),_.jsx("span",{className:"sr-only",children:"New session"})]})}),_.jsx(A3,{className:"sm:max-w-md",children:_.jsxs("form",{className:"contents",onSubmit:k=>{k.preventDefault(),C()},children:[_.jsxs(C3,{children:[_.jsx(k3,{children:"New session"}),_.jsx(N3,{children:"Start a fresh agent conversation in a working directory."})]}),_.jsxs("div",{className:"flex flex-col gap-4",children:[_.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("label",{htmlFor:"new-session-cwd",className:"text-xs font-medium text-muted-foreground",children:"Working directory"}),_.jsx(DK,{id:"new-session-cwd",value:c,onChange:k=>f(k.target.value),placeholder:"/path/to/project",autoFocus:!0,spellCheck:!1,autoComplete:"off",className:"font-mono text-[13px]"})]}),_.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("label",{htmlFor:"new-session-model",className:"text-xs font-medium text-muted-foreground",children:"Model"}),_.jsxs(K1,{...h!==""?{value:h}:{},onValueChange:p,children:[_.jsx(J1,{id:"new-session-model",className:"w-full",children:_.jsx(Z1,{placeholder:"Choose a model"})}),_.jsx(eb,{children:t!==void 0&&_.jsx(x3,{catalog:t})})]})]}),E!==void 0&&_.jsx("p",{className:"text-[13px] leading-5 text-destructive",children:E})]}),_.jsxs(w3,{children:[_.jsx(ln,{type:"button",variant:"ghost",onClick:()=>l(!1),disabled:m,children:"Cancel"}),_.jsx(ln,{type:"submit",disabled:!w,children:m?"Creating…":"Create session"})]})]})})]})}function PK(e){const{session:t}=e,n=t.title??"Untitled session";return _.jsxs("button",{type:"button",onClick:e.onSelect,title:`${n} — ${O3(t.status)}`,className:we("w-full rounded-lg px-2.5 py-2 text-left transition-colors outline-none","focus-visible:ring-2 focus-visible:ring-ring/60",e.isActive?"bg-accent text-accent-foreground":"text-foreground/90 hover:bg-accent/50"),children:[_.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[_.jsx("span",{className:"min-w-0 truncate text-[13px] leading-5 font-medium",children:n}),_.jsx("span",{className:"shrink-0 text-[11px] leading-5 text-muted-foreground",children:og(t.lastMessageAt??t.updatedAt)})]}),_.jsxs("div",{className:"mt-0.5 flex items-center gap-1.5",children:[_.jsx(L3,{status:t.status}),_.jsx("span",{className:"min-w-0 truncate text-[11px] leading-4 text-muted-foreground",children:nu(t.modelId)})]})]})}function BK(e){return e.isLoading?_.jsxs("div",{className:"flex flex-col gap-2 p-2",children:[_.jsx(Ka,{className:"h-10 w-full"}),_.jsx(Ka,{className:"h-10 w-full"}),_.jsx(Ka,{className:"h-10 w-full"})]}):e.listError!==void 0?_.jsx("div",{className:"px-4 py-10 text-center",children:_.jsx("p",{className:"text-xs text-red-400",children:"The session list could not be loaded."})}):_.jsxs("div",{className:"flex flex-col items-center gap-2 px-4 py-10 text-center",children:[_.jsx(j2,{className:"size-5 text-muted-foreground/60"}),_.jsx("p",{className:"text-xs text-muted-foreground",children:"No sessions yet. Create one to start chatting."})]})}function jK(e){return _.jsxs("aside",{className:"flex w-72 shrink-0 flex-col border-r border-border/60 bg-background",children:[_.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b border-border/60 pr-2 pl-4",children:[_.jsx("span",{className:"text-[13px] font-semibold tracking-tight",children:"Rig"}),_.jsx(MK,{catalog:e.health?.catalog,daemonReady:e.health?.ready===!0&&e.healthError===void 0,defaultCwd:e.sessions[0]?.cwd,onSessionCreated:e.onSessionCreated,refreshSessions:e.refreshSessions})]}),_.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:e.sessions.length===0?_.jsx(BK,{isLoading:e.isLoadingSessions,listError:e.sessionListError}):_.jsx("ul",{className:"flex flex-col gap-0.5",children:e.sessions.map(t=>_.jsx("li",{children:_.jsx(PK,{session:t,isActive:t.id===e.activeSessionId,onSelect:()=>e.onSelectSession(t.id)})},t.id))})}),_.jsx(IK,{health:e.health,healthError:e.healthError})]})}function UK(e,t){const n=e.findIndex(r=>r.id===t.id);return n<0?[...e,t].sort((r,i)=>r.createdAt-i.createdAt):e.map((r,i)=>i===n?t:r)}const Ef={isAborting:!1,isLoading:!1,loadError:void 0,messages:[],optimistic:[],runError:void 0,session:void 0,streamError:void 0,streamingPartial:void 0,subagents:[],submittedRunIds:[]};function k2(e,t){return e.some(n=>n.id===t.id)?e:[...e,t]}function N2(e){return e.blocks.filter(t=>t.type==="text").map(t=>t.text).join(`
|
|
341
|
+
`)}function HK(e,t,n){const r=e.filter(l=>l.runId!==t);if(r.length!==e.length)return r;const i=N2(n),o=r.findIndex(l=>l.runId===void 0&&N2(l.message)===i);return o===-1?r:r.filter((l,c)=>c!==o)}function zK(e,t){switch(t.type){case"session_created":return{...e,session:t.data.session};case"message_submitted":return{...e,messages:k2(e.messages,t.data.message),optimistic:HK(e.optimistic,t.data.runId,t.data.message),submittedRunIds:[...e.submittedRunIds,t.data.runId]};case"run_started":return{...e,isAborting:!1,runError:void 0,session:e.session!==void 0?{...e.session,status:"running"}:void 0};case"agent_event":{const n=t.data.event;return n.type==="inference_iteration_start"?e:"partial"in n?{...e,streamingPartial:n.partial}:e}case"agent_message":return{...e,messages:k2(e.messages,t.data.message),streamingPartial:void 0};case"run_finished":return{...e,isAborting:!1,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:t.data.stopReason==="aborted"?"aborted":"completed"}:void 0};case"run_error":return e.isAborting?{...e,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"aborted"}:void 0}:{...e,isAborting:!1,runError:t.data.errorMessage,streamingPartial:void 0,session:e.session!==void 0?{...e.session,status:"error"}:void 0};case"abort_requested":return{...e,isAborting:!0};case"session_reset":return{...e,messages:t.data.snapshot.messages,optimistic:[],runError:void 0,streamingPartial:void 0,session:e.session!==void 0?{...e.session,snapshot:t.data.snapshot}:void 0};case"session_title_changed":{if(e.session===void 0)return e;const n={...e.session,titleStatus:t.data.status};return t.data.title!==void 0&&(n.title=t.data.title),t.data.errorMessage!==void 0&&(n.titleError=t.data.errorMessage),{...e,session:n}}case"model_changed":case"effort_changed":{if(e.session===void 0)return e;const n={...e.session,modelId:t.data.modelId,snapshot:t.data.snapshot};return t.data.effort!==void 0?n.effort=t.data.effort:delete n.effort,{...e,session:n}}case"subagent_changed":return{...e,subagents:UK(e.subagents,t.data.subagent)}}}function FK(e,t){switch(t.type){case"reset_for_session":return{...Ef,isLoading:!0};case"session_loaded":return{...Ef,isLoading:!1,messages:t.session.snapshot.messages,session:t.session,subagents:t.subagents};case"load_failed":return{...Ef,isLoading:!1,loadError:t.errorMessage};case"server_event":return zK(e,t.event);case"stream_rejected":return{...e,streamError:t.errorMessage};case"optimistic_added":return e.session?.id!==t.sessionId?e:{...e,optimistic:[...e.optimistic,{localId:t.localId,message:t.message,runId:void 0}],runError:void 0};case"optimistic_run_assigned":return e.session?.id!==t.sessionId?e:e.submittedRunIds.includes(t.runId)?{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId)}:{...e,optimistic:e.optimistic.map(n=>n.localId===t.localId?{...n,runId:t.runId}:n)};case"optimistic_failed":return e.session?.id!==t.sessionId?e:{...e,optimistic:e.optimistic.filter(n=>n.localId!==t.localId),runError:t.errorMessage};case"session_replaced":return{...e,messages:t.session.snapshot.messages,optimistic:[],runError:void 0,session:t.session,streamingPartial:void 0};case"session_updated":return{...e,session:t.session}}}function R2(e,t){return e instanceof Error?e.message:t}function $K(e){const[t,n]=v.useReducer(FK,Ef);v.useEffect(()=>{if(e===void 0){n({type:"reset_for_session"});return}const p=new AbortController;return n({type:"reset_for_session"}),(async()=>{let y;try{const[E,T]=await Promise.all([T2(e),x2(e)]);y=E.session,p.signal.aborted||n({type:"session_loaded",session:y,subagents:T.subagents})}catch(E){p.signal.aborted||n({type:"load_failed",errorMessage:R2(E,"The session could not be loaded.")});return}p.signal.aborted||await QW(e,y.lastEventId,E=>{n({type:"server_event",event:E})},p.signal,{onCursorInvalid:async()=>{const[E,T]=await Promise.all([T2(e),x2(e)]);if(!p.signal.aborted)return n({type:"session_loaded",session:E.session,subagents:T.subagents}),E.session.lastEventId},onStreamRejected:E=>{n({type:"stream_rejected",errorMessage:`The daemon rejected the event stream (HTTP ${E}).`})}})})(),()=>{p.abort()}},[e]);const r=v.useCallback(async(p,m)=>{if(e===void 0||t.session?.agent.type==="subagent")return!1;const y=`optimistic-${crypto.randomUUID()}`,E=[...m??[],...p!==""?[{type:"text",text:p}]:[]];n({type:"optimistic_added",localId:y,message:{role:"user",id:y,blocks:E},sessionId:e});try{const S=await FW(e,m!==void 0&&m.length>0?{text:p,content:E}:{text:p});return n({type:"optimistic_run_assigned",localId:y,runId:S.runId,sessionId:e}),!0}catch(S){return n({type:"optimistic_failed",localId:y,errorMessage:R2(S,"The message could not be sent."),sessionId:e}),!1}},[e,t.session?.agent.type]),i=v.useCallback(async()=>{e!==void 0&&await $W(e)},[e]),o=v.useCallback(async()=>{if(e===void 0)return;const p=await VW(e);n({type:"session_replaced",session:p.session})},[e]),l=v.useCallback(async(p,m,y)=>{if(e===void 0)return;const E=await GW(e,y!==void 0?{modelId:m,providerId:p,effort:y}:{modelId:m,providerId:p});n({type:"session_updated",session:E.session})},[e]),c=v.useCallback(async p=>{if(e===void 0)return;const m=await qW(e,p!==void 0?{effort:p}:{});n({type:"session_updated",session:m.session})},[e]),f=v.useMemo(()=>t.optimistic.length===0?t.messages:[...t.messages,...t.optimistic.map(p=>p.message)],[t.messages,t.optimistic]),h=t.session!==void 0&&(t.session.status==="running"||t.session.status==="queued");return{abort:i,changeEffort:c,changeModel:l,isAborting:t.isAborting,isLoading:t.isLoading,isRunning:h,loadError:t.loadError,messages:f,reset:o,runError:t.runError,session:t.session,streamError:t.streamError,streamingPartial:t.streamingPartial,subagents:t.subagents,submit:r}}const VK=5e3;function GK(){const[e,t]=v.useState(void 0),[n,r]=v.useState(void 0);return v.useEffect(()=>{let i=!1;const o=async()=>{try{const c=await jW();i||(t(c),r(void 0))}catch(c){i||r(c instanceof Error?c.message:"The daemon could not be reached.")}};o();const l=window.setInterval(()=>{o()},VK);return()=>{i=!0,window.clearInterval(l)}},[]),{error:n,health:e}}const qK=5e3;function YK(){const[e,t]=v.useState([]),[n,r]=v.useState(void 0),[i,o]=v.useState(!0),[l,c]=v.useState(0),f=v.useCallback(()=>{c(h=>h+1)},[]);return v.useEffect(()=>{let h=!1;const p=async()=>{try{const y=await UW();h||(t(y.sessions),r(void 0))}catch(y){h||r(y instanceof Error?y.message:"The session list could not be loaded.")}finally{h||o(!1)}};p();const m=window.setInterval(()=>{p()},qK);return()=>{h=!0,window.clearInterval(m)}},[l]),{error:n,isLoading:i,refresh:f,sessions:e}}function XK(){const[e,t]=v.useState([]),n=e.at(-1),r=e.at(0),{health:i,error:o}=GK(),l=YK(),c=$K(n),{refresh:f}=l,h=v.useCallback(C=>{t([C.id]),f()},[f]),p=v.useCallback(C=>{t([C])},[]),m=v.useCallback(C=>{t(w=>w.at(-1)===C?w:[...w,C])},[]),y=v.useCallback(()=>{t(C=>C.length>1?C.slice(0,-1):C)},[]),E=c.session?.title,T=c.session?.status;v.useEffect(()=>{f()},[E,T,f]);const S=l.sessions.find(C=>C.id===n);return _.jsxs("div",{className:"flex h-screen min-w-[1100px] bg-background text-foreground",children:[_.jsx(jK,{activeSessionId:r,health:i,healthError:o,isLoadingSessions:l.isLoading,onSelectSession:p,onSessionCreated:h,refreshSessions:f,sessionListError:l.error,sessions:l.sessions}),_.jsx(oK,{activeSession:c,daemonReady:i?.ready===!0&&o===void 0,historyDepth:Math.max(0,e.length-1),onBackToParent:y,onOpenSubagent:m,sessionId:n}),_.jsx(OK,{activeSession:c,catalog:i?.catalog,onOpenSubagent:m,sessionId:n,summary:S})]})}rL.createRoot(document.getElementById("root")).render(_.jsx(v.StrictMode,{children:_.jsx(XK,{})}));const QK=Object.freeze(Object.defineProperty({__proto__:null,Mermaid:Kk},Symbol.toStringTag,{value:"Module"}));export{K$ as A,tZ as L,Vn as R,_ as j,v as r};
|