@amodalai/runtime-app 0.1.10 → 0.1.12

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.
@@ -0,0 +1,343 @@
1
+ var oE=Object.defineProperty;var Mv=n=>{throw TypeError(n)};var aE=(n,e,t)=>e in n?oE(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var Yc=(n,e,t)=>aE(n,typeof e!="symbol"?e+"":e,t),Bg=(n,e,t)=>e.has(n)||Mv("Cannot "+t);var I=(n,e,t)=>(Bg(n,e,"read from private field"),t?t.call(n):e.get(n)),Ie=(n,e,t)=>e.has(n)?Mv("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,t),Oe=(n,e,t,r)=>(Bg(n,e,"write to private field"),r?r.call(n,t):e.set(n,t),t),Ee=(n,e,t)=>(Bg(n,e,"access private method"),t);var $d=(n,e,t,r)=>({set _(i){Oe(n,e,i,t)},get _(){return I(n,e,r)}});function Kb(n,e){for(var t=0;t<e.length;t++){const r=e[t];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in n)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(n,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=t(i);fetch(i.href,s)}})();function af(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function lE(n){if(Object.prototype.hasOwnProperty.call(n,"__esModule"))return n;var e=n.default;if(typeof e=="function"){var t=function r(){return this instanceof r?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(r){var i=Object.getOwnPropertyDescriptor(n,r);Object.defineProperty(t,r,i.get?i:{enumerable:!0,get:function(){return n[r]}})}),t}var Yg={exports:{}},Uc={},Ug={exports:{}},kt={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var jv;function uE(){if(jv)return kt;jv=1;var n=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;function m(U){return U===null||typeof U!="object"?null:(U=p&&U[p]||U["@@iterator"],typeof U=="function"?U:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,w={};function C(U,ue,L){this.props=U,this.context=ue,this.refs=w,this.updater=L||g}C.prototype.isReactComponent={},C.prototype.setState=function(U,ue){if(typeof U!="object"&&typeof U!="function"&&U!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,U,ue,"setState")},C.prototype.forceUpdate=function(U){this.updater.enqueueForceUpdate(this,U,"forceUpdate")};function Q(){}Q.prototype=C.prototype;function $(U,ue,L){this.props=U,this.context=ue,this.refs=w,this.updater=L||g}var E=$.prototype=new Q;E.constructor=$,k(E,C.prototype),E.isPureReactComponent=!0;var Z=Array.isArray,Y=Object.prototype.hasOwnProperty,_={current:null},R={key:!0,ref:!0,__self:!0,__source:!0};function q(U,ue,L){var Re,_e={},$e=null,rt=null;if(ue!=null)for(Re in ue.ref!==void 0&&(rt=ue.ref),ue.key!==void 0&&($e=""+ue.key),ue)Y.call(ue,Re)&&!R.hasOwnProperty(Re)&&(_e[Re]=ue[Re]);var st=arguments.length-2;if(st===1)_e.children=L;else if(1<st){for(var mt=Array(st),Xt=0;Xt<st;Xt++)mt[Xt]=arguments[Xt+2];_e.children=mt}if(U&&U.defaultProps)for(Re in st=U.defaultProps,st)_e[Re]===void 0&&(_e[Re]=st[Re]);return{$$typeof:n,type:U,key:$e,ref:rt,props:_e,_owner:_.current}}function G(U,ue){return{$$typeof:n,type:U.type,key:ue,ref:U.ref,props:U.props,_owner:U._owner}}function W(U){return typeof U=="object"&&U!==null&&U.$$typeof===n}function z(U){var ue={"=":"=0",":":"=2"};return"$"+U.replace(/[=:]/g,function(L){return ue[L]})}var D=/\/+/g;function se(U,ue){return typeof U=="object"&&U!==null&&U.key!=null?z(""+U.key):ue.toString(36)}function oe(U,ue,L,Re,_e){var $e=typeof U;($e==="undefined"||$e==="boolean")&&(U=null);var rt=!1;if(U===null)rt=!0;else switch($e){case"string":case"number":rt=!0;break;case"object":switch(U.$$typeof){case n:case e:rt=!0}}if(rt)return rt=U,_e=_e(rt),U=Re===""?"."+se(rt,0):Re,Z(_e)?(L="",U!=null&&(L=U.replace(D,"$&/")+"/"),oe(_e,ue,L,"",function(Xt){return Xt})):_e!=null&&(W(_e)&&(_e=G(_e,L+(!_e.key||rt&&rt.key===_e.key?"":(""+_e.key).replace(D,"$&/")+"/")+U)),ue.push(_e)),1;if(rt=0,Re=Re===""?".":Re+":",Z(U))for(var st=0;st<U.length;st++){$e=U[st];var mt=Re+se($e,st);rt+=oe($e,ue,L,mt,_e)}else if(mt=m(U),typeof mt=="function")for(U=mt.call(U),st=0;!($e=U.next()).done;)$e=$e.value,mt=Re+se($e,st++),rt+=oe($e,ue,L,mt,_e);else if($e==="object")throw ue=String(U),Error("Objects are not valid as a React child (found: "+(ue==="[object Object]"?"object with keys {"+Object.keys(U).join(", ")+"}":ue)+"). If you meant to render a collection of children, use an array instead.");return rt}function ne(U,ue,L){if(U==null)return U;var Re=[],_e=0;return oe(U,Re,"","",function($e){return ue.call(L,$e,_e++)}),Re}function de(U){if(U._status===-1){var ue=U._result;ue=ue(),ue.then(function(L){(U._status===0||U._status===-1)&&(U._status=1,U._result=L)},function(L){(U._status===0||U._status===-1)&&(U._status=2,U._result=L)}),U._status===-1&&(U._status=0,U._result=ue)}if(U._status===1)return U._result.default;throw U._result}var ke={current:null},he={transition:null},ye={ReactCurrentDispatcher:ke,ReactCurrentBatchConfig:he,ReactCurrentOwner:_};function N(){throw Error("act(...) is not supported in production builds of React.")}return kt.Children={map:ne,forEach:function(U,ue,L){ne(U,function(){ue.apply(this,arguments)},L)},count:function(U){var ue=0;return ne(U,function(){ue++}),ue},toArray:function(U){return ne(U,function(ue){return ue})||[]},only:function(U){if(!W(U))throw Error("React.Children.only expected to receive a single React element child.");return U}},kt.Component=C,kt.Fragment=t,kt.Profiler=i,kt.PureComponent=$,kt.StrictMode=r,kt.Suspense=c,kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ye,kt.act=N,kt.cloneElement=function(U,ue,L){if(U==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+U+".");var Re=k({},U.props),_e=U.key,$e=U.ref,rt=U._owner;if(ue!=null){if(ue.ref!==void 0&&($e=ue.ref,rt=_.current),ue.key!==void 0&&(_e=""+ue.key),U.type&&U.type.defaultProps)var st=U.type.defaultProps;for(mt in ue)Y.call(ue,mt)&&!R.hasOwnProperty(mt)&&(Re[mt]=ue[mt]===void 0&&st!==void 0?st[mt]:ue[mt])}var mt=arguments.length-2;if(mt===1)Re.children=L;else if(1<mt){st=Array(mt);for(var Xt=0;Xt<mt;Xt++)st[Xt]=arguments[Xt+2];Re.children=st}return{$$typeof:n,type:U.type,key:_e,ref:$e,props:Re,_owner:rt}},kt.createContext=function(U){return U={$$typeof:o,_currentValue:U,_currentValue2:U,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},U.Provider={$$typeof:s,_context:U},U.Consumer=U},kt.createElement=q,kt.createFactory=function(U){var ue=q.bind(null,U);return ue.type=U,ue},kt.createRef=function(){return{current:null}},kt.forwardRef=function(U){return{$$typeof:l,render:U}},kt.isValidElement=W,kt.lazy=function(U){return{$$typeof:f,_payload:{_status:-1,_result:U},_init:de}},kt.memo=function(U,ue){return{$$typeof:h,type:U,compare:ue===void 0?null:ue}},kt.startTransition=function(U){var ue=he.transition;he.transition={};try{U()}finally{he.transition=ue}},kt.unstable_act=N,kt.useCallback=function(U,ue){return ke.current.useCallback(U,ue)},kt.useContext=function(U){return ke.current.useContext(U)},kt.useDebugValue=function(){},kt.useDeferredValue=function(U){return ke.current.useDeferredValue(U)},kt.useEffect=function(U,ue){return ke.current.useEffect(U,ue)},kt.useId=function(){return ke.current.useId()},kt.useImperativeHandle=function(U,ue,L){return ke.current.useImperativeHandle(U,ue,L)},kt.useInsertionEffect=function(U,ue){return ke.current.useInsertionEffect(U,ue)},kt.useLayoutEffect=function(U,ue){return ke.current.useLayoutEffect(U,ue)},kt.useMemo=function(U,ue){return ke.current.useMemo(U,ue)},kt.useReducer=function(U,ue,L){return ke.current.useReducer(U,ue,L)},kt.useRef=function(U){return ke.current.useRef(U)},kt.useState=function(U){return ke.current.useState(U)},kt.useSyncExternalStore=function(U,ue,L){return ke.current.useSyncExternalStore(U,ue,L)},kt.useTransition=function(){return ke.current.useTransition()},kt.version="18.3.1",kt}var Rv;function $y(){return Rv||(Rv=1,Ug.exports=uE()),Ug.exports}/**
10
+ * @license React
11
+ * react-jsx-runtime.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Nv;function cE(){if(Nv)return Uc;Nv=1;var n=$y(),e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function o(l,c,h){var f,p={},m=null,g=null;h!==void 0&&(m=""+h),c.key!==void 0&&(m=""+c.key),c.ref!==void 0&&(g=c.ref);for(f in c)r.call(c,f)&&!s.hasOwnProperty(f)&&(p[f]=c[f]);if(l&&l.defaultProps)for(f in c=l.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:e,type:l,key:m,ref:g,props:p,_owner:i.current}}return Uc.Fragment=t,Uc.jsx=o,Uc.jsxs=o,Uc}var Av;function hE(){return Av||(Av=1,Yg.exports=cE()),Yg.exports}var x=hE(),V=$y();const Jb=af(V),fE=Kb({__proto__:null,default:Jb},[V]);var qg={exports:{}},Or={},Hg={exports:{}},Gg={};/**
18
+ * @license React
19
+ * scheduler.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var _v;function dE(){return _v||(_v=1,function(n){function e(he,ye){var N=he.length;he.push(ye);e:for(;0<N;){var U=N-1>>>1,ue=he[U];if(0<i(ue,ye))he[U]=ye,he[N]=ue,N=U;else break e}}function t(he){return he.length===0?null:he[0]}function r(he){if(he.length===0)return null;var ye=he[0],N=he.pop();if(N!==ye){he[0]=N;e:for(var U=0,ue=he.length,L=ue>>>1;U<L;){var Re=2*(U+1)-1,_e=he[Re],$e=Re+1,rt=he[$e];if(0>i(_e,N))$e<ue&&0>i(rt,_e)?(he[U]=rt,he[$e]=N,U=$e):(he[U]=_e,he[Re]=N,U=Re);else if($e<ue&&0>i(rt,N))he[U]=rt,he[$e]=N,U=$e;else break e}}return ye}function i(he,ye){var N=he.sortIndex-ye.sortIndex;return N!==0?N:he.id-ye.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();n.unstable_now=function(){return o.now()-l}}var c=[],h=[],f=1,p=null,m=3,g=!1,k=!1,w=!1,C=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function E(he){for(var ye=t(h);ye!==null;){if(ye.callback===null)r(h);else if(ye.startTime<=he)r(h),ye.sortIndex=ye.expirationTime,e(c,ye);else break;ye=t(h)}}function Z(he){if(w=!1,E(he),!k)if(t(c)!==null)k=!0,de(Y);else{var ye=t(h);ye!==null&&ke(Z,ye.startTime-he)}}function Y(he,ye){k=!1,w&&(w=!1,Q(q),q=-1),g=!0;var N=m;try{for(E(ye),p=t(c);p!==null&&(!(p.expirationTime>ye)||he&&!z());){var U=p.callback;if(typeof U=="function"){p.callback=null,m=p.priorityLevel;var ue=U(p.expirationTime<=ye);ye=n.unstable_now(),typeof ue=="function"?p.callback=ue:p===t(c)&&r(c),E(ye)}else r(c);p=t(c)}if(p!==null)var L=!0;else{var Re=t(h);Re!==null&&ke(Z,Re.startTime-ye),L=!1}return L}finally{p=null,m=N,g=!1}}var _=!1,R=null,q=-1,G=5,W=-1;function z(){return!(n.unstable_now()-W<G)}function D(){if(R!==null){var he=n.unstable_now();W=he;var ye=!0;try{ye=R(!0,he)}finally{ye?se():(_=!1,R=null)}}else _=!1}var se;if(typeof $=="function")se=function(){$(D)};else if(typeof MessageChannel<"u"){var oe=new MessageChannel,ne=oe.port2;oe.port1.onmessage=D,se=function(){ne.postMessage(null)}}else se=function(){C(D,0)};function de(he){R=he,_||(_=!0,se())}function ke(he,ye){q=C(function(){he(n.unstable_now())},ye)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(he){he.callback=null},n.unstable_continueExecution=function(){k||g||(k=!0,de(Y))},n.unstable_forceFrameRate=function(he){0>he||125<he?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<he?Math.floor(1e3/he):5},n.unstable_getCurrentPriorityLevel=function(){return m},n.unstable_getFirstCallbackNode=function(){return t(c)},n.unstable_next=function(he){switch(m){case 1:case 2:case 3:var ye=3;break;default:ye=m}var N=m;m=ye;try{return he()}finally{m=N}},n.unstable_pauseExecution=function(){},n.unstable_requestPaint=function(){},n.unstable_runWithPriority=function(he,ye){switch(he){case 1:case 2:case 3:case 4:case 5:break;default:he=3}var N=m;m=he;try{return ye()}finally{m=N}},n.unstable_scheduleCallback=function(he,ye,N){var U=n.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?U+N:U):N=U,he){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=N+ue,he={id:f++,callback:ye,priorityLevel:he,startTime:N,expirationTime:ue,sortIndex:-1},N>U?(he.sortIndex=N,e(h,he),t(c)===null&&he===t(h)&&(w?(Q(q),q=-1):w=!0,ke(Z,N-U))):(he.sortIndex=ue,e(c,he),k||g||(k=!0,de(Y))),he},n.unstable_shouldYield=z,n.unstable_wrapCallback=function(he){var ye=m;return function(){var N=m;m=ye;try{return he.apply(this,arguments)}finally{m=N}}}}(Gg)),Gg}var zv;function pE(){return zv||(zv=1,Hg.exports=dE()),Hg.exports}/**
26
+ * @license React
27
+ * react-dom.production.min.js
28
+ *
29
+ * Copyright (c) Facebook, Inc. and its affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Dv;function mE(){if(Dv)return Or;Dv=1;var n=$y(),e=pE();function t(a){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+a,d=1;d<arguments.length;d++)u+="&args[]="+encodeURIComponent(arguments[d]);return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(a,u){o(a,u),o(a+"Capture",u)}function o(a,u){for(i[a]=u,a=0;a<u.length;a++)r.add(u[a])}var l=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),c=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(a){return c.call(p,a)?!0:c.call(f,a)?!1:h.test(a)?p[a]=!0:(f[a]=!0,!1)}function g(a,u,d,y){if(d!==null&&d.type===0)return!1;switch(typeof u){case"function":case"symbol":return!0;case"boolean":return y?!1:d!==null?!d.acceptsBooleans:(a=a.toLowerCase().slice(0,5),a!=="data-"&&a!=="aria-");default:return!1}}function k(a,u,d,y){if(u===null||typeof u>"u"||g(a,u,d,y))return!0;if(y)return!1;if(d!==null)switch(d.type){case 3:return!u;case 4:return u===!1;case 5:return isNaN(u);case 6:return isNaN(u)||1>u}return!1}function w(a,u,d,y,v,b,M){this.acceptsBooleans=u===2||u===3||u===4,this.attributeName=y,this.attributeNamespace=v,this.mustUseProperty=d,this.propertyName=a,this.type=u,this.sanitizeURL=b,this.removeEmptyString=M}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){C[a]=new w(a,0,!1,a,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var u=a[0];C[u]=new w(u,1,!1,a[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(a){C[a]=new w(a,2,!1,a.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){C[a]=new w(a,2,!1,a,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){C[a]=new w(a,3,!1,a.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(a){C[a]=new w(a,3,!0,a,null,!1,!1)}),["capture","download"].forEach(function(a){C[a]=new w(a,4,!1,a,null,!1,!1)}),["cols","rows","size","span"].forEach(function(a){C[a]=new w(a,6,!1,a,null,!1,!1)}),["rowSpan","start"].forEach(function(a){C[a]=new w(a,5,!1,a.toLowerCase(),null,!1,!1)});var Q=/[\-:]([a-z])/g;function $(a){return a[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var u=a.replace(Q,$);C[u]=new w(u,1,!1,a,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var u=a.replace(Q,$);C[u]=new w(u,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(a){var u=a.replace(Q,$);C[u]=new w(u,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(a){C[a]=new w(a,1,!1,a.toLowerCase(),null,!1,!1)}),C.xlinkHref=new w("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(a){C[a]=new w(a,1,!1,a.toLowerCase(),null,!0,!0)});function E(a,u,d,y){var v=C.hasOwnProperty(u)?C[u]:null;(v!==null?v.type!==0:y||!(2<u.length)||u[0]!=="o"&&u[0]!=="O"||u[1]!=="n"&&u[1]!=="N")&&(k(u,d,v,y)&&(d=null),y||v===null?m(u)&&(d===null?a.removeAttribute(u):a.setAttribute(u,""+d)):v.mustUseProperty?a[v.propertyName]=d===null?v.type===3?!1:"":d:(u=v.attributeName,y=v.attributeNamespace,d===null?a.removeAttribute(u):(v=v.type,d=v===3||v===4&&d===!0?"":""+d,y?a.setAttributeNS(y,u,d):a.setAttribute(u,d))))}var Z=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),W=Symbol.for("react.provider"),z=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),se=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ne=Symbol.for("react.memo"),de=Symbol.for("react.lazy"),ke=Symbol.for("react.offscreen"),he=Symbol.iterator;function ye(a){return a===null||typeof a!="object"?null:(a=he&&a[he]||a["@@iterator"],typeof a=="function"?a:null)}var N=Object.assign,U;function ue(a){if(U===void 0)try{throw Error()}catch(d){var u=d.stack.trim().match(/\n( *(at )?)/);U=u&&u[1]||""}return`
34
+ `+U+a}var L=!1;function Re(a,u){if(!a||L)return"";L=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(u)if(u=function(){throw Error()},Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(le){var y=le}Reflect.construct(a,[],u)}else{try{u.call()}catch(le){y=le}a.call(u.prototype)}else{try{throw Error()}catch(le){y=le}a()}}catch(le){if(le&&y&&typeof le.stack=="string"){for(var v=le.stack.split(`
35
+ `),b=y.stack.split(`
36
+ `),M=v.length-1,X=b.length-1;1<=M&&0<=X&&v[M]!==b[X];)X--;for(;1<=M&&0<=X;M--,X--)if(v[M]!==b[X]){if(M!==1||X!==1)do if(M--,X--,0>X||v[M]!==b[X]){var H=`
37
+ `+v[M].replace(" at new "," at ");return a.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",a.displayName)),H}while(1<=M&&0<=X);break}}}finally{L=!1,Error.prepareStackTrace=d}return(a=a?a.displayName||a.name:"")?ue(a):""}function _e(a){switch(a.tag){case 5:return ue(a.type);case 16:return ue("Lazy");case 13:return ue("Suspense");case 19:return ue("SuspenseList");case 0:case 2:case 15:return a=Re(a.type,!1),a;case 11:return a=Re(a.type.render,!1),a;case 1:return a=Re(a.type,!0),a;default:return""}}function $e(a){if(a==null)return null;if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case R:return"Fragment";case _:return"Portal";case G:return"Profiler";case q:return"StrictMode";case se:return"Suspense";case oe:return"SuspenseList"}if(typeof a=="object")switch(a.$$typeof){case z:return(a.displayName||"Context")+".Consumer";case W:return(a._context.displayName||"Context")+".Provider";case D:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case ne:return u=a.displayName||null,u!==null?u:$e(a.type)||"Memo";case de:u=a._payload,a=a._init;try{return $e(a(u))}catch{}}return null}function rt(a){var u=a.type;switch(a.tag){case 24:return"Cache";case 9:return(u.displayName||"Context")+".Consumer";case 10:return(u._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return a=u.render,a=a.displayName||a.name||"",u.displayName||(a!==""?"ForwardRef("+a+")":"ForwardRef");case 7:return"Fragment";case 5:return u;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(u);case 8:return u===q?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u}return null}function st(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function mt(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function Xt(a){var u=mt(a)?"checked":"value",d=Object.getOwnPropertyDescriptor(a.constructor.prototype,u),y=""+a[u];if(!a.hasOwnProperty(u)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var v=d.get,b=d.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return v.call(this)},set:function(M){y=""+M,b.call(this,M)}}),Object.defineProperty(a,u,{enumerable:d.enumerable}),{getValue:function(){return y},setValue:function(M){y=""+M},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function Gn(a){a._valueTracker||(a._valueTracker=Xt(a))}function cn(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var d=u.getValue(),y="";return a&&(y=mt(a)?a.checked?"true":"false":a.value),a=y,a!==d?(u.setValue(a),!0):!1}function Nn(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}}function Zi(a,u){var d=u.checked;return N({},u,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:d??a._wrapperState.initialChecked})}function Tr(a,u){var d=u.defaultValue==null?"":u.defaultValue,y=u.checked!=null?u.checked:u.defaultChecked;d=st(u.value!=null?u.value:d),a._wrapperState={initialChecked:y,initialValue:d,controlled:u.type==="checkbox"||u.type==="radio"?u.checked!=null:u.value!=null}}function Kn(a,u){u=u.checked,u!=null&&E(a,"checked",u,!1)}function Yr(a,u){Kn(a,u);var d=st(u.value),y=u.type;if(d!=null)y==="number"?(d===0&&a.value===""||a.value!=d)&&(a.value=""+d):a.value!==""+d&&(a.value=""+d);else if(y==="submit"||y==="reset"){a.removeAttribute("value");return}u.hasOwnProperty("value")?$r(a,u.type,d):u.hasOwnProperty("defaultValue")&&$r(a,u.type,st(u.defaultValue)),u.checked==null&&u.defaultChecked!=null&&(a.defaultChecked=!!u.defaultChecked)}function Ss(a,u,d){if(u.hasOwnProperty("value")||u.hasOwnProperty("defaultValue")){var y=u.type;if(!(y!=="submit"&&y!=="reset"||u.value!==void 0&&u.value!==null))return;u=""+a._wrapperState.initialValue,d||u===a.value||(a.value=u),a.defaultValue=u}d=a.name,d!==""&&(a.name=""),a.defaultChecked=!!a._wrapperState.initialChecked,d!==""&&(a.name=d)}function $r(a,u,d){(u!=="number"||Nn(a.ownerDocument)!==a)&&(d==null?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+d&&(a.defaultValue=""+d))}var Ur=Array.isArray;function qr(a,u,d,y){if(a=a.options,u){u={};for(var v=0;v<d.length;v++)u["$"+d[v]]=!0;for(d=0;d<a.length;d++)v=u.hasOwnProperty("$"+a[d].value),a[d].selected!==v&&(a[d].selected=v),v&&y&&(a[d].defaultSelected=!0)}else{for(d=""+st(d),u=null,v=0;v<a.length;v++){if(a[v].value===d){a[v].selected=!0,y&&(a[v].defaultSelected=!0);return}u!==null||a[v].disabled||(u=a[v])}u!==null&&(u.selected=!0)}}function bs(a,u){if(u.dangerouslySetInnerHTML!=null)throw Error(t(91));return N({},u,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function io(a,u){var d=u.value;if(d==null){if(d=u.children,u=u.defaultValue,d!=null){if(u!=null)throw Error(t(92));if(Ur(d)){if(1<d.length)throw Error(t(93));d=d[0]}u=d}u==null&&(u=""),d=u}a._wrapperState={initialValue:st(d)}}function cr(a,u){var d=st(u.value),y=st(u.defaultValue);d!=null&&(d=""+d,d!==a.value&&(a.value=d),u.defaultValue==null&&a.defaultValue!==d&&(a.defaultValue=d)),y!=null&&(a.defaultValue=""+y)}function Jn(a){var u=a.textContent;u===a._wrapperState.initialValue&&u!==""&&u!==null&&(a.value=u)}function fe(a){switch(a){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Pe(a,u){return a==null||a==="http://www.w3.org/1999/xhtml"?fe(u):a==="http://www.w3.org/2000/svg"&&u==="foreignObject"?"http://www.w3.org/1999/xhtml":a}var Fe,nt=function(a){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(u,d,y,v){MSApp.execUnsafeLocalFunction(function(){return a(u,d,y,v)})}:a}(function(a,u){if(a.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in a)a.innerHTML=u;else{for(Fe=Fe||document.createElement("div"),Fe.innerHTML="<svg>"+u.valueOf().toString()+"</svg>",u=Fe.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;u.firstChild;)a.appendChild(u.firstChild)}});function yt(a,u){if(u){var d=a.firstChild;if(d&&d===a.lastChild&&d.nodeType===3){d.nodeValue=u;return}}a.textContent=u}var Ke={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},er=["Webkit","ms","Moz","O"];Object.keys(Ke).forEach(function(a){er.forEach(function(u){u=u+a.charAt(0).toUpperCase()+a.substring(1),Ke[u]=Ke[a]})});function xt(a,u,d){return u==null||typeof u=="boolean"||u===""?"":d||typeof u!="number"||u===0||Ke.hasOwnProperty(a)&&Ke[a]?(""+u).trim():u+"px"}function hr(a,u){a=a.style;for(var d in u)if(u.hasOwnProperty(d)){var y=d.indexOf("--")===0,v=xt(d,u[d],y);d==="float"&&(d="cssFloat"),y?a.setProperty(d,v):a[d]=v}}var bn=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function nn(a,u){if(u){if(bn[a]&&(u.children!=null||u.dangerouslySetInnerHTML!=null))throw Error(t(137,a));if(u.dangerouslySetInnerHTML!=null){if(u.children!=null)throw Error(t(60));if(typeof u.dangerouslySetInnerHTML!="object"||!("__html"in u.dangerouslySetInnerHTML))throw Error(t(61))}if(u.style!=null&&typeof u.style!="object")throw Error(t(62))}}function tr(a,u){if(a.indexOf("-")===-1)return typeof u.is=="string";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 Tn=null;function Xi(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var Vi=null,Hr=null,hn=null;function va(a){if(a=Eo(a)){if(typeof Vi!="function")throw Error(t(280));var u=a.stateNode;u&&(u=Za(u),Vi(a.stateNode,a.type,u))}}function so(a){Hr?hn?hn.push(a):hn=[a]:Hr=a}function wa(){if(Hr){var a=Hr,u=hn;if(hn=Hr=null,va(a),u)for(a=0;a<u.length;a++)va(u[a])}}function oo(a,u){return a(u)}function Wi(){}var yi=!1;function ka(a,u,d){if(yi)return a(u,d);yi=!0;try{return oo(a,u,d)}finally{yi=!1,(Hr!==null||hn!==null)&&(Wi(),wa())}}function Fi(a,u){var d=a.stateNode;if(d===null)return null;var y=Za(d);if(y===null)return null;d=y[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(y=!y.disabled)||(a=a.type,y=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!y;break e;default:a=!1}if(a)return null;if(d&&typeof d!="function")throw Error(t(231,u,typeof d));return d}var B=!1;if(l)try{var ee={};Object.defineProperty(ee,"passive",{get:function(){B=!0}}),window.addEventListener("test",ee,ee),window.removeEventListener("test",ee,ee)}catch{B=!1}function ce(a,u,d,y,v,b,M,X,H){var le=Array.prototype.slice.call(arguments,3);try{u.apply(d,le)}catch(ve){this.onError(ve)}}var pe=!1,Se=null,Xe=!1,Je=null,Ae={onError:function(a){pe=!0,Se=a}};function ze(a,u,d,y,v,b,M,X,H){pe=!1,Se=null,ce.apply(Ae,arguments)}function Me(a,u,d,y,v,b,M,X,H){if(ze.apply(this,arguments),pe){if(pe){var le=Se;pe=!1,Se=null}else throw Error(t(198));Xe||(Xe=!0,Je=le)}}function Ne(a){var u=a,d=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,(u.flags&4098)!==0&&(d=u.return),a=u.return;while(a)}return u.tag===3?d:null}function ot(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function gt(a){if(Ne(a)!==a)throw Error(t(188))}function fn(a){var u=a.alternate;if(!u){if(u=Ne(a),u===null)throw Error(t(188));return u!==a?null:a}for(var d=a,y=u;;){var v=d.return;if(v===null)break;var b=v.alternate;if(b===null){if(y=v.return,y!==null){d=y;continue}break}if(v.child===b.child){for(b=v.child;b;){if(b===d)return gt(v),a;if(b===y)return gt(v),u;b=b.sibling}throw Error(t(188))}if(d.return!==y.return)d=v,y=b;else{for(var M=!1,X=v.child;X;){if(X===d){M=!0,d=v,y=b;break}if(X===y){M=!0,y=v,d=b;break}X=X.sibling}if(!M){for(X=b.child;X;){if(X===d){M=!0,d=b,y=v;break}if(X===y){M=!0,y=b,d=v;break}X=X.sibling}if(!M)throw Error(t(189))}}if(d.alternate!==y)throw Error(t(190))}if(d.tag!==3)throw Error(t(188));return d.stateNode.current===d?a:u}function _t(a){return a=fn(a),a!==null?Qt(a):null}function Qt(a){if(a.tag===5||a.tag===6)return a;for(a=a.child;a!==null;){var u=Qt(a);if(u!==null)return u;a=a.sibling}return null}var Ft=e.unstable_scheduleCallback,Gr=e.unstable_cancelCallback,qe=e.unstable_shouldYield,vn=e.unstable_requestPaint,bt=e.unstable_now,Sa=e.unstable_getCurrentPriorityLevel,xi=e.unstable_ImmediatePriority,Er=e.unstable_UserBlockingPriority,Kr=e.unstable_NormalPriority,ao=e.unstable_LowPriority,vt=e.unstable_IdlePriority,Vt=null,rn=null;function vi(a){if(rn&&typeof rn.onCommitFiberRoot=="function")try{rn.onCommitFiberRoot(Vt,a,void 0,(a.current.flags&128)===128)}catch{}}var ht=Math.clz32?Math.clz32:Jr,Bi=Math.log,Kt=Math.LN2;function Jr(a){return a>>>=0,a===0?32:31-(Bi(a)/Kt|0)|0}var ei=64,lo=4194304;function Ps(a){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: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 a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a}}function Yi(a,u){var d=a.pendingLanes;if(d===0)return 0;var y=0,v=a.suspendedLanes,b=a.pingedLanes,M=d&268435455;if(M!==0){var X=M&~v;X!==0?y=Ps(X):(b&=M,b!==0&&(y=Ps(b)))}else M=d&~v,M!==0?y=Ps(M):b!==0&&(y=Ps(b));if(y===0)return 0;if(u!==0&&u!==y&&(u&v)===0&&(v=y&-y,b=u&-u,v>=b||v===16&&(b&4194240)!==0))return u;if((y&4)!==0&&(y|=d&16),u=a.entangledLanes,u!==0)for(a=a.entanglements,u&=y;0<u;)d=31-ht(u),v=1<<d,y|=a[d],u&=~v;return y}function uo(a,u){switch(a){case 1:case 2:case 4:return u+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Al(a,u){for(var d=a.suspendedLanes,y=a.pingedLanes,v=a.expirationTimes,b=a.pendingLanes;0<b;){var M=31-ht(b),X=1<<M,H=v[M];H===-1?((X&d)===0||(X&y)!==0)&&(v[M]=uo(X,u)):H<=u&&(a.expiredLanes|=X),b&=~X}}function co(a){return a=a.pendingLanes&-1073741825,a!==0?a:a&1073741824?1073741824:0}function ac(){var a=ei;return ei<<=1,(ei&4194240)===0&&(ei=64),a}function Qs(a){for(var u=[],d=0;31>d;d++)u.push(a);return u}function Cs(a,u,d){a.pendingLanes|=u,u!==536870912&&(a.suspendedLanes=0,a.pingedLanes=0),a=a.eventTimes,u=31-ht(u),a[u]=d}function Sf(a,u){var d=a.pendingLanes&~u;a.pendingLanes=u,a.suspendedLanes=0,a.pingedLanes=0,a.expiredLanes&=u,a.mutableReadLanes&=u,a.entangledLanes&=u,u=a.entanglements;var y=a.eventTimes;for(a=a.expirationTimes;0<d;){var v=31-ht(d),b=1<<v;u[v]=0,y[v]=-1,a[v]=-1,d&=~b}}function ho(a,u){var d=a.entangledLanes|=u;for(a=a.entanglements;d;){var y=31-ht(d),v=1<<y;v&u|a[y]&u&&(a[y]|=u),d&=~v}}var jt=0;function ba(a){return a&=-a,1<a?4<a?(a&268435455)!==0?16:536870912:4:1}var fo,po,bf,lc,Pf,_l=!1,Pa=[],wi=null,Ui=null,ki=null,mo=new Map,Qa=new Map,qi=[],gm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function uc(a,u){switch(a){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Ui=null;break;case"mouseover":case"mouseout":ki=null;break;case"pointerover":case"pointerout":mo.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qa.delete(u.pointerId)}}function Ca(a,u,d,y,v,b){return a===null||a.nativeEvent!==b?(a={blockedOn:u,domEventName:d,eventSystemFlags:y,nativeEvent:b,targetContainers:[v]},u!==null&&(u=Eo(u),u!==null&&po(u)),a):(a.eventSystemFlags|=y,u=a.targetContainers,v!==null&&u.indexOf(v)===-1&&u.push(v),a)}function Om(a,u,d,y,v){switch(u){case"focusin":return wi=Ca(wi,a,u,d,y,v),!0;case"dragenter":return Ui=Ca(Ui,a,u,d,y,v),!0;case"mouseover":return ki=Ca(ki,a,u,d,y,v),!0;case"pointerover":var b=v.pointerId;return mo.set(b,Ca(mo.get(b)||null,a,u,d,y,v)),!0;case"gotpointercapture":return b=v.pointerId,Qa.set(b,Ca(Qa.get(b)||null,a,u,d,y,v)),!0}return!1}function Qf(a){var u=jr(a.target);if(u!==null){var d=Ne(u);if(d!==null){if(u=d.tag,u===13){if(u=ot(d),u!==null){a.blockedOn=u,Pf(a.priority,function(){bf(d)});return}}else if(u===3&&d.stateNode.current.memoizedState.isDehydrated){a.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}a.blockedOn=null}function zl(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var d=cc(a.domEventName,a.eventSystemFlags,u[0],a.nativeEvent);if(d===null){d=a.nativeEvent;var y=new d.constructor(d.type,d);Tn=y,d.target.dispatchEvent(y),Tn=null}else return u=Eo(d),u!==null&&po(u),a.blockedOn=d,!1;u.shift()}return!0}function Cf(a,u,d){zl(a)&&d.delete(u)}function Tf(){_l=!1,wi!==null&&zl(wi)&&(wi=null),Ui!==null&&zl(Ui)&&(Ui=null),ki!==null&&zl(ki)&&(ki=null),mo.forEach(Cf),Qa.forEach(Cf)}function Ta(a,u){a.blockedOn===u&&(a.blockedOn=null,_l||(_l=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Tf)))}function dn(a){function u(v){return Ta(v,a)}if(0<Pa.length){Ta(Pa[0],a);for(var d=1;d<Pa.length;d++){var y=Pa[d];y.blockedOn===a&&(y.blockedOn=null)}}for(wi!==null&&Ta(wi,a),Ui!==null&&Ta(Ui,a),ki!==null&&Ta(ki,a),mo.forEach(u),Qa.forEach(u),d=0;d<qi.length;d++)y=qi[d],y.blockedOn===a&&(y.blockedOn=null);for(;0<qi.length&&(d=qi[0],d.blockedOn===null);)Qf(d),d.blockedOn===null&&qi.shift()}var Ts=Z.ReactCurrentBatchConfig,Si=!0;function go(a,u,d,y){var v=jt,b=Ts.transition;Ts.transition=null;try{jt=1,Dl(a,u,d,y)}finally{jt=v,Ts.transition=b}}function Oo(a,u,d,y){var v=jt,b=Ts.transition;Ts.transition=null;try{jt=4,Dl(a,u,d,y)}finally{jt=v,Ts.transition=b}}function Dl(a,u,d,y){if(Si){var v=cc(a,u,d,y);if(v===null)Gl(a,u,y,$a,d),uc(a,y);else if(Om(v,a,u,d,y))y.stopPropagation();else if(uc(a,y),u&4&&-1<gm.indexOf(a)){for(;v!==null;){var b=Eo(v);if(b!==null&&fo(b),b=cc(a,u,d,y),b===null&&Gl(a,u,y,$a,d),b===v)break;v=b}v!==null&&y.stopPropagation()}else Gl(a,u,y,null,d)}}var $a=null;function cc(a,u,d,y){if($a=null,a=Xi(y),a=jr(a),a!==null)if(u=Ne(a),u===null)a=null;else if(d=u.tag,d===13){if(a=ot(u),a!==null)return a;a=null}else if(d===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null);return $a=a,null}function Ll(a){switch(a){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Sa()){case xi:return 1;case Er:return 4;case Kr:case ao:return 16;case vt:return 536870912;default:return 16}default:return 16}}var bi=null,Ea=null,Il=null;function $f(){if(Il)return Il;var a,u=Ea,d=u.length,y,v="value"in bi?bi.value:bi.textContent,b=v.length;for(a=0;a<d&&u[a]===v[a];a++);var M=d-a;for(y=1;y<=M&&u[d-y]===v[b-y];y++);return Il=v.slice(a,1<y?1-y:void 0)}function Zl(a){var u=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function Xl(){return!0}function Ef(){return!1}function nr(a){function u(d,y,v,b,M){this._reactName=d,this._targetInst=v,this.type=y,this.nativeEvent=b,this.target=M,this.currentTarget=null;for(var X in a)a.hasOwnProperty(X)&&(d=a[X],this[X]=d?d(b):b[X]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Xl:Ef,this.isPropagationStopped=Ef,this}return N(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=Xl)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=Xl)},persist:function(){},isPersistent:Xl}),u}var $s={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hc=nr($s),ti=N({},$s,{view:0,detail:0}),ym=nr(ti),Hi,Es,Pi,Vl=N({},ti,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mc,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!==Pi&&(Pi&&a.type==="mousemove"?(Hi=a.screenX-Pi.screenX,Es=a.screenY-Pi.screenY):Es=Hi=0,Pi=a),Hi)},movementY:function(a){return"movementY"in a?a.movementY:Es}}),Mf=nr(Vl),xm=N({},Vl,{dataTransfer:0}),vm=nr(xm),fc=N({},ti,{relatedTarget:0}),dc=nr(fc),wm=N({},$s,{animationName:0,elapsedTime:0,pseudoElement:0}),km=nr(wm),Sm=N({},$s,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),bm=nr(Sm),Pm=N({},$s,{data:0}),pc=nr(Pm),Qm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Cm={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"},Tm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $m(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=Tm[a])?!!u[a]:!1}function mc(){return $m}var jf=N({},ti,{key:function(a){if(a.key){var u=Qm[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=Zl(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?Cm[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mc,charCode:function(a){return a.type==="keypress"?Zl(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?Zl(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),Em=nr(jf),Mm=N({},Vl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Rf=nr(Mm),jm=N({},ti,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mc}),Rm=nr(jm),Nm=N({},$s,{propertyName:0,elapsedTime:0,pseudoElement:0}),Am=nr(Nm),_m=N({},Vl,{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}),zm=nr(_m),Dm=[9,13,27,32],gc=l&&"CompositionEvent"in window,Ma=null;l&&"documentMode"in document&&(Ma=document.documentMode);var Lm=l&&"TextEvent"in window&&!Ma,Oc=l&&(!gc||Ma&&8<Ma&&11>=Ma),yc=" ",Nf=!1;function rr(a,u){switch(a){case"keyup":return Dm.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ms(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var yo=!1;function js(a,u){switch(a){case"compositionend":return Ms(u);case"keypress":return u.which!==32?null:(Nf=!0,yc);case"textInput":return a=u.data,a===yc&&Nf?null:a;default:return null}}function Im(a,u){if(yo)return a==="compositionend"||!gc&&rr(a,u)?(a=$f(),Il=Ea=bi=null,yo=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return Oc&&u.locale!=="ko"?null:u.data;default:return null}}var Qi={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 xc(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!Qi[a.type]:u==="textarea"}function vc(a,u,d,y){so(y),u=La(u,"onChange"),0<u.length&&(d=new hc("onChange","change",null,d,y),a.push({event:d,listeners:u}))}var xo=null,Ot=null;function vo(a){Wf(a,0)}function Wl(a){var u=Mo(a);if(cn(u))return a}function Jt(a,u){if(a==="change")return u}var wo=!1;if(l){var Fl;if(l){var wc="oninput"in document;if(!wc){var Af=document.createElement("div");Af.setAttribute("oninput","return;"),wc=typeof Af.oninput=="function"}Fl=wc}else Fl=!1;wo=Fl&&(!document.documentMode||9<document.documentMode)}function _f(){xo&&(xo.detachEvent("onpropertychange",Tt),Ot=xo=null)}function Tt(a){if(a.propertyName==="value"&&Wl(Ot)){var u=[];vc(u,Ot,a,Xi(a)),ka(vo,u)}}function Kx(a,u,d){a==="focusin"?(_f(),xo=u,Ot=d,xo.attachEvent("onpropertychange",Tt)):a==="focusout"&&_f()}function zf(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return Wl(Ot)}function Df(a,u){if(a==="click")return Wl(u)}function Zm(a,u){if(a==="input"||a==="change")return Wl(u)}function Lf(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var an=typeof Object.is=="function"?Object.is:Lf;function ko(a,u){if(an(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var d=Object.keys(a),y=Object.keys(u);if(d.length!==y.length)return!1;for(y=0;y<d.length;y++){var v=d[y];if(!c.call(u,v)||!an(a[v],u[v]))return!1}return!0}function ja(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function If(a,u){var d=ja(a);a=0;for(var y;d;){if(d.nodeType===3){if(y=a+d.textContent.length,a<=u&&y>=u)return{node:d,offset:u-a};a=y}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=ja(d)}}function Zf(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?Zf(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function Xf(){for(var a=window,u=Nn();u instanceof a.HTMLIFrameElement;){try{var d=typeof u.contentWindow.location.href=="string"}catch{d=!1}if(d)a=u.contentWindow;else break;u=Nn(a.document)}return u}function kc(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}function Xm(a){var u=Xf(),d=a.focusedElem,y=a.selectionRange;if(u!==d&&d&&d.ownerDocument&&Zf(d.ownerDocument.documentElement,d)){if(y!==null&&kc(d)){if(u=y.start,a=y.end,a===void 0&&(a=u),"selectionStart"in d)d.selectionStart=u,d.selectionEnd=Math.min(a,d.value.length);else if(a=(u=d.ownerDocument||document)&&u.defaultView||window,a.getSelection){a=a.getSelection();var v=d.textContent.length,b=Math.min(y.start,v);y=y.end===void 0?b:Math.min(y.end,v),!a.extend&&b>y&&(v=y,y=b,b=v),v=If(d,b);var M=If(d,y);v&&M&&(a.rangeCount!==1||a.anchorNode!==v.node||a.anchorOffset!==v.offset||a.focusNode!==M.node||a.focusOffset!==M.offset)&&(u=u.createRange(),u.setStart(v.node,v.offset),a.removeAllRanges(),b>y?(a.addRange(u),a.extend(M.node,M.offset)):(u.setEnd(M.node,M.offset),a.addRange(u)))}}for(u=[],a=d;a=a.parentNode;)a.nodeType===1&&u.push({element:a,left:a.scrollLeft,top:a.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<u.length;d++)a=u[d],a.element.scrollLeft=a.left,a.element.scrollTop=a.top}}var Vm=l&&"documentMode"in document&&11>=document.documentMode,So=null,Ra=null,Na=null,Sc=!1;function bc(a,u,d){var y=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;Sc||So==null||So!==Nn(y)||(y=So,"selectionStart"in y&&kc(y)?y={start:y.selectionStart,end:y.selectionEnd}:(y=(y.ownerDocument&&y.ownerDocument.defaultView||window).getSelection(),y={anchorNode:y.anchorNode,anchorOffset:y.anchorOffset,focusNode:y.focusNode,focusOffset:y.focusOffset}),Na&&ko(Na,y)||(Na=y,y=La(Ra,"onSelect"),0<y.length&&(u=new hc("onSelect","select",null,u,d),a.push({event:u,listeners:y}),u.target=So)))}function Aa(a,u){var d={};return d[a.toLowerCase()]=u.toLowerCase(),d["Webkit"+a]="webkit"+u,d["Moz"+a]="moz"+u,d}var Rs={animationend:Aa("Animation","AnimationEnd"),animationiteration:Aa("Animation","AnimationIteration"),animationstart:Aa("Animation","AnimationStart"),transitionend:Aa("Transition","TransitionEnd")},Pc={},Qc={};l&&(Qc=document.createElement("div").style,"AnimationEvent"in window||(delete Rs.animationend.animation,delete Rs.animationiteration.animation,delete Rs.animationstart.animation),"TransitionEvent"in window||delete Rs.transitionend.transition);function bo(a){if(Pc[a])return Pc[a];if(!Rs[a])return a;var u=Rs[a],d;for(d in u)if(u.hasOwnProperty(d)&&d in Qc)return Pc[a]=u[d];return a}var Cc=bo("animationend"),Po=bo("animationiteration"),Bl=bo("animationstart"),Yl=bo("transitionend"),Gi=new Map,Tc="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Mr(a,u){Gi.set(a,u),s(u,[a])}for(var Qo=0;Qo<Tc.length;Qo++){var Ul=Tc[Qo],Co=Ul.toLowerCase(),ql=Ul[0].toUpperCase()+Ul.slice(1);Mr(Co,"on"+ql)}Mr(Cc,"onAnimationEnd"),Mr(Po,"onAnimationIteration"),Mr(Bl,"onAnimationStart"),Mr("dblclick","onDoubleClick"),Mr("focusin","onFocus"),Mr("focusout","onBlur"),Mr(Yl,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ns="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(" "),Vf=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ns));function $c(a,u,d){var y=a.type||"unknown-event";a.currentTarget=d,Me(y,u,void 0,a),a.currentTarget=null}function Wf(a,u){u=(u&4)!==0;for(var d=0;d<a.length;d++){var y=a[d],v=y.event;y=y.listeners;e:{var b=void 0;if(u)for(var M=y.length-1;0<=M;M--){var X=y[M],H=X.instance,le=X.currentTarget;if(X=X.listener,H!==b&&v.isPropagationStopped())break e;$c(v,X,le),b=H}else for(M=0;M<y.length;M++){if(X=y[M],H=X.instance,le=X.currentTarget,X=X.listener,H!==b&&v.isPropagationStopped())break e;$c(v,X,le),b=H}}}if(Xe)throw a=Je,Xe=!1,Je=null,a}function Bt(a,u){var d=u[ir];d===void 0&&(d=u[ir]=new Set);var y=a+"__bubble";d.has(y)||(za(u,a,2,!1),d.add(y))}function To(a,u,d){var y=0;u&&(y|=4),za(d,a,y,u)}var Hl="_reactListening"+Math.random().toString(36).slice(2);function _a(a){if(!a[Hl]){a[Hl]=!0,r.forEach(function(d){d!=="selectionchange"&&(Vf.has(d)||To(d,!1,a),To(d,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[Hl]||(u[Hl]=!0,To("selectionchange",!1,u))}}function za(a,u,d,y){switch(Ll(u)){case 1:var v=go;break;case 4:v=Oo;break;default:v=Dl}d=v.bind(null,u,d,a),v=void 0,!B||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(v=!0),y?v!==void 0?a.addEventListener(u,d,{capture:!0,passive:v}):a.addEventListener(u,d,!0):v!==void 0?a.addEventListener(u,d,{passive:v}):a.addEventListener(u,d,!1)}function Gl(a,u,d,y,v){var b=y;if((u&1)===0&&(u&2)===0&&y!==null)e:for(;;){if(y===null)return;var M=y.tag;if(M===3||M===4){var X=y.stateNode.containerInfo;if(X===v||X.nodeType===8&&X.parentNode===v)break;if(M===4)for(M=y.return;M!==null;){var H=M.tag;if((H===3||H===4)&&(H=M.stateNode.containerInfo,H===v||H.nodeType===8&&H.parentNode===v))return;M=M.return}for(;X!==null;){if(M=jr(X),M===null)return;if(H=M.tag,H===5||H===6){y=b=M;continue e}X=X.parentNode}}y=y.return}ka(function(){var le=b,ve=Xi(d),we=[];e:{var ge=Gi.get(a);if(ge!==void 0){var je=hc,Ze=a;switch(a){case"keypress":if(Zl(d)===0)break e;case"keydown":case"keyup":je=Em;break;case"focusin":Ze="focus",je=dc;break;case"focusout":Ze="blur",je=dc;break;case"beforeblur":case"afterblur":je=dc;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":je=Mf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":je=vm;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":je=Rm;break;case Cc:case Po:case Bl:je=km;break;case Yl:je=Am;break;case"scroll":je=ym;break;case"wheel":je=zm;break;case"copy":case"cut":case"paste":je=bm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":je=Rf}var Ve=(u&4)!==0,On=!Ve&&a==="scroll",ie=Ve?ge!==null?ge+"Capture":null:ge;Ve=[];for(var J=le,ae;J!==null;){ae=J;var Qe=ae.stateNode;if(ae.tag===5&&Qe!==null&&(ae=Qe,ie!==null&&(Qe=Fi(J,ie),Qe!=null&&Ve.push(Da(J,Qe,ae)))),On)break;J=J.return}0<Ve.length&&(ge=new je(ge,Ze,null,d,ve),we.push({event:ge,listeners:Ve}))}}if((u&7)===0){e:{if(ge=a==="mouseover"||a==="pointerover",je=a==="mouseout"||a==="pointerout",ge&&d!==Tn&&(Ze=d.relatedTarget||d.fromElement)&&(jr(Ze)||Ze[It]))break e;if((je||ge)&&(ge=ve.window===ve?ve:(ge=ve.ownerDocument)?ge.defaultView||ge.parentWindow:window,je?(Ze=d.relatedTarget||d.toElement,je=le,Ze=Ze?jr(Ze):null,Ze!==null&&(On=Ne(Ze),Ze!==On||Ze.tag!==5&&Ze.tag!==6)&&(Ze=null)):(je=null,Ze=le),je!==Ze)){if(Ve=Mf,Qe="onMouseLeave",ie="onMouseEnter",J="mouse",(a==="pointerout"||a==="pointerover")&&(Ve=Rf,Qe="onPointerLeave",ie="onPointerEnter",J="pointer"),On=je==null?ge:Mo(je),ae=Ze==null?ge:Mo(Ze),ge=new Ve(Qe,J+"leave",je,d,ve),ge.target=On,ge.relatedTarget=ae,Qe=null,jr(ve)===le&&(Ve=new Ve(ie,J+"enter",Ze,d,ve),Ve.target=ae,Ve.relatedTarget=On,Qe=Ve),On=Qe,je&&Ze)t:{for(Ve=je,ie=Ze,J=0,ae=Ve;ae;ae=As(ae))J++;for(ae=0,Qe=ie;Qe;Qe=As(Qe))ae++;for(;0<J-ae;)Ve=As(Ve),J--;for(;0<ae-J;)ie=As(ie),ae--;for(;J--;){if(Ve===ie||ie!==null&&Ve===ie.alternate)break t;Ve=As(Ve),ie=As(ie)}Ve=null}else Ve=null;je!==null&&Ec(we,ge,je,Ve,!1),Ze!==null&&On!==null&&Ec(we,On,Ze,Ve,!0)}}e:{if(ge=le?Mo(le):window,je=ge.nodeName&&ge.nodeName.toLowerCase(),je==="select"||je==="input"&&ge.type==="file")var We=Jt;else if(xc(ge))if(wo)We=Zm;else{We=zf;var et=Kx}else(je=ge.nodeName)&&je.toLowerCase()==="input"&&(ge.type==="checkbox"||ge.type==="radio")&&(We=Df);if(We&&(We=We(a,le))){vc(we,We,d,ve);break e}et&&et(a,ge,le),a==="focusout"&&(et=ge._wrapperState)&&et.controlled&&ge.type==="number"&&$r(ge,"number",ge.value)}switch(et=le?Mo(le):window,a){case"focusin":(xc(et)||et.contentEditable==="true")&&(So=et,Ra=le,Na=null);break;case"focusout":Na=Ra=So=null;break;case"mousedown":Sc=!0;break;case"contextmenu":case"mouseup":case"dragend":Sc=!1,bc(we,d,ve);break;case"selectionchange":if(Vm)break;case"keydown":case"keyup":bc(we,d,ve)}var tt;if(gc)e:{switch(a){case"compositionstart":var lt="onCompositionStart";break e;case"compositionend":lt="onCompositionEnd";break e;case"compositionupdate":lt="onCompositionUpdate";break e}lt=void 0}else yo?rr(a,d)&&(lt="onCompositionEnd"):a==="keydown"&&d.keyCode===229&&(lt="onCompositionStart");lt&&(Oc&&d.locale!=="ko"&&(yo||lt!=="onCompositionStart"?lt==="onCompositionEnd"&&yo&&(tt=$f()):(bi=ve,Ea="value"in bi?bi.value:bi.textContent,yo=!0)),et=La(le,lt),0<et.length&&(lt=new pc(lt,a,null,d,ve),we.push({event:lt,listeners:et}),tt?lt.data=tt:(tt=Ms(d),tt!==null&&(lt.data=tt)))),(tt=Lm?js(a,d):Im(a,d))&&(le=La(le,"onBeforeInput"),0<le.length&&(ve=new pc("onBeforeInput","beforeinput",null,d,ve),we.push({event:ve,listeners:le}),ve.data=tt))}Wf(we,u)})}function Da(a,u,d){return{instance:a,listener:u,currentTarget:d}}function La(a,u){for(var d=u+"Capture",y=[];a!==null;){var v=a,b=v.stateNode;v.tag===5&&b!==null&&(v=b,b=Fi(a,d),b!=null&&y.unshift(Da(a,b,v)),b=Fi(a,u),b!=null&&y.push(Da(a,b,v))),a=a.return}return y}function As(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5);return a||null}function Ec(a,u,d,y,v){for(var b=u._reactName,M=[];d!==null&&d!==y;){var X=d,H=X.alternate,le=X.stateNode;if(H!==null&&H===y)break;X.tag===5&&le!==null&&(X=le,v?(H=Fi(d,b),H!=null&&M.unshift(Da(d,H,X))):v||(H=Fi(d,b),H!=null&&M.push(Da(d,H,X)))),d=d.return}M.length!==0&&a.push({event:u,listeners:M})}var Ia=/\r\n?/g,Mc=/\u0000|\uFFFD/g;function it(a){return(typeof a=="string"?a:""+a).replace(Ia,`
38
+ `).replace(Mc,"")}function Ki(a,u,d){if(u=it(u),it(a)!==u&&d)throw Error(t(425))}function Kl(){}var P=null,O=null;function S(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var T=typeof setTimeout=="function"?setTimeout:void 0,j=typeof clearTimeout=="function"?clearTimeout:void 0,F=typeof Promise=="function"?Promise:void 0,K=typeof queueMicrotask=="function"?queueMicrotask:typeof F<"u"?function(a){return F.resolve(null).then(a).catch(te)}:T;function te(a){setTimeout(function(){throw a})}function re(a,u){var d=u,y=0;do{var v=d.nextSibling;if(a.removeChild(d),v&&v.nodeType===8)if(d=v.data,d==="/$"){if(y===0){a.removeChild(v),dn(u);return}y--}else d!=="$"&&d!=="$?"&&d!=="$!"||y++;d=v}while(d);dn(u)}function xe(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?")break;if(u==="/$")return null}}return a}function He(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="$"||d==="$!"||d==="$?"){if(u===0)return a;u--}else d==="/$"&&u++}a=a.previousSibling}return null}var at=Math.random().toString(36).slice(2),wt="__reactFiber$"+at,Ge="__reactProps$"+at,It="__reactContainer$"+at,ir="__reactEvents$"+at,ni="__reactListeners$"+at,$o="__reactHandles$"+at;function jr(a){var u=a[wt];if(u)return u;for(var d=a.parentNode;d;){if(u=d[It]||d[wt]){if(d=u.alternate,u.child!==null||d!==null&&d.child!==null)for(a=He(a);a!==null;){if(d=a[wt])return d;a=He(a)}return u}a=d,d=a.parentNode}return null}function Eo(a){return a=a[wt]||a[It],!a||a.tag!==5&&a.tag!==6&&a.tag!==13&&a.tag!==3?null:a}function Mo(a){if(a.tag===5||a.tag===6)return a.stateNode;throw Error(t(33))}function Za(a){return a[Ge]||null}var jc=[],jo=-1;function Ji(a){return{current:a}}function zt(a){0>jo||(a.current=jc[jo],jc[jo]=null,jo--)}function Rt(a,u){jo++,jc[jo]=a.current,a.current=u}var es={},In=Ji(es),fr=Ji(!1),Xa=es;function Jl(a,u){var d=a.type.contextTypes;if(!d)return es;var y=a.stateNode;if(y&&y.__reactInternalMemoizedUnmaskedChildContext===u)return y.__reactInternalMemoizedMaskedChildContext;var v={},b;for(b in d)v[b]=u[b];return y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=u,a.__reactInternalMemoizedMaskedChildContext=v),v}function dr(a){return a=a.childContextTypes,a!=null}function Ff(){zt(fr),zt(In)}function Jx(a,u,d){if(In.current!==es)throw Error(t(168));Rt(In,u),Rt(fr,d)}function e1(a,u,d){var y=a.stateNode;if(u=u.childContextTypes,typeof y.getChildContext!="function")return d;y=y.getChildContext();for(var v in y)if(!(v in u))throw Error(t(108,rt(a)||"Unknown",v));return N({},d,y)}function Bf(a){return a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||es,Xa=In.current,Rt(In,a),Rt(fr,fr.current),!0}function t1(a,u,d){var y=a.stateNode;if(!y)throw Error(t(169));d?(a=e1(a,u,Xa),y.__reactInternalMemoizedMergedChildContext=a,zt(fr),zt(In),Rt(In,a)):zt(fr),Rt(fr,d)}var _s=null,Yf=!1,Wm=!1;function n1(a){_s===null?_s=[a]:_s.push(a)}function P$(a){Yf=!0,n1(a)}function Ro(){if(!Wm&&_s!==null){Wm=!0;var a=0,u=jt;try{var d=_s;for(jt=1;a<d.length;a++){var y=d[a];do y=y(!0);while(y!==null)}_s=null,Yf=!1}catch(v){throw _s!==null&&(_s=_s.slice(a+1)),Ft(xi,Ro),v}finally{jt=u,Wm=!1}}return null}var eu=[],tu=0,Uf=null,qf=0,ri=[],ii=0,Va=null,zs=1,Ds="";function Wa(a,u){eu[tu++]=qf,eu[tu++]=Uf,Uf=a,qf=u}function r1(a,u,d){ri[ii++]=zs,ri[ii++]=Ds,ri[ii++]=Va,Va=a;var y=zs;a=Ds;var v=32-ht(y)-1;y&=~(1<<v),d+=1;var b=32-ht(u)+v;if(30<b){var M=v-v%5;b=(y&(1<<M)-1).toString(32),y>>=M,v-=M,zs=1<<32-ht(u)+v|d<<v|y,Ds=b+a}else zs=1<<b|d<<v|y,Ds=a}function Fm(a){a.return!==null&&(Wa(a,1),r1(a,1,0))}function Bm(a){for(;a===Uf;)Uf=eu[--tu],eu[tu]=null,qf=eu[--tu],eu[tu]=null;for(;a===Va;)Va=ri[--ii],ri[ii]=null,Ds=ri[--ii],ri[ii]=null,zs=ri[--ii],ri[ii]=null}var Rr=null,Nr=null,sn=!1,Ci=null;function i1(a,u){var d=li(5,null,null,0);d.elementType="DELETED",d.stateNode=u,d.return=a,u=a.deletions,u===null?(a.deletions=[d],a.flags|=16):u.push(d)}function s1(a,u){switch(a.tag){case 5:var d=a.type;return u=u.nodeType!==1||d.toLowerCase()!==u.nodeName.toLowerCase()?null:u,u!==null?(a.stateNode=u,Rr=a,Nr=xe(u.firstChild),!0):!1;case 6:return u=a.pendingProps===""||u.nodeType!==3?null:u,u!==null?(a.stateNode=u,Rr=a,Nr=null,!0):!1;case 13:return u=u.nodeType!==8?null:u,u!==null?(d=Va!==null?{id:zs,overflow:Ds}:null,a.memoizedState={dehydrated:u,treeContext:d,retryLane:1073741824},d=li(18,null,null,0),d.stateNode=u,d.return=a,a.child=d,Rr=a,Nr=null,!0):!1;default:return!1}}function Ym(a){return(a.mode&1)!==0&&(a.flags&128)===0}function Um(a){if(sn){var u=Nr;if(u){var d=u;if(!s1(a,u)){if(Ym(a))throw Error(t(418));u=xe(d.nextSibling);var y=Rr;u&&s1(a,u)?i1(y,d):(a.flags=a.flags&-4097|2,sn=!1,Rr=a)}}else{if(Ym(a))throw Error(t(418));a.flags=a.flags&-4097|2,sn=!1,Rr=a}}}function o1(a){for(a=a.return;a!==null&&a.tag!==5&&a.tag!==3&&a.tag!==13;)a=a.return;Rr=a}function Hf(a){if(a!==Rr)return!1;if(!sn)return o1(a),sn=!0,!1;var u;if((u=a.tag!==3)&&!(u=a.tag!==5)&&(u=a.type,u=u!=="head"&&u!=="body"&&!S(a.type,a.memoizedProps)),u&&(u=Nr)){if(Ym(a))throw a1(),Error(t(418));for(;u;)i1(a,u),u=xe(u.nextSibling)}if(o1(a),a.tag===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(t(317));e:{for(a=a.nextSibling,u=0;a;){if(a.nodeType===8){var d=a.data;if(d==="/$"){if(u===0){Nr=xe(a.nextSibling);break e}u--}else d!=="$"&&d!=="$!"&&d!=="$?"||u++}a=a.nextSibling}Nr=null}}else Nr=Rr?xe(a.stateNode.nextSibling):null;return!0}function a1(){for(var a=Nr;a;)a=xe(a.nextSibling)}function nu(){Nr=Rr=null,sn=!1}function qm(a){Ci===null?Ci=[a]:Ci.push(a)}var Q$=Z.ReactCurrentBatchConfig;function Rc(a,u,d){if(a=d.ref,a!==null&&typeof a!="function"&&typeof a!="object"){if(d._owner){if(d=d._owner,d){if(d.tag!==1)throw Error(t(309));var y=d.stateNode}if(!y)throw Error(t(147,a));var v=y,b=""+a;return u!==null&&u.ref!==null&&typeof u.ref=="function"&&u.ref._stringRef===b?u.ref:(u=function(M){var X=v.refs;M===null?delete X[b]:X[b]=M},u._stringRef=b,u)}if(typeof a!="string")throw Error(t(284));if(!d._owner)throw Error(t(290,a))}return a}function Gf(a,u){throw a=Object.prototype.toString.call(u),Error(t(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a))}function l1(a){var u=a._init;return u(a._payload)}function u1(a){function u(ie,J){if(a){var ae=ie.deletions;ae===null?(ie.deletions=[J],ie.flags|=16):ae.push(J)}}function d(ie,J){if(!a)return null;for(;J!==null;)u(ie,J),J=J.sibling;return null}function y(ie,J){for(ie=new Map;J!==null;)J.key!==null?ie.set(J.key,J):ie.set(J.index,J),J=J.sibling;return ie}function v(ie,J){return ie=Zo(ie,J),ie.index=0,ie.sibling=null,ie}function b(ie,J,ae){return ie.index=ae,a?(ae=ie.alternate,ae!==null?(ae=ae.index,ae<J?(ie.flags|=2,J):ae):(ie.flags|=2,J)):(ie.flags|=1048576,J)}function M(ie){return a&&ie.alternate===null&&(ie.flags|=2),ie}function X(ie,J,ae,Qe){return J===null||J.tag!==6?(J=Ig(ae,ie.mode,Qe),J.return=ie,J):(J=v(J,ae),J.return=ie,J)}function H(ie,J,ae,Qe){var We=ae.type;return We===R?ve(ie,J,ae.props.children,Qe,ae.key):J!==null&&(J.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===de&&l1(We)===J.type)?(Qe=v(J,ae.props),Qe.ref=Rc(ie,J,ae),Qe.return=ie,Qe):(Qe=wd(ae.type,ae.key,ae.props,null,ie.mode,Qe),Qe.ref=Rc(ie,J,ae),Qe.return=ie,Qe)}function le(ie,J,ae,Qe){return J===null||J.tag!==4||J.stateNode.containerInfo!==ae.containerInfo||J.stateNode.implementation!==ae.implementation?(J=Zg(ae,ie.mode,Qe),J.return=ie,J):(J=v(J,ae.children||[]),J.return=ie,J)}function ve(ie,J,ae,Qe,We){return J===null||J.tag!==7?(J=Ka(ae,ie.mode,Qe,We),J.return=ie,J):(J=v(J,ae),J.return=ie,J)}function we(ie,J,ae){if(typeof J=="string"&&J!==""||typeof J=="number")return J=Ig(""+J,ie.mode,ae),J.return=ie,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case Y:return ae=wd(J.type,J.key,J.props,null,ie.mode,ae),ae.ref=Rc(ie,null,J),ae.return=ie,ae;case _:return J=Zg(J,ie.mode,ae),J.return=ie,J;case de:var Qe=J._init;return we(ie,Qe(J._payload),ae)}if(Ur(J)||ye(J))return J=Ka(J,ie.mode,ae,null),J.return=ie,J;Gf(ie,J)}return null}function ge(ie,J,ae,Qe){var We=J!==null?J.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number")return We!==null?null:X(ie,J,""+ae,Qe);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case Y:return ae.key===We?H(ie,J,ae,Qe):null;case _:return ae.key===We?le(ie,J,ae,Qe):null;case de:return We=ae._init,ge(ie,J,We(ae._payload),Qe)}if(Ur(ae)||ye(ae))return We!==null?null:ve(ie,J,ae,Qe,null);Gf(ie,ae)}return null}function je(ie,J,ae,Qe,We){if(typeof Qe=="string"&&Qe!==""||typeof Qe=="number")return ie=ie.get(ae)||null,X(J,ie,""+Qe,We);if(typeof Qe=="object"&&Qe!==null){switch(Qe.$$typeof){case Y:return ie=ie.get(Qe.key===null?ae:Qe.key)||null,H(J,ie,Qe,We);case _:return ie=ie.get(Qe.key===null?ae:Qe.key)||null,le(J,ie,Qe,We);case de:var et=Qe._init;return je(ie,J,ae,et(Qe._payload),We)}if(Ur(Qe)||ye(Qe))return ie=ie.get(ae)||null,ve(J,ie,Qe,We,null);Gf(J,Qe)}return null}function Ze(ie,J,ae,Qe){for(var We=null,et=null,tt=J,lt=J=0,Mn=null;tt!==null&&lt<ae.length;lt++){tt.index>lt?(Mn=tt,tt=null):Mn=tt.sibling;var Nt=ge(ie,tt,ae[lt],Qe);if(Nt===null){tt===null&&(tt=Mn);break}a&&tt&&Nt.alternate===null&&u(ie,tt),J=b(Nt,J,lt),et===null?We=Nt:et.sibling=Nt,et=Nt,tt=Mn}if(lt===ae.length)return d(ie,tt),sn&&Wa(ie,lt),We;if(tt===null){for(;lt<ae.length;lt++)tt=we(ie,ae[lt],Qe),tt!==null&&(J=b(tt,J,lt),et===null?We=tt:et.sibling=tt,et=tt);return sn&&Wa(ie,lt),We}for(tt=y(ie,tt);lt<ae.length;lt++)Mn=je(tt,ie,lt,ae[lt],Qe),Mn!==null&&(a&&Mn.alternate!==null&&tt.delete(Mn.key===null?lt:Mn.key),J=b(Mn,J,lt),et===null?We=Mn:et.sibling=Mn,et=Mn);return a&&tt.forEach(function(Xo){return u(ie,Xo)}),sn&&Wa(ie,lt),We}function Ve(ie,J,ae,Qe){var We=ye(ae);if(typeof We!="function")throw Error(t(150));if(ae=We.call(ae),ae==null)throw Error(t(151));for(var et=We=null,tt=J,lt=J=0,Mn=null,Nt=ae.next();tt!==null&&!Nt.done;lt++,Nt=ae.next()){tt.index>lt?(Mn=tt,tt=null):Mn=tt.sibling;var Xo=ge(ie,tt,Nt.value,Qe);if(Xo===null){tt===null&&(tt=Mn);break}a&&tt&&Xo.alternate===null&&u(ie,tt),J=b(Xo,J,lt),et===null?We=Xo:et.sibling=Xo,et=Xo,tt=Mn}if(Nt.done)return d(ie,tt),sn&&Wa(ie,lt),We;if(tt===null){for(;!Nt.done;lt++,Nt=ae.next())Nt=we(ie,Nt.value,Qe),Nt!==null&&(J=b(Nt,J,lt),et===null?We=Nt:et.sibling=Nt,et=Nt);return sn&&Wa(ie,lt),We}for(tt=y(ie,tt);!Nt.done;lt++,Nt=ae.next())Nt=je(tt,ie,lt,Nt.value,Qe),Nt!==null&&(a&&Nt.alternate!==null&&tt.delete(Nt.key===null?lt:Nt.key),J=b(Nt,J,lt),et===null?We=Nt:et.sibling=Nt,et=Nt);return a&&tt.forEach(function(sE){return u(ie,sE)}),sn&&Wa(ie,lt),We}function On(ie,J,ae,Qe){if(typeof ae=="object"&&ae!==null&&ae.type===R&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case Y:e:{for(var We=ae.key,et=J;et!==null;){if(et.key===We){if(We=ae.type,We===R){if(et.tag===7){d(ie,et.sibling),J=v(et,ae.props.children),J.return=ie,ie=J;break e}}else if(et.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===de&&l1(We)===et.type){d(ie,et.sibling),J=v(et,ae.props),J.ref=Rc(ie,et,ae),J.return=ie,ie=J;break e}d(ie,et);break}else u(ie,et);et=et.sibling}ae.type===R?(J=Ka(ae.props.children,ie.mode,Qe,ae.key),J.return=ie,ie=J):(Qe=wd(ae.type,ae.key,ae.props,null,ie.mode,Qe),Qe.ref=Rc(ie,J,ae),Qe.return=ie,ie=Qe)}return M(ie);case _:e:{for(et=ae.key;J!==null;){if(J.key===et)if(J.tag===4&&J.stateNode.containerInfo===ae.containerInfo&&J.stateNode.implementation===ae.implementation){d(ie,J.sibling),J=v(J,ae.children||[]),J.return=ie,ie=J;break e}else{d(ie,J);break}else u(ie,J);J=J.sibling}J=Zg(ae,ie.mode,Qe),J.return=ie,ie=J}return M(ie);case de:return et=ae._init,On(ie,J,et(ae._payload),Qe)}if(Ur(ae))return Ze(ie,J,ae,Qe);if(ye(ae))return Ve(ie,J,ae,Qe);Gf(ie,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"?(ae=""+ae,J!==null&&J.tag===6?(d(ie,J.sibling),J=v(J,ae),J.return=ie,ie=J):(d(ie,J),J=Ig(ae,ie.mode,Qe),J.return=ie,ie=J),M(ie)):d(ie,J)}return On}var ru=u1(!0),c1=u1(!1),Kf=Ji(null),Jf=null,iu=null,Hm=null;function Gm(){Hm=iu=Jf=null}function Km(a){var u=Kf.current;zt(Kf),a._currentValue=u}function Jm(a,u,d){for(;a!==null;){var y=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,y!==null&&(y.childLanes|=u)):y!==null&&(y.childLanes&u)!==u&&(y.childLanes|=u),a===d)break;a=a.return}}function su(a,u){Jf=a,Hm=iu=null,a=a.dependencies,a!==null&&a.firstContext!==null&&((a.lanes&u)!==0&&(pr=!0),a.firstContext=null)}function si(a){var u=a._currentValue;if(Hm!==a)if(a={context:a,memoizedValue:u,next:null},iu===null){if(Jf===null)throw Error(t(308));iu=a,Jf.dependencies={lanes:0,firstContext:a}}else iu=iu.next=a;return u}var Fa=null;function eg(a){Fa===null?Fa=[a]:Fa.push(a)}function h1(a,u,d,y){var v=u.interleaved;return v===null?(d.next=d,eg(u)):(d.next=v.next,v.next=d),u.interleaved=d,Ls(a,y)}function Ls(a,u){a.lanes|=u;var d=a.alternate;for(d!==null&&(d.lanes|=u),d=a,a=a.return;a!==null;)a.childLanes|=u,d=a.alternate,d!==null&&(d.childLanes|=u),d=a,a=a.return;return d.tag===3?d.stateNode:null}var No=!1;function tg(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function f1(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function Is(a,u){return{eventTime:a,lane:u,tag:0,payload:null,callback:null,next:null}}function Ao(a,u,d){var y=a.updateQueue;if(y===null)return null;if(y=y.shared,(Mt&2)!==0){var v=y.pending;return v===null?u.next=u:(u.next=v.next,v.next=u),y.pending=u,Ls(a,d)}return v=y.interleaved,v===null?(u.next=u,eg(y)):(u.next=v.next,v.next=u),y.interleaved=u,Ls(a,d)}function ed(a,u,d){if(u=u.updateQueue,u!==null&&(u=u.shared,(d&4194240)!==0)){var y=u.lanes;y&=a.pendingLanes,d|=y,u.lanes=d,ho(a,d)}}function d1(a,u){var d=a.updateQueue,y=a.alternate;if(y!==null&&(y=y.updateQueue,d===y)){var v=null,b=null;if(d=d.firstBaseUpdate,d!==null){do{var M={eventTime:d.eventTime,lane:d.lane,tag:d.tag,payload:d.payload,callback:d.callback,next:null};b===null?v=b=M:b=b.next=M,d=d.next}while(d!==null);b===null?v=b=u:b=b.next=u}else v=b=u;d={baseState:y.baseState,firstBaseUpdate:v,lastBaseUpdate:b,shared:y.shared,effects:y.effects},a.updateQueue=d;return}a=d.lastBaseUpdate,a===null?d.firstBaseUpdate=u:a.next=u,d.lastBaseUpdate=u}function td(a,u,d,y){var v=a.updateQueue;No=!1;var b=v.firstBaseUpdate,M=v.lastBaseUpdate,X=v.shared.pending;if(X!==null){v.shared.pending=null;var H=X,le=H.next;H.next=null,M===null?b=le:M.next=le,M=H;var ve=a.alternate;ve!==null&&(ve=ve.updateQueue,X=ve.lastBaseUpdate,X!==M&&(X===null?ve.firstBaseUpdate=le:X.next=le,ve.lastBaseUpdate=H))}if(b!==null){var we=v.baseState;M=0,ve=le=H=null,X=b;do{var ge=X.lane,je=X.eventTime;if((y&ge)===ge){ve!==null&&(ve=ve.next={eventTime:je,lane:0,tag:X.tag,payload:X.payload,callback:X.callback,next:null});e:{var Ze=a,Ve=X;switch(ge=u,je=d,Ve.tag){case 1:if(Ze=Ve.payload,typeof Ze=="function"){we=Ze.call(je,we,ge);break e}we=Ze;break e;case 3:Ze.flags=Ze.flags&-65537|128;case 0:if(Ze=Ve.payload,ge=typeof Ze=="function"?Ze.call(je,we,ge):Ze,ge==null)break e;we=N({},we,ge);break e;case 2:No=!0}}X.callback!==null&&X.lane!==0&&(a.flags|=64,ge=v.effects,ge===null?v.effects=[X]:ge.push(X))}else je={eventTime:je,lane:ge,tag:X.tag,payload:X.payload,callback:X.callback,next:null},ve===null?(le=ve=je,H=we):ve=ve.next=je,M|=ge;if(X=X.next,X===null){if(X=v.shared.pending,X===null)break;ge=X,X=ge.next,ge.next=null,v.lastBaseUpdate=ge,v.shared.pending=null}}while(!0);if(ve===null&&(H=we),v.baseState=H,v.firstBaseUpdate=le,v.lastBaseUpdate=ve,u=v.shared.interleaved,u!==null){v=u;do M|=v.lane,v=v.next;while(v!==u)}else b===null&&(v.shared.lanes=0);Ua|=M,a.lanes=M,a.memoizedState=we}}function p1(a,u,d){if(a=u.effects,u.effects=null,a!==null)for(u=0;u<a.length;u++){var y=a[u],v=y.callback;if(v!==null){if(y.callback=null,y=d,typeof v!="function")throw Error(t(191,v));v.call(y)}}}var Nc={},ts=Ji(Nc),Ac=Ji(Nc),_c=Ji(Nc);function Ba(a){if(a===Nc)throw Error(t(174));return a}function ng(a,u){switch(Rt(_c,u),Rt(Ac,a),Rt(ts,Nc),a=u.nodeType,a){case 9:case 11:u=(u=u.documentElement)?u.namespaceURI:Pe(null,"");break;default:a=a===8?u.parentNode:u,u=a.namespaceURI||null,a=a.tagName,u=Pe(u,a)}zt(ts),Rt(ts,u)}function ou(){zt(ts),zt(Ac),zt(_c)}function m1(a){Ba(_c.current);var u=Ba(ts.current),d=Pe(u,a.type);u!==d&&(Rt(Ac,a),Rt(ts,d))}function rg(a){Ac.current===a&&(zt(ts),zt(Ac))}var ln=Ji(0);function nd(a){for(var u=a;u!==null;){if(u.tag===13){var d=u.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||d.data==="$?"||d.data==="$!"))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var ig=[];function sg(){for(var a=0;a<ig.length;a++)ig[a]._workInProgressVersionPrimary=null;ig.length=0}var rd=Z.ReactCurrentDispatcher,og=Z.ReactCurrentBatchConfig,Ya=0,un=null,Pn=null,$n=null,id=!1,zc=!1,Dc=0,C$=0;function Zn(){throw Error(t(321))}function ag(a,u){if(u===null)return!1;for(var d=0;d<u.length&&d<a.length;d++)if(!an(a[d],u[d]))return!1;return!0}function lg(a,u,d,y,v,b){if(Ya=b,un=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,rd.current=a===null||a.memoizedState===null?M$:j$,a=d(y,v),zc){b=0;do{if(zc=!1,Dc=0,25<=b)throw Error(t(301));b+=1,$n=Pn=null,u.updateQueue=null,rd.current=R$,a=d(y,v)}while(zc)}if(rd.current=ad,u=Pn!==null&&Pn.next!==null,Ya=0,$n=Pn=un=null,id=!1,u)throw Error(t(300));return a}function ug(){var a=Dc!==0;return Dc=0,a}function ns(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return $n===null?un.memoizedState=$n=a:$n=$n.next=a,$n}function oi(){if(Pn===null){var a=un.alternate;a=a!==null?a.memoizedState:null}else a=Pn.next;var u=$n===null?un.memoizedState:$n.next;if(u!==null)$n=u,Pn=a;else{if(a===null)throw Error(t(310));Pn=a,a={memoizedState:Pn.memoizedState,baseState:Pn.baseState,baseQueue:Pn.baseQueue,queue:Pn.queue,next:null},$n===null?un.memoizedState=$n=a:$n=$n.next=a}return $n}function Lc(a,u){return typeof u=="function"?u(a):u}function cg(a){var u=oi(),d=u.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var y=Pn,v=y.baseQueue,b=d.pending;if(b!==null){if(v!==null){var M=v.next;v.next=b.next,b.next=M}y.baseQueue=v=b,d.pending=null}if(v!==null){b=v.next,y=y.baseState;var X=M=null,H=null,le=b;do{var ve=le.lane;if((Ya&ve)===ve)H!==null&&(H=H.next={lane:0,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null}),y=le.hasEagerState?le.eagerState:a(y,le.action);else{var we={lane:ve,action:le.action,hasEagerState:le.hasEagerState,eagerState:le.eagerState,next:null};H===null?(X=H=we,M=y):H=H.next=we,un.lanes|=ve,Ua|=ve}le=le.next}while(le!==null&&le!==b);H===null?M=y:H.next=X,an(y,u.memoizedState)||(pr=!0),u.memoizedState=y,u.baseState=M,u.baseQueue=H,d.lastRenderedState=y}if(a=d.interleaved,a!==null){v=a;do b=v.lane,un.lanes|=b,Ua|=b,v=v.next;while(v!==a)}else v===null&&(d.lanes=0);return[u.memoizedState,d.dispatch]}function hg(a){var u=oi(),d=u.queue;if(d===null)throw Error(t(311));d.lastRenderedReducer=a;var y=d.dispatch,v=d.pending,b=u.memoizedState;if(v!==null){d.pending=null;var M=v=v.next;do b=a(b,M.action),M=M.next;while(M!==v);an(b,u.memoizedState)||(pr=!0),u.memoizedState=b,u.baseQueue===null&&(u.baseState=b),d.lastRenderedState=b}return[b,y]}function g1(){}function O1(a,u){var d=un,y=oi(),v=u(),b=!an(y.memoizedState,v);if(b&&(y.memoizedState=v,pr=!0),y=y.queue,fg(v1.bind(null,d,y,a),[a]),y.getSnapshot!==u||b||$n!==null&&$n.memoizedState.tag&1){if(d.flags|=2048,Ic(9,x1.bind(null,d,y,v,u),void 0,null),En===null)throw Error(t(349));(Ya&30)!==0||y1(d,u,v)}return v}function y1(a,u,d){a.flags|=16384,a={getSnapshot:u,value:d},u=un.updateQueue,u===null?(u={lastEffect:null,stores:null},un.updateQueue=u,u.stores=[a]):(d=u.stores,d===null?u.stores=[a]:d.push(a))}function x1(a,u,d,y){u.value=d,u.getSnapshot=y,w1(u)&&k1(a)}function v1(a,u,d){return d(function(){w1(u)&&k1(a)})}function w1(a){var u=a.getSnapshot;a=a.value;try{var d=u();return!an(a,d)}catch{return!0}}function k1(a){var u=Ls(a,1);u!==null&&Mi(u,a,1,-1)}function S1(a){var u=ns();return typeof a=="function"&&(a=a()),u.memoizedState=u.baseState=a,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Lc,lastRenderedState:a},u.queue=a,a=a.dispatch=E$.bind(null,un,a),[u.memoizedState,a]}function Ic(a,u,d,y){return a={tag:a,create:u,destroy:d,deps:y,next:null},u=un.updateQueue,u===null?(u={lastEffect:null,stores:null},un.updateQueue=u,u.lastEffect=a.next=a):(d=u.lastEffect,d===null?u.lastEffect=a.next=a:(y=d.next,d.next=a,a.next=y,u.lastEffect=a)),a}function b1(){return oi().memoizedState}function sd(a,u,d,y){var v=ns();un.flags|=a,v.memoizedState=Ic(1|u,d,void 0,y===void 0?null:y)}function od(a,u,d,y){var v=oi();y=y===void 0?null:y;var b=void 0;if(Pn!==null){var M=Pn.memoizedState;if(b=M.destroy,y!==null&&ag(y,M.deps)){v.memoizedState=Ic(u,d,b,y);return}}un.flags|=a,v.memoizedState=Ic(1|u,d,b,y)}function P1(a,u){return sd(8390656,8,a,u)}function fg(a,u){return od(2048,8,a,u)}function Q1(a,u){return od(4,2,a,u)}function C1(a,u){return od(4,4,a,u)}function T1(a,u){if(typeof u=="function")return a=a(),u(a),function(){u(null)};if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function $1(a,u,d){return d=d!=null?d.concat([a]):null,od(4,4,T1.bind(null,u,a),d)}function dg(){}function E1(a,u){var d=oi();u=u===void 0?null:u;var y=d.memoizedState;return y!==null&&u!==null&&ag(u,y[1])?y[0]:(d.memoizedState=[a,u],a)}function M1(a,u){var d=oi();u=u===void 0?null:u;var y=d.memoizedState;return y!==null&&u!==null&&ag(u,y[1])?y[0]:(a=a(),d.memoizedState=[a,u],a)}function j1(a,u,d){return(Ya&21)===0?(a.baseState&&(a.baseState=!1,pr=!0),a.memoizedState=d):(an(d,u)||(d=ac(),un.lanes|=d,Ua|=d,a.baseState=!0),u)}function T$(a,u){var d=jt;jt=d!==0&&4>d?d:4,a(!0);var y=og.transition;og.transition={};try{a(!1),u()}finally{jt=d,og.transition=y}}function R1(){return oi().memoizedState}function $$(a,u,d){var y=Lo(a);if(d={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null},N1(a))A1(u,d);else if(d=h1(a,u,d,y),d!==null){var v=or();Mi(d,a,y,v),_1(d,u,y)}}function E$(a,u,d){var y=Lo(a),v={lane:y,action:d,hasEagerState:!1,eagerState:null,next:null};if(N1(a))A1(u,v);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=u.lastRenderedReducer,b!==null))try{var M=u.lastRenderedState,X=b(M,d);if(v.hasEagerState=!0,v.eagerState=X,an(X,M)){var H=u.interleaved;H===null?(v.next=v,eg(u)):(v.next=H.next,H.next=v),u.interleaved=v;return}}catch{}finally{}d=h1(a,u,v,y),d!==null&&(v=or(),Mi(d,a,y,v),_1(d,u,y))}}function N1(a){var u=a.alternate;return a===un||u!==null&&u===un}function A1(a,u){zc=id=!0;var d=a.pending;d===null?u.next=u:(u.next=d.next,d.next=u),a.pending=u}function _1(a,u,d){if((d&4194240)!==0){var y=u.lanes;y&=a.pendingLanes,d|=y,u.lanes=d,ho(a,d)}}var ad={readContext:si,useCallback:Zn,useContext:Zn,useEffect:Zn,useImperativeHandle:Zn,useInsertionEffect:Zn,useLayoutEffect:Zn,useMemo:Zn,useReducer:Zn,useRef:Zn,useState:Zn,useDebugValue:Zn,useDeferredValue:Zn,useTransition:Zn,useMutableSource:Zn,useSyncExternalStore:Zn,useId:Zn,unstable_isNewReconciler:!1},M$={readContext:si,useCallback:function(a,u){return ns().memoizedState=[a,u===void 0?null:u],a},useContext:si,useEffect:P1,useImperativeHandle:function(a,u,d){return d=d!=null?d.concat([a]):null,sd(4194308,4,T1.bind(null,u,a),d)},useLayoutEffect:function(a,u){return sd(4194308,4,a,u)},useInsertionEffect:function(a,u){return sd(4,2,a,u)},useMemo:function(a,u){var d=ns();return u=u===void 0?null:u,a=a(),d.memoizedState=[a,u],a},useReducer:function(a,u,d){var y=ns();return u=d!==void 0?d(u):u,y.memoizedState=y.baseState=u,a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:u},y.queue=a,a=a.dispatch=$$.bind(null,un,a),[y.memoizedState,a]},useRef:function(a){var u=ns();return a={current:a},u.memoizedState=a},useState:S1,useDebugValue:dg,useDeferredValue:function(a){return ns().memoizedState=a},useTransition:function(){var a=S1(!1),u=a[0];return a=T$.bind(null,a[1]),ns().memoizedState=a,[u,a]},useMutableSource:function(){},useSyncExternalStore:function(a,u,d){var y=un,v=ns();if(sn){if(d===void 0)throw Error(t(407));d=d()}else{if(d=u(),En===null)throw Error(t(349));(Ya&30)!==0||y1(y,u,d)}v.memoizedState=d;var b={value:d,getSnapshot:u};return v.queue=b,P1(v1.bind(null,y,b,a),[a]),y.flags|=2048,Ic(9,x1.bind(null,y,b,d,u),void 0,null),d},useId:function(){var a=ns(),u=En.identifierPrefix;if(sn){var d=Ds,y=zs;d=(y&~(1<<32-ht(y)-1)).toString(32)+d,u=":"+u+"R"+d,d=Dc++,0<d&&(u+="H"+d.toString(32)),u+=":"}else d=C$++,u=":"+u+"r"+d.toString(32)+":";return a.memoizedState=u},unstable_isNewReconciler:!1},j$={readContext:si,useCallback:E1,useContext:si,useEffect:fg,useImperativeHandle:$1,useInsertionEffect:Q1,useLayoutEffect:C1,useMemo:M1,useReducer:cg,useRef:b1,useState:function(){return cg(Lc)},useDebugValue:dg,useDeferredValue:function(a){var u=oi();return j1(u,Pn.memoizedState,a)},useTransition:function(){var a=cg(Lc)[0],u=oi().memoizedState;return[a,u]},useMutableSource:g1,useSyncExternalStore:O1,useId:R1,unstable_isNewReconciler:!1},R$={readContext:si,useCallback:E1,useContext:si,useEffect:fg,useImperativeHandle:$1,useInsertionEffect:Q1,useLayoutEffect:C1,useMemo:M1,useReducer:hg,useRef:b1,useState:function(){return hg(Lc)},useDebugValue:dg,useDeferredValue:function(a){var u=oi();return Pn===null?u.memoizedState=a:j1(u,Pn.memoizedState,a)},useTransition:function(){var a=hg(Lc)[0],u=oi().memoizedState;return[a,u]},useMutableSource:g1,useSyncExternalStore:O1,useId:R1,unstable_isNewReconciler:!1};function Ti(a,u){if(a&&a.defaultProps){u=N({},u),a=a.defaultProps;for(var d in a)u[d]===void 0&&(u[d]=a[d]);return u}return u}function pg(a,u,d,y){u=a.memoizedState,d=d(y,u),d=d==null?u:N({},u,d),a.memoizedState=d,a.lanes===0&&(a.updateQueue.baseState=d)}var ld={isMounted:function(a){return(a=a._reactInternals)?Ne(a)===a:!1},enqueueSetState:function(a,u,d){a=a._reactInternals;var y=or(),v=Lo(a),b=Is(y,v);b.payload=u,d!=null&&(b.callback=d),u=Ao(a,b,v),u!==null&&(Mi(u,a,v,y),ed(u,a,v))},enqueueReplaceState:function(a,u,d){a=a._reactInternals;var y=or(),v=Lo(a),b=Is(y,v);b.tag=1,b.payload=u,d!=null&&(b.callback=d),u=Ao(a,b,v),u!==null&&(Mi(u,a,v,y),ed(u,a,v))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var d=or(),y=Lo(a),v=Is(d,y);v.tag=2,u!=null&&(v.callback=u),u=Ao(a,v,y),u!==null&&(Mi(u,a,y,d),ed(u,a,y))}};function z1(a,u,d,y,v,b,M){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(y,b,M):u.prototype&&u.prototype.isPureReactComponent?!ko(d,y)||!ko(v,b):!0}function D1(a,u,d){var y=!1,v=es,b=u.contextType;return typeof b=="object"&&b!==null?b=si(b):(v=dr(u)?Xa:In.current,y=u.contextTypes,b=(y=y!=null)?Jl(a,v):es),u=new u(d,b),a.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=ld,a.stateNode=u,u._reactInternals=a,y&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=v,a.__reactInternalMemoizedMaskedChildContext=b),u}function L1(a,u,d,y){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(d,y),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(d,y),u.state!==a&&ld.enqueueReplaceState(u,u.state,null)}function mg(a,u,d,y){var v=a.stateNode;v.props=d,v.state=a.memoizedState,v.refs={},tg(a);var b=u.contextType;typeof b=="object"&&b!==null?v.context=si(b):(b=dr(u)?Xa:In.current,v.context=Jl(a,b)),v.state=a.memoizedState,b=u.getDerivedStateFromProps,typeof b=="function"&&(pg(a,u,b,d),v.state=a.memoizedState),typeof u.getDerivedStateFromProps=="function"||typeof v.getSnapshotBeforeUpdate=="function"||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(u=v.state,typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount(),u!==v.state&&ld.enqueueReplaceState(v,v.state,null),td(a,d,v,y),v.state=a.memoizedState),typeof v.componentDidMount=="function"&&(a.flags|=4194308)}function au(a,u){try{var d="",y=u;do d+=_e(y),y=y.return;while(y);var v=d}catch(b){v=`
39
+ Error generating stack: `+b.message+`
40
+ `+b.stack}return{value:a,source:u,stack:v,digest:null}}function gg(a,u,d){return{value:a,source:null,stack:d??null,digest:u??null}}function Og(a,u){try{console.error(u.value)}catch(d){setTimeout(function(){throw d})}}var N$=typeof WeakMap=="function"?WeakMap:Map;function I1(a,u,d){d=Is(-1,d),d.tag=3,d.payload={element:null};var y=u.value;return d.callback=function(){md||(md=!0,jg=y),Og(a,u)},d}function Z1(a,u,d){d=Is(-1,d),d.tag=3;var y=a.type.getDerivedStateFromError;if(typeof y=="function"){var v=u.value;d.payload=function(){return y(v)},d.callback=function(){Og(a,u)}}var b=a.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(d.callback=function(){Og(a,u),typeof y!="function"&&(zo===null?zo=new Set([this]):zo.add(this));var M=u.stack;this.componentDidCatch(u.value,{componentStack:M!==null?M:""})}),d}function X1(a,u,d){var y=a.pingCache;if(y===null){y=a.pingCache=new N$;var v=new Set;y.set(u,v)}else v=y.get(u),v===void 0&&(v=new Set,y.set(u,v));v.has(d)||(v.add(d),a=U$.bind(null,a,u,d),u.then(a,a))}function V1(a){do{var u;if((u=a.tag===13)&&(u=a.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return a;a=a.return}while(a!==null);return null}function W1(a,u,d,y,v){return(a.mode&1)===0?(a===u?a.flags|=65536:(a.flags|=128,d.flags|=131072,d.flags&=-52805,d.tag===1&&(d.alternate===null?d.tag=17:(u=Is(-1,1),u.tag=2,Ao(d,u,1))),d.lanes|=1),a):(a.flags|=65536,a.lanes=v,a)}var A$=Z.ReactCurrentOwner,pr=!1;function sr(a,u,d,y){u.child=a===null?c1(u,null,d,y):ru(u,a.child,d,y)}function F1(a,u,d,y,v){d=d.render;var b=u.ref;return su(u,v),y=lg(a,u,d,y,b,v),d=ug(),a!==null&&!pr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~v,Zs(a,u,v)):(sn&&d&&Fm(u),u.flags|=1,sr(a,u,y,v),u.child)}function B1(a,u,d,y,v){if(a===null){var b=d.type;return typeof b=="function"&&!Lg(b)&&b.defaultProps===void 0&&d.compare===null&&d.defaultProps===void 0?(u.tag=15,u.type=b,Y1(a,u,b,y,v)):(a=wd(d.type,null,y,u,u.mode,v),a.ref=u.ref,a.return=u,u.child=a)}if(b=a.child,(a.lanes&v)===0){var M=b.memoizedProps;if(d=d.compare,d=d!==null?d:ko,d(M,y)&&a.ref===u.ref)return Zs(a,u,v)}return u.flags|=1,a=Zo(b,y),a.ref=u.ref,a.return=u,u.child=a}function Y1(a,u,d,y,v){if(a!==null){var b=a.memoizedProps;if(ko(b,y)&&a.ref===u.ref)if(pr=!1,u.pendingProps=y=b,(a.lanes&v)!==0)(a.flags&131072)!==0&&(pr=!0);else return u.lanes=a.lanes,Zs(a,u,v)}return yg(a,u,d,y,v)}function U1(a,u,d){var y=u.pendingProps,v=y.children,b=a!==null?a.memoizedState:null;if(y.mode==="hidden")if((u.mode&1)===0)u.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(uu,Ar),Ar|=d;else{if((d&1073741824)===0)return a=b!==null?b.baseLanes|d:d,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:a,cachePool:null,transitions:null},u.updateQueue=null,Rt(uu,Ar),Ar|=a,null;u.memoizedState={baseLanes:0,cachePool:null,transitions:null},y=b!==null?b.baseLanes:d,Rt(uu,Ar),Ar|=y}else b!==null?(y=b.baseLanes|d,u.memoizedState=null):y=d,Rt(uu,Ar),Ar|=y;return sr(a,u,v,d),u.child}function q1(a,u){var d=u.ref;(a===null&&d!==null||a!==null&&a.ref!==d)&&(u.flags|=512,u.flags|=2097152)}function yg(a,u,d,y,v){var b=dr(d)?Xa:In.current;return b=Jl(u,b),su(u,v),d=lg(a,u,d,y,b,v),y=ug(),a!==null&&!pr?(u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~v,Zs(a,u,v)):(sn&&y&&Fm(u),u.flags|=1,sr(a,u,d,v),u.child)}function H1(a,u,d,y,v){if(dr(d)){var b=!0;Bf(u)}else b=!1;if(su(u,v),u.stateNode===null)cd(a,u),D1(u,d,y),mg(u,d,y,v),y=!0;else if(a===null){var M=u.stateNode,X=u.memoizedProps;M.props=X;var H=M.context,le=d.contextType;typeof le=="object"&&le!==null?le=si(le):(le=dr(d)?Xa:In.current,le=Jl(u,le));var ve=d.getDerivedStateFromProps,we=typeof ve=="function"||typeof M.getSnapshotBeforeUpdate=="function";we||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(X!==y||H!==le)&&L1(u,M,y,le),No=!1;var ge=u.memoizedState;M.state=ge,td(u,y,M,v),H=u.memoizedState,X!==y||ge!==H||fr.current||No?(typeof ve=="function"&&(pg(u,d,ve,y),H=u.memoizedState),(X=No||z1(u,d,X,y,ge,H,le))?(we||typeof M.UNSAFE_componentWillMount!="function"&&typeof M.componentWillMount!="function"||(typeof M.componentWillMount=="function"&&M.componentWillMount(),typeof M.UNSAFE_componentWillMount=="function"&&M.UNSAFE_componentWillMount()),typeof M.componentDidMount=="function"&&(u.flags|=4194308)):(typeof M.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=y,u.memoizedState=H),M.props=y,M.state=H,M.context=le,y=X):(typeof M.componentDidMount=="function"&&(u.flags|=4194308),y=!1)}else{M=u.stateNode,f1(a,u),X=u.memoizedProps,le=u.type===u.elementType?X:Ti(u.type,X),M.props=le,we=u.pendingProps,ge=M.context,H=d.contextType,typeof H=="object"&&H!==null?H=si(H):(H=dr(d)?Xa:In.current,H=Jl(u,H));var je=d.getDerivedStateFromProps;(ve=typeof je=="function"||typeof M.getSnapshotBeforeUpdate=="function")||typeof M.UNSAFE_componentWillReceiveProps!="function"&&typeof M.componentWillReceiveProps!="function"||(X!==we||ge!==H)&&L1(u,M,y,H),No=!1,ge=u.memoizedState,M.state=ge,td(u,y,M,v);var Ze=u.memoizedState;X!==we||ge!==Ze||fr.current||No?(typeof je=="function"&&(pg(u,d,je,y),Ze=u.memoizedState),(le=No||z1(u,d,le,y,ge,Ze,H)||!1)?(ve||typeof M.UNSAFE_componentWillUpdate!="function"&&typeof M.componentWillUpdate!="function"||(typeof M.componentWillUpdate=="function"&&M.componentWillUpdate(y,Ze,H),typeof M.UNSAFE_componentWillUpdate=="function"&&M.UNSAFE_componentWillUpdate(y,Ze,H)),typeof M.componentDidUpdate=="function"&&(u.flags|=4),typeof M.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof M.componentDidUpdate!="function"||X===a.memoizedProps&&ge===a.memoizedState||(u.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||X===a.memoizedProps&&ge===a.memoizedState||(u.flags|=1024),u.memoizedProps=y,u.memoizedState=Ze),M.props=y,M.state=Ze,M.context=H,y=le):(typeof M.componentDidUpdate!="function"||X===a.memoizedProps&&ge===a.memoizedState||(u.flags|=4),typeof M.getSnapshotBeforeUpdate!="function"||X===a.memoizedProps&&ge===a.memoizedState||(u.flags|=1024),y=!1)}return xg(a,u,d,y,b,v)}function xg(a,u,d,y,v,b){q1(a,u);var M=(u.flags&128)!==0;if(!y&&!M)return v&&t1(u,d,!1),Zs(a,u,b);y=u.stateNode,A$.current=u;var X=M&&typeof d.getDerivedStateFromError!="function"?null:y.render();return u.flags|=1,a!==null&&M?(u.child=ru(u,a.child,null,b),u.child=ru(u,null,X,b)):sr(a,u,X,b),u.memoizedState=y.state,v&&t1(u,d,!0),u.child}function G1(a){var u=a.stateNode;u.pendingContext?Jx(a,u.pendingContext,u.pendingContext!==u.context):u.context&&Jx(a,u.context,!1),ng(a,u.containerInfo)}function K1(a,u,d,y,v){return nu(),qm(v),u.flags|=256,sr(a,u,d,y),u.child}var vg={dehydrated:null,treeContext:null,retryLane:0};function wg(a){return{baseLanes:a,cachePool:null,transitions:null}}function J1(a,u,d){var y=u.pendingProps,v=ln.current,b=!1,M=(u.flags&128)!==0,X;if((X=M)||(X=a!==null&&a.memoizedState===null?!1:(v&2)!==0),X?(b=!0,u.flags&=-129):(a===null||a.memoizedState!==null)&&(v|=1),Rt(ln,v&1),a===null)return Um(u),a=u.memoizedState,a!==null&&(a=a.dehydrated,a!==null)?((u.mode&1)===0?u.lanes=1:a.data==="$!"?u.lanes=8:u.lanes=1073741824,null):(M=y.children,a=y.fallback,b?(y=u.mode,b=u.child,M={mode:"hidden",children:M},(y&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=M):b=kd(M,y,0,null),a=Ka(a,y,d,null),b.return=u,a.return=u,b.sibling=a,u.child=b,u.child.memoizedState=wg(d),u.memoizedState=vg,a):kg(u,M));if(v=a.memoizedState,v!==null&&(X=v.dehydrated,X!==null))return _$(a,u,M,y,X,v,d);if(b){b=y.fallback,M=u.mode,v=a.child,X=v.sibling;var H={mode:"hidden",children:y.children};return(M&1)===0&&u.child!==v?(y=u.child,y.childLanes=0,y.pendingProps=H,u.deletions=null):(y=Zo(v,H),y.subtreeFlags=v.subtreeFlags&14680064),X!==null?b=Zo(X,b):(b=Ka(b,M,d,null),b.flags|=2),b.return=u,y.return=u,y.sibling=b,u.child=y,y=b,b=u.child,M=a.child.memoizedState,M=M===null?wg(d):{baseLanes:M.baseLanes|d,cachePool:null,transitions:M.transitions},b.memoizedState=M,b.childLanes=a.childLanes&~d,u.memoizedState=vg,y}return b=a.child,a=b.sibling,y=Zo(b,{mode:"visible",children:y.children}),(u.mode&1)===0&&(y.lanes=d),y.return=u,y.sibling=null,a!==null&&(d=u.deletions,d===null?(u.deletions=[a],u.flags|=16):d.push(a)),u.child=y,u.memoizedState=null,y}function kg(a,u){return u=kd({mode:"visible",children:u},a.mode,0,null),u.return=a,a.child=u}function ud(a,u,d,y){return y!==null&&qm(y),ru(u,a.child,null,d),a=kg(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function _$(a,u,d,y,v,b,M){if(d)return u.flags&256?(u.flags&=-257,y=gg(Error(t(422))),ud(a,u,M,y)):u.memoizedState!==null?(u.child=a.child,u.flags|=128,null):(b=y.fallback,v=u.mode,y=kd({mode:"visible",children:y.children},v,0,null),b=Ka(b,v,M,null),b.flags|=2,y.return=u,b.return=u,y.sibling=b,u.child=y,(u.mode&1)!==0&&ru(u,a.child,null,M),u.child.memoizedState=wg(M),u.memoizedState=vg,b);if((u.mode&1)===0)return ud(a,u,M,null);if(v.data==="$!"){if(y=v.nextSibling&&v.nextSibling.dataset,y)var X=y.dgst;return y=X,b=Error(t(419)),y=gg(b,y,void 0),ud(a,u,M,y)}if(X=(M&a.childLanes)!==0,pr||X){if(y=En,y!==null){switch(M&-M){case 4:v=2;break;case 16:v=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:v=32;break;case 536870912:v=268435456;break;default:v=0}v=(v&(y.suspendedLanes|M))!==0?0:v,v!==0&&v!==b.retryLane&&(b.retryLane=v,Ls(a,v),Mi(y,a,v,-1))}return Dg(),y=gg(Error(t(421))),ud(a,u,M,y)}return v.data==="$?"?(u.flags|=128,u.child=a.child,u=q$.bind(null,a),v._reactRetry=u,null):(a=b.treeContext,Nr=xe(v.nextSibling),Rr=u,sn=!0,Ci=null,a!==null&&(ri[ii++]=zs,ri[ii++]=Ds,ri[ii++]=Va,zs=a.id,Ds=a.overflow,Va=u),u=kg(u,y.children),u.flags|=4096,u)}function ev(a,u,d){a.lanes|=u;var y=a.alternate;y!==null&&(y.lanes|=u),Jm(a.return,u,d)}function Sg(a,u,d,y,v){var b=a.memoizedState;b===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:y,tail:d,tailMode:v}:(b.isBackwards=u,b.rendering=null,b.renderingStartTime=0,b.last=y,b.tail=d,b.tailMode=v)}function tv(a,u,d){var y=u.pendingProps,v=y.revealOrder,b=y.tail;if(sr(a,u,y.children,d),y=ln.current,(y&2)!==0)y=y&1|2,u.flags|=128;else{if(a!==null&&(a.flags&128)!==0)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&ev(a,d,u);else if(a.tag===19)ev(a,d,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}y&=1}if(Rt(ln,y),(u.mode&1)===0)u.memoizedState=null;else switch(v){case"forwards":for(d=u.child,v=null;d!==null;)a=d.alternate,a!==null&&nd(a)===null&&(v=d),d=d.sibling;d=v,d===null?(v=u.child,u.child=null):(v=d.sibling,d.sibling=null),Sg(u,!1,v,d,b);break;case"backwards":for(d=null,v=u.child,u.child=null;v!==null;){if(a=v.alternate,a!==null&&nd(a)===null){u.child=v;break}a=v.sibling,v.sibling=d,d=v,v=a}Sg(u,!0,d,null,b);break;case"together":Sg(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function cd(a,u){(u.mode&1)===0&&a!==null&&(a.alternate=null,u.alternate=null,u.flags|=2)}function Zs(a,u,d){if(a!==null&&(u.dependencies=a.dependencies),Ua|=u.lanes,(d&u.childLanes)===0)return null;if(a!==null&&u.child!==a.child)throw Error(t(153));if(u.child!==null){for(a=u.child,d=Zo(a,a.pendingProps),u.child=d,d.return=u;a.sibling!==null;)a=a.sibling,d=d.sibling=Zo(a,a.pendingProps),d.return=u;d.sibling=null}return u.child}function z$(a,u,d){switch(u.tag){case 3:G1(u),nu();break;case 5:m1(u);break;case 1:dr(u.type)&&Bf(u);break;case 4:ng(u,u.stateNode.containerInfo);break;case 10:var y=u.type._context,v=u.memoizedProps.value;Rt(Kf,y._currentValue),y._currentValue=v;break;case 13:if(y=u.memoizedState,y!==null)return y.dehydrated!==null?(Rt(ln,ln.current&1),u.flags|=128,null):(d&u.child.childLanes)!==0?J1(a,u,d):(Rt(ln,ln.current&1),a=Zs(a,u,d),a!==null?a.sibling:null);Rt(ln,ln.current&1);break;case 19:if(y=(d&u.childLanes)!==0,(a.flags&128)!==0){if(y)return tv(a,u,d);u.flags|=128}if(v=u.memoizedState,v!==null&&(v.rendering=null,v.tail=null,v.lastEffect=null),Rt(ln,ln.current),y)break;return null;case 22:case 23:return u.lanes=0,U1(a,u,d)}return Zs(a,u,d)}var nv,bg,rv,iv;nv=function(a,u){for(var d=u.child;d!==null;){if(d.tag===5||d.tag===6)a.appendChild(d.stateNode);else if(d.tag!==4&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===u)break;for(;d.sibling===null;){if(d.return===null||d.return===u)return;d=d.return}d.sibling.return=d.return,d=d.sibling}},bg=function(){},rv=function(a,u,d,y){var v=a.memoizedProps;if(v!==y){a=u.stateNode,Ba(ts.current);var b=null;switch(d){case"input":v=Zi(a,v),y=Zi(a,y),b=[];break;case"select":v=N({},v,{value:void 0}),y=N({},y,{value:void 0}),b=[];break;case"textarea":v=bs(a,v),y=bs(a,y),b=[];break;default:typeof v.onClick!="function"&&typeof y.onClick=="function"&&(a.onclick=Kl)}nn(d,y);var M;d=null;for(le in v)if(!y.hasOwnProperty(le)&&v.hasOwnProperty(le)&&v[le]!=null)if(le==="style"){var X=v[le];for(M in X)X.hasOwnProperty(M)&&(d||(d={}),d[M]="")}else le!=="dangerouslySetInnerHTML"&&le!=="children"&&le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&le!=="autoFocus"&&(i.hasOwnProperty(le)?b||(b=[]):(b=b||[]).push(le,null));for(le in y){var H=y[le];if(X=v!=null?v[le]:void 0,y.hasOwnProperty(le)&&H!==X&&(H!=null||X!=null))if(le==="style")if(X){for(M in X)!X.hasOwnProperty(M)||H&&H.hasOwnProperty(M)||(d||(d={}),d[M]="");for(M in H)H.hasOwnProperty(M)&&X[M]!==H[M]&&(d||(d={}),d[M]=H[M])}else d||(b||(b=[]),b.push(le,d)),d=H;else le==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,X=X?X.__html:void 0,H!=null&&X!==H&&(b=b||[]).push(le,H)):le==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(le,""+H):le!=="suppressContentEditableWarning"&&le!=="suppressHydrationWarning"&&(i.hasOwnProperty(le)?(H!=null&&le==="onScroll"&&Bt("scroll",a),b||X===H||(b=[])):(b=b||[]).push(le,H))}d&&(b=b||[]).push("style",d);var le=b;(u.updateQueue=le)&&(u.flags|=4)}},iv=function(a,u,d,y){d!==y&&(u.flags|=4)};function Zc(a,u){if(!sn)switch(a.tailMode){case"hidden":u=a.tail;for(var d=null;u!==null;)u.alternate!==null&&(d=u),u=u.sibling;d===null?a.tail=null:d.sibling=null;break;case"collapsed":d=a.tail;for(var y=null;d!==null;)d.alternate!==null&&(y=d),d=d.sibling;y===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:y.sibling=null}}function Xn(a){var u=a.alternate!==null&&a.alternate.child===a.child,d=0,y=0;if(u)for(var v=a.child;v!==null;)d|=v.lanes|v.childLanes,y|=v.subtreeFlags&14680064,y|=v.flags&14680064,v.return=a,v=v.sibling;else for(v=a.child;v!==null;)d|=v.lanes|v.childLanes,y|=v.subtreeFlags,y|=v.flags,v.return=a,v=v.sibling;return a.subtreeFlags|=y,a.childLanes=d,u}function D$(a,u,d){var y=u.pendingProps;switch(Bm(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xn(u),null;case 1:return dr(u.type)&&Ff(),Xn(u),null;case 3:return y=u.stateNode,ou(),zt(fr),zt(In),sg(),y.pendingContext&&(y.context=y.pendingContext,y.pendingContext=null),(a===null||a.child===null)&&(Hf(u)?u.flags|=4:a===null||a.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,Ci!==null&&(Ag(Ci),Ci=null))),bg(a,u),Xn(u),null;case 5:rg(u);var v=Ba(_c.current);if(d=u.type,a!==null&&u.stateNode!=null)rv(a,u,d,y,v),a.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!y){if(u.stateNode===null)throw Error(t(166));return Xn(u),null}if(a=Ba(ts.current),Hf(u)){y=u.stateNode,d=u.type;var b=u.memoizedProps;switch(y[wt]=u,y[Ge]=b,a=(u.mode&1)!==0,d){case"dialog":Bt("cancel",y),Bt("close",y);break;case"iframe":case"object":case"embed":Bt("load",y);break;case"video":case"audio":for(v=0;v<Ns.length;v++)Bt(Ns[v],y);break;case"source":Bt("error",y);break;case"img":case"image":case"link":Bt("error",y),Bt("load",y);break;case"details":Bt("toggle",y);break;case"input":Tr(y,b),Bt("invalid",y);break;case"select":y._wrapperState={wasMultiple:!!b.multiple},Bt("invalid",y);break;case"textarea":io(y,b),Bt("invalid",y)}nn(d,b),v=null;for(var M in b)if(b.hasOwnProperty(M)){var X=b[M];M==="children"?typeof X=="string"?y.textContent!==X&&(b.suppressHydrationWarning!==!0&&Ki(y.textContent,X,a),v=["children",X]):typeof X=="number"&&y.textContent!==""+X&&(b.suppressHydrationWarning!==!0&&Ki(y.textContent,X,a),v=["children",""+X]):i.hasOwnProperty(M)&&X!=null&&M==="onScroll"&&Bt("scroll",y)}switch(d){case"input":Gn(y),Ss(y,b,!0);break;case"textarea":Gn(y),Jn(y);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(y.onclick=Kl)}y=v,u.updateQueue=y,y!==null&&(u.flags|=4)}else{M=v.nodeType===9?v:v.ownerDocument,a==="http://www.w3.org/1999/xhtml"&&(a=fe(d)),a==="http://www.w3.org/1999/xhtml"?d==="script"?(a=M.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild)):typeof y.is=="string"?a=M.createElement(d,{is:y.is}):(a=M.createElement(d),d==="select"&&(M=a,y.multiple?M.multiple=!0:y.size&&(M.size=y.size))):a=M.createElementNS(a,d),a[wt]=u,a[Ge]=y,nv(a,u,!1,!1),u.stateNode=a;e:{switch(M=tr(d,y),d){case"dialog":Bt("cancel",a),Bt("close",a),v=y;break;case"iframe":case"object":case"embed":Bt("load",a),v=y;break;case"video":case"audio":for(v=0;v<Ns.length;v++)Bt(Ns[v],a);v=y;break;case"source":Bt("error",a),v=y;break;case"img":case"image":case"link":Bt("error",a),Bt("load",a),v=y;break;case"details":Bt("toggle",a),v=y;break;case"input":Tr(a,y),v=Zi(a,y),Bt("invalid",a);break;case"option":v=y;break;case"select":a._wrapperState={wasMultiple:!!y.multiple},v=N({},y,{value:void 0}),Bt("invalid",a);break;case"textarea":io(a,y),v=bs(a,y),Bt("invalid",a);break;default:v=y}nn(d,v),X=v;for(b in X)if(X.hasOwnProperty(b)){var H=X[b];b==="style"?hr(a,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&nt(a,H)):b==="children"?typeof H=="string"?(d!=="textarea"||H!=="")&&yt(a,H):typeof H=="number"&&yt(a,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(i.hasOwnProperty(b)?H!=null&&b==="onScroll"&&Bt("scroll",a):H!=null&&E(a,b,H,M))}switch(d){case"input":Gn(a),Ss(a,y,!1);break;case"textarea":Gn(a),Jn(a);break;case"option":y.value!=null&&a.setAttribute("value",""+st(y.value));break;case"select":a.multiple=!!y.multiple,b=y.value,b!=null?qr(a,!!y.multiple,b,!1):y.defaultValue!=null&&qr(a,!!y.multiple,y.defaultValue,!0);break;default:typeof v.onClick=="function"&&(a.onclick=Kl)}switch(d){case"button":case"input":case"select":case"textarea":y=!!y.autoFocus;break e;case"img":y=!0;break e;default:y=!1}}y&&(u.flags|=4)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Xn(u),null;case 6:if(a&&u.stateNode!=null)iv(a,u,a.memoizedProps,y);else{if(typeof y!="string"&&u.stateNode===null)throw Error(t(166));if(d=Ba(_c.current),Ba(ts.current),Hf(u)){if(y=u.stateNode,d=u.memoizedProps,y[wt]=u,(b=y.nodeValue!==d)&&(a=Rr,a!==null))switch(a.tag){case 3:Ki(y.nodeValue,d,(a.mode&1)!==0);break;case 5:a.memoizedProps.suppressHydrationWarning!==!0&&Ki(y.nodeValue,d,(a.mode&1)!==0)}b&&(u.flags|=4)}else y=(d.nodeType===9?d:d.ownerDocument).createTextNode(y),y[wt]=u,u.stateNode=y}return Xn(u),null;case 13:if(zt(ln),y=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(sn&&Nr!==null&&(u.mode&1)!==0&&(u.flags&128)===0)a1(),nu(),u.flags|=98560,b=!1;else if(b=Hf(u),y!==null&&y.dehydrated!==null){if(a===null){if(!b)throw Error(t(318));if(b=u.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(t(317));b[wt]=u}else nu(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Xn(u),b=!1}else Ci!==null&&(Ag(Ci),Ci=null),b=!0;if(!b)return u.flags&65536?u:null}return(u.flags&128)!==0?(u.lanes=d,u):(y=y!==null,y!==(a!==null&&a.memoizedState!==null)&&y&&(u.child.flags|=8192,(u.mode&1)!==0&&(a===null||(ln.current&1)!==0?Qn===0&&(Qn=3):Dg())),u.updateQueue!==null&&(u.flags|=4),Xn(u),null);case 4:return ou(),bg(a,u),a===null&&_a(u.stateNode.containerInfo),Xn(u),null;case 10:return Km(u.type._context),Xn(u),null;case 17:return dr(u.type)&&Ff(),Xn(u),null;case 19:if(zt(ln),b=u.memoizedState,b===null)return Xn(u),null;if(y=(u.flags&128)!==0,M=b.rendering,M===null)if(y)Zc(b,!1);else{if(Qn!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if(M=nd(a),M!==null){for(u.flags|=128,Zc(b,!1),y=M.updateQueue,y!==null&&(u.updateQueue=y,u.flags|=4),u.subtreeFlags=0,y=d,d=u.child;d!==null;)b=d,a=y,b.flags&=14680066,M=b.alternate,M===null?(b.childLanes=0,b.lanes=a,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=M.childLanes,b.lanes=M.lanes,b.child=M.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=M.memoizedProps,b.memoizedState=M.memoizedState,b.updateQueue=M.updateQueue,b.type=M.type,a=M.dependencies,b.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),d=d.sibling;return Rt(ln,ln.current&1|2),u.child}a=a.sibling}b.tail!==null&&bt()>cu&&(u.flags|=128,y=!0,Zc(b,!1),u.lanes=4194304)}else{if(!y)if(a=nd(M),a!==null){if(u.flags|=128,y=!0,d=a.updateQueue,d!==null&&(u.updateQueue=d,u.flags|=4),Zc(b,!0),b.tail===null&&b.tailMode==="hidden"&&!M.alternate&&!sn)return Xn(u),null}else 2*bt()-b.renderingStartTime>cu&&d!==1073741824&&(u.flags|=128,y=!0,Zc(b,!1),u.lanes=4194304);b.isBackwards?(M.sibling=u.child,u.child=M):(d=b.last,d!==null?d.sibling=M:u.child=M,b.last=M)}return b.tail!==null?(u=b.tail,b.rendering=u,b.tail=u.sibling,b.renderingStartTime=bt(),u.sibling=null,d=ln.current,Rt(ln,y?d&1|2:d&1),u):(Xn(u),null);case 22:case 23:return zg(),y=u.memoizedState!==null,a!==null&&a.memoizedState!==null!==y&&(u.flags|=8192),y&&(u.mode&1)!==0?(Ar&1073741824)!==0&&(Xn(u),u.subtreeFlags&6&&(u.flags|=8192)):Xn(u),null;case 24:return null;case 25:return null}throw Error(t(156,u.tag))}function L$(a,u){switch(Bm(u),u.tag){case 1:return dr(u.type)&&Ff(),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return ou(),zt(fr),zt(In),sg(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 5:return rg(u),null;case 13:if(zt(ln),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(t(340));nu()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return zt(ln),null;case 4:return ou(),null;case 10:return Km(u.type._context),null;case 22:case 23:return zg(),null;case 24:return null;default:return null}}var hd=!1,Vn=!1,I$=typeof WeakSet=="function"?WeakSet:Set,De=null;function lu(a,u){var d=a.ref;if(d!==null)if(typeof d=="function")try{d(null)}catch(y){pn(a,u,y)}else d.current=null}function Pg(a,u,d){try{d()}catch(y){pn(a,u,y)}}var sv=!1;function Z$(a,u){if(P=Si,a=Xf(),kc(a)){if("selectionStart"in a)var d={start:a.selectionStart,end:a.selectionEnd};else e:{d=(d=a.ownerDocument)&&d.defaultView||window;var y=d.getSelection&&d.getSelection();if(y&&y.rangeCount!==0){d=y.anchorNode;var v=y.anchorOffset,b=y.focusNode;y=y.focusOffset;try{d.nodeType,b.nodeType}catch{d=null;break e}var M=0,X=-1,H=-1,le=0,ve=0,we=a,ge=null;t:for(;;){for(var je;we!==d||v!==0&&we.nodeType!==3||(X=M+v),we!==b||y!==0&&we.nodeType!==3||(H=M+y),we.nodeType===3&&(M+=we.nodeValue.length),(je=we.firstChild)!==null;)ge=we,we=je;for(;;){if(we===a)break t;if(ge===d&&++le===v&&(X=M),ge===b&&++ve===y&&(H=M),(je=we.nextSibling)!==null)break;we=ge,ge=we.parentNode}we=je}d=X===-1||H===-1?null:{start:X,end:H}}else d=null}d=d||{start:0,end:0}}else d=null;for(O={focusedElem:a,selectionRange:d},Si=!1,De=u;De!==null;)if(u=De,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,De=a;else for(;De!==null;){u=De;try{var Ze=u.alternate;if((u.flags&1024)!==0)switch(u.tag){case 0:case 11:case 15:break;case 1:if(Ze!==null){var Ve=Ze.memoizedProps,On=Ze.memoizedState,ie=u.stateNode,J=ie.getSnapshotBeforeUpdate(u.elementType===u.type?Ve:Ti(u.type,Ve),On);ie.__reactInternalSnapshotBeforeUpdate=J}break;case 3:var ae=u.stateNode.containerInfo;ae.nodeType===1?ae.textContent="":ae.nodeType===9&&ae.documentElement&&ae.removeChild(ae.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(Qe){pn(u,u.return,Qe)}if(a=u.sibling,a!==null){a.return=u.return,De=a;break}De=u.return}return Ze=sv,sv=!1,Ze}function Xc(a,u,d){var y=u.updateQueue;if(y=y!==null?y.lastEffect:null,y!==null){var v=y=y.next;do{if((v.tag&a)===a){var b=v.destroy;v.destroy=void 0,b!==void 0&&Pg(u,d,b)}v=v.next}while(v!==y)}}function fd(a,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var d=u=u.next;do{if((d.tag&a)===a){var y=d.create;d.destroy=y()}d=d.next}while(d!==u)}}function Qg(a){var u=a.ref;if(u!==null){var d=a.stateNode;switch(a.tag){case 5:a=d;break;default:a=d}typeof u=="function"?u(a):u.current=a}}function ov(a){var u=a.alternate;u!==null&&(a.alternate=null,ov(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&(delete u[wt],delete u[Ge],delete u[ir],delete u[ni],delete u[$o])),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}function av(a){return a.tag===5||a.tag===3||a.tag===4}function lv(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||av(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.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 Cg(a,u,d){var y=a.tag;if(y===5||y===6)a=a.stateNode,u?d.nodeType===8?d.parentNode.insertBefore(a,u):d.insertBefore(a,u):(d.nodeType===8?(u=d.parentNode,u.insertBefore(a,d)):(u=d,u.appendChild(a)),d=d._reactRootContainer,d!=null||u.onclick!==null||(u.onclick=Kl));else if(y!==4&&(a=a.child,a!==null))for(Cg(a,u,d),a=a.sibling;a!==null;)Cg(a,u,d),a=a.sibling}function Tg(a,u,d){var y=a.tag;if(y===5||y===6)a=a.stateNode,u?d.insertBefore(a,u):d.appendChild(a);else if(y!==4&&(a=a.child,a!==null))for(Tg(a,u,d),a=a.sibling;a!==null;)Tg(a,u,d),a=a.sibling}var An=null,$i=!1;function _o(a,u,d){for(d=d.child;d!==null;)uv(a,u,d),d=d.sibling}function uv(a,u,d){if(rn&&typeof rn.onCommitFiberUnmount=="function")try{rn.onCommitFiberUnmount(Vt,d)}catch{}switch(d.tag){case 5:Vn||lu(d,u);case 6:var y=An,v=$i;An=null,_o(a,u,d),An=y,$i=v,An!==null&&($i?(a=An,d=d.stateNode,a.nodeType===8?a.parentNode.removeChild(d):a.removeChild(d)):An.removeChild(d.stateNode));break;case 18:An!==null&&($i?(a=An,d=d.stateNode,a.nodeType===8?re(a.parentNode,d):a.nodeType===1&&re(a,d),dn(a)):re(An,d.stateNode));break;case 4:y=An,v=$i,An=d.stateNode.containerInfo,$i=!0,_o(a,u,d),An=y,$i=v;break;case 0:case 11:case 14:case 15:if(!Vn&&(y=d.updateQueue,y!==null&&(y=y.lastEffect,y!==null))){v=y=y.next;do{var b=v,M=b.destroy;b=b.tag,M!==void 0&&((b&2)!==0||(b&4)!==0)&&Pg(d,u,M),v=v.next}while(v!==y)}_o(a,u,d);break;case 1:if(!Vn&&(lu(d,u),y=d.stateNode,typeof y.componentWillUnmount=="function"))try{y.props=d.memoizedProps,y.state=d.memoizedState,y.componentWillUnmount()}catch(X){pn(d,u,X)}_o(a,u,d);break;case 21:_o(a,u,d);break;case 22:d.mode&1?(Vn=(y=Vn)||d.memoizedState!==null,_o(a,u,d),Vn=y):_o(a,u,d);break;default:_o(a,u,d)}}function cv(a){var u=a.updateQueue;if(u!==null){a.updateQueue=null;var d=a.stateNode;d===null&&(d=a.stateNode=new I$),u.forEach(function(y){var v=H$.bind(null,a,y);d.has(y)||(d.add(y),y.then(v,v))})}}function Ei(a,u){var d=u.deletions;if(d!==null)for(var y=0;y<d.length;y++){var v=d[y];try{var b=a,M=u,X=M;e:for(;X!==null;){switch(X.tag){case 5:An=X.stateNode,$i=!1;break e;case 3:An=X.stateNode.containerInfo,$i=!0;break e;case 4:An=X.stateNode.containerInfo,$i=!0;break e}X=X.return}if(An===null)throw Error(t(160));uv(b,M,v),An=null,$i=!1;var H=v.alternate;H!==null&&(H.return=null),v.return=null}catch(le){pn(v,u,le)}}if(u.subtreeFlags&12854)for(u=u.child;u!==null;)hv(u,a),u=u.sibling}function hv(a,u){var d=a.alternate,y=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:if(Ei(u,a),rs(a),y&4){try{Xc(3,a,a.return),fd(3,a)}catch(Ve){pn(a,a.return,Ve)}try{Xc(5,a,a.return)}catch(Ve){pn(a,a.return,Ve)}}break;case 1:Ei(u,a),rs(a),y&512&&d!==null&&lu(d,d.return);break;case 5:if(Ei(u,a),rs(a),y&512&&d!==null&&lu(d,d.return),a.flags&32){var v=a.stateNode;try{yt(v,"")}catch(Ve){pn(a,a.return,Ve)}}if(y&4&&(v=a.stateNode,v!=null)){var b=a.memoizedProps,M=d!==null?d.memoizedProps:b,X=a.type,H=a.updateQueue;if(a.updateQueue=null,H!==null)try{X==="input"&&b.type==="radio"&&b.name!=null&&Kn(v,b),tr(X,M);var le=tr(X,b);for(M=0;M<H.length;M+=2){var ve=H[M],we=H[M+1];ve==="style"?hr(v,we):ve==="dangerouslySetInnerHTML"?nt(v,we):ve==="children"?yt(v,we):E(v,ve,we,le)}switch(X){case"input":Yr(v,b);break;case"textarea":cr(v,b);break;case"select":var ge=v._wrapperState.wasMultiple;v._wrapperState.wasMultiple=!!b.multiple;var je=b.value;je!=null?qr(v,!!b.multiple,je,!1):ge!==!!b.multiple&&(b.defaultValue!=null?qr(v,!!b.multiple,b.defaultValue,!0):qr(v,!!b.multiple,b.multiple?[]:"",!1))}v[Ge]=b}catch(Ve){pn(a,a.return,Ve)}}break;case 6:if(Ei(u,a),rs(a),y&4){if(a.stateNode===null)throw Error(t(162));v=a.stateNode,b=a.memoizedProps;try{v.nodeValue=b}catch(Ve){pn(a,a.return,Ve)}}break;case 3:if(Ei(u,a),rs(a),y&4&&d!==null&&d.memoizedState.isDehydrated)try{dn(u.containerInfo)}catch(Ve){pn(a,a.return,Ve)}break;case 4:Ei(u,a),rs(a);break;case 13:Ei(u,a),rs(a),v=a.child,v.flags&8192&&(b=v.memoizedState!==null,v.stateNode.isHidden=b,!b||v.alternate!==null&&v.alternate.memoizedState!==null||(Mg=bt())),y&4&&cv(a);break;case 22:if(ve=d!==null&&d.memoizedState!==null,a.mode&1?(Vn=(le=Vn)||ve,Ei(u,a),Vn=le):Ei(u,a),rs(a),y&8192){if(le=a.memoizedState!==null,(a.stateNode.isHidden=le)&&!ve&&(a.mode&1)!==0)for(De=a,ve=a.child;ve!==null;){for(we=De=ve;De!==null;){switch(ge=De,je=ge.child,ge.tag){case 0:case 11:case 14:case 15:Xc(4,ge,ge.return);break;case 1:lu(ge,ge.return);var Ze=ge.stateNode;if(typeof Ze.componentWillUnmount=="function"){y=ge,d=ge.return;try{u=y,Ze.props=u.memoizedProps,Ze.state=u.memoizedState,Ze.componentWillUnmount()}catch(Ve){pn(y,d,Ve)}}break;case 5:lu(ge,ge.return);break;case 22:if(ge.memoizedState!==null){pv(we);continue}}je!==null?(je.return=ge,De=je):pv(we)}ve=ve.sibling}e:for(ve=null,we=a;;){if(we.tag===5){if(ve===null){ve=we;try{v=we.stateNode,le?(b=v.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(X=we.stateNode,H=we.memoizedProps.style,M=H!=null&&H.hasOwnProperty("display")?H.display:null,X.style.display=xt("display",M))}catch(Ve){pn(a,a.return,Ve)}}}else if(we.tag===6){if(ve===null)try{we.stateNode.nodeValue=le?"":we.memoizedProps}catch(Ve){pn(a,a.return,Ve)}}else if((we.tag!==22&&we.tag!==23||we.memoizedState===null||we===a)&&we.child!==null){we.child.return=we,we=we.child;continue}if(we===a)break e;for(;we.sibling===null;){if(we.return===null||we.return===a)break e;ve===we&&(ve=null),we=we.return}ve===we&&(ve=null),we.sibling.return=we.return,we=we.sibling}}break;case 19:Ei(u,a),rs(a),y&4&&cv(a);break;case 21:break;default:Ei(u,a),rs(a)}}function rs(a){var u=a.flags;if(u&2){try{e:{for(var d=a.return;d!==null;){if(av(d)){var y=d;break e}d=d.return}throw Error(t(160))}switch(y.tag){case 5:var v=y.stateNode;y.flags&32&&(yt(v,""),y.flags&=-33);var b=lv(a);Tg(a,b,v);break;case 3:case 4:var M=y.stateNode.containerInfo,X=lv(a);Cg(a,X,M);break;default:throw Error(t(161))}}catch(H){pn(a,a.return,H)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function X$(a,u,d){De=a,fv(a)}function fv(a,u,d){for(var y=(a.mode&1)!==0;De!==null;){var v=De,b=v.child;if(v.tag===22&&y){var M=v.memoizedState!==null||hd;if(!M){var X=v.alternate,H=X!==null&&X.memoizedState!==null||Vn;X=hd;var le=Vn;if(hd=M,(Vn=H)&&!le)for(De=v;De!==null;)M=De,H=M.child,M.tag===22&&M.memoizedState!==null?mv(v):H!==null?(H.return=M,De=H):mv(v);for(;b!==null;)De=b,fv(b),b=b.sibling;De=v,hd=X,Vn=le}dv(a)}else(v.subtreeFlags&8772)!==0&&b!==null?(b.return=v,De=b):dv(a)}}function dv(a){for(;De!==null;){var u=De;if((u.flags&8772)!==0){var d=u.alternate;try{if((u.flags&8772)!==0)switch(u.tag){case 0:case 11:case 15:Vn||fd(5,u);break;case 1:var y=u.stateNode;if(u.flags&4&&!Vn)if(d===null)y.componentDidMount();else{var v=u.elementType===u.type?d.memoizedProps:Ti(u.type,d.memoizedProps);y.componentDidUpdate(v,d.memoizedState,y.__reactInternalSnapshotBeforeUpdate)}var b=u.updateQueue;b!==null&&p1(u,b,y);break;case 3:var M=u.updateQueue;if(M!==null){if(d=null,u.child!==null)switch(u.child.tag){case 5:d=u.child.stateNode;break;case 1:d=u.child.stateNode}p1(u,M,d)}break;case 5:var X=u.stateNode;if(d===null&&u.flags&4){d=X;var H=u.memoizedProps;switch(u.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&d.focus();break;case"img":H.src&&(d.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(u.memoizedState===null){var le=u.alternate;if(le!==null){var ve=le.memoizedState;if(ve!==null){var we=ve.dehydrated;we!==null&&dn(we)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Vn||u.flags&512&&Qg(u)}catch(ge){pn(u,u.return,ge)}}if(u===a){De=null;break}if(d=u.sibling,d!==null){d.return=u.return,De=d;break}De=u.return}}function pv(a){for(;De!==null;){var u=De;if(u===a){De=null;break}var d=u.sibling;if(d!==null){d.return=u.return,De=d;break}De=u.return}}function mv(a){for(;De!==null;){var u=De;try{switch(u.tag){case 0:case 11:case 15:var d=u.return;try{fd(4,u)}catch(H){pn(u,d,H)}break;case 1:var y=u.stateNode;if(typeof y.componentDidMount=="function"){var v=u.return;try{y.componentDidMount()}catch(H){pn(u,v,H)}}var b=u.return;try{Qg(u)}catch(H){pn(u,b,H)}break;case 5:var M=u.return;try{Qg(u)}catch(H){pn(u,M,H)}}}catch(H){pn(u,u.return,H)}if(u===a){De=null;break}var X=u.sibling;if(X!==null){X.return=u.return,De=X;break}De=u.return}}var V$=Math.ceil,dd=Z.ReactCurrentDispatcher,$g=Z.ReactCurrentOwner,ai=Z.ReactCurrentBatchConfig,Mt=0,En=null,wn=null,_n=0,Ar=0,uu=Ji(0),Qn=0,Vc=null,Ua=0,pd=0,Eg=0,Wc=null,mr=null,Mg=0,cu=1/0,Xs=null,md=!1,jg=null,zo=null,gd=!1,Do=null,Od=0,Fc=0,Rg=null,yd=-1,xd=0;function or(){return(Mt&6)!==0?bt():yd!==-1?yd:yd=bt()}function Lo(a){return(a.mode&1)===0?1:(Mt&2)!==0&&_n!==0?_n&-_n:Q$.transition!==null?(xd===0&&(xd=ac()),xd):(a=jt,a!==0||(a=window.event,a=a===void 0?16:Ll(a.type)),a)}function Mi(a,u,d,y){if(50<Fc)throw Fc=0,Rg=null,Error(t(185));Cs(a,d,y),((Mt&2)===0||a!==En)&&(a===En&&((Mt&2)===0&&(pd|=d),Qn===4&&Io(a,_n)),gr(a,y),d===1&&Mt===0&&(u.mode&1)===0&&(cu=bt()+500,Yf&&Ro()))}function gr(a,u){var d=a.callbackNode;Al(a,u);var y=Yi(a,a===En?_n:0);if(y===0)d!==null&&Gr(d),a.callbackNode=null,a.callbackPriority=0;else if(u=y&-y,a.callbackPriority!==u){if(d!=null&&Gr(d),u===1)a.tag===0?P$(Ov.bind(null,a)):n1(Ov.bind(null,a)),K(function(){(Mt&6)===0&&Ro()}),d=null;else{switch(ba(y)){case 1:d=xi;break;case 4:d=Er;break;case 16:d=Kr;break;case 536870912:d=vt;break;default:d=Kr}d=Pv(d,gv.bind(null,a))}a.callbackPriority=u,a.callbackNode=d}}function gv(a,u){if(yd=-1,xd=0,(Mt&6)!==0)throw Error(t(327));var d=a.callbackNode;if(hu()&&a.callbackNode!==d)return null;var y=Yi(a,a===En?_n:0);if(y===0)return null;if((y&30)!==0||(y&a.expiredLanes)!==0||u)u=vd(a,y);else{u=y;var v=Mt;Mt|=2;var b=xv();(En!==a||_n!==u)&&(Xs=null,cu=bt()+500,Ha(a,u));do try{B$();break}catch(X){yv(a,X)}while(!0);Gm(),dd.current=b,Mt=v,wn!==null?u=0:(En=null,_n=0,u=Qn)}if(u!==0){if(u===2&&(v=co(a),v!==0&&(y=v,u=Ng(a,v))),u===1)throw d=Vc,Ha(a,0),Io(a,y),gr(a,bt()),d;if(u===6)Io(a,y);else{if(v=a.current.alternate,(y&30)===0&&!W$(v)&&(u=vd(a,y),u===2&&(b=co(a),b!==0&&(y=b,u=Ng(a,b))),u===1))throw d=Vc,Ha(a,0),Io(a,y),gr(a,bt()),d;switch(a.finishedWork=v,a.finishedLanes=y,u){case 0:case 1:throw Error(t(345));case 2:Ga(a,mr,Xs);break;case 3:if(Io(a,y),(y&130023424)===y&&(u=Mg+500-bt(),10<u)){if(Yi(a,0)!==0)break;if(v=a.suspendedLanes,(v&y)!==y){or(),a.pingedLanes|=a.suspendedLanes&v;break}a.timeoutHandle=T(Ga.bind(null,a,mr,Xs),u);break}Ga(a,mr,Xs);break;case 4:if(Io(a,y),(y&4194240)===y)break;for(u=a.eventTimes,v=-1;0<y;){var M=31-ht(y);b=1<<M,M=u[M],M>v&&(v=M),y&=~b}if(y=v,y=bt()-y,y=(120>y?120:480>y?480:1080>y?1080:1920>y?1920:3e3>y?3e3:4320>y?4320:1960*V$(y/1960))-y,10<y){a.timeoutHandle=T(Ga.bind(null,a,mr,Xs),y);break}Ga(a,mr,Xs);break;case 5:Ga(a,mr,Xs);break;default:throw Error(t(329))}}}return gr(a,bt()),a.callbackNode===d?gv.bind(null,a):null}function Ng(a,u){var d=Wc;return a.current.memoizedState.isDehydrated&&(Ha(a,u).flags|=256),a=vd(a,u),a!==2&&(u=mr,mr=d,u!==null&&Ag(u)),a}function Ag(a){mr===null?mr=a:mr.push.apply(mr,a)}function W$(a){for(var u=a;;){if(u.flags&16384){var d=u.updateQueue;if(d!==null&&(d=d.stores,d!==null))for(var y=0;y<d.length;y++){var v=d[y],b=v.getSnapshot;v=v.value;try{if(!an(b(),v))return!1}catch{return!1}}}if(d=u.child,u.subtreeFlags&16384&&d!==null)d.return=u,u=d;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function Io(a,u){for(u&=~Eg,u&=~pd,a.suspendedLanes|=u,a.pingedLanes&=~u,a=a.expirationTimes;0<u;){var d=31-ht(u),y=1<<d;a[d]=-1,u&=~y}}function Ov(a){if((Mt&6)!==0)throw Error(t(327));hu();var u=Yi(a,0);if((u&1)===0)return gr(a,bt()),null;var d=vd(a,u);if(a.tag!==0&&d===2){var y=co(a);y!==0&&(u=y,d=Ng(a,y))}if(d===1)throw d=Vc,Ha(a,0),Io(a,u),gr(a,bt()),d;if(d===6)throw Error(t(345));return a.finishedWork=a.current.alternate,a.finishedLanes=u,Ga(a,mr,Xs),gr(a,bt()),null}function _g(a,u){var d=Mt;Mt|=1;try{return a(u)}finally{Mt=d,Mt===0&&(cu=bt()+500,Yf&&Ro())}}function qa(a){Do!==null&&Do.tag===0&&(Mt&6)===0&&hu();var u=Mt;Mt|=1;var d=ai.transition,y=jt;try{if(ai.transition=null,jt=1,a)return a()}finally{jt=y,ai.transition=d,Mt=u,(Mt&6)===0&&Ro()}}function zg(){Ar=uu.current,zt(uu)}function Ha(a,u){a.finishedWork=null,a.finishedLanes=0;var d=a.timeoutHandle;if(d!==-1&&(a.timeoutHandle=-1,j(d)),wn!==null)for(d=wn.return;d!==null;){var y=d;switch(Bm(y),y.tag){case 1:y=y.type.childContextTypes,y!=null&&Ff();break;case 3:ou(),zt(fr),zt(In),sg();break;case 5:rg(y);break;case 4:ou();break;case 13:zt(ln);break;case 19:zt(ln);break;case 10:Km(y.type._context);break;case 22:case 23:zg()}d=d.return}if(En=a,wn=a=Zo(a.current,null),_n=Ar=u,Qn=0,Vc=null,Eg=pd=Ua=0,mr=Wc=null,Fa!==null){for(u=0;u<Fa.length;u++)if(d=Fa[u],y=d.interleaved,y!==null){d.interleaved=null;var v=y.next,b=d.pending;if(b!==null){var M=b.next;b.next=v,y.next=M}d.pending=y}Fa=null}return a}function yv(a,u){do{var d=wn;try{if(Gm(),rd.current=ad,id){for(var y=un.memoizedState;y!==null;){var v=y.queue;v!==null&&(v.pending=null),y=y.next}id=!1}if(Ya=0,$n=Pn=un=null,zc=!1,Dc=0,$g.current=null,d===null||d.return===null){Qn=1,Vc=u,wn=null;break}e:{var b=a,M=d.return,X=d,H=u;if(u=_n,X.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var le=H,ve=X,we=ve.tag;if((ve.mode&1)===0&&(we===0||we===11||we===15)){var ge=ve.alternate;ge?(ve.updateQueue=ge.updateQueue,ve.memoizedState=ge.memoizedState,ve.lanes=ge.lanes):(ve.updateQueue=null,ve.memoizedState=null)}var je=V1(M);if(je!==null){je.flags&=-257,W1(je,M,X,b,u),je.mode&1&&X1(b,le,u),u=je,H=le;var Ze=u.updateQueue;if(Ze===null){var Ve=new Set;Ve.add(H),u.updateQueue=Ve}else Ze.add(H);break e}else{if((u&1)===0){X1(b,le,u),Dg();break e}H=Error(t(426))}}else if(sn&&X.mode&1){var On=V1(M);if(On!==null){(On.flags&65536)===0&&(On.flags|=256),W1(On,M,X,b,u),qm(au(H,X));break e}}b=H=au(H,X),Qn!==4&&(Qn=2),Wc===null?Wc=[b]:Wc.push(b),b=M;do{switch(b.tag){case 3:b.flags|=65536,u&=-u,b.lanes|=u;var ie=I1(b,H,u);d1(b,ie);break e;case 1:X=H;var J=b.type,ae=b.stateNode;if((b.flags&128)===0&&(typeof J.getDerivedStateFromError=="function"||ae!==null&&typeof ae.componentDidCatch=="function"&&(zo===null||!zo.has(ae)))){b.flags|=65536,u&=-u,b.lanes|=u;var Qe=Z1(b,X,u);d1(b,Qe);break e}}b=b.return}while(b!==null)}wv(d)}catch(We){u=We,wn===d&&d!==null&&(wn=d=d.return);continue}break}while(!0)}function xv(){var a=dd.current;return dd.current=ad,a===null?ad:a}function Dg(){(Qn===0||Qn===3||Qn===2)&&(Qn=4),En===null||(Ua&268435455)===0&&(pd&268435455)===0||Io(En,_n)}function vd(a,u){var d=Mt;Mt|=2;var y=xv();(En!==a||_n!==u)&&(Xs=null,Ha(a,u));do try{F$();break}catch(v){yv(a,v)}while(!0);if(Gm(),Mt=d,dd.current=y,wn!==null)throw Error(t(261));return En=null,_n=0,Qn}function F$(){for(;wn!==null;)vv(wn)}function B$(){for(;wn!==null&&!qe();)vv(wn)}function vv(a){var u=bv(a.alternate,a,Ar);a.memoizedProps=a.pendingProps,u===null?wv(a):wn=u,$g.current=null}function wv(a){var u=a;do{var d=u.alternate;if(a=u.return,(u.flags&32768)===0){if(d=D$(d,u,Ar),d!==null){wn=d;return}}else{if(d=L$(d,u),d!==null){d.flags&=32767,wn=d;return}if(a!==null)a.flags|=32768,a.subtreeFlags=0,a.deletions=null;else{Qn=6,wn=null;return}}if(u=u.sibling,u!==null){wn=u;return}wn=u=a}while(u!==null);Qn===0&&(Qn=5)}function Ga(a,u,d){var y=jt,v=ai.transition;try{ai.transition=null,jt=1,Y$(a,u,d,y)}finally{ai.transition=v,jt=y}return null}function Y$(a,u,d,y){do hu();while(Do!==null);if((Mt&6)!==0)throw Error(t(327));d=a.finishedWork;var v=a.finishedLanes;if(d===null)return null;if(a.finishedWork=null,a.finishedLanes=0,d===a.current)throw Error(t(177));a.callbackNode=null,a.callbackPriority=0;var b=d.lanes|d.childLanes;if(Sf(a,b),a===En&&(wn=En=null,_n=0),(d.subtreeFlags&2064)===0&&(d.flags&2064)===0||gd||(gd=!0,Pv(Kr,function(){return hu(),null})),b=(d.flags&15990)!==0,(d.subtreeFlags&15990)!==0||b){b=ai.transition,ai.transition=null;var M=jt;jt=1;var X=Mt;Mt|=4,$g.current=null,Z$(a,d),hv(d,a),Xm(O),Si=!!P,O=P=null,a.current=d,X$(d),vn(),Mt=X,jt=M,ai.transition=b}else a.current=d;if(gd&&(gd=!1,Do=a,Od=v),b=a.pendingLanes,b===0&&(zo=null),vi(d.stateNode),gr(a,bt()),u!==null)for(y=a.onRecoverableError,d=0;d<u.length;d++)v=u[d],y(v.value,{componentStack:v.stack,digest:v.digest});if(md)throw md=!1,a=jg,jg=null,a;return(Od&1)!==0&&a.tag!==0&&hu(),b=a.pendingLanes,(b&1)!==0?a===Rg?Fc++:(Fc=0,Rg=a):Fc=0,Ro(),null}function hu(){if(Do!==null){var a=ba(Od),u=ai.transition,d=jt;try{if(ai.transition=null,jt=16>a?16:a,Do===null)var y=!1;else{if(a=Do,Do=null,Od=0,(Mt&6)!==0)throw Error(t(331));var v=Mt;for(Mt|=4,De=a.current;De!==null;){var b=De,M=b.child;if((De.flags&16)!==0){var X=b.deletions;if(X!==null){for(var H=0;H<X.length;H++){var le=X[H];for(De=le;De!==null;){var ve=De;switch(ve.tag){case 0:case 11:case 15:Xc(8,ve,b)}var we=ve.child;if(we!==null)we.return=ve,De=we;else for(;De!==null;){ve=De;var ge=ve.sibling,je=ve.return;if(ov(ve),ve===le){De=null;break}if(ge!==null){ge.return=je,De=ge;break}De=je}}}var Ze=b.alternate;if(Ze!==null){var Ve=Ze.child;if(Ve!==null){Ze.child=null;do{var On=Ve.sibling;Ve.sibling=null,Ve=On}while(Ve!==null)}}De=b}}if((b.subtreeFlags&2064)!==0&&M!==null)M.return=b,De=M;else e:for(;De!==null;){if(b=De,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Xc(9,b,b.return)}var ie=b.sibling;if(ie!==null){ie.return=b.return,De=ie;break e}De=b.return}}var J=a.current;for(De=J;De!==null;){M=De;var ae=M.child;if((M.subtreeFlags&2064)!==0&&ae!==null)ae.return=M,De=ae;else e:for(M=J;De!==null;){if(X=De,(X.flags&2048)!==0)try{switch(X.tag){case 0:case 11:case 15:fd(9,X)}}catch(We){pn(X,X.return,We)}if(X===M){De=null;break e}var Qe=X.sibling;if(Qe!==null){Qe.return=X.return,De=Qe;break e}De=X.return}}if(Mt=v,Ro(),rn&&typeof rn.onPostCommitFiberRoot=="function")try{rn.onPostCommitFiberRoot(Vt,a)}catch{}y=!0}return y}finally{jt=d,ai.transition=u}}return!1}function kv(a,u,d){u=au(d,u),u=I1(a,u,1),a=Ao(a,u,1),u=or(),a!==null&&(Cs(a,1,u),gr(a,u))}function pn(a,u,d){if(a.tag===3)kv(a,a,d);else for(;u!==null;){if(u.tag===3){kv(u,a,d);break}else if(u.tag===1){var y=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof y.componentDidCatch=="function"&&(zo===null||!zo.has(y))){a=au(d,a),a=Z1(u,a,1),u=Ao(u,a,1),a=or(),u!==null&&(Cs(u,1,a),gr(u,a));break}}u=u.return}}function U$(a,u,d){var y=a.pingCache;y!==null&&y.delete(u),u=or(),a.pingedLanes|=a.suspendedLanes&d,En===a&&(_n&d)===d&&(Qn===4||Qn===3&&(_n&130023424)===_n&&500>bt()-Mg?Ha(a,0):Eg|=d),gr(a,u)}function Sv(a,u){u===0&&((a.mode&1)===0?u=1:(u=lo,lo<<=1,(lo&130023424)===0&&(lo=4194304)));var d=or();a=Ls(a,u),a!==null&&(Cs(a,u,d),gr(a,d))}function q$(a){var u=a.memoizedState,d=0;u!==null&&(d=u.retryLane),Sv(a,d)}function H$(a,u){var d=0;switch(a.tag){case 13:var y=a.stateNode,v=a.memoizedState;v!==null&&(d=v.retryLane);break;case 19:y=a.stateNode;break;default:throw Error(t(314))}y!==null&&y.delete(u),Sv(a,d)}var bv;bv=function(a,u,d){if(a!==null)if(a.memoizedProps!==u.pendingProps||fr.current)pr=!0;else{if((a.lanes&d)===0&&(u.flags&128)===0)return pr=!1,z$(a,u,d);pr=(a.flags&131072)!==0}else pr=!1,sn&&(u.flags&1048576)!==0&&r1(u,qf,u.index);switch(u.lanes=0,u.tag){case 2:var y=u.type;cd(a,u),a=u.pendingProps;var v=Jl(u,In.current);su(u,d),v=lg(null,u,y,a,v,d);var b=ug();return u.flags|=1,typeof v=="object"&&v!==null&&typeof v.render=="function"&&v.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,dr(y)?(b=!0,Bf(u)):b=!1,u.memoizedState=v.state!==null&&v.state!==void 0?v.state:null,tg(u),v.updater=ld,u.stateNode=v,v._reactInternals=u,mg(u,y,a,d),u=xg(null,u,y,!0,b,d)):(u.tag=0,sn&&b&&Fm(u),sr(null,u,v,d),u=u.child),u;case 16:y=u.elementType;e:{switch(cd(a,u),a=u.pendingProps,v=y._init,y=v(y._payload),u.type=y,v=u.tag=K$(y),a=Ti(y,a),v){case 0:u=yg(null,u,y,a,d);break e;case 1:u=H1(null,u,y,a,d);break e;case 11:u=F1(null,u,y,a,d);break e;case 14:u=B1(null,u,y,Ti(y.type,a),d);break e}throw Error(t(306,y,""))}return u;case 0:return y=u.type,v=u.pendingProps,v=u.elementType===y?v:Ti(y,v),yg(a,u,y,v,d);case 1:return y=u.type,v=u.pendingProps,v=u.elementType===y?v:Ti(y,v),H1(a,u,y,v,d);case 3:e:{if(G1(u),a===null)throw Error(t(387));y=u.pendingProps,b=u.memoizedState,v=b.element,f1(a,u),td(u,y,null,d);var M=u.memoizedState;if(y=M.element,b.isDehydrated)if(b={element:y,isDehydrated:!1,cache:M.cache,pendingSuspenseBoundaries:M.pendingSuspenseBoundaries,transitions:M.transitions},u.updateQueue.baseState=b,u.memoizedState=b,u.flags&256){v=au(Error(t(423)),u),u=K1(a,u,y,d,v);break e}else if(y!==v){v=au(Error(t(424)),u),u=K1(a,u,y,d,v);break e}else for(Nr=xe(u.stateNode.containerInfo.firstChild),Rr=u,sn=!0,Ci=null,d=c1(u,null,y,d),u.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling;else{if(nu(),y===v){u=Zs(a,u,d);break e}sr(a,u,y,d)}u=u.child}return u;case 5:return m1(u),a===null&&Um(u),y=u.type,v=u.pendingProps,b=a!==null?a.memoizedProps:null,M=v.children,S(y,v)?M=null:b!==null&&S(y,b)&&(u.flags|=32),q1(a,u),sr(a,u,M,d),u.child;case 6:return a===null&&Um(u),null;case 13:return J1(a,u,d);case 4:return ng(u,u.stateNode.containerInfo),y=u.pendingProps,a===null?u.child=ru(u,null,y,d):sr(a,u,y,d),u.child;case 11:return y=u.type,v=u.pendingProps,v=u.elementType===y?v:Ti(y,v),F1(a,u,y,v,d);case 7:return sr(a,u,u.pendingProps,d),u.child;case 8:return sr(a,u,u.pendingProps.children,d),u.child;case 12:return sr(a,u,u.pendingProps.children,d),u.child;case 10:e:{if(y=u.type._context,v=u.pendingProps,b=u.memoizedProps,M=v.value,Rt(Kf,y._currentValue),y._currentValue=M,b!==null)if(an(b.value,M)){if(b.children===v.children&&!fr.current){u=Zs(a,u,d);break e}}else for(b=u.child,b!==null&&(b.return=u);b!==null;){var X=b.dependencies;if(X!==null){M=b.child;for(var H=X.firstContext;H!==null;){if(H.context===y){if(b.tag===1){H=Is(-1,d&-d),H.tag=2;var le=b.updateQueue;if(le!==null){le=le.shared;var ve=le.pending;ve===null?H.next=H:(H.next=ve.next,ve.next=H),le.pending=H}}b.lanes|=d,H=b.alternate,H!==null&&(H.lanes|=d),Jm(b.return,d,u),X.lanes|=d;break}H=H.next}}else if(b.tag===10)M=b.type===u.type?null:b.child;else if(b.tag===18){if(M=b.return,M===null)throw Error(t(341));M.lanes|=d,X=M.alternate,X!==null&&(X.lanes|=d),Jm(M,d,u),M=b.sibling}else M=b.child;if(M!==null)M.return=b;else for(M=b;M!==null;){if(M===u){M=null;break}if(b=M.sibling,b!==null){b.return=M.return,M=b;break}M=M.return}b=M}sr(a,u,v.children,d),u=u.child}return u;case 9:return v=u.type,y=u.pendingProps.children,su(u,d),v=si(v),y=y(v),u.flags|=1,sr(a,u,y,d),u.child;case 14:return y=u.type,v=Ti(y,u.pendingProps),v=Ti(y.type,v),B1(a,u,y,v,d);case 15:return Y1(a,u,u.type,u.pendingProps,d);case 17:return y=u.type,v=u.pendingProps,v=u.elementType===y?v:Ti(y,v),cd(a,u),u.tag=1,dr(y)?(a=!0,Bf(u)):a=!1,su(u,d),D1(u,y,v),mg(u,y,v,d),xg(null,u,y,!0,a,d);case 19:return tv(a,u,d);case 22:return U1(a,u,d)}throw Error(t(156,u.tag))};function Pv(a,u){return Ft(a,u)}function G$(a,u,d,y){this.tag=a,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=y,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function li(a,u,d,y){return new G$(a,u,d,y)}function Lg(a){return a=a.prototype,!(!a||!a.isReactComponent)}function K$(a){if(typeof a=="function")return Lg(a)?1:0;if(a!=null){if(a=a.$$typeof,a===D)return 11;if(a===ne)return 14}return 2}function Zo(a,u){var d=a.alternate;return d===null?(d=li(a.tag,u,a.key,a.mode),d.elementType=a.elementType,d.type=a.type,d.stateNode=a.stateNode,d.alternate=a,a.alternate=d):(d.pendingProps=u,d.type=a.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=a.flags&14680064,d.childLanes=a.childLanes,d.lanes=a.lanes,d.child=a.child,d.memoizedProps=a.memoizedProps,d.memoizedState=a.memoizedState,d.updateQueue=a.updateQueue,u=a.dependencies,d.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},d.sibling=a.sibling,d.index=a.index,d.ref=a.ref,d}function wd(a,u,d,y,v,b){var M=2;if(y=a,typeof a=="function")Lg(a)&&(M=1);else if(typeof a=="string")M=5;else e:switch(a){case R:return Ka(d.children,v,b,u);case q:M=8,v|=8;break;case G:return a=li(12,d,u,v|2),a.elementType=G,a.lanes=b,a;case se:return a=li(13,d,u,v),a.elementType=se,a.lanes=b,a;case oe:return a=li(19,d,u,v),a.elementType=oe,a.lanes=b,a;case ke:return kd(d,v,b,u);default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case W:M=10;break e;case z:M=9;break e;case D:M=11;break e;case ne:M=14;break e;case de:M=16,y=null;break e}throw Error(t(130,a==null?a:typeof a,""))}return u=li(M,d,u,v),u.elementType=a,u.type=y,u.lanes=b,u}function Ka(a,u,d,y){return a=li(7,a,y,u),a.lanes=d,a}function kd(a,u,d,y){return a=li(22,a,y,u),a.elementType=ke,a.lanes=d,a.stateNode={isHidden:!1},a}function Ig(a,u,d){return a=li(6,a,null,u),a.lanes=d,a}function Zg(a,u,d){return u=li(4,a.children!==null?a.children:[],a.key,u),u.lanes=d,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}function J$(a,u,d,y,v){this.tag=u,this.containerInfo=a,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qs(0),this.expirationTimes=Qs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qs(0),this.identifierPrefix=y,this.onRecoverableError=v,this.mutableSourceEagerHydrationData=null}function Xg(a,u,d,y,v,b,M,X,H){return a=new J$(a,u,d,X,H),u===1?(u=1,b===!0&&(u|=8)):u=0,b=li(3,null,null,u),a.current=b,b.stateNode=a,b.memoizedState={element:y,isDehydrated:d,cache:null,transitions:null,pendingSuspenseBoundaries:null},tg(b),a}function eE(a,u,d){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:y==null?null:""+y,children:a,containerInfo:u,implementation:d}}function Qv(a){if(!a)return es;a=a._reactInternals;e:{if(Ne(a)!==a||a.tag!==1)throw Error(t(170));var u=a;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(dr(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(t(171))}if(a.tag===1){var d=a.type;if(dr(d))return e1(a,d,u)}return u}function Cv(a,u,d,y,v,b,M,X,H){return a=Xg(d,y,!0,a,v,b,M,X,H),a.context=Qv(null),d=a.current,y=or(),v=Lo(d),b=Is(y,v),b.callback=u??null,Ao(d,b,v),a.current.lanes=v,Cs(a,v,y),gr(a,y),a}function Sd(a,u,d,y){var v=u.current,b=or(),M=Lo(v);return d=Qv(d),u.context===null?u.context=d:u.pendingContext=d,u=Is(b,M),u.payload={element:a},y=y===void 0?null:y,y!==null&&(u.callback=y),a=Ao(v,u,M),a!==null&&(Mi(a,v,M,b),ed(a,v,M)),M}function bd(a){if(a=a.current,!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function Tv(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var d=a.retryLane;a.retryLane=d!==0&&d<u?d:u}}function Vg(a,u){Tv(a,u),(a=a.alternate)&&Tv(a,u)}function tE(){return null}var $v=typeof reportError=="function"?reportError:function(a){console.error(a)};function Wg(a){this._internalRoot=a}Pd.prototype.render=Wg.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(t(409));Sd(a,u,null,null)},Pd.prototype.unmount=Wg.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;qa(function(){Sd(null,a,null,null)}),u[It]=null}};function Pd(a){this._internalRoot=a}Pd.prototype.unstable_scheduleHydration=function(a){if(a){var u=lc();a={blockedOn:null,target:a,priority:u};for(var d=0;d<qi.length&&u!==0&&u<qi[d].priority;d++);qi.splice(d,0,a),d===0&&Qf(a)}};function Fg(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function Qd(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11&&(a.nodeType!==8||a.nodeValue!==" react-mount-point-unstable "))}function Ev(){}function nE(a,u,d,y,v){if(v){if(typeof y=="function"){var b=y;y=function(){var le=bd(M);b.call(le)}}var M=Cv(u,y,a,0,null,!1,!1,"",Ev);return a._reactRootContainer=M,a[It]=M.current,_a(a.nodeType===8?a.parentNode:a),qa(),M}for(;v=a.lastChild;)a.removeChild(v);if(typeof y=="function"){var X=y;y=function(){var le=bd(H);X.call(le)}}var H=Xg(a,0,!1,null,null,!1,!1,"",Ev);return a._reactRootContainer=H,a[It]=H.current,_a(a.nodeType===8?a.parentNode:a),qa(function(){Sd(u,H,d,y)}),H}function Cd(a,u,d,y,v){var b=d._reactRootContainer;if(b){var M=b;if(typeof v=="function"){var X=v;v=function(){var H=bd(M);X.call(H)}}Sd(u,M,a,v)}else M=nE(d,u,a,v,y);return bd(M)}fo=function(a){switch(a.tag){case 3:var u=a.stateNode;if(u.current.memoizedState.isDehydrated){var d=Ps(u.pendingLanes);d!==0&&(ho(u,d|1),gr(u,bt()),(Mt&6)===0&&(cu=bt()+500,Ro()))}break;case 13:qa(function(){var y=Ls(a,1);if(y!==null){var v=or();Mi(y,a,1,v)}}),Vg(a,1)}},po=function(a){if(a.tag===13){var u=Ls(a,134217728);if(u!==null){var d=or();Mi(u,a,134217728,d)}Vg(a,134217728)}},bf=function(a){if(a.tag===13){var u=Lo(a),d=Ls(a,u);if(d!==null){var y=or();Mi(d,a,u,y)}Vg(a,u)}},lc=function(){return jt},Pf=function(a,u){var d=jt;try{return jt=a,u()}finally{jt=d}},Vi=function(a,u,d){switch(u){case"input":if(Yr(a,d),u=d.name,d.type==="radio"&&u!=null){for(d=a;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll("input[name="+JSON.stringify(""+u)+'][type="radio"]'),u=0;u<d.length;u++){var y=d[u];if(y!==a&&y.form===a.form){var v=Za(y);if(!v)throw Error(t(90));cn(y),Yr(y,v)}}}break;case"textarea":cr(a,d);break;case"select":u=d.value,u!=null&&qr(a,!!d.multiple,u,!1)}},oo=_g,Wi=qa;var rE={usingClientEntryPoint:!1,Events:[Eo,Mo,Za,so,wa,_g]},Bc={findFiberByHostInstance:jr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},iE={bundleType:Bc.bundleType,version:Bc.version,rendererPackageName:Bc.rendererPackageName,rendererConfig:Bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){return a=_t(a),a===null?null:a.stateNode},findFiberByHostInstance:Bc.findFiberByHostInstance||tE,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Td.isDisabled&&Td.supportsFiber)try{Vt=Td.inject(iE),rn=Td}catch{}}return Or.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=rE,Or.createPortal=function(a,u){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Fg(u))throw Error(t(200));return eE(a,u,null,d)},Or.createRoot=function(a,u){if(!Fg(a))throw Error(t(299));var d=!1,y="",v=$v;return u!=null&&(u.unstable_strictMode===!0&&(d=!0),u.identifierPrefix!==void 0&&(y=u.identifierPrefix),u.onRecoverableError!==void 0&&(v=u.onRecoverableError)),u=Xg(a,1,!1,null,null,d,!1,y,v),a[It]=u.current,_a(a.nodeType===8?a.parentNode:a),new Wg(u)},Or.findDOMNode=function(a){if(a==null)return null;if(a.nodeType===1)return a;var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(t(188)):(a=Object.keys(a).join(","),Error(t(268,a)));return a=_t(u),a=a===null?null:a.stateNode,a},Or.flushSync=function(a){return qa(a)},Or.hydrate=function(a,u,d){if(!Qd(u))throw Error(t(200));return Cd(null,a,u,!0,d)},Or.hydrateRoot=function(a,u,d){if(!Fg(a))throw Error(t(405));var y=d!=null&&d.hydratedSources||null,v=!1,b="",M=$v;if(d!=null&&(d.unstable_strictMode===!0&&(v=!0),d.identifierPrefix!==void 0&&(b=d.identifierPrefix),d.onRecoverableError!==void 0&&(M=d.onRecoverableError)),u=Cv(u,null,a,1,d??null,v,!1,b,M),a[It]=u.current,_a(a),y)for(a=0;a<y.length;a++)d=y[a],v=d._getVersion,v=v(d._source),u.mutableSourceEagerHydrationData==null?u.mutableSourceEagerHydrationData=[d,v]:u.mutableSourceEagerHydrationData.push(d,v);return new Pd(u)},Or.render=function(a,u,d){if(!Qd(u))throw Error(t(200));return Cd(null,a,u,!1,d)},Or.unmountComponentAtNode=function(a){if(!Qd(a))throw Error(t(40));return a._reactRootContainer?(qa(function(){Cd(null,null,a,!1,function(){a._reactRootContainer=null,a[It]=null})}),!0):!1},Or.unstable_batchedUpdates=_g,Or.unstable_renderSubtreeIntoContainer=function(a,u,d,y){if(!Qd(d))throw Error(t(200));if(a==null||a._reactInternals===void 0)throw Error(t(38));return Cd(a,u,d,!1,y)},Or.version="18.3.1-next-f1338f8080-20240426",Or}var Lv;function eP(){if(Lv)return qg.exports;Lv=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),qg.exports=mE(),qg.exports}var tP=eP();const nP=af(tP),gE=Kb({__proto__:null,default:nP},[tP]);var Ed={},Iv;function OE(){if(Iv)return Ed;Iv=1;var n=eP();return Ed.createRoot=n.createRoot,Ed.hydrateRoot=n.hydrateRoot,Ed}var yE=OE();/**
41
+ * @remix-run/router v1.23.2
42
+ *
43
+ * Copyright (c) Remix Software Inc.
44
+ *
45
+ * This source code is licensed under the MIT license found in the
46
+ * LICENSE.md file in the root directory of this source tree.
47
+ *
48
+ * @license MIT
49
+ */function on(){return on=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},on.apply(this,arguments)}var Sn;(function(n){n.Pop="POP",n.Push="PUSH",n.Replace="REPLACE"})(Sn||(Sn={}));const Zv="popstate";function xE(n){n===void 0&&(n={});function e(r,i){let{pathname:s,search:o,hash:l}=r.location;return zh("",{pathname:s,search:o,hash:l},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function t(r,i){return typeof i=="string"?i:kl(i)}return wE(e,t,null,n)}function St(n,e){if(n===!1||n===null||typeof n>"u")throw new Error(e)}function wl(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function vE(){return Math.random().toString(36).substr(2,8)}function Xv(n,e){return{usr:n.state,key:n.key,idx:e}}function zh(n,e,t,r){return t===void 0&&(t=null),on({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?ga(e):e,{state:t,key:e&&e.key||r||vE()})}function kl(n){let{pathname:e="/",search:t="",hash:r=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function ga(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let r=n.indexOf("?");r>=0&&(e.search=n.substr(r),n=n.substr(0,r)),n&&(e.pathname=n)}return e}function wE(n,e,t,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,o=i.history,l=Sn.Pop,c=null,h=f();h==null&&(h=0,o.replaceState(on({},o.state,{idx:h}),""));function f(){return(o.state||{idx:null}).idx}function p(){l=Sn.Pop;let C=f(),Q=C==null?null:C-h;h=C,c&&c({action:l,location:w.location,delta:Q})}function m(C,Q){l=Sn.Push;let $=zh(w.location,C,Q);h=f()+1;let E=Xv($,h),Z=w.createHref($);try{o.pushState(E,"",Z)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;i.location.assign(Z)}s&&c&&c({action:l,location:w.location,delta:1})}function g(C,Q){l=Sn.Replace;let $=zh(w.location,C,Q);h=f();let E=Xv($,h),Z=w.createHref($);o.replaceState(E,"",Z),s&&c&&c({action:l,location:w.location,delta:0})}function k(C){let Q=i.location.origin!=="null"?i.location.origin:i.location.href,$=typeof C=="string"?C:kl(C);return $=$.replace(/ $/,"%20"),St(Q,"No window.location.(origin|href) available to create URL for href: "+$),new URL($,Q)}let w={get action(){return l},get location(){return n(i,o)},listen(C){if(c)throw new Error("A history only accepts one active listener");return i.addEventListener(Zv,p),c=C,()=>{i.removeEventListener(Zv,p),c=null}},createHref(C){return e(i,C)},createURL:k,encodeLocation(C){let Q=k(C);return{pathname:Q.pathname,search:Q.search,hash:Q.hash}},push:m,replace:g,go(C){return o.go(C)}};return w}var Wt;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(Wt||(Wt={}));const kE=new Set(["lazy","caseSensitive","path","id","index","children"]);function SE(n){return n.index===!0}function gp(n,e,t,r){return t===void 0&&(t=[]),r===void 0&&(r={}),n.map((i,s)=>{let o=[...t,String(s)],l=typeof i.id=="string"?i.id:o.join("-");if(St(i.index!==!0||!i.children,"Cannot specify children on an index route"),St(!r[l],'Found a route id collision on id "'+l+`". Route id's must be globally unique within Data Router usages`),SE(i)){let c=on({},i,e(i),{id:l});return r[l]=c,c}else{let c=on({},i,e(i),{id:l,children:void 0});return r[l]=c,i.children&&(c.children=gp(i.children,e,o,r)),c}})}function ol(n,e,t){return t===void 0&&(t="/"),rp(n,e,t,!1)}function rp(n,e,t,r){let i=typeof e=="string"?ga(e):e,s=Js(i.pathname||"/",t);if(s==null)return null;let o=rP(n);PE(o);let l=null;for(let c=0;l==null&&c<o.length;++c){let h=_E(s);l=NE(o[c],h,r)}return l}function bE(n,e){let{route:t,pathname:r,params:i}=n;return{id:t.id,pathname:r,params:i,data:e[t.id],handle:t.handle}}function rP(n,e,t,r){e===void 0&&(e=[]),t===void 0&&(t=[]),r===void 0&&(r="");let i=(s,o,l)=>{let c={relativePath:l===void 0?s.path||"":l,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};c.relativePath.startsWith("/")&&(St(c.relativePath.startsWith(r),'Absolute route path "'+c.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),c.relativePath=c.relativePath.slice(r.length));let h=qs([r,c.relativePath]),f=t.concat(c);s.children&&s.children.length>0&&(St(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+h+'".')),rP(s.children,e,f,h)),!(s.path==null&&!s.index)&&e.push({path:h,score:jE(h,s.index),routesMeta:f})};return n.forEach((s,o)=>{var l;if(s.path===""||!((l=s.path)!=null&&l.includes("?")))i(s,o);else for(let c of iP(s.path))i(s,o,c)}),e}function iP(n){let e=n.split("/");if(e.length===0)return[];let[t,...r]=e,i=t.endsWith("?"),s=t.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let o=iP(r.join("/")),l=[];return l.push(...o.map(c=>c===""?s:[s,c].join("/"))),i&&l.push(...o),l.map(c=>n.startsWith("/")&&c===""?"/":c)}function PE(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:RE(e.routesMeta.map(r=>r.childrenIndex),t.routesMeta.map(r=>r.childrenIndex)))}const QE=/^:[\w-]+$/,CE=3,TE=2,$E=1,EE=10,ME=-2,Vv=n=>n==="*";function jE(n,e){let t=n.split("/"),r=t.length;return t.some(Vv)&&(r+=ME),e&&(r+=TE),t.filter(i=>!Vv(i)).reduce((i,s)=>i+(QE.test(s)?CE:s===""?$E:EE),r)}function RE(n,e){return n.length===e.length&&n.slice(0,-1).every((r,i)=>r===e[i])?n[n.length-1]-e[e.length-1]:0}function NE(n,e,t){t===void 0&&(t=!1);let{routesMeta:r}=n,i={},s="/",o=[];for(let l=0;l<r.length;++l){let c=r[l],h=l===r.length-1,f=s==="/"?e:e.slice(s.length)||"/",p=Op({path:c.relativePath,caseSensitive:c.caseSensitive,end:h},f),m=c.route;if(!p&&h&&t&&!r[r.length-1].route.index&&(p=Op({path:c.relativePath,caseSensitive:c.caseSensitive,end:!1},f)),!p)return null;Object.assign(i,p.params),o.push({params:i,pathname:qs([s,p.pathname]),pathnameBase:IE(qs([s,p.pathnameBase])),route:m}),p.pathnameBase!=="/"&&(s=qs([s,p.pathnameBase]))}return o}function Op(n,e){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[t,r]=AE(n.path,n.caseSensitive,n.end),i=e.match(t);if(!i)return null;let s=i[0],o=s.replace(/(.)\/+$/,"$1"),l=i.slice(1);return{params:r.reduce((h,f,p)=>{let{paramName:m,isOptional:g}=f;if(m==="*"){let w=l[p]||"";o=s.slice(0,s.length-w.length).replace(/(.)\/+$/,"$1")}const k=l[p];return g&&!k?h[m]=void 0:h[m]=(k||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:o,pattern:n}}function AE(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),wl(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let r=[],i="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,l,c)=>(r.push({paramName:l,isOptional:c!=null}),c?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(r.push({paramName:"*"}),i+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?i+="\\/*$":n!==""&&n!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function _E(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return wl(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function Js(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,r=n.charAt(t);return r&&r!=="/"?null:n.slice(t)||"/"}const zE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,DE=n=>zE.test(n);function LE(n,e){e===void 0&&(e="/");let{pathname:t,search:r="",hash:i=""}=typeof n=="string"?ga(n):n,s;if(t)if(DE(t))s=t;else{if(t.includes("//")){let o=t;t=t.replace(/\/\/+/g,"/"),wl(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+t))}t.startsWith("/")?s=Wv(t.substring(1),"/"):s=Wv(t,e)}else s=e;return{pathname:s,search:ZE(r),hash:XE(i)}}function Wv(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(i=>{i===".."?t.length>1&&t.pop():i!=="."&&t.push(i)}),t.length>1?t.join("/"):"/"}function Kg(n,e,t,r){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function sP(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ey(n,e){let t=sP(n);return e?t.map((r,i)=>i===t.length-1?r.pathname:r.pathnameBase):t.map(r=>r.pathnameBase)}function My(n,e,t,r){r===void 0&&(r=!1);let i;typeof n=="string"?i=ga(n):(i=on({},n),St(!i.pathname||!i.pathname.includes("?"),Kg("?","pathname","search",i)),St(!i.pathname||!i.pathname.includes("#"),Kg("#","pathname","hash",i)),St(!i.search||!i.search.includes("#"),Kg("#","search","hash",i)));let s=n===""||i.pathname==="",o=s?"/":i.pathname,l;if(o==null)l=t;else{let p=e.length-1;if(!r&&o.startsWith("..")){let m=o.split("/");for(;m[0]==="..";)m.shift(),p-=1;i.pathname=m.join("/")}l=p>=0?e[p]:"/"}let c=LE(i,l),h=o&&o!=="/"&&o.endsWith("/"),f=(s||o===".")&&t.endsWith("/");return!c.pathname.endsWith("/")&&(h||f)&&(c.pathname+="/"),c}const qs=n=>n.join("/").replace(/\/\/+/g,"/"),IE=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),ZE=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,XE=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;class yp{constructor(e,t,r,i){i===void 0&&(i=!1),this.status=e,this.statusText=t||"",this.internal=i,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Dh(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const oP=["post","put","patch","delete"],VE=new Set(oP),WE=["get",...oP],FE=new Set(WE),BE=new Set([301,302,303,307,308]),YE=new Set([307,308]),Jg={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},UE={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},jy=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,qE=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),aP="remix-router-transitions";function HE(n){const e=n.window?n.window:typeof window<"u"?window:void 0,t=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!t;St(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let i;if(n.mapRouteProperties)i=n.mapRouteProperties;else if(n.detectErrorBoundary){let B=n.detectErrorBoundary;i=ee=>({hasErrorBoundary:B(ee)})}else i=qE;let s={},o=gp(n.routes,i,void 0,s),l,c=n.basename||"/",h=n.dataStrategy||eM,f=n.patchRoutesOnNavigation,p=on({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},n.future),m=null,g=new Set,k=null,w=null,C=null,Q=n.hydrationData!=null,$=ol(o,n.history.location,c),E=!1,Z=null;if($==null&&!f){let B=wr(404,{pathname:n.history.location.pathname}),{matches:ee,route:ce}=tw(o);$=ee,Z={[ce.id]:B}}$&&!n.hydrationData&&Wi($,o,n.history.location.pathname).active&&($=null);let Y;if($)if($.some(B=>B.route.lazy))Y=!1;else if(!$.some(B=>B.route.loader))Y=!0;else if(p.v7_partialHydration){let B=n.hydrationData?n.hydrationData.loaderData:null,ee=n.hydrationData?n.hydrationData.errors:null;if(ee){let ce=$.findIndex(pe=>ee[pe.route.id]!==void 0);Y=$.slice(0,ce+1).every(pe=>!s0(pe.route,B,ee))}else Y=$.every(ce=>!s0(ce.route,B,ee))}else Y=n.hydrationData!=null;else if(Y=!1,$=[],p.v7_partialHydration){let B=Wi(null,o,n.history.location.pathname);B.active&&B.matches&&(E=!0,$=B.matches)}let _,R={historyAction:n.history.action,location:n.history.location,matches:$,initialized:Y,navigation:Jg,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||Z,fetchers:new Map,blockers:new Map},q=Sn.Pop,G=!1,W,z=!1,D=new Map,se=null,oe=!1,ne=!1,de=[],ke=new Set,he=new Map,ye=0,N=-1,U=new Map,ue=new Set,L=new Map,Re=new Map,_e=new Set,$e=new Map,rt=new Map,st;function mt(){if(m=n.history.listen(B=>{let{action:ee,location:ce,delta:pe}=B;if(st){st(),st=void 0;return}wl(rt.size===0||pe!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Se=Vi({currentLocation:R.location,nextLocation:ce,historyAction:ee});if(Se&&pe!=null){let Xe=new Promise(Je=>{st=Je});n.history.go(pe*-1),Xi(Se,{state:"blocked",location:ce,proceed(){Xi(Se,{state:"proceeding",proceed:void 0,reset:void 0,location:ce}),Xe.then(()=>n.history.go(pe))},reset(){let Je=new Map(R.blockers);Je.set(Se,qc),cn({blockers:Je})}});return}return Kn(ee,ce)}),t){pM(e,D);let B=()=>mM(e,D);e.addEventListener("pagehide",B),se=()=>e.removeEventListener("pagehide",B)}return R.initialized||Kn(Sn.Pop,R.location,{initialHydration:!0}),_}function Xt(){m&&m(),se&&se(),g.clear(),W&&W.abort(),R.fetchers.forEach((B,ee)=>Ke(ee)),R.blockers.forEach((B,ee)=>Tn(ee))}function Gn(B){return g.add(B),()=>g.delete(B)}function cn(B,ee){ee===void 0&&(ee={}),R=on({},R,B);let ce=[],pe=[];p.v7_fetcherPersist&&R.fetchers.forEach((Se,Xe)=>{Se.state==="idle"&&(_e.has(Xe)?pe.push(Xe):ce.push(Xe))}),_e.forEach(Se=>{!R.fetchers.has(Se)&&!he.has(Se)&&pe.push(Se)}),[...g].forEach(Se=>Se(R,{deletedFetchers:pe,viewTransitionOpts:ee.viewTransitionOpts,flushSync:ee.flushSync===!0})),p.v7_fetcherPersist?(ce.forEach(Se=>R.fetchers.delete(Se)),pe.forEach(Se=>Ke(Se))):pe.forEach(Se=>_e.delete(Se))}function Nn(B,ee,ce){var pe,Se;let{flushSync:Xe}=ce===void 0?{}:ce,Je=R.actionData!=null&&R.navigation.formMethod!=null&&Ai(R.navigation.formMethod)&&R.navigation.state==="loading"&&((pe=B.state)==null?void 0:pe._isRedirect)!==!0,Ae;ee.actionData?Object.keys(ee.actionData).length>0?Ae=ee.actionData:Ae=null:Je?Ae=R.actionData:Ae=null;let ze=ee.loaderData?Jv(R.loaderData,ee.loaderData,ee.matches||[],ee.errors):R.loaderData,Me=R.blockers;Me.size>0&&(Me=new Map(Me),Me.forEach((gt,fn)=>Me.set(fn,qc)));let Ne=G===!0||R.navigation.formMethod!=null&&Ai(R.navigation.formMethod)&&((Se=B.state)==null?void 0:Se._isRedirect)!==!0;l&&(o=l,l=void 0),oe||q===Sn.Pop||(q===Sn.Push?n.history.push(B,B.state):q===Sn.Replace&&n.history.replace(B,B.state));let ot;if(q===Sn.Pop){let gt=D.get(R.location.pathname);gt&&gt.has(B.pathname)?ot={currentLocation:R.location,nextLocation:B}:D.has(B.pathname)&&(ot={currentLocation:B,nextLocation:R.location})}else if(z){let gt=D.get(R.location.pathname);gt?gt.add(B.pathname):(gt=new Set([B.pathname]),D.set(R.location.pathname,gt)),ot={currentLocation:R.location,nextLocation:B}}cn(on({},ee,{actionData:Ae,loaderData:ze,historyAction:q,location:B,initialized:!0,navigation:Jg,revalidation:"idle",restoreScrollPosition:oo(B,ee.matches||R.matches),preventScrollReset:Ne,blockers:Me}),{viewTransitionOpts:ot,flushSync:Xe===!0}),q=Sn.Pop,G=!1,z=!1,oe=!1,ne=!1,de=[]}async function Zi(B,ee){if(typeof B=="number"){n.history.go(B);return}let ce=i0(R.location,R.matches,c,p.v7_prependBasename,B,p.v7_relativeSplatPath,ee==null?void 0:ee.fromRouteId,ee==null?void 0:ee.relative),{path:pe,submission:Se,error:Xe}=Fv(p.v7_normalizeFormMethod,!1,ce,ee),Je=R.location,Ae=zh(R.location,pe,ee&&ee.state);Ae=on({},Ae,n.history.encodeLocation(Ae));let ze=ee&&ee.replace!=null?ee.replace:void 0,Me=Sn.Push;ze===!0?Me=Sn.Replace:ze===!1||Se!=null&&Ai(Se.formMethod)&&Se.formAction===R.location.pathname+R.location.search&&(Me=Sn.Replace);let Ne=ee&&"preventScrollReset"in ee?ee.preventScrollReset===!0:void 0,ot=(ee&&ee.flushSync)===!0,gt=Vi({currentLocation:Je,nextLocation:Ae,historyAction:Me});if(gt){Xi(gt,{state:"blocked",location:Ae,proceed(){Xi(gt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ae}),Zi(B,ee)},reset(){let fn=new Map(R.blockers);fn.set(gt,qc),cn({blockers:fn})}});return}return await Kn(Me,Ae,{submission:Se,pendingError:Xe,preventScrollReset:Ne,replace:ee&&ee.replace,enableViewTransition:ee&&ee.viewTransition,flushSync:ot})}function Tr(){if(Pe(),cn({revalidation:"loading"}),R.navigation.state!=="submitting"){if(R.navigation.state==="idle"){Kn(R.historyAction,R.location,{startUninterruptedRevalidation:!0});return}Kn(q||R.historyAction,R.navigation.location,{overrideNavigation:R.navigation,enableViewTransition:z===!0})}}async function Kn(B,ee,ce){W&&W.abort(),W=null,q=B,oe=(ce&&ce.startUninterruptedRevalidation)===!0,wa(R.location,R.matches),G=(ce&&ce.preventScrollReset)===!0,z=(ce&&ce.enableViewTransition)===!0;let pe=l||o,Se=ce&&ce.overrideNavigation,Xe=ce!=null&&ce.initialHydration&&R.matches&&R.matches.length>0&&!E?R.matches:ol(pe,ee,c),Je=(ce&&ce.flushSync)===!0;if(Xe&&R.initialized&&!ne&&oM(R.location,ee)&&!(ce&&ce.submission&&Ai(ce.submission.formMethod))){Nn(ee,{matches:Xe},{flushSync:Je});return}let Ae=Wi(Xe,pe,ee.pathname);if(Ae.active&&Ae.matches&&(Xe=Ae.matches),!Xe){let{error:_t,notFoundMatches:Qt,route:Ft}=Hr(ee.pathname);Nn(ee,{matches:Qt,loaderData:{},errors:{[Ft.id]:_t}},{flushSync:Je});return}W=new AbortController;let ze=fu(n.history,ee,W.signal,ce&&ce.submission),Me;if(ce&&ce.pendingError)Me=[al(Xe).route.id,{type:Wt.error,error:ce.pendingError}];else if(ce&&ce.submission&&Ai(ce.submission.formMethod)){let _t=await Yr(ze,ee,ce.submission,Xe,Ae.active,{replace:ce.replace,flushSync:Je});if(_t.shortCircuited)return;if(_t.pendingActionResult){let[Qt,Ft]=_t.pendingActionResult;if(Vr(Ft)&&Dh(Ft.error)&&Ft.error.status===404){W=null,Nn(ee,{matches:_t.matches,loaderData:{},errors:{[Qt]:Ft.error}});return}}Xe=_t.matches||Xe,Me=_t.pendingActionResult,Se=eO(ee,ce.submission),Je=!1,Ae.active=!1,ze=fu(n.history,ze.url,ze.signal)}let{shortCircuited:Ne,matches:ot,loaderData:gt,errors:fn}=await Ss(ze,ee,Xe,Ae.active,Se,ce&&ce.submission,ce&&ce.fetcherSubmission,ce&&ce.replace,ce&&ce.initialHydration===!0,Je,Me);Ne||(W=null,Nn(ee,on({matches:ot||Xe},ew(Me),{loaderData:gt,errors:fn})))}async function Yr(B,ee,ce,pe,Se,Xe){Xe===void 0&&(Xe={}),Pe();let Je=fM(ee,ce);if(cn({navigation:Je},{flushSync:Xe.flushSync===!0}),Se){let Me=await yi(pe,ee.pathname,B.signal);if(Me.type==="aborted")return{shortCircuited:!0};if(Me.type==="error"){let Ne=al(Me.partialMatches).route.id;return{matches:Me.partialMatches,pendingActionResult:[Ne,{type:Wt.error,error:Me.error}]}}else if(Me.matches)pe=Me.matches;else{let{notFoundMatches:Ne,error:ot,route:gt}=Hr(ee.pathname);return{matches:Ne,pendingActionResult:[gt.id,{type:Wt.error,error:ot}]}}}let Ae,ze=kh(pe,ee);if(!ze.route.action&&!ze.route.lazy)Ae={type:Wt.error,error:wr(405,{method:B.method,pathname:ee.pathname,routeId:ze.route.id})};else if(Ae=(await Jn("action",R,B,[ze],pe,null))[ze.route.id],B.signal.aborted)return{shortCircuited:!0};if(cl(Ae)){let Me;return Xe&&Xe.replace!=null?Me=Xe.replace:Me=Hv(Ae.response.headers.get("Location"),new URL(B.url),c,n.history)===R.location.pathname+R.location.search,await cr(B,Ae,!0,{submission:ce,replace:Me}),{shortCircuited:!0}}if(aa(Ae))throw wr(400,{type:"defer-action"});if(Vr(Ae)){let Me=al(pe,ze.route.id);return(Xe&&Xe.replace)!==!0&&(q=Sn.Push),{matches:pe,pendingActionResult:[Me.route.id,Ae]}}return{matches:pe,pendingActionResult:[ze.route.id,Ae]}}async function Ss(B,ee,ce,pe,Se,Xe,Je,Ae,ze,Me,Ne){let ot=Se||eO(ee,Xe),gt=Xe||Je||rw(ot),fn=!oe&&(!p.v7_partialHydration||!ze);if(pe){if(fn){let Vt=$r(Ne);cn(on({navigation:ot},Vt!==void 0?{actionData:Vt}:{}),{flushSync:Me})}let vt=await yi(ce,ee.pathname,B.signal);if(vt.type==="aborted")return{shortCircuited:!0};if(vt.type==="error"){let Vt=al(vt.partialMatches).route.id;return{matches:vt.partialMatches,loaderData:{},errors:{[Vt]:vt.error}}}else if(vt.matches)ce=vt.matches;else{let{error:Vt,notFoundMatches:rn,route:vi}=Hr(ee.pathname);return{matches:rn,loaderData:{},errors:{[vi.id]:Vt}}}}let _t=l||o,[Qt,Ft]=Yv(n.history,R,ce,gt,ee,p.v7_partialHydration&&ze===!0,p.v7_skipActionErrorRevalidation,ne,de,ke,_e,L,ue,_t,c,Ne);if(hn(vt=>!(ce&&ce.some(Vt=>Vt.route.id===vt))||Qt&&Qt.some(Vt=>Vt.route.id===vt)),N=++ye,Qt.length===0&&Ft.length===0){let vt=bn();return Nn(ee,on({matches:ce,loaderData:{},errors:Ne&&Vr(Ne[1])?{[Ne[0]]:Ne[1].error}:null},ew(Ne),vt?{fetchers:new Map(R.fetchers)}:{}),{flushSync:Me}),{shortCircuited:!0}}if(fn){let vt={};if(!pe){vt.navigation=ot;let Vt=$r(Ne);Vt!==void 0&&(vt.actionData=Vt)}Ft.length>0&&(vt.fetchers=Ur(Ft)),cn(vt,{flushSync:Me})}Ft.forEach(vt=>{xt(vt.key),vt.controller&&he.set(vt.key,vt.controller)});let Gr=()=>Ft.forEach(vt=>xt(vt.key));W&&W.signal.addEventListener("abort",Gr);let{loaderResults:qe,fetcherResults:vn}=await fe(R,ce,Qt,Ft,B);if(B.signal.aborted)return{shortCircuited:!0};W&&W.signal.removeEventListener("abort",Gr),Ft.forEach(vt=>he.delete(vt.key));let bt=Md(qe);if(bt)return await cr(B,bt.result,!0,{replace:Ae}),{shortCircuited:!0};if(bt=Md(vn),bt)return ue.add(bt.key),await cr(B,bt.result,!0,{replace:Ae}),{shortCircuited:!0};let{loaderData:Sa,errors:xi}=Kv(R,ce,qe,Ne,Ft,vn,$e);$e.forEach((vt,Vt)=>{vt.subscribe(rn=>{(rn||vt.done)&&$e.delete(Vt)})}),p.v7_partialHydration&&ze&&R.errors&&(xi=on({},R.errors,xi));let Er=bn(),Kr=nn(N),ao=Er||Kr||Ft.length>0;return on({matches:ce,loaderData:Sa,errors:xi},ao?{fetchers:new Map(R.fetchers)}:{})}function $r(B){if(B&&!Vr(B[1]))return{[B[0]]:B[1].data};if(R.actionData)return Object.keys(R.actionData).length===0?null:R.actionData}function Ur(B){return B.forEach(ee=>{let ce=R.fetchers.get(ee.key),pe=Hc(void 0,ce?ce.data:void 0);R.fetchers.set(ee.key,pe)}),new Map(R.fetchers)}function qr(B,ee,ce,pe){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");xt(B);let Se=(pe&&pe.flushSync)===!0,Xe=l||o,Je=i0(R.location,R.matches,c,p.v7_prependBasename,ce,p.v7_relativeSplatPath,ee,pe==null?void 0:pe.relative),Ae=ol(Xe,Je,c),ze=Wi(Ae,Xe,Je);if(ze.active&&ze.matches&&(Ae=ze.matches),!Ae){nt(B,ee,wr(404,{pathname:Je}),{flushSync:Se});return}let{path:Me,submission:Ne,error:ot}=Fv(p.v7_normalizeFormMethod,!0,Je,pe);if(ot){nt(B,ee,ot,{flushSync:Se});return}let gt=kh(Ae,Me),fn=(pe&&pe.preventScrollReset)===!0;if(Ne&&Ai(Ne.formMethod)){bs(B,ee,Me,gt,Ae,ze.active,Se,fn,Ne);return}L.set(B,{routeId:ee,path:Me}),io(B,ee,Me,gt,Ae,ze.active,Se,fn,Ne)}async function bs(B,ee,ce,pe,Se,Xe,Je,Ae,ze){Pe(),L.delete(B);function Me(ht){if(!ht.route.action&&!ht.route.lazy){let Bi=wr(405,{method:ze.formMethod,pathname:ce,routeId:ee});return nt(B,ee,Bi,{flushSync:Je}),!0}return!1}if(!Xe&&Me(pe))return;let Ne=R.fetchers.get(B);Fe(B,dM(ze,Ne),{flushSync:Je});let ot=new AbortController,gt=fu(n.history,ce,ot.signal,ze);if(Xe){let ht=await yi(Se,new URL(gt.url).pathname,gt.signal,B);if(ht.type==="aborted")return;if(ht.type==="error"){nt(B,ee,ht.error,{flushSync:Je});return}else if(ht.matches){if(Se=ht.matches,pe=kh(Se,ce),Me(pe))return}else{nt(B,ee,wr(404,{pathname:ce}),{flushSync:Je});return}}he.set(B,ot);let fn=ye,Qt=(await Jn("action",R,gt,[pe],Se,B))[pe.route.id];if(gt.signal.aborted){he.get(B)===ot&&he.delete(B);return}if(p.v7_fetcherPersist&&_e.has(B)){if(cl(Qt)||Vr(Qt)){Fe(B,Uo(void 0));return}}else{if(cl(Qt))if(he.delete(B),N>fn){Fe(B,Uo(void 0));return}else return ue.add(B),Fe(B,Hc(ze)),cr(gt,Qt,!1,{fetcherSubmission:ze,preventScrollReset:Ae});if(Vr(Qt)){nt(B,ee,Qt.error);return}}if(aa(Qt))throw wr(400,{type:"defer-action"});let Ft=R.navigation.location||R.location,Gr=fu(n.history,Ft,ot.signal),qe=l||o,vn=R.navigation.state!=="idle"?ol(qe,R.navigation.location,c):R.matches;St(vn,"Didn't find any matches after fetcher action");let bt=++ye;U.set(B,bt);let Sa=Hc(ze,Qt.data);R.fetchers.set(B,Sa);let[xi,Er]=Yv(n.history,R,vn,ze,Ft,!1,p.v7_skipActionErrorRevalidation,ne,de,ke,_e,L,ue,qe,c,[pe.route.id,Qt]);Er.filter(ht=>ht.key!==B).forEach(ht=>{let Bi=ht.key,Kt=R.fetchers.get(Bi),Jr=Hc(void 0,Kt?Kt.data:void 0);R.fetchers.set(Bi,Jr),xt(Bi),ht.controller&&he.set(Bi,ht.controller)}),cn({fetchers:new Map(R.fetchers)});let Kr=()=>Er.forEach(ht=>xt(ht.key));ot.signal.addEventListener("abort",Kr);let{loaderResults:ao,fetcherResults:vt}=await fe(R,vn,xi,Er,Gr);if(ot.signal.aborted)return;ot.signal.removeEventListener("abort",Kr),U.delete(B),he.delete(B),Er.forEach(ht=>he.delete(ht.key));let Vt=Md(ao);if(Vt)return cr(Gr,Vt.result,!1,{preventScrollReset:Ae});if(Vt=Md(vt),Vt)return ue.add(Vt.key),cr(Gr,Vt.result,!1,{preventScrollReset:Ae});let{loaderData:rn,errors:vi}=Kv(R,vn,ao,void 0,Er,vt,$e);if(R.fetchers.has(B)){let ht=Uo(Qt.data);R.fetchers.set(B,ht)}nn(bt),R.navigation.state==="loading"&&bt>N?(St(q,"Expected pending action"),W&&W.abort(),Nn(R.navigation.location,{matches:vn,loaderData:rn,errors:vi,fetchers:new Map(R.fetchers)})):(cn({errors:vi,loaderData:Jv(R.loaderData,rn,vn,vi),fetchers:new Map(R.fetchers)}),ne=!1)}async function io(B,ee,ce,pe,Se,Xe,Je,Ae,ze){let Me=R.fetchers.get(B);Fe(B,Hc(ze,Me?Me.data:void 0),{flushSync:Je});let Ne=new AbortController,ot=fu(n.history,ce,Ne.signal);if(Xe){let Qt=await yi(Se,new URL(ot.url).pathname,ot.signal,B);if(Qt.type==="aborted")return;if(Qt.type==="error"){nt(B,ee,Qt.error,{flushSync:Je});return}else if(Qt.matches)Se=Qt.matches,pe=kh(Se,ce);else{nt(B,ee,wr(404,{pathname:ce}),{flushSync:Je});return}}he.set(B,Ne);let gt=ye,_t=(await Jn("loader",R,ot,[pe],Se,B))[pe.route.id];if(aa(_t)&&(_t=await Ry(_t,ot.signal,!0)||_t),he.get(B)===Ne&&he.delete(B),!ot.signal.aborted){if(_e.has(B)){Fe(B,Uo(void 0));return}if(cl(_t))if(N>gt){Fe(B,Uo(void 0));return}else{ue.add(B),await cr(ot,_t,!1,{preventScrollReset:Ae});return}if(Vr(_t)){nt(B,ee,_t.error);return}St(!aa(_t),"Unhandled fetcher deferred data"),Fe(B,Uo(_t.data))}}async function cr(B,ee,ce,pe){let{submission:Se,fetcherSubmission:Xe,preventScrollReset:Je,replace:Ae}=pe===void 0?{}:pe;ee.response.headers.has("X-Remix-Revalidate")&&(ne=!0);let ze=ee.response.headers.get("Location");St(ze,"Expected a Location header on the redirect Response"),ze=Hv(ze,new URL(B.url),c,n.history);let Me=zh(R.location,ze,{_isRedirect:!0});if(t){let Qt=!1;if(ee.response.headers.has("X-Remix-Reload-Document"))Qt=!0;else if(jy.test(ze)){const Ft=n.history.createURL(ze);Qt=Ft.origin!==e.location.origin||Js(Ft.pathname,c)==null}if(Qt){Ae?e.location.replace(ze):e.location.assign(ze);return}}W=null;let Ne=Ae===!0||ee.response.headers.has("X-Remix-Replace")?Sn.Replace:Sn.Push,{formMethod:ot,formAction:gt,formEncType:fn}=R.navigation;!Se&&!Xe&&ot&&gt&&fn&&(Se=rw(R.navigation));let _t=Se||Xe;if(YE.has(ee.response.status)&&_t&&Ai(_t.formMethod))await Kn(Ne,Me,{submission:on({},_t,{formAction:ze}),preventScrollReset:Je||G,enableViewTransition:ce?z:void 0});else{let Qt=eO(Me,Se);await Kn(Ne,Me,{overrideNavigation:Qt,fetcherSubmission:Xe,preventScrollReset:Je||G,enableViewTransition:ce?z:void 0})}}async function Jn(B,ee,ce,pe,Se,Xe){let Je,Ae={};try{Je=await tM(h,B,ee,ce,pe,Se,Xe,s,i)}catch(ze){return pe.forEach(Me=>{Ae[Me.route.id]={type:Wt.error,error:ze}}),Ae}for(let[ze,Me]of Object.entries(Je))if(aM(Me)){let Ne=Me.result;Ae[ze]={type:Wt.redirect,response:iM(Ne,ce,ze,Se,c,p.v7_relativeSplatPath)}}else Ae[ze]=await rM(Me);return Ae}async function fe(B,ee,ce,pe,Se){let Xe=B.matches,Je=Jn("loader",B,Se,ce,ee,null),Ae=Promise.all(pe.map(async Ne=>{if(Ne.matches&&Ne.match&&Ne.controller){let gt=(await Jn("loader",B,fu(n.history,Ne.path,Ne.controller.signal),[Ne.match],Ne.matches,Ne.key))[Ne.match.route.id];return{[Ne.key]:gt}}else return Promise.resolve({[Ne.key]:{type:Wt.error,error:wr(404,{pathname:Ne.path})}})})),ze=await Je,Me=(await Ae).reduce((Ne,ot)=>Object.assign(Ne,ot),{});return await Promise.all([cM(ee,ze,Se.signal,Xe,B.loaderData),hM(ee,Me,pe)]),{loaderResults:ze,fetcherResults:Me}}function Pe(){ne=!0,de.push(...hn()),L.forEach((B,ee)=>{he.has(ee)&&ke.add(ee),xt(ee)})}function Fe(B,ee,ce){ce===void 0&&(ce={}),R.fetchers.set(B,ee),cn({fetchers:new Map(R.fetchers)},{flushSync:(ce&&ce.flushSync)===!0})}function nt(B,ee,ce,pe){pe===void 0&&(pe={});let Se=al(R.matches,ee);Ke(B),cn({errors:{[Se.route.id]:ce},fetchers:new Map(R.fetchers)},{flushSync:(pe&&pe.flushSync)===!0})}function yt(B){return Re.set(B,(Re.get(B)||0)+1),_e.has(B)&&_e.delete(B),R.fetchers.get(B)||UE}function Ke(B){let ee=R.fetchers.get(B);he.has(B)&&!(ee&&ee.state==="loading"&&U.has(B))&&xt(B),L.delete(B),U.delete(B),ue.delete(B),p.v7_fetcherPersist&&_e.delete(B),ke.delete(B),R.fetchers.delete(B)}function er(B){let ee=(Re.get(B)||0)-1;ee<=0?(Re.delete(B),_e.add(B),p.v7_fetcherPersist||Ke(B)):Re.set(B,ee),cn({fetchers:new Map(R.fetchers)})}function xt(B){let ee=he.get(B);ee&&(ee.abort(),he.delete(B))}function hr(B){for(let ee of B){let ce=yt(ee),pe=Uo(ce.data);R.fetchers.set(ee,pe)}}function bn(){let B=[],ee=!1;for(let ce of ue){let pe=R.fetchers.get(ce);St(pe,"Expected fetcher: "+ce),pe.state==="loading"&&(ue.delete(ce),B.push(ce),ee=!0)}return hr(B),ee}function nn(B){let ee=[];for(let[ce,pe]of U)if(pe<B){let Se=R.fetchers.get(ce);St(Se,"Expected fetcher: "+ce),Se.state==="loading"&&(xt(ce),U.delete(ce),ee.push(ce))}return hr(ee),ee.length>0}function tr(B,ee){let ce=R.blockers.get(B)||qc;return rt.get(B)!==ee&&rt.set(B,ee),ce}function Tn(B){R.blockers.delete(B),rt.delete(B)}function Xi(B,ee){let ce=R.blockers.get(B)||qc;St(ce.state==="unblocked"&&ee.state==="blocked"||ce.state==="blocked"&&ee.state==="blocked"||ce.state==="blocked"&&ee.state==="proceeding"||ce.state==="blocked"&&ee.state==="unblocked"||ce.state==="proceeding"&&ee.state==="unblocked","Invalid blocker state transition: "+ce.state+" -> "+ee.state);let pe=new Map(R.blockers);pe.set(B,ee),cn({blockers:pe})}function Vi(B){let{currentLocation:ee,nextLocation:ce,historyAction:pe}=B;if(rt.size===0)return;rt.size>1&&wl(!1,"A router only supports one blocker at a time");let Se=Array.from(rt.entries()),[Xe,Je]=Se[Se.length-1],Ae=R.blockers.get(Xe);if(!(Ae&&Ae.state==="proceeding")&&Je({currentLocation:ee,nextLocation:ce,historyAction:pe}))return Xe}function Hr(B){let ee=wr(404,{pathname:B}),ce=l||o,{matches:pe,route:Se}=tw(ce);return hn(),{notFoundMatches:pe,route:Se,error:ee}}function hn(B){let ee=[];return $e.forEach((ce,pe)=>{(!B||B(pe))&&(ce.cancel(),ee.push(pe),$e.delete(pe))}),ee}function va(B,ee,ce){if(k=B,C=ee,w=ce||null,!Q&&R.navigation===Jg){Q=!0;let pe=oo(R.location,R.matches);pe!=null&&cn({restoreScrollPosition:pe})}return()=>{k=null,C=null,w=null}}function so(B,ee){return w&&w(B,ee.map(pe=>bE(pe,R.loaderData)))||B.key}function wa(B,ee){if(k&&C){let ce=so(B,ee);k[ce]=C()}}function oo(B,ee){if(k){let ce=so(B,ee),pe=k[ce];if(typeof pe=="number")return pe}return null}function Wi(B,ee,ce){if(f)if(B){if(Object.keys(B[0].params).length>0)return{active:!0,matches:rp(ee,ce,c,!0)}}else return{active:!0,matches:rp(ee,ce,c,!0)||[]};return{active:!1,matches:null}}async function yi(B,ee,ce,pe){if(!f)return{type:"success",matches:B};let Se=B;for(;;){let Xe=l==null,Je=l||o,Ae=s;try{await f({signal:ce,path:ee,matches:Se,fetcherKey:pe,patch:(Ne,ot)=>{ce.aborted||qv(Ne,ot,Je,Ae,i)}})}catch(Ne){return{type:"error",error:Ne,partialMatches:Se}}finally{Xe&&!ce.aborted&&(o=[...o])}if(ce.aborted)return{type:"aborted"};let ze=ol(Je,ee,c);if(ze)return{type:"success",matches:ze};let Me=rp(Je,ee,c,!0);if(!Me||Se.length===Me.length&&Se.every((Ne,ot)=>Ne.route.id===Me[ot].route.id))return{type:"success",matches:null};Se=Me}}function ka(B){s={},l=gp(B,i,void 0,s)}function Fi(B,ee){let ce=l==null;qv(B,ee,l||o,s,i),ce&&(o=[...o],cn({}))}return _={get basename(){return c},get future(){return p},get state(){return R},get routes(){return o},get window(){return e},initialize:mt,subscribe:Gn,enableScrollRestoration:va,navigate:Zi,fetch:qr,revalidate:Tr,createHref:B=>n.history.createHref(B),encodeLocation:B=>n.history.encodeLocation(B),getFetcher:yt,deleteFetcher:er,dispose:Xt,getBlocker:tr,deleteBlocker:Tn,patchRoutes:Fi,_internalFetchControllers:he,_internalActiveDeferreds:$e,_internalSetRoutes:ka},_}function GE(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function i0(n,e,t,r,i,s,o,l){let c,h;if(o){c=[];for(let p of e)if(c.push(p),p.route.id===o){h=p;break}}else c=e,h=e[e.length-1];let f=My(i||".",Ey(c,s),Js(n.pathname,t)||n.pathname,l==="path");if(i==null&&(f.search=n.search,f.hash=n.hash),(i==null||i===""||i===".")&&h){let p=Ny(f.search);if(h.route.index&&!p)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&p){let m=new URLSearchParams(f.search),g=m.getAll("index");m.delete("index"),g.filter(w=>w).forEach(w=>m.append("index",w));let k=m.toString();f.search=k?"?"+k:""}}return r&&t!=="/"&&(f.pathname=f.pathname==="/"?t:qs([t,f.pathname])),kl(f)}function Fv(n,e,t,r){if(!r||!GE(r))return{path:t};if(r.formMethod&&!uM(r.formMethod))return{path:t,error:wr(405,{method:r.formMethod})};let i=()=>({path:t,error:wr(400,{type:"invalid-body"})}),s=r.formMethod||"get",o=n?s.toUpperCase():s.toLowerCase(),l=cP(t);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ai(o))return i();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((g,k)=>{let[w,C]=k;return""+g+w+"="+C+`
50
+ `},""):String(r.body);return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!Ai(o))return i();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:l,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return i()}}}St(typeof FormData=="function","FormData is not available in this environment");let c,h;if(r.formData)c=o0(r.formData),h=r.formData;else if(r.body instanceof FormData)c=o0(r.body),h=r.body;else if(r.body instanceof URLSearchParams)c=r.body,h=Gv(c);else if(r.body==null)c=new URLSearchParams,h=new FormData;else try{c=new URLSearchParams(r.body),h=Gv(c)}catch{return i()}let f={formMethod:o,formAction:l,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:h,json:void 0,text:void 0};if(Ai(f.formMethod))return{path:t,submission:f};let p=ga(t);return e&&p.search&&Ny(p.search)&&c.append("index",""),p.search="?"+c,{path:kl(p),submission:f}}function Bv(n,e,t){t===void 0&&(t=!1);let r=n.findIndex(i=>i.route.id===e);return r>=0?n.slice(0,t?r+1:r):n}function Yv(n,e,t,r,i,s,o,l,c,h,f,p,m,g,k,w){let C=w?Vr(w[1])?w[1].error:w[1].data:void 0,Q=n.createURL(e.location),$=n.createURL(i),E=t;s&&e.errors?E=Bv(t,Object.keys(e.errors)[0],!0):w&&Vr(w[1])&&(E=Bv(t,w[0]));let Z=w?w[1].statusCode:void 0,Y=o&&Z&&Z>=400,_=E.filter((q,G)=>{let{route:W}=q;if(W.lazy)return!0;if(W.loader==null)return!1;if(s)return s0(W,e.loaderData,e.errors);if(KE(e.loaderData,e.matches[G],q)||c.some(se=>se===q.route.id))return!0;let z=e.matches[G],D=q;return Uv(q,on({currentUrl:Q,currentParams:z.params,nextUrl:$,nextParams:D.params},r,{actionResult:C,actionStatus:Z,defaultShouldRevalidate:Y?!1:l||Q.pathname+Q.search===$.pathname+$.search||Q.search!==$.search||lP(z,D)}))}),R=[];return p.forEach((q,G)=>{if(s||!t.some(oe=>oe.route.id===q.routeId)||f.has(G))return;let W=ol(g,q.path,k);if(!W){R.push({key:G,routeId:q.routeId,path:q.path,matches:null,match:null,controller:null});return}let z=e.fetchers.get(G),D=kh(W,q.path),se=!1;m.has(G)?se=!1:h.has(G)?(h.delete(G),se=!0):z&&z.state!=="idle"&&z.data===void 0?se=l:se=Uv(D,on({currentUrl:Q,currentParams:e.matches[e.matches.length-1].params,nextUrl:$,nextParams:t[t.length-1].params},r,{actionResult:C,actionStatus:Z,defaultShouldRevalidate:Y?!1:l})),se&&R.push({key:G,routeId:q.routeId,path:q.path,matches:W,match:D,controller:new AbortController})}),[_,R]}function s0(n,e,t){if(n.lazy)return!0;if(!n.loader)return!1;let r=e!=null&&e[n.id]!==void 0,i=t!=null&&t[n.id]!==void 0;return!r&&i?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!r&&!i}function KE(n,e,t){let r=!e||t.route.id!==e.route.id,i=n[t.route.id]===void 0;return r||i}function lP(n,e){let t=n.route.path;return n.pathname!==e.pathname||t!=null&&t.endsWith("*")&&n.params["*"]!==e.params["*"]}function Uv(n,e){if(n.route.shouldRevalidate){let t=n.route.shouldRevalidate(e);if(typeof t=="boolean")return t}return e.defaultShouldRevalidate}function qv(n,e,t,r,i){var s;let o;if(n){let h=r[n];St(h,"No route found to patch children into: routeId = "+n),h.children||(h.children=[]),o=h.children}else o=t;let l=e.filter(h=>!o.some(f=>uP(h,f))),c=gp(l,i,[n||"_","patch",String(((s=o)==null?void 0:s.length)||"0")],r);o.push(...c)}function uP(n,e){return"id"in n&&"id"in e&&n.id===e.id?!0:n.index===e.index&&n.path===e.path&&n.caseSensitive===e.caseSensitive?(!n.children||n.children.length===0)&&(!e.children||e.children.length===0)?!0:n.children.every((t,r)=>{var i;return(i=e.children)==null?void 0:i.some(s=>uP(t,s))}):!1}async function JE(n,e,t){if(!n.lazy)return;let r=await n.lazy();if(!n.lazy)return;let i=t[n.id];St(i,"No route found in manifest");let s={};for(let o in r){let c=i[o]!==void 0&&o!=="hasErrorBoundary";wl(!c,'Route "'+i.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!c&&!kE.has(o)&&(s[o]=r[o])}Object.assign(i,s),Object.assign(i,on({},e(i),{lazy:void 0}))}async function eM(n){let{matches:e}=n,t=e.filter(i=>i.shouldLoad);return(await Promise.all(t.map(i=>i.resolve()))).reduce((i,s,o)=>Object.assign(i,{[t[o].route.id]:s}),{})}async function tM(n,e,t,r,i,s,o,l,c,h){let f=s.map(g=>g.route.lazy?JE(g.route,c,l):void 0),p=s.map((g,k)=>{let w=f[k],C=i.some($=>$.route.id===g.route.id);return on({},g,{shouldLoad:C,resolve:async $=>($&&r.method==="GET"&&(g.route.lazy||g.route.loader)&&(C=!0),C?nM(e,r,g,w,$,h):Promise.resolve({type:Wt.data,result:void 0}))})}),m=await n({matches:p,request:r,params:s[0].params,fetcherKey:o,context:h});try{await Promise.all(f)}catch{}return m}async function nM(n,e,t,r,i,s){let o,l,c=h=>{let f,p=new Promise((k,w)=>f=w);l=()=>f(),e.signal.addEventListener("abort",l);let m=k=>typeof h!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+n+'" [routeId: '+t.route.id+"]"))):h({request:e,params:t.params,context:s},...k!==void 0?[k]:[]),g=(async()=>{try{return{type:"data",result:await(i?i(w=>m(w)):m())}}catch(k){return{type:"error",result:k}}})();return Promise.race([g,p])};try{let h=t.route[n];if(r)if(h){let f,[p]=await Promise.all([c(h).catch(m=>{f=m}),r]);if(f!==void 0)throw f;o=p}else if(await r,h=t.route[n],h)o=await c(h);else if(n==="action"){let f=new URL(e.url),p=f.pathname+f.search;throw wr(405,{method:e.method,pathname:p,routeId:t.route.id})}else return{type:Wt.data,result:void 0};else if(h)o=await c(h);else{let f=new URL(e.url),p=f.pathname+f.search;throw wr(404,{pathname:p})}St(o.result!==void 0,"You defined "+(n==="action"?"an action":"a loader")+" for route "+('"'+t.route.id+"\" but didn't return anything from your `"+n+"` ")+"function. Please return a value or `null`.")}catch(h){return{type:Wt.error,result:h}}finally{l&&e.signal.removeEventListener("abort",l)}return o}async function rM(n){let{result:e,type:t}=n;if(hP(e)){let p;try{let m=e.headers.get("Content-Type");m&&/\bapplication\/json\b/.test(m)?e.body==null?p=null:p=await e.json():p=await e.text()}catch(m){return{type:Wt.error,error:m}}return t===Wt.error?{type:Wt.error,error:new yp(e.status,e.statusText,p),statusCode:e.status,headers:e.headers}:{type:Wt.data,data:p,statusCode:e.status,headers:e.headers}}if(t===Wt.error){if(nw(e)){var r,i;if(e.data instanceof Error){var s,o;return{type:Wt.error,error:e.data,statusCode:(s=e.init)==null?void 0:s.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}}return{type:Wt.error,error:new yp(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:Dh(e)?e.status:void 0,headers:(i=e.init)!=null&&i.headers?new Headers(e.init.headers):void 0}}return{type:Wt.error,error:e,statusCode:Dh(e)?e.status:void 0}}if(lM(e)){var l,c;return{type:Wt.deferred,deferredData:e,statusCode:(l=e.init)==null?void 0:l.status,headers:((c=e.init)==null?void 0:c.headers)&&new Headers(e.init.headers)}}if(nw(e)){var h,f;return{type:Wt.data,data:e.data,statusCode:(h=e.init)==null?void 0:h.status,headers:(f=e.init)!=null&&f.headers?new Headers(e.init.headers):void 0}}return{type:Wt.data,data:e}}function iM(n,e,t,r,i,s){let o=n.headers.get("Location");if(St(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!jy.test(o)){let l=r.slice(0,r.findIndex(c=>c.route.id===t)+1);o=i0(new URL(e.url),l,i,!0,o,s),n.headers.set("Location",o)}return n}function Hv(n,e,t,r){let i=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(jy.test(n)){let s=n,o=s.startsWith("//")?new URL(e.protocol+s):new URL(s);if(i.includes(o.protocol))throw new Error("Invalid redirect location");let l=Js(o.pathname,t)!=null;if(o.origin===e.origin&&l)return o.pathname+o.search+o.hash}try{let s=r.createURL(n);if(i.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return n}function fu(n,e,t,r){let i=n.createURL(cP(e)).toString(),s={signal:t};if(r&&Ai(r.formMethod)){let{formMethod:o,formEncType:l}=r;s.method=o.toUpperCase(),l==="application/json"?(s.headers=new Headers({"Content-Type":l}),s.body=JSON.stringify(r.json)):l==="text/plain"?s.body=r.text:l==="application/x-www-form-urlencoded"&&r.formData?s.body=o0(r.formData):s.body=r.formData}return new Request(i,s)}function o0(n){let e=new URLSearchParams;for(let[t,r]of n.entries())e.append(t,typeof r=="string"?r:r.name);return e}function Gv(n){let e=new FormData;for(let[t,r]of n.entries())e.append(t,r);return e}function sM(n,e,t,r,i){let s={},o=null,l,c=!1,h={},f=t&&Vr(t[1])?t[1].error:void 0;return n.forEach(p=>{if(!(p.route.id in e))return;let m=p.route.id,g=e[m];if(St(!cl(g),"Cannot handle redirect results in processLoaderData"),Vr(g)){let k=g.error;f!==void 0&&(k=f,f=void 0),o=o||{};{let w=al(n,m);o[w.route.id]==null&&(o[w.route.id]=k)}s[m]=void 0,c||(c=!0,l=Dh(g.error)?g.error.status:500),g.headers&&(h[m]=g.headers)}else aa(g)?(r.set(m,g.deferredData),s[m]=g.deferredData.data,g.statusCode!=null&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(h[m]=g.headers)):(s[m]=g.data,g.statusCode&&g.statusCode!==200&&!c&&(l=g.statusCode),g.headers&&(h[m]=g.headers))}),f!==void 0&&t&&(o={[t[0]]:f},s[t[0]]=void 0),{loaderData:s,errors:o,statusCode:l||200,loaderHeaders:h}}function Kv(n,e,t,r,i,s,o){let{loaderData:l,errors:c}=sM(e,t,r,o);return i.forEach(h=>{let{key:f,match:p,controller:m}=h,g=s[f];if(St(g,"Did not find corresponding fetcher result"),!(m&&m.signal.aborted))if(Vr(g)){let k=al(n.matches,p==null?void 0:p.route.id);c&&c[k.route.id]||(c=on({},c,{[k.route.id]:g.error})),n.fetchers.delete(f)}else if(cl(g))St(!1,"Unhandled fetcher revalidation redirect");else if(aa(g))St(!1,"Unhandled fetcher deferred data");else{let k=Uo(g.data);n.fetchers.set(f,k)}}),{loaderData:l,errors:c}}function Jv(n,e,t,r){let i=on({},e);for(let s of t){let o=s.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(i[o]=e[o]):n[o]!==void 0&&s.route.loader&&(i[o]=n[o]),r&&r.hasOwnProperty(o))break}return i}function ew(n){return n?Vr(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function al(n,e){return(e?n.slice(0,n.findIndex(r=>r.route.id===e)+1):[...n]).reverse().find(r=>r.route.hasErrorBoundary===!0)||n[0]}function tw(n){let e=n.length===1?n[0]:n.find(t=>t.index||!t.path||t.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function wr(n,e){let{pathname:t,routeId:r,method:i,type:s,message:o}=e===void 0?{}:e,l="Unknown Server Error",c="Unknown @remix-run/router error";return n===400?(l="Bad Request",i&&t&&r?c="You made a "+i+' request to "'+t+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":s==="defer-action"?c="defer() is not supported in actions":s==="invalid-body"&&(c="Unable to encode submission body")):n===403?(l="Forbidden",c='Route "'+r+'" does not match URL "'+t+'"'):n===404?(l="Not Found",c='No route matches URL "'+t+'"'):n===405&&(l="Method Not Allowed",i&&t&&r?c="You made a "+i.toUpperCase()+' request to "'+t+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":i&&(c='Invalid request method "'+i.toUpperCase()+'"')),new yp(n||500,l,new Error(c),!0)}function Md(n){let e=Object.entries(n);for(let t=e.length-1;t>=0;t--){let[r,i]=e[t];if(cl(i))return{key:r,result:i}}}function cP(n){let e=typeof n=="string"?ga(n):n;return kl(on({},e,{hash:""}))}function oM(n,e){return n.pathname!==e.pathname||n.search!==e.search?!1:n.hash===""?e.hash!=="":n.hash===e.hash?!0:e.hash!==""}function aM(n){return hP(n.result)&&BE.has(n.result.status)}function aa(n){return n.type===Wt.deferred}function Vr(n){return n.type===Wt.error}function cl(n){return(n&&n.type)===Wt.redirect}function nw(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function lM(n){let e=n;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function hP(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function uM(n){return FE.has(n.toLowerCase())}function Ai(n){return VE.has(n.toLowerCase())}async function cM(n,e,t,r,i){let s=Object.entries(e);for(let o=0;o<s.length;o++){let[l,c]=s[o],h=n.find(m=>(m==null?void 0:m.route.id)===l);if(!h)continue;let f=r.find(m=>m.route.id===h.route.id),p=f!=null&&!lP(f,h)&&(i&&i[h.route.id])!==void 0;aa(c)&&p&&await Ry(c,t,!1).then(m=>{m&&(e[l]=m)})}}async function hM(n,e,t){for(let r=0;r<t.length;r++){let{key:i,routeId:s,controller:o}=t[r],l=e[i];n.find(h=>(h==null?void 0:h.route.id)===s)&&aa(l)&&(St(o,"Expected an AbortController for revalidating fetcher deferred result"),await Ry(l,o.signal,!0).then(h=>{h&&(e[i]=h)}))}}async function Ry(n,e,t){if(t===void 0&&(t=!1),!await n.deferredData.resolveData(e)){if(t)try{return{type:Wt.data,data:n.deferredData.unwrappedData}}catch(i){return{type:Wt.error,error:i}}return{type:Wt.data,data:n.deferredData.data}}}function Ny(n){return new URLSearchParams(n).getAll("index").some(e=>e==="")}function kh(n,e){let t=typeof e=="string"?ga(e).search:e.search;if(n[n.length-1].route.index&&Ny(t||""))return n[n.length-1];let r=sP(n);return r[r.length-1]}function rw(n){let{formMethod:e,formAction:t,formEncType:r,text:i,formData:s,json:o}=n;if(!(!e||!t||!r)){if(i!=null)return{formMethod:e,formAction:t,formEncType:r,formData:void 0,json:void 0,text:i};if(s!=null)return{formMethod:e,formAction:t,formEncType:r,formData:s,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:t,formEncType:r,formData:void 0,json:o,text:void 0}}}function eO(n,e){return e?{state:"loading",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function fM(n,e){return{state:"submitting",location:n,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function Hc(n,e){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function dM(n,e){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:e?e.data:void 0}}function Uo(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function pM(n,e){try{let t=n.sessionStorage.getItem(aP);if(t){let r=JSON.parse(t);for(let[i,s]of Object.entries(r||{}))s&&Array.isArray(s)&&e.set(i,new Set(s||[]))}}catch{}}function mM(n,e){if(e.size>0){let t={};for(let[r,i]of e)t[r]=[...i];try{n.sessionStorage.setItem(aP,JSON.stringify(t))}catch(r){wl(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
51
+ * React Router v6.30.3
52
+ *
53
+ * Copyright (c) Remix Software Inc.
54
+ *
55
+ * This source code is licensed under the MIT license found in the
56
+ * LICENSE.md file in the root directory of this source tree.
57
+ *
58
+ * @license MIT
59
+ */function xp(){return xp=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},xp.apply(this,arguments)}const lf=V.createContext(null),Ay=V.createContext(null),Oa=V.createContext(null),_y=V.createContext(null),ro=V.createContext({outlet:null,matches:[],isDataRoute:!1}),fP=V.createContext(null);function gM(n,e){let{relative:t}=e===void 0?{}:e;uf()||St(!1);let{basename:r,navigator:i}=V.useContext(Oa),{hash:s,pathname:o,search:l}=Hp(n,{relative:t}),c=o;return r!=="/"&&(c=o==="/"?r:qs([r,o])),i.createHref({pathname:c,search:l,hash:s})}function uf(){return V.useContext(_y)!=null}function Tl(){return uf()||St(!1),V.useContext(_y).location}function dP(n){V.useContext(Oa).static||V.useLayoutEffect(n)}function Ku(){let{isDataRoute:n}=V.useContext(ro);return n?EM():OM()}function OM(){uf()||St(!1);let n=V.useContext(lf),{basename:e,future:t,navigator:r}=V.useContext(Oa),{matches:i}=V.useContext(ro),{pathname:s}=Tl(),o=JSON.stringify(Ey(i,t.v7_relativeSplatPath)),l=V.useRef(!1);return dP(()=>{l.current=!0}),V.useCallback(function(h,f){if(f===void 0&&(f={}),!l.current)return;if(typeof h=="number"){r.go(h);return}let p=My(h,JSON.parse(o),s,f.relative==="path");n==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:qs([e,p.pathname])),(f.replace?r.replace:r.push)(p,f.state,f)},[e,r,o,s,n])}const yM=V.createContext(null);function xM(n){let e=V.useContext(ro).outlet;return e&&V.createElement(yM.Provider,{value:n},e)}function Ju(){let{matches:n}=V.useContext(ro),e=n[n.length-1];return e?e.params:{}}function Hp(n,e){let{relative:t}=e===void 0?{}:e,{future:r}=V.useContext(Oa),{matches:i}=V.useContext(ro),{pathname:s}=Tl(),o=JSON.stringify(Ey(i,r.v7_relativeSplatPath));return V.useMemo(()=>My(n,JSON.parse(o),s,t==="path"),[n,o,s,t])}function vM(n,e,t,r){uf()||St(!1);let{navigator:i}=V.useContext(Oa),{matches:s}=V.useContext(ro),o=s[s.length-1],l=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:"/";o&&o.route;let h=Tl(),f;f=h;let p=f.pathname||"/",m=p;if(c!=="/"){let w=c.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(w.length).join("/")}let g=ol(n,{pathname:m});return PM(g&&g.map(w=>Object.assign({},w,{params:Object.assign({},l,w.params),pathname:qs([c,i.encodeLocation?i.encodeLocation(w.pathname).pathname:w.pathname]),pathnameBase:w.pathnameBase==="/"?c:qs([c,i.encodeLocation?i.encodeLocation(w.pathnameBase).pathname:w.pathnameBase])})),s,t,r)}function wM(){let n=$M(),e=Dh(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return V.createElement(V.Fragment,null,V.createElement("h2",null,"Unexpected Application Error!"),V.createElement("h3",{style:{fontStyle:"italic"}},e),t?V.createElement("pre",{style:i},t):null,null)}const kM=V.createElement(wM,null);class SM extends V.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?V.createElement(ro.Provider,{value:this.props.routeContext},V.createElement(fP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function bM(n){let{routeContext:e,match:t,children:r}=n,i=V.useContext(lf);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),V.createElement(ro.Provider,{value:e},r)}function PM(n,e,t,r){var i;if(e===void 0&&(e=[]),t===void 0&&(t=null),r===void 0&&(r=null),n==null){var s;if(!t)return null;if(t.errors)n=t.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!t.initialized&&t.matches.length>0)n=t.matches;else return null}let o=n,l=(i=t)==null?void 0:i.errors;if(l!=null){let f=o.findIndex(p=>p.route.id&&(l==null?void 0:l[p.route.id])!==void 0);f>=0||St(!1),o=o.slice(0,Math.min(o.length,f+1))}let c=!1,h=-1;if(t&&r&&r.v7_partialHydration)for(let f=0;f<o.length;f++){let p=o[f];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(h=f),p.route.id){let{loaderData:m,errors:g}=t,k=p.route.loader&&m[p.route.id]===void 0&&(!g||g[p.route.id]===void 0);if(p.route.lazy||k){c=!0,h>=0?o=o.slice(0,h+1):o=[o[0]];break}}}return o.reduceRight((f,p,m)=>{let g,k=!1,w=null,C=null;t&&(g=l&&p.route.id?l[p.route.id]:void 0,w=p.route.errorElement||kM,c&&(h<0&&m===0?(MM("route-fallback"),k=!0,C=null):h===m&&(k=!0,C=p.route.hydrateFallbackElement||null)));let Q=e.concat(o.slice(0,m+1)),$=()=>{let E;return g?E=w:k?E=C:p.route.Component?E=V.createElement(p.route.Component,null):p.route.element?E=p.route.element:E=f,V.createElement(bM,{match:p,routeContext:{outlet:f,matches:Q,isDataRoute:t!=null},children:E})};return t&&(p.route.ErrorBoundary||p.route.errorElement||m===0)?V.createElement(SM,{location:t.location,revalidation:t.revalidation,component:w,error:g,children:$(),routeContext:{outlet:null,matches:Q,isDataRoute:!0}}):$()},null)}var pP=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}(pP||{}),mP=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(mP||{});function QM(n){let e=V.useContext(lf);return e||St(!1),e}function CM(n){let e=V.useContext(Ay);return e||St(!1),e}function TM(n){let e=V.useContext(ro);return e||St(!1),e}function gP(n){let e=TM(),t=e.matches[e.matches.length-1];return t.route.id||St(!1),t.route.id}function $M(){var n;let e=V.useContext(fP),t=CM(mP.UseRouteError),r=gP();return e!==void 0?e:(n=t.errors)==null?void 0:n[r]}function EM(){let{router:n}=QM(pP.UseNavigateStable),e=gP(),t=V.useRef(!1);return dP(()=>{t.current=!0}),V.useCallback(function(i,s){s===void 0&&(s={}),t.current&&(typeof i=="number"?n.navigate(i):n.navigate(i,xp({fromRouteId:e},s)))},[n,e])}const iw={};function MM(n,e,t){iw[n]||(iw[n]=!0)}function jM(n,e){n==null||n.v7_startTransition,(n==null?void 0:n.v7_relativeSplatPath)===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function OP(n){return xM(n.context)}function RM(n){let{basename:e="/",children:t=null,location:r,navigationType:i=Sn.Pop,navigator:s,static:o=!1,future:l}=n;uf()&&St(!1);let c=e.replace(/^\/*/,"/"),h=V.useMemo(()=>({basename:c,navigator:s,static:o,future:xp({v7_relativeSplatPath:!1},l)}),[c,l,s,o]);typeof r=="string"&&(r=ga(r));let{pathname:f="/",search:p="",hash:m="",state:g=null,key:k="default"}=r,w=V.useMemo(()=>{let C=Js(f,c);return C==null?null:{location:{pathname:C,search:p,hash:m,state:g,key:k},navigationType:i}},[c,f,p,m,g,k,i]);return w==null?null:V.createElement(Oa.Provider,{value:h},V.createElement(_y.Provider,{children:t,value:w}))}new Promise(()=>{});function NM(n){let e={hasErrorBoundary:n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&Object.assign(e,{element:V.createElement(n.Component),Component:void 0}),n.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:V.createElement(n.HydrateFallback),HydrateFallback:void 0}),n.ErrorBoundary&&Object.assign(e,{errorElement:V.createElement(n.ErrorBoundary),ErrorBoundary:void 0}),e}/**
60
+ * React Router DOM v6.30.3
61
+ *
62
+ * Copyright (c) Remix Software Inc.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE.md file in the root directory of this source tree.
66
+ *
67
+ * @license MIT
68
+ */function Lu(){return Lu=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},Lu.apply(this,arguments)}function yP(n,e){if(n==null)return{};var t={},r=Object.keys(n),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(t[i]=n[i]);return t}function AM(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function _M(n,e){return n.button===0&&(!e||e==="_self")&&!AM(n)}function a0(n){return n===void 0&&(n=""),new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((e,t)=>{let r=n[t];return e.concat(Array.isArray(r)?r.map(i=>[t,i]):[[t,r]])},[]))}function zM(n,e){let t=a0(n);return e&&e.forEach((r,i)=>{t.has(i)||e.getAll(i).forEach(s=>{t.append(i,s)})}),t}const DM=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],LM=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],IM="6";try{window.__reactRouterVersion=IM}catch{}function ZM(n,e){return HE({basename:void 0,future:Lu({},void 0,{v7_prependBasename:!0}),history:xE({window:void 0}),hydrationData:XM(),routes:n,mapRouteProperties:NM,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function XM(){var n;let e=(n=window)==null?void 0:n.__staticRouterHydrationData;return e&&e.errors&&(e=Lu({},e,{errors:VM(e.errors)})),e}function VM(n){if(!n)return null;let e=Object.entries(n),t={};for(let[r,i]of e)if(i&&i.__type==="RouteErrorResponse")t[r]=new yp(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let s=window[i.__subType];if(typeof s=="function")try{let o=new s(i.message);o.stack="",t[r]=o}catch{}}if(t[r]==null){let s=new Error(i.message);s.stack="",t[r]=s}}else t[r]=i;return t}const xP=V.createContext({isTransitioning:!1}),WM=V.createContext(new Map),FM="startTransition",sw=fE[FM],BM="flushSync",ow=gE[BM];function YM(n){sw?sw(n):n()}function Gc(n){ow?ow(n):n()}class UM{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}}function qM(n){let{fallbackElement:e,router:t,future:r}=n,[i,s]=V.useState(t.state),[o,l]=V.useState(),[c,h]=V.useState({isTransitioning:!1}),[f,p]=V.useState(),[m,g]=V.useState(),[k,w]=V.useState(),C=V.useRef(new Map),{v7_startTransition:Q}=r||{},$=V.useCallback(q=>{Q?YM(q):q()},[Q]),E=V.useCallback((q,G)=>{let{deletedFetchers:W,flushSync:z,viewTransitionOpts:D}=G;q.fetchers.forEach((oe,ne)=>{oe.data!==void 0&&C.current.set(ne,oe.data)}),W.forEach(oe=>C.current.delete(oe));let se=t.window==null||t.window.document==null||typeof t.window.document.startViewTransition!="function";if(!D||se){z?Gc(()=>s(q)):$(()=>s(q));return}if(z){Gc(()=>{m&&(f&&f.resolve(),m.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:D.currentLocation,nextLocation:D.nextLocation})});let oe=t.window.document.startViewTransition(()=>{Gc(()=>s(q))});oe.finished.finally(()=>{Gc(()=>{p(void 0),g(void 0),l(void 0),h({isTransitioning:!1})})}),Gc(()=>g(oe));return}m?(f&&f.resolve(),m.skipTransition(),w({state:q,currentLocation:D.currentLocation,nextLocation:D.nextLocation})):(l(q),h({isTransitioning:!0,flushSync:!1,currentLocation:D.currentLocation,nextLocation:D.nextLocation}))},[t.window,m,f,C,$]);V.useLayoutEffect(()=>t.subscribe(E),[t,E]),V.useEffect(()=>{c.isTransitioning&&!c.flushSync&&p(new UM)},[c]),V.useEffect(()=>{if(f&&o&&t.window){let q=o,G=f.promise,W=t.window.document.startViewTransition(async()=>{$(()=>s(q)),await G});W.finished.finally(()=>{p(void 0),g(void 0),l(void 0),h({isTransitioning:!1})}),g(W)}},[$,o,f,t.window]),V.useEffect(()=>{f&&o&&i.location.key===o.location.key&&f.resolve()},[f,m,i.location,o]),V.useEffect(()=>{!c.isTransitioning&&k&&(l(k.state),h({isTransitioning:!0,flushSync:!1,currentLocation:k.currentLocation,nextLocation:k.nextLocation}),w(void 0))},[c.isTransitioning,k]),V.useEffect(()=>{},[]);let Z=V.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:q=>t.navigate(q),push:(q,G,W)=>t.navigate(q,{state:G,preventScrollReset:W==null?void 0:W.preventScrollReset}),replace:(q,G,W)=>t.navigate(q,{replace:!0,state:G,preventScrollReset:W==null?void 0:W.preventScrollReset})}),[t]),Y=t.basename||"/",_=V.useMemo(()=>({router:t,navigator:Z,static:!1,basename:Y}),[t,Z,Y]),R=V.useMemo(()=>({v7_relativeSplatPath:t.future.v7_relativeSplatPath}),[t.future.v7_relativeSplatPath]);return V.useEffect(()=>jM(r,t.future),[r,t.future]),V.createElement(V.Fragment,null,V.createElement(lf.Provider,{value:_},V.createElement(Ay.Provider,{value:i},V.createElement(WM.Provider,{value:C.current},V.createElement(xP.Provider,{value:c},V.createElement(RM,{basename:Y,location:i.location,navigationType:i.historyAction,navigator:Z,future:R},i.initialized||t.future.v7_partialHydration?V.createElement(HM,{routes:t.routes,future:t.future,state:i}):e))))),null)}const HM=V.memo(GM);function GM(n){let{routes:e,future:t,state:r}=n;return vM(e,void 0,r,t)}const KM=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",JM=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cf=V.forwardRef(function(e,t){let{onClick:r,relative:i,reloadDocument:s,replace:o,state:l,target:c,to:h,preventScrollReset:f,viewTransition:p}=e,m=yP(e,DM),{basename:g}=V.useContext(Oa),k,w=!1;if(typeof h=="string"&&JM.test(h)&&(k=h,KM))try{let E=new URL(window.location.href),Z=h.startsWith("//")?new URL(E.protocol+h):new URL(h),Y=Js(Z.pathname,g);Z.origin===E.origin&&Y!=null?h=Y+Z.search+Z.hash:w=!0}catch{}let C=gM(h,{relative:i}),Q=tj(h,{replace:o,state:l,target:c,preventScrollReset:f,relative:i,viewTransition:p});function $(E){r&&r(E),E.defaultPrevented||Q(E)}return V.createElement("a",Lu({},m,{href:k||C,onClick:w||s?r:$,ref:t,target:c}))}),Iu=V.forwardRef(function(e,t){let{"aria-current":r="page",caseSensitive:i=!1,className:s="",end:o=!1,style:l,to:c,viewTransition:h,children:f}=e,p=yP(e,LM),m=Hp(c,{relative:p.relative}),g=Tl(),k=V.useContext(Ay),{navigator:w,basename:C}=V.useContext(Oa),Q=k!=null&&rj(m)&&h===!0,$=w.encodeLocation?w.encodeLocation(m).pathname:m.pathname,E=g.pathname,Z=k&&k.navigation&&k.navigation.location?k.navigation.location.pathname:null;i||(E=E.toLowerCase(),Z=Z?Z.toLowerCase():null,$=$.toLowerCase()),Z&&C&&(Z=Js(Z,C)||Z);const Y=$!=="/"&&$.endsWith("/")?$.length-1:$.length;let _=E===$||!o&&E.startsWith($)&&E.charAt(Y)==="/",R=Z!=null&&(Z===$||!o&&Z.startsWith($)&&Z.charAt($.length)==="/"),q={isActive:_,isPending:R,isTransitioning:Q},G=_?r:void 0,W;typeof s=="function"?W=s(q):W=[s,_?"active":null,R?"pending":null,Q?"transitioning":null].filter(Boolean).join(" ");let z=typeof l=="function"?l(q):l;return V.createElement(cf,Lu({},p,{"aria-current":G,className:W,ref:t,style:z,to:c,viewTransition:h}),typeof f=="function"?f(q):f)});var l0;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(l0||(l0={}));var aw;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(aw||(aw={}));function ej(n){let e=V.useContext(lf);return e||St(!1),e}function tj(n,e){let{target:t,replace:r,state:i,preventScrollReset:s,relative:o,viewTransition:l}=e===void 0?{}:e,c=Ku(),h=Tl(),f=Hp(n,{relative:o});return V.useCallback(p=>{if(_M(p,t)){p.preventDefault();let m=r!==void 0?r:kl(h)===kl(f);c(n,{replace:m,state:i,preventScrollReset:s,relative:o,viewTransition:l})}},[h,c,f,r,i,t,n,s,o,l])}function nj(n){let e=V.useRef(a0(n)),t=V.useRef(!1),r=Tl(),i=V.useMemo(()=>zM(r.search,t.current?null:e.current),[r.search]),s=Ku(),o=V.useCallback((l,c)=>{const h=a0(typeof l=="function"?l(i):l);t.current=!0,s("?"+h,c)},[s,i]);return[i,o]}function rj(n,e){e===void 0&&(e={});let t=V.useContext(xP);t==null&&St(!1);let{basename:r}=ej(l0.useViewTransitionState),i=Hp(n,{relative:e.relative});if(!t.isTransitioning)return!1;let s=Js(t.currentLocation.pathname,r)||t.currentLocation.pathname,o=Js(t.nextLocation.pathname,r)||t.nextLocation.pathname;return Op(i.pathname,o)!=null||Op(i.pathname,s)!=null}var Gp=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(n){return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ml,ta,Mu,Vb,ij=(Vb=class extends Gp{constructor(){super();Ie(this,ml);Ie(this,ta);Ie(this,Mu);Oe(this,Mu,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){I(this,ta)||this.setEventListener(I(this,Mu))}onUnsubscribe(){var e;this.hasListeners()||((e=I(this,ta))==null||e.call(this),Oe(this,ta,void 0))}setEventListener(e){var t;Oe(this,Mu,e),(t=I(this,ta))==null||t.call(this),Oe(this,ta,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){I(this,ml)!==e&&(Oe(this,ml,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){var e;return typeof I(this,ml)=="boolean"?I(this,ml):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},ml=new WeakMap,ta=new WeakMap,Mu=new WeakMap,Vb),vP=new ij,sj={setTimeout:(n,e)=>setTimeout(n,e),clearTimeout:n=>clearTimeout(n),setInterval:(n,e)=>setInterval(n,e),clearInterval:n=>clearInterval(n)},na,Ty,Wb,oj=(Wb=class{constructor(){Ie(this,na,sj);Ie(this,Ty,!1)}setTimeoutProvider(n){Oe(this,na,n)}setTimeout(n,e){return I(this,na).setTimeout(n,e)}clearTimeout(n){I(this,na).clearTimeout(n)}setInterval(n,e){return I(this,na).setInterval(n,e)}clearInterval(n){I(this,na).clearInterval(n)}},na=new WeakMap,Ty=new WeakMap,Wb),u0=new oj;function aj(n){setTimeout(n,0)}var lj=typeof window>"u"||"Deno"in globalThis;function Ri(){}function uj(n,e){return typeof n=="function"?n(e):n}function cj(n){return typeof n=="number"&&n>=0&&n!==1/0}function hj(n,e){return Math.max(n+(e||0)-Date.now(),0)}function c0(n,e){return typeof n=="function"?n(e):n}function fj(n,e){return typeof n=="function"?n(e):n}function lw(n,e){const{type:t="all",exact:r,fetchStatus:i,predicate:s,queryKey:o,stale:l}=n;if(o){if(r){if(e.queryHash!==zy(o,e.options))return!1}else if(!Ih(e.queryKey,o))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||i&&i!==e.state.fetchStatus||s&&!s(e))}function uw(n,e){const{exact:t,status:r,predicate:i,mutationKey:s}=n;if(s){if(!e.options.mutationKey)return!1;if(t){if(Lh(e.options.mutationKey)!==Lh(s))return!1}else if(!Ih(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function zy(n,e){return((e==null?void 0:e.queryKeyHashFn)||Lh)(n)}function Lh(n){return JSON.stringify(n,(e,t)=>h0(t)?Object.keys(t).sort().reduce((r,i)=>(r[i]=t[i],r),{}):t)}function Ih(n,e){return n===e?!0:typeof n!=typeof e?!1:n&&e&&typeof n=="object"&&typeof e=="object"?Object.keys(e).every(t=>Ih(n[t],e[t])):!1}var dj=Object.prototype.hasOwnProperty;function wP(n,e,t=0){if(n===e)return n;if(t>500)return e;const r=cw(n)&&cw(e);if(!r&&!(h0(n)&&h0(e)))return e;const s=(r?n:Object.keys(n)).length,o=r?e:Object.keys(e),l=o.length,c=r?new Array(l):{};let h=0;for(let f=0;f<l;f++){const p=r?f:o[f],m=n[p],g=e[p];if(m===g){c[p]=m,(r?f<s:dj.call(n,p))&&h++;continue}if(m===null||g===null||typeof m!="object"||typeof g!="object"){c[p]=g;continue}const k=wP(m,g,t+1);c[p]=k,k===m&&h++}return s===l&&h===s?n:c}function cw(n){return Array.isArray(n)&&n.length===Object.keys(n).length}function h0(n){if(!hw(n))return!1;const e=n.constructor;if(e===void 0)return!0;const t=e.prototype;return!(!hw(t)||!t.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(n)!==Object.prototype)}function hw(n){return Object.prototype.toString.call(n)==="[object Object]"}function pj(n){return new Promise(e=>{u0.setTimeout(e,n)})}function mj(n,e,t){return typeof t.structuralSharing=="function"?t.structuralSharing(n,e):t.structuralSharing!==!1?wP(n,e):e}function gj(n,e,t=0){const r=[...n,e];return t&&r.length>t?r.slice(1):r}function Oj(n,e,t=0){const r=[e,...n];return t&&r.length>t?r.slice(0,-1):r}var Dy=Symbol();function kP(n,e){return!n.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!n.queryFn||n.queryFn===Dy?()=>Promise.reject(new Error(`Missing queryFn: '${n.queryHash}'`)):n.queryFn}function yj(n,e,t){let r=!1,i;return Object.defineProperty(n,"signal",{enumerable:!0,get:()=>(i??(i=e()),r||(r=!0,i.aborted?t():i.addEventListener("abort",t,{once:!0})),i)}),n}var SP=(()=>{let n=()=>lj;return{isServer(){return n()},setIsServer(e){n=e}}})();function xj(){let n,e;const t=new Promise((i,s)=>{n=i,e=s});t.status="pending",t.catch(()=>{});function r(i){Object.assign(t,i),delete t.resolve,delete t.reject}return t.resolve=i=>{r({status:"fulfilled",value:i}),n(i)},t.reject=i=>{r({status:"rejected",reason:i}),e(i)},t}var vj=aj;function wj(){let n=[],e=0,t=l=>{l()},r=l=>{l()},i=vj;const s=l=>{e?n.push(l):i(()=>{t(l)})},o=()=>{const l=n;n=[],l.length&&i(()=>{r(()=>{l.forEach(c=>{t(c)})})})};return{batch:l=>{let c;e++;try{c=l()}finally{e--,e||o()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{t=l},setBatchNotifyFunction:l=>{r=l},setScheduler:l=>{i=l}}}var lr=wj(),ju,ra,Ru,Fb,kj=(Fb=class extends Gp{constructor(){super();Ie(this,ju,!0);Ie(this,ra);Ie(this,Ru);Oe(this,Ru,e=>{if(typeof window<"u"&&window.addEventListener){const t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}})}onSubscribe(){I(this,ra)||this.setEventListener(I(this,Ru))}onUnsubscribe(){var e;this.hasListeners()||((e=I(this,ra))==null||e.call(this),Oe(this,ra,void 0))}setEventListener(e){var t;Oe(this,Ru,e),(t=I(this,ra))==null||t.call(this),Oe(this,ra,e(this.setOnline.bind(this)))}setOnline(e){I(this,ju)!==e&&(Oe(this,ju,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return I(this,ju)}},ju=new WeakMap,ra=new WeakMap,Ru=new WeakMap,Fb),vp=new kj;function Sj(n){return Math.min(1e3*2**n,3e4)}function bP(n){return(n??"online")==="online"?vp.isOnline():!0}var f0=class extends Error{constructor(n){super("CancelledError"),this.revert=n==null?void 0:n.revert,this.silent=n==null?void 0:n.silent}};function PP(n){let e=!1,t=0,r;const i=xj(),s=()=>i.status!=="pending",o=w=>{var C;if(!s()){const Q=new f0(w);m(Q),(C=n.onCancel)==null||C.call(n,Q)}},l=()=>{e=!0},c=()=>{e=!1},h=()=>vP.isFocused()&&(n.networkMode==="always"||vp.isOnline())&&n.canRun(),f=()=>bP(n.networkMode)&&n.canRun(),p=w=>{s()||(r==null||r(),i.resolve(w))},m=w=>{s()||(r==null||r(),i.reject(w))},g=()=>new Promise(w=>{var C;r=Q=>{(s()||h())&&w(Q)},(C=n.onPause)==null||C.call(n)}).then(()=>{var w;r=void 0,s()||(w=n.onContinue)==null||w.call(n)}),k=()=>{if(s())return;let w;const C=t===0?n.initialPromise:void 0;try{w=C??n.fn()}catch(Q){w=Promise.reject(Q)}Promise.resolve(w).then(p).catch(Q=>{var _;if(s())return;const $=n.retry??(SP.isServer()?0:3),E=n.retryDelay??Sj,Z=typeof E=="function"?E(t,Q):E,Y=$===!0||typeof $=="number"&&t<$||typeof $=="function"&&$(t,Q);if(e||!Y){m(Q);return}t++,(_=n.onFail)==null||_.call(n,t,Q),pj(Z).then(()=>h()?void 0:g()).then(()=>{e?m(Q):k()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r==null||r(),i),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?k():g().then(k),i)}}var gl,Bb,QP=(Bb=class{constructor(){Ie(this,gl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),cj(this.gcTime)&&Oe(this,gl,u0.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(n){this.gcTime=Math.max(this.gcTime||0,n??(SP.isServer()?1/0:5*60*1e3))}clearGcTimeout(){I(this,gl)&&(u0.clearTimeout(I(this,gl)),Oe(this,gl,void 0))}},gl=new WeakMap,Bb),Ol,Nu,ui,yl,jn,rf,xl,Xr,CP,Fs,Yb,bj=(Yb=class extends QP{constructor(e){super();Ie(this,Xr);Ie(this,Ol);Ie(this,Nu);Ie(this,ui);Ie(this,yl);Ie(this,jn);Ie(this,rf);Ie(this,xl);Oe(this,xl,!1),Oe(this,rf,e.defaultOptions),this.setOptions(e.options),this.observers=[],Oe(this,yl,e.client),Oe(this,ui,I(this,yl).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,Oe(this,Ol,dw(this.options)),this.state=e.state??I(this,Ol),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=I(this,jn))==null?void 0:e.promise}setOptions(e){if(this.options={...I(this,rf),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=dw(this.options);t.data!==void 0&&(this.setState(fw(t.data,t.dataUpdatedAt)),Oe(this,Ol,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,ui).remove(this)}setData(e,t){const r=mj(this.state.data,e,this.options);return Ee(this,Xr,Fs).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(e,t){Ee(this,Xr,Fs).call(this,{type:"setState",state:e,setStateOptions:t})}cancel(e){var r,i;const t=(r=I(this,jn))==null?void 0:r.promise;return(i=I(this,jn))==null||i.cancel(e),t?t.then(Ri).catch(Ri):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,Ol)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>fj(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Dy||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>c0(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!hj(this.state.dataUpdatedAt,e)}onFocus(){var t;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(t=I(this,jn))==null||t.continue()}onOnline(){var t;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(t=I(this,jn))==null||t.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),I(this,ui).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(I(this,jn)&&(I(this,xl)||Ee(this,Xr,CP).call(this)?I(this,jn).cancel({revert:!0}):I(this,jn).cancelRetry()),this.scheduleGc()),I(this,ui).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ee(this,Xr,Fs).call(this,{type:"invalidate"})}async fetch(e,t){var c,h,f,p,m,g,k,w,C,Q,$,E;if(this.state.fetchStatus!=="idle"&&((c=I(this,jn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(I(this,jn))return I(this,jn).continueRetry(),I(this,jn).promise}if(e&&this.setOptions(e),!this.options.queryFn){const Z=this.observers.find(Y=>Y.options.queryFn);Z&&this.setOptions(Z.options)}const r=new AbortController,i=Z=>{Object.defineProperty(Z,"signal",{enumerable:!0,get:()=>(Oe(this,xl,!0),r.signal)})},s=()=>{const Z=kP(this.options,t),_=(()=>{const R={client:I(this,yl),queryKey:this.queryKey,meta:this.meta};return i(R),R})();return Oe(this,xl,!1),this.options.persister?this.options.persister(Z,_,this):Z(_)},l=(()=>{const Z={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:I(this,yl),state:this.state,fetchFn:s};return i(Z),Z})();(h=this.options.behavior)==null||h.onFetch(l,this),Oe(this,Nu,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&Ee(this,Xr,Fs).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),Oe(this,jn,PP({initialPromise:t==null?void 0:t.initialPromise,fn:l.fetchFn,onCancel:Z=>{Z instanceof f0&&Z.revert&&this.setState({...I(this,Nu),fetchStatus:"idle"}),r.abort()},onFail:(Z,Y)=>{Ee(this,Xr,Fs).call(this,{type:"failed",failureCount:Z,error:Y})},onPause:()=>{Ee(this,Xr,Fs).call(this,{type:"pause"})},onContinue:()=>{Ee(this,Xr,Fs).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const Z=await I(this,jn).start();if(Z===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(Z),(g=(m=I(this,ui).config).onSuccess)==null||g.call(m,Z,this),(w=(k=I(this,ui).config).onSettled)==null||w.call(k,Z,this.state.error,this),Z}catch(Z){if(Z instanceof f0){if(Z.silent)return I(this,jn).promise;if(Z.revert){if(this.state.data===void 0)throw Z;return this.state.data}}throw Ee(this,Xr,Fs).call(this,{type:"error",error:Z}),(Q=(C=I(this,ui).config).onError)==null||Q.call(C,Z,this),(E=($=I(this,ui).config).onSettled)==null||E.call($,this.state.data,Z,this),Z}finally{this.scheduleGc()}}},Ol=new WeakMap,Nu=new WeakMap,ui=new WeakMap,yl=new WeakMap,jn=new WeakMap,rf=new WeakMap,xl=new WeakMap,Xr=new WeakSet,CP=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Fs=function(e){const t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Pj(r.data,this.options),fetchMeta:e.meta??null};case"success":const i={...r,...fw(e.data,e.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Oe(this,Nu,e.manual?i:void 0),i;case"error":const s=e.error;return{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),lr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),I(this,ui).notify({query:this,type:"updated",action:e})})},Yb);function Pj(n,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bP(e.networkMode)?"fetching":"paused",...n===void 0&&{error:null,status:"pending"}}}function fw(n,e){return{data:n,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function dw(n){const e=typeof n.initialData=="function"?n.initialData():n.initialData,t=e!==void 0,r=t?typeof n.initialDataUpdatedAt=="function"?n.initialDataUpdatedAt():n.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"pending",fetchStatus:"idle"}}function pw(n){return{onFetch:(e,t)=>{var f,p,m,g,k;const r=e.options,i=(m=(p=(f=e.fetchOptions)==null?void 0:f.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,s=((g=e.state.data)==null?void 0:g.pages)||[],o=((k=e.state.data)==null?void 0:k.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const h=async()=>{let w=!1;const C=E=>{yj(E,()=>e.signal,()=>w=!0)},Q=kP(e.options,e.fetchOptions),$=async(E,Z,Y)=>{if(w)return Promise.reject();if(Z==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const z={client:e.client,queryKey:e.queryKey,pageParam:Z,direction:Y?"backward":"forward",meta:e.options.meta};return C(z),z})(),q=await Q(R),{maxPages:G}=e.options,W=Y?Oj:gj;return{pages:W(E.pages,q,G),pageParams:W(E.pageParams,Z,G)}};if(i&&s.length){const E=i==="backward",Z=E?Qj:mw,Y={pages:s,pageParams:o},_=Z(r,Y);l=await $(Y,_,E)}else{const E=n??s.length;do{const Z=c===0?o[0]??r.initialPageParam:mw(r,l);if(c>0&&Z==null)break;l=await $(l,Z),c++}while(c<E)}return l};e.options.persister?e.fetchFn=()=>{var w,C;return(C=(w=e.options).persister)==null?void 0:C.call(w,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},t)}:e.fetchFn=h}}}function mw(n,{pages:e,pageParams:t}){const r=e.length-1;return e.length>0?n.getNextPageParam(e[r],e,t[r],t):void 0}function Qj(n,{pages:e,pageParams:t}){var r;return e.length>0?(r=n.getPreviousPageParam)==null?void 0:r.call(n,e[0],e,t[0],t):void 0}var sf,us,Wn,vl,cs,qo,Ub,Cj=(Ub=class extends QP{constructor(e){super();Ie(this,cs);Ie(this,sf);Ie(this,us);Ie(this,Wn);Ie(this,vl);Oe(this,sf,e.client),this.mutationId=e.mutationId,Oe(this,Wn,e.mutationCache),Oe(this,us,[]),this.state=e.state||Tj(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){I(this,us).includes(e)||(I(this,us).push(e),this.clearGcTimeout(),I(this,Wn).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){Oe(this,us,I(this,us).filter(t=>t!==e)),this.scheduleGc(),I(this,Wn).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){I(this,us).length||(this.state.status==="pending"?this.scheduleGc():I(this,Wn).remove(this))}continue(){var e;return((e=I(this,vl))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,c,h,f,p,m,g,k,w,C,Q,$,E,Z,Y,_,R;const t=()=>{Ee(this,cs,qo).call(this,{type:"continue"})},r={client:I(this,sf),meta:this.options.meta,mutationKey:this.options.mutationKey};Oe(this,vl,PP({fn:()=>this.options.mutationFn?this.options.mutationFn(e,r):Promise.reject(new Error("No mutationFn found")),onFail:(q,G)=>{Ee(this,cs,qo).call(this,{type:"failed",failureCount:q,error:G})},onPause:()=>{Ee(this,cs,qo).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,Wn).canRun(this)}));const i=this.state.status==="pending",s=!I(this,vl).canStart();try{if(i)t();else{Ee(this,cs,qo).call(this,{type:"pending",variables:e,isPaused:s}),I(this,Wn).config.onMutate&&await I(this,Wn).config.onMutate(e,this,r);const G=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,e,r));G!==this.state.context&&Ee(this,cs,qo).call(this,{type:"pending",context:G,variables:e,isPaused:s})}const q=await I(this,vl).start();return await((h=(c=I(this,Wn).config).onSuccess)==null?void 0:h.call(c,q,e,this.state.context,this,r)),await((p=(f=this.options).onSuccess)==null?void 0:p.call(f,q,e,this.state.context,r)),await((g=(m=I(this,Wn).config).onSettled)==null?void 0:g.call(m,q,null,this.state.variables,this.state.context,this,r)),await((w=(k=this.options).onSettled)==null?void 0:w.call(k,q,null,e,this.state.context,r)),Ee(this,cs,qo).call(this,{type:"success",data:q}),q}catch(q){try{await((Q=(C=I(this,Wn).config).onError)==null?void 0:Q.call(C,q,e,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((E=($=this.options).onError)==null?void 0:E.call($,q,e,this.state.context,r))}catch(G){Promise.reject(G)}try{await((Y=(Z=I(this,Wn).config).onSettled)==null?void 0:Y.call(Z,void 0,q,this.state.variables,this.state.context,this,r))}catch(G){Promise.reject(G)}try{await((R=(_=this.options).onSettled)==null?void 0:R.call(_,void 0,q,e,this.state.context,r))}catch(G){Promise.reject(G)}throw Ee(this,cs,qo).call(this,{type:"error",error:q}),q}finally{I(this,Wn).runNext(this)}}},sf=new WeakMap,us=new WeakMap,Wn=new WeakMap,vl=new WeakMap,cs=new WeakSet,qo=function(e){const t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),lr.batch(()=>{I(this,us).forEach(r=>{r.onMutationUpdate(e)}),I(this,Wn).notify({mutation:this,type:"updated",action:e})})},Ub);function Tj(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Ys,Ni,of,qb,$j=(qb=class extends Gp{constructor(e={}){super();Ie(this,Ys);Ie(this,Ni);Ie(this,of);this.config=e,Oe(this,Ys,new Set),Oe(this,Ni,new Map),Oe(this,of,0)}build(e,t,r){const i=new Cj({client:e,mutationCache:this,mutationId:++$d(this,of)._,options:e.defaultMutationOptions(t),state:r});return this.add(i),i}add(e){I(this,Ys).add(e);const t=jd(e);if(typeof t=="string"){const r=I(this,Ni).get(t);r?r.push(e):I(this,Ni).set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(I(this,Ys).delete(e)){const t=jd(e);if(typeof t=="string"){const r=I(this,Ni).get(t);if(r)if(r.length>1){const i=r.indexOf(e);i!==-1&&r.splice(i,1)}else r[0]===e&&I(this,Ni).delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=jd(e);if(typeof t=="string"){const r=I(this,Ni).get(t),i=r==null?void 0:r.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){var r;const t=jd(e);if(typeof t=="string"){const i=(r=I(this,Ni).get(t))==null?void 0:r.find(s=>s!==e&&s.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){lr.batch(()=>{I(this,Ys).forEach(e=>{this.notify({type:"removed",mutation:e})}),I(this,Ys).clear(),I(this,Ni).clear()})}getAll(){return Array.from(I(this,Ys))}find(e){const t={exact:!0,...e};return this.getAll().find(r=>uw(t,r))}findAll(e={}){return this.getAll().filter(t=>uw(e,t))}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return lr.batch(()=>Promise.all(e.map(t=>t.continue().catch(Ri))))}},Ys=new WeakMap,Ni=new WeakMap,of=new WeakMap,qb);function jd(n){var e;return(e=n.options.scope)==null?void 0:e.id}var hs,Hb,Ej=(Hb=class extends Gp{constructor(e={}){super();Ie(this,hs);this.config=e,Oe(this,hs,new Map)}build(e,t,r){const i=t.queryKey,s=t.queryHash??zy(i,t);let o=this.get(s);return o||(o=new bj({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(o)),o}add(e){I(this,hs).has(e.queryHash)||(I(this,hs).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=I(this,hs).get(e.queryHash);t&&(e.destroy(),t===e&&I(this,hs).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){lr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return I(this,hs).get(e)}getAll(){return[...I(this,hs).values()]}find(e){const t={exact:!0,...e};return this.getAll().find(r=>lw(t,r))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(r=>lw(e,r)):t}notify(e){lr.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){lr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){lr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},hs=new WeakMap,Hb),mn,ia,sa,Au,_u,oa,zu,Du,Gb,Mj=(Gb=class{constructor(n={}){Ie(this,mn);Ie(this,ia);Ie(this,sa);Ie(this,Au);Ie(this,_u);Ie(this,oa);Ie(this,zu);Ie(this,Du);Oe(this,mn,n.queryCache||new Ej),Oe(this,ia,n.mutationCache||new $j),Oe(this,sa,n.defaultOptions||{}),Oe(this,Au,new Map),Oe(this,_u,new Map),Oe(this,oa,0)}mount(){$d(this,oa)._++,I(this,oa)===1&&(Oe(this,zu,vP.subscribe(async n=>{n&&(await this.resumePausedMutations(),I(this,mn).onFocus())})),Oe(this,Du,vp.subscribe(async n=>{n&&(await this.resumePausedMutations(),I(this,mn).onOnline())})))}unmount(){var n,e;$d(this,oa)._--,I(this,oa)===0&&((n=I(this,zu))==null||n.call(this),Oe(this,zu,void 0),(e=I(this,Du))==null||e.call(this),Oe(this,Du,void 0))}isFetching(n){return I(this,mn).findAll({...n,fetchStatus:"fetching"}).length}isMutating(n){return I(this,ia).findAll({...n,status:"pending"}).length}getQueryData(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=I(this,mn).get(e.queryHash))==null?void 0:t.state.data}ensureQueryData(n){const e=this.defaultQueryOptions(n),t=I(this,mn).build(this,e),r=t.state.data;return r===void 0?this.fetchQuery(n):(n.revalidateIfStale&&t.isStaleByTime(c0(e.staleTime,t))&&this.prefetchQuery(e),Promise.resolve(r))}getQueriesData(n){return I(this,mn).findAll(n).map(({queryKey:e,state:t})=>{const r=t.data;return[e,r]})}setQueryData(n,e,t){const r=this.defaultQueryOptions({queryKey:n}),i=I(this,mn).get(r.queryHash),s=i==null?void 0:i.state.data,o=uj(e,s);if(o!==void 0)return I(this,mn).build(this,r).setData(o,{...t,manual:!0})}setQueriesData(n,e,t){return lr.batch(()=>I(this,mn).findAll(n).map(({queryKey:r})=>[r,this.setQueryData(r,e,t)]))}getQueryState(n){var t;const e=this.defaultQueryOptions({queryKey:n});return(t=I(this,mn).get(e.queryHash))==null?void 0:t.state}removeQueries(n){const e=I(this,mn);lr.batch(()=>{e.findAll(n).forEach(t=>{e.remove(t)})})}resetQueries(n,e){const t=I(this,mn);return lr.batch(()=>(t.findAll(n).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...n},e)))}cancelQueries(n,e={}){const t={revert:!0,...e},r=lr.batch(()=>I(this,mn).findAll(n).map(i=>i.cancel(t)));return Promise.all(r).then(Ri).catch(Ri)}invalidateQueries(n,e={}){return lr.batch(()=>(I(this,mn).findAll(n).forEach(t=>{t.invalidate()}),(n==null?void 0:n.refetchType)==="none"?Promise.resolve():this.refetchQueries({...n,type:(n==null?void 0:n.refetchType)??(n==null?void 0:n.type)??"active"},e)))}refetchQueries(n,e={}){const t={...e,cancelRefetch:e.cancelRefetch??!0},r=lr.batch(()=>I(this,mn).findAll(n).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let s=i.fetch(void 0,t);return t.throwOnError||(s=s.catch(Ri)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(Ri)}fetchQuery(n){const e=this.defaultQueryOptions(n);e.retry===void 0&&(e.retry=!1);const t=I(this,mn).build(this,e);return t.isStaleByTime(c0(e.staleTime,t))?t.fetch(e):Promise.resolve(t.state.data)}prefetchQuery(n){return this.fetchQuery(n).then(Ri).catch(Ri)}fetchInfiniteQuery(n){return n.behavior=pw(n.pages),this.fetchQuery(n)}prefetchInfiniteQuery(n){return this.fetchInfiniteQuery(n).then(Ri).catch(Ri)}ensureInfiniteQueryData(n){return n.behavior=pw(n.pages),this.ensureQueryData(n)}resumePausedMutations(){return vp.isOnline()?I(this,ia).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,mn)}getMutationCache(){return I(this,ia)}getDefaultOptions(){return I(this,sa)}setDefaultOptions(n){Oe(this,sa,n)}setQueryDefaults(n,e){I(this,Au).set(Lh(n),{queryKey:n,defaultOptions:e})}getQueryDefaults(n){const e=[...I(this,Au).values()],t={};return e.forEach(r=>{Ih(n,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(n,e){I(this,_u).set(Lh(n),{mutationKey:n,defaultOptions:e})}getMutationDefaults(n){const e=[...I(this,_u).values()],t={};return e.forEach(r=>{Ih(n,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(n){if(n._defaulted)return n;const e={...I(this,sa).queries,...this.getQueryDefaults(n.queryKey),...n,_defaulted:!0};return e.queryHash||(e.queryHash=zy(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Dy&&(e.enabled=!1),e}defaultMutationOptions(n){return n!=null&&n._defaulted?n:{...I(this,sa).mutations,...(n==null?void 0:n.mutationKey)&&this.getMutationDefaults(n.mutationKey),...n,_defaulted:!0}}clear(){I(this,mn).clear(),I(this,ia).clear()}},mn=new WeakMap,ia=new WeakMap,sa=new WeakMap,Au=new WeakMap,_u=new WeakMap,oa=new WeakMap,zu=new WeakMap,Du=new WeakMap,Gb),jj=V.createContext(void 0),Rj=({client:n,children:e})=>(V.useEffect(()=>(n.mount(),()=>{n.unmount()}),[n]),x.jsx(jj.Provider,{value:n,children:e}));/**
69
+ * @license
70
+ * Copyright 2025 Amodal Labs, Inc.
71
+ * SPDX-License-Identifier: MIT
72
+ */function gw(n){if(!n.startsWith("data: "))return null;const e=n.slice(6).trim();return e.length===0?null:JSON.parse(e)}async function*Nj(n,e,t){const r={"Content-Type":"application/json",...t==null?void 0:t.headers},i=await fetch(n,{method:"POST",headers:r,body:JSON.stringify(e),signal:t==null?void 0:t.signal});if(!i.ok)throw new Error(`SSE request failed: ${String(i.status)} ${i.statusText}`);yield*TP(i)}async function*Aj(n,e){const t=await fetch(n,{method:"GET",headers:e==null?void 0:e.headers,signal:e==null?void 0:e.signal});if(!t.ok)throw new Error(`SSE request failed: ${String(t.status)} ${t.statusText}`);yield*TP(t)}async function*TP(n){const e=n.body;if(!e)throw new Error("Response body is null");const t=e.getReader(),r=new TextDecoder;let i="";try{for(;;){const{done:s,value:o}=await t.read();if(s)break;i+=r.decode(o,{stream:!0});const l=i.split(`
73
+ `);i=l.pop()??"";for(const c of l){const h=c.trim();if(h.length===0)continue;const f=gw(h);f&&(yield f)}}if(i.trim().length>0){const s=gw(i.trim());s&&(yield s)}}finally{t.releaseLock()}}/**
74
+ * @license
75
+ * Copyright 2025 Amodal Labs, Inc.
76
+ * SPDX-License-Identifier: MIT
77
+ */class _j{constructor(e){Yc(this,"runtimeUrl");Yc(this,"appId");Yc(this,"getToken");this.runtimeUrl=e.runtimeUrl.replace(/\/$/,""),this.appId=e.appId,this.getToken=e.getToken}async authHeaders(){const e={};if(this.getToken){const t=await this.getToken();t&&(e.Authorization=`Bearer ${t}`)}return e}async*chatStream(e,t){const r=`${this.runtimeUrl}/chat`,i={message:e,app_id:this.appId};t!=null&&t.sessionId&&(i.session_id=t.sessionId),t!=null&&t.context&&(i.context=t.context);const s=await this.authHeaders();yield*Nj(r,i,{signal:t==null?void 0:t.signal,headers:s})}async startTask(e,t){const r=`${this.runtimeUrl}/task`,i=await this.authHeaders(),s={prompt:e,app_id:this.appId};t&&(s.app_token=t);const o=await fetch(r,{method:"POST",headers:{"Content-Type":"application/json",...i},body:JSON.stringify(s)});if(!o.ok)throw new Error(`Start task failed: ${String(o.status)} ${o.statusText}`);return await o.json()}async getTaskStatus(e){const t=`${this.runtimeUrl}/task/${e}`,r=await this.authHeaders(),i=await fetch(t,{method:"GET",headers:r});if(!i.ok)throw new Error(`Get task status failed: ${String(i.status)} ${i.statusText}`);return await i.json()}async*streamTask(e,t){const r=`${this.runtimeUrl}/task/${e}/stream`,i=await this.authHeaders();yield*Aj(r,{signal:t,headers:i})}async getStores(e){const t=`${this.runtimeUrl}/api/stores`,r=await this.authHeaders(),i=await fetch(t,{headers:r,signal:e});if(!i.ok)throw new Error(`Failed to fetch stores: ${String(i.status)}`);return(await i.json()).stores}async getStoreDocuments(e,t){const r=new URLSearchParams;t!=null&&t.filter&&r.set("filter",JSON.stringify(t.filter)),t!=null&&t.sort&&r.set("sort",t.sort),(t==null?void 0:t.limit)!==void 0&&r.set("limit",String(t.limit)),(t==null?void 0:t.offset)!==void 0&&r.set("offset",String(t.offset));const i=r.toString(),s=`${this.runtimeUrl}/api/stores/${e}${i?`?${i}`:""}`,o=await this.authHeaders(),l=await fetch(s,{headers:o,signal:t==null?void 0:t.signal});if(!l.ok)throw new Error(`Failed to fetch store documents: ${String(l.status)}`);return await l.json()}async getStoreDocument(e,t,r){const i=`${this.runtimeUrl}/api/stores/${e}/${encodeURIComponent(t)}`,s=await this.authHeaders(),o=await fetch(i,{headers:s,signal:r});if(!o.ok){if(o.status===404)return{document:null,history:[]};throw new Error(`Failed to fetch store document: ${String(o.status)}`)}return await o.json()}}const $P=V.createContext(null);function zj({runtimeUrl:n,appId:e,getToken:t,children:r}){const i=V.useMemo(()=>new _j({runtimeUrl:n,appId:e,getToken:t}),[n,e,t]),s=V.useMemo(()=>({client:i,runtimeUrl:n,appId:e}),[i,n,e]);return x.jsx($P.Provider,{value:s,children:r})}function Ly(){const n=V.useContext($P);if(!n)throw new Error("useAmodalContext must be used within an <AmodalProvider>");return n}/**
78
+ * @license
79
+ * Copyright 2025 Amodal Labs, Inc.
80
+ * SPDX-License-Identifier: MIT
81
+ */const EP={messages:[],sessionId:null,isStreaming:!1,error:null,activeToolCalls:[],isHistorical:!1,usage:{inputTokens:0,outputTokens:0}};let Ow=0;function yw(){return Ow++,`msg-${Date.now()}-${String(Ow)}`}function Dj(n,e){switch(e.type){case"SEND_MESSAGE":{const t={type:"user",id:yw(),text:e.text,timestamp:new Date().toISOString()},r={type:"assistant_text",id:yw(),text:"",toolCalls:[],confirmations:[],skillActivations:[],kbProposals:[],widgets:[],contentBlocks:[],timestamp:new Date().toISOString()};return{...n,messages:[...n.messages,t,r],isStreaming:!0,error:null,activeToolCalls:[]}}case"STREAM_INIT":return{...n,sessionId:e.sessionId};case"STREAM_TEXT_DELTA":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=[...r.contentBlocks],s=i[i.length-1];s&&s.type==="text"?i[i.length-1]={type:"text",text:s.text+e.content}:i.push({type:"text",text:e.content}),t[t.length-1]={...r,text:r.text+e.content,contentBlocks:i}}return{...n,messages:t}}case"STREAM_TOOL_CALL_START":{const t=[...n.messages],r=t[t.length-1],i={toolId:e.toolId,toolName:e.toolName,parameters:e.parameters,status:"running"};if(r&&r.type==="assistant_text"){const s=[...r.toolCalls,i],o=[...r.contentBlocks],l=o[o.length-1];l&&l.type==="tool_calls"?o[o.length-1]={type:"tool_calls",calls:[...l.calls,i]}:o.push({type:"tool_calls",calls:[i]}),t[t.length-1]={...r,toolCalls:s,contentBlocks:o}}return{...n,messages:t,activeToolCalls:[...n.activeToolCalls,i]}}case"STREAM_TOOL_CALL_RESULT":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const s=c=>c.toolId===e.toolId?{...c,status:e.status,result:e.result,duration_ms:e.duration_ms,error:e.error}:c,o=r.toolCalls.map(s),l=r.contentBlocks.map(c=>c.type==="tool_calls"?{...c,calls:c.calls.map(s)}:c);t[t.length-1]={...r,toolCalls:o,contentBlocks:l}}const i=n.activeToolCalls.filter(s=>s.toolId!==e.toolId);return{...n,messages:t,activeToolCalls:i}}case"STREAM_SUBAGENT_EVENT":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=l=>l.toolId===e.parentToolId?{...l,subagentEvents:[...l.subagentEvents??[],e.event]}:l,s=r.toolCalls.map(i),o=r.contentBlocks.map(l=>l.type==="tool_calls"?{...l,calls:l.calls.map(i)}:l);t[t.length-1]={...r,toolCalls:s,contentBlocks:o}}return{...n,messages:t}}case"STREAM_WIDGET":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i={type:"widget",widgetType:e.widgetType,data:e.data};t[t.length-1]={...r,contentBlocks:[...r.contentBlocks,i]}}return{...n,messages:t}}case"STREAM_CONFIRMATION_REQUIRED":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i={type:"confirmation",confirmation:e.confirmation};t[t.length-1]={...r,confirmations:[...r.confirmations,e.confirmation],contentBlocks:[...r.contentBlocks,i]}}return{...n,messages:t}}case"CONFIRMATION_RESPONDED":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const i=r.confirmations.map(o=>o.correlationId===e.correlationId?{...o,status:e.approved?"approved":"denied"}:o),s=r.contentBlocks.map(o=>o.type==="confirmation"&&o.confirmation.correlationId===e.correlationId?{...o,confirmation:{...o.confirmation,status:e.approved?"approved":"denied"}}:o);t[t.length-1]={...r,confirmations:i,contentBlocks:s}}return{...n,messages:t}}case"STREAM_ERROR":return{...n,isStreaming:!1,error:e.message,activeToolCalls:[]};case"STREAM_DONE":{const t=[...n.messages],r=t[t.length-1];if(r&&r.type==="assistant_text"){const s=c=>c.status==="running"?{...c,status:"error",error:"Stopped"}:c,o=r.toolCalls.map(s),l=r.contentBlocks.map(c=>c.type==="tool_calls"?{...c,calls:c.calls.map(s)}:c);t[t.length-1]={...r,toolCalls:o,contentBlocks:l}}const i=e.usage?{inputTokens:n.usage.inputTokens+e.usage.inputTokens,outputTokens:n.usage.outputTokens+e.usage.outputTokens}:n.usage;return{...n,messages:t,isStreaming:!1,activeToolCalls:[],usage:i}}case"RESET":return{...EP};default:return n}}function Lj(n){const{client:e}=Ly(),[t,r]=V.useReducer(Dj,EP),i=V.useRef((n==null?void 0:n.initialSessionId)??null),s=V.useRef(null),o=V.useRef(n);o.current=n,i.current=t.sessionId??i.current;const l=V.useCallback(p=>{if(t.isStreaming)return;r({type:"SEND_MESSAGE",text:p});const m=new AbortController;s.current=m,(async()=>{var w,C,Q,$,E,Z,Y,_,R,q,G;let k=!1;try{const W=e.chatStream(p,{sessionId:i.current??void 0,context:(w=o.current)==null?void 0:w.context,signal:m.signal});for await(const z of W)switch(z.type){case"init":r({type:"STREAM_INIT",sessionId:z.session_id}),(Q=(C=o.current)==null?void 0:C.onSessionCreated)==null||Q.call(C,z.session_id);break;case"text_delta":r({type:"STREAM_TEXT_DELTA",content:z.content});break;case"tool_call_start":r({type:"STREAM_TOOL_CALL_START",toolId:z.tool_id,toolName:z.tool_name,parameters:z.parameters});break;case"tool_call_result":r({type:"STREAM_TOOL_CALL_RESULT",toolId:z.tool_id,status:z.status,result:z.result,duration_ms:z.duration_ms,error:z.error}),(E=($=o.current)==null?void 0:$.onToolCall)==null||E.call($,{toolId:z.tool_id,toolName:"",parameters:{},status:z.status,result:z.result,duration_ms:z.duration_ms,error:z.error});break;case"subagent_event":r({type:"STREAM_SUBAGENT_EVENT",parentToolId:z.parent_tool_id,event:{agentName:z.agent_name,eventType:z.event_type,toolName:z.tool_name,toolArgs:z.tool_args,result:z.result,text:z.text,error:z.error,timestamp:z.timestamp}});break;case"widget":r({type:"STREAM_WIDGET",widgetType:z.widget_type,data:z.data});break;case"confirmation_required":{const D={endpoint:z.endpoint,method:z.method,reason:z.reason,escalated:z.escalated,params:z.params,connectionName:z.connection_name,correlationId:z.correlation_id,status:"pending"};r({type:"STREAM_CONFIRMATION_REQUIRED",confirmation:D}),(Y=(Z=o.current)==null?void 0:Z.onConfirmation)==null||Y.call(Z,D);break}case"error":r({type:"STREAM_ERROR",message:z.message});break;case"done":k=!0,r({type:"STREAM_DONE",usage:z.usage?{inputTokens:z.usage.input_tokens,outputTokens:z.usage.output_tokens}:void 0}),(R=(_=o.current)==null?void 0:_.onStreamEnd)==null||R.call(_);break;default:break}}catch(W){W instanceof DOMException&&W.name==="AbortError"||r({type:"STREAM_ERROR",message:W instanceof Error?W.message:"Unknown error"})}finally{s.current=null,!k&&!m.signal.aborted&&(r({type:"STREAM_DONE"}),(G=(q=o.current)==null?void 0:q.onStreamEnd)==null||G.call(q))}})()},[e,t.isStreaming]),c=V.useCallback(()=>{s.current&&(s.current.abort(),s.current=null),r({type:"STREAM_DONE"})},[]),h=V.useCallback(()=>{s.current&&(s.current.abort(),s.current=null),r({type:"RESET"})},[]),f=V.useCallback((p,m)=>{r({type:"CONFIRMATION_RESPONDED",correlationId:p,approved:m});const g=m?`I approve the action (correlation: ${p})`:`I deny the action (correlation: ${p})`;t.isStreaming||l(g)},[l,t.isStreaming]);return V.useEffect(()=>()=>{s.current&&s.current.abort()},[]),{messages:t.messages,send:l,stop:c,isStreaming:t.isStreaming,activeToolCalls:t.activeToolCalls,sessionId:t.sessionId,error:t.error,usage:t.usage,reset:h,respondToConfirmation:f}}/**
82
+ * @license
83
+ * Copyright 2025 Amodal Labs, Inc.
84
+ * SPDX-License-Identifier: MIT
85
+ */function Ij(n,e){const{key:t,refreshInterval:r=3e4}=e,{client:i}=Ly(),[s,o]=V.useState(null),[l,c]=V.useState([]),[h,f]=V.useState(!0),[p,m]=V.useState(null),g=V.useRef(null),k=V.useCallback(async()=>{g.current&&g.current.abort();const C=new AbortController;g.current=C;try{const Q=await i.getStoreDocument(n,t,C.signal);o(Q.document),c(Q.history),m(null)}catch(Q){Q instanceof DOMException&&Q.name==="AbortError"||m(Q instanceof Error?Q.message:"Failed to fetch document")}finally{f(!1),g.current=null}},[i,n,t]),w=V.useCallback(()=>{k()},[k]);return V.useEffect(()=>(f(!0),k(),()=>{g.current&&g.current.abort()}),[k]),V.useEffect(()=>{if(r<=0)return;const C=setInterval(()=>{k()},r);return()=>clearInterval(C)},[k,r]),{data:(s==null?void 0:s.payload)??null,meta:(s==null?void 0:s.meta)??null,document:s,history:l,isLoading:h,error:p,refetch:w}}/**
86
+ * @license
87
+ * Copyright 2025 Amodal Labs, Inc.
88
+ * SPDX-License-Identifier: MIT
89
+ */function Zj(n,e={}){const{filter:t,sort:r,limit:i=20,refreshInterval:s=3e4}=e,{client:o}=Ly(),[l,c]=V.useState([]),[h,f]=V.useState(0),[p,m]=V.useState(!1),[g,k]=V.useState(!0),[w,C]=V.useState(null),Q=V.useRef(null),$=t?JSON.stringify(t):"",E=V.useCallback(async()=>{Q.current&&Q.current.abort();const Y=new AbortController;Q.current=Y;try{const _=await o.getStoreDocuments(n,{filter:$?JSON.parse($):void 0,sort:r,limit:i,signal:Y.signal});c(_.documents),f(_.total),m(_.hasMore),C(null)}catch(_){_ instanceof DOMException&&_.name==="AbortError"||C(_ instanceof Error?_.message:"Failed to fetch store list")}finally{k(!1),Q.current=null}},[o,n,$,r,i]),Z=V.useCallback(()=>{E()},[E]);return V.useEffect(()=>(k(!0),E(),()=>{Q.current&&Q.current.abort()}),[E]),V.useEffect(()=>{if(s<=0)return;const Y=setInterval(()=>{E()},s);return()=>clearInterval(Y)},[E,s]),{data:l.map(Y=>Y.payload),documents:l,total:h,hasMore:p,isLoading:g,error:w,refetch:Z}}/**
90
+ * @license
91
+ * Copyright 2025 Amodal Labs, Inc.
92
+ * SPDX-License-Identifier: MIT
93
+ */V.createContext(null);const MP=V.createContext({name:"",model:"",provider:"",stores:[],connections:[],mcpServers:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});function Xj({runtimeUrl:n,children:e}){const[t,r]=V.useState({name:"",model:"",provider:"",stores:[],connections:[],mcpServers:[],skills:[],automations:[],knowledge:[],resumeSessionId:null,isLoading:!0,error:null});return V.useEffect(()=>{let i=!1;async function s(){try{const o=await fetch(`${n}/inspect/context`);let l="",c="",h="",f=[],p=[],m=[],g=[],k=[];if(o.ok){const Q=await o.json();l=Q.name??"",c=Q.model??"",h=Q.provider??"",f=Q.connections??[],p=Q.mcpServers??[],m=Q.skills??[],g=Q.automations??[],k=Q.knowledge??[]}let w=[];try{const Q=await fetch(`${n}/api/stores`);Q.ok&&(w=(await Q.json()).stores)}catch{}let C=null;try{const Q=await fetch(`${n}/config`);Q.ok&&(C=(await Q.json()).resumeSessionId??null)}catch{}i||r({name:l,model:c,provider:h,stores:w,connections:f,mcpServers:p,skills:m,automations:g,knowledge:k,resumeSessionId:C,isLoading:!1,error:null})}catch(o){i||r(l=>({...l,isLoading:!1,error:o instanceof Error?o.message:"Failed to load manifest"}))}}return s(),()=>{i=!0}},[n]),x.jsx(MP.Provider,{value:t,children:e})}function ec(){return V.useContext(MP)}/**
94
+ * @license lucide-react v0.469.0 - ISC
95
+ *
96
+ * This source code is licensed under the ISC license.
97
+ * See the LICENSE file in the root directory of this source tree.
98
+ */const Vj=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),jP=(...n)=>n.filter((e,t,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===t).join(" ").trim();/**
99
+ * @license lucide-react v0.469.0 - ISC
100
+ *
101
+ * This source code is licensed under the ISC license.
102
+ * See the LICENSE file in the root directory of this source tree.
103
+ */var Wj={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"};/**
104
+ * @license lucide-react v0.469.0 - ISC
105
+ *
106
+ * This source code is licensed under the ISC license.
107
+ * See the LICENSE file in the root directory of this source tree.
108
+ */const Fj=V.forwardRef(({color:n="currentColor",size:e=24,strokeWidth:t=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:o,...l},c)=>V.createElement("svg",{ref:c,...Wj,width:e,height:e,stroke:n,strokeWidth:r?Number(t)*24/Number(e):t,className:jP("lucide",i),...l},[...o.map(([h,f])=>V.createElement(h,f)),...Array.isArray(s)?s:[s]]));/**
109
+ * @license lucide-react v0.469.0 - ISC
110
+ *
111
+ * This source code is licensed under the ISC license.
112
+ * See the LICENSE file in the root directory of this source tree.
113
+ */const Ct=(n,e)=>{const t=V.forwardRef(({className:r,...i},s)=>V.createElement(Fj,{ref:s,iconNode:e,className:jP(`lucide-${Vj(n)}`,r),...i}));return t.displayName=`${n}`,t};/**
114
+ * @license lucide-react v0.469.0 - ISC
115
+ *
116
+ * This source code is licensed under the ISC license.
117
+ * See the LICENSE file in the root directory of this source tree.
118
+ */const tO=Ct("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/**
119
+ * @license lucide-react v0.469.0 - ISC
120
+ *
121
+ * This source code is licensed under the ISC license.
122
+ * See the LICENSE file in the root directory of this source tree.
123
+ */const Iy=Ct("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
124
+ * @license lucide-react v0.469.0 - ISC
125
+ *
126
+ * This source code is licensed under the ISC license.
127
+ * See the LICENSE file in the root directory of this source tree.
128
+ */const d0=Ct("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/**
129
+ * @license lucide-react v0.469.0 - ISC
130
+ *
131
+ * This source code is licensed under the ISC license.
132
+ * See the LICENSE file in the root directory of this source tree.
133
+ */const RP=Ct("Bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);/**
134
+ * @license lucide-react v0.469.0 - ISC
135
+ *
136
+ * This source code is licensed under the ISC license.
137
+ * See the LICENSE file in the root directory of this source tree.
138
+ */const NP=Ct("Cable",[["path",{d:"M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1",key:"10bnsj"}],["path",{d:"M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9",key:"1eqmu1"}],["path",{d:"M21 21v-2h-4",key:"14zm7j"}],["path",{d:"M3 5h4V3",key:"z442eg"}],["path",{d:"M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3",key:"ebdjd7"}]]);/**
139
+ * @license lucide-react v0.469.0 - ISC
140
+ *
141
+ * This source code is licensed under the ISC license.
142
+ * See the LICENSE file in the root directory of this source tree.
143
+ */const Bj=Ct("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
144
+ * @license lucide-react v0.469.0 - ISC
145
+ *
146
+ * This source code is licensed under the ISC license.
147
+ * See the LICENSE file in the root directory of this source tree.
148
+ */const Zy=Ct("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
149
+ * @license lucide-react v0.469.0 - ISC
150
+ *
151
+ * This source code is licensed under the ISC license.
152
+ * See the LICENSE file in the root directory of this source tree.
153
+ */const Yj=Ct("CircleAlert",[["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"}]]);/**
154
+ * @license lucide-react v0.469.0 - ISC
155
+ *
156
+ * This source code is licensed under the ISC license.
157
+ * See the LICENSE file in the root directory of this source tree.
158
+ */const Zh=Ct("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
159
+ * @license lucide-react v0.469.0 - ISC
160
+ *
161
+ * This source code is licensed under the ISC license.
162
+ * See the LICENSE file in the root directory of this source tree.
163
+ */const Xy=Ct("CircleX",[["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"}]]);/**
164
+ * @license lucide-react v0.469.0 - ISC
165
+ *
166
+ * This source code is licensed under the ISC license.
167
+ * See the LICENSE file in the root directory of this source tree.
168
+ */const Kp=Ct("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
169
+ * @license lucide-react v0.469.0 - ISC
170
+ *
171
+ * This source code is licensed under the ISC license.
172
+ * See the LICENSE file in the root directory of this source tree.
173
+ */const Vy=Ct("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]);/**
174
+ * @license lucide-react v0.469.0 - ISC
175
+ *
176
+ * This source code is licensed under the ISC license.
177
+ * See the LICENSE file in the root directory of this source tree.
178
+ */const AP=Ct("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/**
179
+ * @license lucide-react v0.469.0 - ISC
180
+ *
181
+ * This source code is licensed under the ISC license.
182
+ * See the LICENSE file in the root directory of this source tree.
183
+ */const Uj=Ct("DollarSign",[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]);/**
184
+ * @license lucide-react v0.469.0 - ISC
185
+ *
186
+ * This source code is licensed under the ISC license.
187
+ * See the LICENSE file in the root directory of this source tree.
188
+ */const Wy=Ct("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/**
189
+ * @license lucide-react v0.469.0 - ISC
190
+ *
191
+ * This source code is licensed under the ISC license.
192
+ * See the LICENSE file in the root directory of this source tree.
193
+ */const du=Ct("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);/**
194
+ * @license lucide-react v0.469.0 - ISC
195
+ *
196
+ * This source code is licensed under the ISC license.
197
+ * See the LICENSE file in the root directory of this source tree.
198
+ */const qj=Ct("FolderCode",[["path",{d:"M10 10.5 8 13l2 2.5",key:"m4t9c1"}],["path",{d:"m14 10.5 2 2.5-2 2.5",key:"14w2eb"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2z",key:"1u1bxd"}]]);/**
199
+ * @license lucide-react v0.469.0 - ISC
200
+ *
201
+ * This source code is licensed under the ISC license.
202
+ * See the LICENSE file in the root directory of this source tree.
203
+ */const Hj=Ct("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/**
204
+ * @license lucide-react v0.469.0 - ISC
205
+ *
206
+ * This source code is licensed under the ISC license.
207
+ * See the LICENSE file in the root directory of this source tree.
208
+ */const Gj=Ct("Folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]);/**
209
+ * @license lucide-react v0.469.0 - ISC
210
+ *
211
+ * This source code is licensed under the ISC license.
212
+ * See the LICENSE file in the root directory of this source tree.
213
+ */const _P=Ct("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/**
214
+ * @license lucide-react v0.469.0 - ISC
215
+ *
216
+ * This source code is licensed under the ISC license.
217
+ * See the LICENSE file in the root directory of this source tree.
218
+ */const ua=Ct("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
219
+ * @license lucide-react v0.469.0 - ISC
220
+ *
221
+ * This source code is licensed under the ISC license.
222
+ * See the LICENSE file in the root directory of this source tree.
223
+ */const wp=Ct("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/**
224
+ * @license lucide-react v0.469.0 - ISC
225
+ *
226
+ * This source code is licensed under the ISC license.
227
+ * See the LICENSE file in the root directory of this source tree.
228
+ */const zP=Ct("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
229
+ * @license lucide-react v0.469.0 - ISC
230
+ *
231
+ * This source code is licensed under the ISC license.
232
+ * See the LICENSE file in the root directory of this source tree.
233
+ */const Kj=Ct("Package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]]);/**
234
+ * @license lucide-react v0.469.0 - ISC
235
+ *
236
+ * This source code is licensed under the ISC license.
237
+ * See the LICENSE file in the root directory of this source tree.
238
+ */const Fy=Ct("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/**
239
+ * @license lucide-react v0.469.0 - ISC
240
+ *
241
+ * This source code is licensed under the ISC license.
242
+ * See the LICENSE file in the root directory of this source tree.
243
+ */const p0=Ct("Plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M9 8V2",key:"14iosj"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M18 8v5a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V8Z",key:"osxo6l"}]]);/**
244
+ * @license lucide-react v0.469.0 - ISC
245
+ *
246
+ * This source code is licensed under the ISC license.
247
+ * See the LICENSE file in the root directory of this source tree.
248
+ */const Jj=Ct("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);/**
249
+ * @license lucide-react v0.469.0 - ISC
250
+ *
251
+ * This source code is licensed under the ISC license.
252
+ * See the LICENSE file in the root directory of this source tree.
253
+ */const DP=Ct("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/**
254
+ * @license lucide-react v0.469.0 - ISC
255
+ *
256
+ * This source code is licensed under the ISC license.
257
+ * See the LICENSE file in the root directory of this source tree.
258
+ */const gu=Ct("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);/**
259
+ * @license lucide-react v0.469.0 - ISC
260
+ *
261
+ * This source code is licensed under the ISC license.
262
+ * See the LICENSE file in the root directory of this source tree.
263
+ */const LP=Ct("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
264
+ * @license lucide-react v0.469.0 - ISC
265
+ *
266
+ * This source code is licensed under the ISC license.
267
+ * See the LICENSE file in the root directory of this source tree.
268
+ */const m0=Ct("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/**
269
+ * @license lucide-react v0.469.0 - ISC
270
+ *
271
+ * This source code is licensed under the ISC license.
272
+ * See the LICENSE file in the root directory of this source tree.
273
+ */const eR=Ct("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]]);/**
274
+ * @license lucide-react v0.469.0 - ISC
275
+ *
276
+ * This source code is licensed under the ISC license.
277
+ * See the LICENSE file in the root directory of this source tree.
278
+ */const IP=Ct("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/**
279
+ * @license lucide-react v0.469.0 - ISC
280
+ *
281
+ * This source code is licensed under the ISC license.
282
+ * See the LICENSE file in the root directory of this source tree.
283
+ */const tR=Ct("Wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]]);/**
284
+ * @license lucide-react v0.469.0 - ISC
285
+ *
286
+ * This source code is licensed under the ISC license.
287
+ * See the LICENSE file in the root directory of this source tree.
288
+ */const nR=Ct("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
289
+ * @license lucide-react v0.469.0 - ISC
290
+ *
291
+ * This source code is licensed under the ISC license.
292
+ * See the LICENSE file in the root directory of this source tree.
293
+ */const Zu=Ct("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),rR="modulepreload",iR=function(n){return"/"+n},xw={},sR=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let o=function(h){return Promise.all(h.map(f=>Promise.resolve(f).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));i=o(t.map(h=>{if(h=iR(h),h in xw)return;xw[h]=!0;const f=h.endsWith(".css"),p=f?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const m=document.createElement("link");if(m.rel=f?"stylesheet":rR,f||(m.as="script"),m.crossOrigin="",m.href=h,c&&m.setAttribute("nonce",c),document.head.appendChild(m),f)return new Promise((g,k)=>{m.addEventListener("load",g),m.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return i.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};function ZP(n){var e,t,r="";if(typeof n=="string"||typeof n=="number")r+=n;else if(typeof n=="object")if(Array.isArray(n)){var i=n.length;for(e=0;e<i;e++)n[e]&&(t=ZP(n[e]))&&(r&&(r+=" "),r+=t)}else for(t in n)n[t]&&(r&&(r+=" "),r+=t);return r}function oR(){for(var n,e,t=0,r="",i=arguments.length;t<i;t++)(n=arguments[t])&&(e=ZP(n))&&(r&&(r+=" "),r+=e);return r}const By="-",aR=n=>{const e=uR(n),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=n;return{getClassGroupId:o=>{const l=o.split(By);return l[0]===""&&l.length!==1&&l.shift(),XP(l,e)||lR(o)},getConflictingClassGroupIds:(o,l)=>{const c=t[o]||[];return l&&r[o]?[...c,...r[o]]:c}}},XP=(n,e)=>{var o;if(n.length===0)return e.classGroupId;const t=n[0],r=e.nextPart.get(t),i=r?XP(n.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=n.join(By);return(o=e.validators.find(({validator:l})=>l(s)))==null?void 0:o.classGroupId},vw=/^\[(.+)\]$/,lR=n=>{if(vw.test(n)){const e=vw.exec(n)[1],t=e==null?void 0:e.substring(0,e.indexOf(":"));if(t)return"arbitrary.."+t}},uR=n=>{const{theme:e,prefix:t}=n,r={nextPart:new Map,validators:[]};return hR(Object.entries(n.classGroups),t).forEach(([s,o])=>{g0(o,r,s,e)}),r},g0=(n,e,t,r)=>{n.forEach(i=>{if(typeof i=="string"){const s=i===""?e:ww(e,i);s.classGroupId=t;return}if(typeof i=="function"){if(cR(i)){g0(i(r),e,t,r);return}e.validators.push({validator:i,classGroupId:t});return}Object.entries(i).forEach(([s,o])=>{g0(o,ww(e,s),t,r)})})},ww=(n,e)=>{let t=n;return e.split(By).forEach(r=>{t.nextPart.has(r)||t.nextPart.set(r,{nextPart:new Map,validators:[]}),t=t.nextPart.get(r)}),t},cR=n=>n.isThemeGetter,hR=(n,e)=>e?n.map(([t,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([o,l])=>[e+o,l])):s);return[t,i]}):n,fR=n=>{if(n<1)return{get:()=>{},set:()=>{}};let e=0,t=new Map,r=new Map;const i=(s,o)=>{t.set(s,o),e++,e>n&&(e=0,r=t,t=new Map)};return{get(s){let o=t.get(s);if(o!==void 0)return o;if((o=r.get(s))!==void 0)return i(s,o),o},set(s,o){t.has(s)?t.set(s,o):i(s,o)}}},VP="!",dR=n=>{const{separator:e,experimentalParseClassName:t}=n,r=e.length===1,i=e[0],s=e.length,o=l=>{const c=[];let h=0,f=0,p;for(let C=0;C<l.length;C++){let Q=l[C];if(h===0){if(Q===i&&(r||l.slice(C,C+s)===e)){c.push(l.slice(f,C)),f=C+s;continue}if(Q==="/"){p=C;continue}}Q==="["?h++:Q==="]"&&h--}const m=c.length===0?l:l.substring(f),g=m.startsWith(VP),k=g?m.substring(1):m,w=p&&p>f?p-f:void 0;return{modifiers:c,hasImportantModifier:g,baseClassName:k,maybePostfixModifierPosition:w}};return t?l=>t({className:l,parseClassName:o}):o},pR=n=>{if(n.length<=1)return n;const e=[];let t=[];return n.forEach(r=>{r[0]==="["?(e.push(...t.sort(),r),t=[]):t.push(r)}),e.push(...t.sort()),e},mR=n=>({cache:fR(n.cacheSize),parseClassName:dR(n),...aR(n)}),gR=/\s+/,OR=(n,e)=>{const{parseClassName:t,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],o=n.trim().split(gR);let l="";for(let c=o.length-1;c>=0;c-=1){const h=o[c],{modifiers:f,hasImportantModifier:p,baseClassName:m,maybePostfixModifierPosition:g}=t(h);let k=!!g,w=r(k?m.substring(0,g):m);if(!w){if(!k){l=h+(l.length>0?" "+l:l);continue}if(w=r(m),!w){l=h+(l.length>0?" "+l:l);continue}k=!1}const C=pR(f).join(":"),Q=p?C+VP:C,$=Q+w;if(s.includes($))continue;s.push($);const E=i(w,k);for(let Z=0;Z<E.length;++Z){const Y=E[Z];s.push(Q+Y)}l=h+(l.length>0?" "+l:l)}return l};function yR(){let n=0,e,t,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=WP(e))&&(r&&(r+=" "),r+=t);return r}const WP=n=>{if(typeof n=="string")return n;let e,t="";for(let r=0;r<n.length;r++)n[r]&&(e=WP(n[r]))&&(t&&(t+=" "),t+=e);return t};function xR(n,...e){let t,r,i,s=o;function o(c){const h=e.reduce((f,p)=>p(f),n());return t=mR(h),r=t.cache.get,i=t.cache.set,s=l,l(c)}function l(c){const h=r(c);if(h)return h;const f=OR(c,t);return i(c,f),f}return function(){return s(yR.apply(null,arguments))}}const en=n=>{const e=t=>t[n]||[];return e.isThemeGetter=!0,e},FP=/^\[(?:([a-z-]+):)?(.+)\]$/i,vR=/^\d+\/\d+$/,wR=new Set(["px","full","screen"]),kR=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,SR=/\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$/,bR=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,PR=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,QR=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Vs=n=>wu(n)||wR.has(n)||vR.test(n),Vo=n=>tc(n,"length",NR),wu=n=>!!n&&!Number.isNaN(Number(n)),nO=n=>tc(n,"number",wu),Kc=n=>!!n&&Number.isInteger(Number(n)),CR=n=>n.endsWith("%")&&wu(n.slice(0,-1)),ft=n=>FP.test(n),Wo=n=>kR.test(n),TR=new Set(["length","size","percentage"]),$R=n=>tc(n,TR,BP),ER=n=>tc(n,"position",BP),MR=new Set(["image","url"]),jR=n=>tc(n,MR,_R),RR=n=>tc(n,"",AR),Jc=()=>!0,tc=(n,e,t)=>{const r=FP.exec(n);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):t(r[2]):!1},NR=n=>SR.test(n)&&!bR.test(n),BP=()=>!1,AR=n=>PR.test(n),_R=n=>QR.test(n),zR=()=>{const n=en("colors"),e=en("spacing"),t=en("blur"),r=en("brightness"),i=en("borderColor"),s=en("borderRadius"),o=en("borderSpacing"),l=en("borderWidth"),c=en("contrast"),h=en("grayscale"),f=en("hueRotate"),p=en("invert"),m=en("gap"),g=en("gradientColorStops"),k=en("gradientColorStopPositions"),w=en("inset"),C=en("margin"),Q=en("opacity"),$=en("padding"),E=en("saturate"),Z=en("scale"),Y=en("sepia"),_=en("skew"),R=en("space"),q=en("translate"),G=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto",ft,e],D=()=>[ft,e],se=()=>["",Vs,Vo],oe=()=>["auto",wu,ft],ne=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],de=()=>["solid","dashed","dotted","double","none"],ke=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>["start","end","center","between","around","evenly","stretch"],ye=()=>["","0",ft],N=()=>["auto","avoid","all","avoid-page","page","left","right","column"],U=()=>[wu,ft];return{cacheSize:500,separator:":",theme:{colors:[Jc],spacing:[Vs,Vo],blur:["none","",Wo,ft],brightness:U(),borderColor:[n],borderRadius:["none","","full",Wo,ft],borderSpacing:D(),borderWidth:se(),contrast:U(),grayscale:ye(),hueRotate:U(),invert:ye(),gap:D(),gradientColorStops:[n],gradientColorStopPositions:[CR,Vo],inset:z(),margin:z(),opacity:U(),padding:D(),saturate:U(),scale:U(),sepia:ye(),skew:U(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",ft]}],container:["container"],columns:[{columns:[Wo]}],"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"],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:[...ne(),ft]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kc,ft]}],basis:[{basis:z()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ft]}],grow:[{grow:ye()}],shrink:[{shrink:ye()}],order:[{order:["first","last","none",Kc,ft]}],"grid-cols":[{"grid-cols":[Jc]}],"col-start-end":[{col:["auto",{span:["full",Kc,ft]},ft]}],"col-start":[{"col-start":oe()}],"col-end":[{"col-end":oe()}],"grid-rows":[{"grid-rows":[Jc]}],"row-start-end":[{row:["auto",{span:[Kc,ft]},ft]}],"row-start":[{"row-start":oe()}],"row-end":[{"row-end":oe()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ft]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ft]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...he()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...he(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...he(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[$]}],px:[{px:[$]}],py:[{py:[$]}],ps:[{ps:[$]}],pe:[{pe:[$]}],pt:[{pt:[$]}],pr:[{pr:[$]}],pb:[{pb:[$]}],pl:[{pl:[$]}],m:[{m:[C]}],mx:[{mx:[C]}],my:[{my:[C]}],ms:[{ms:[C]}],me:[{me:[C]}],mt:[{mt:[C]}],mr:[{mr:[C]}],mb:[{mb:[C]}],ml:[{ml:[C]}],"space-x":[{"space-x":[R]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[R]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",ft,e]}],"min-w":[{"min-w":[ft,e,"min","max","fit"]}],"max-w":[{"max-w":[ft,e,"none","full","min","max","fit","prose",{screen:[Wo]},Wo]}],h:[{h:[ft,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ft,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ft,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Wo,Vo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nO]}],"font-family":[{font:[Jc]}],"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:["tighter","tight","normal","wide","wider","widest",ft]}],"line-clamp":[{"line-clamp":["none",wu,nO]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Vs,ft]}],"list-image":[{"list-image":["none",ft]}],"list-style-type":[{list:["none","disc","decimal",ft]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[n]}],"placeholder-opacity":[{"placeholder-opacity":[Q]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[n]}],"text-opacity":[{"text-opacity":[Q]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...de(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Vs,Vo]}],"underline-offset":[{"underline-offset":["auto",Vs,ft]}],"text-decoration-color":[{decoration:[n]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ft]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ft]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[Q]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ne(),ER]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$R]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},jR]}],"bg-color":[{bg:[n]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-to-pos":[{to:[k]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[Q]}],"border-style":[{border:[...de(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[Q]}],"divide-style":[{divide:de()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...de()]}],"outline-offset":[{"outline-offset":[Vs,ft]}],"outline-w":[{outline:[Vs,Vo]}],"outline-color":[{outline:[n]}],"ring-w":[{ring:se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[n]}],"ring-opacity":[{"ring-opacity":[Q]}],"ring-offset-w":[{"ring-offset":[Vs,Vo]}],"ring-offset-color":[{"ring-offset":[n]}],shadow:[{shadow:["","inner","none",Wo,RR]}],"shadow-color":[{shadow:[Jc]}],opacity:[{opacity:[Q]}],"mix-blend":[{"mix-blend":[...ke(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ke()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Wo,ft]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[E]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[Q]}],"backdrop-saturate":[{"backdrop-saturate":[E]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[o]}],"border-spacing-x":[{"border-spacing-x":[o]}],"border-spacing-y":[{"border-spacing-y":[o]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ft]}],duration:[{duration:U()}],ease:[{ease:["linear","in","out","in-out",ft]}],delay:[{delay:U()}],animate:[{animate:["none","spin","ping","pulse","bounce",ft]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[Z]}],"scale-x":[{"scale-x":[Z]}],"scale-y":[{"scale-y":[Z]}],rotate:[{rotate:[Kc,ft]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[_]}],"skew-y":[{"skew-y":[_]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ft]}],accent:[{accent:["auto",n]}],appearance:[{appearance:["none","auto"]}],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",ft]}],"caret-color":[{caret:[n]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",ft]}],fill:[{fill:[n,"none"]}],"stroke-w":[{stroke:[Vs,Vo,nO]}],stroke:[{stroke:[n,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","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","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","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-s","border-w-e","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-s","border-color-e","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"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","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-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"]}}},DR=xR(zR);/**
294
+ * @license
295
+ * Copyright 2025 Amodal Labs, Inc.
296
+ * SPDX-License-Identifier: MIT
297
+ */function Sr(...n){return DR(oR(n))}function rO({to:n,children:e,end:t}){return x.jsx(Iu,{to:n,end:t,className:({isActive:r})=>Sr("flex items-center gap-2.5 px-3 py-[7px] rounded-md text-[13px] transition-colors duration-150",r?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 font-medium":"text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04]"),children:e})}function eh({children:n,action:e}){return x.jsxs("div",{className:"px-3 pt-5 pb-1.5 flex items-center justify-between",children:[x.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:n}),e]})}function iO({label:n,icon:e,children:t,count:r}){const[i,s]=V.useState(!1);return x.jsxs("div",{children:[x.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-2 w-full px-3 py-[7px] rounded-md text-[13px] text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[x.jsx(Zy,{className:Sr("h-3 w-3 shrink-0 transition-transform",i&&"rotate-90")}),e,x.jsx("span",{className:"flex-1 text-left",children:n}),x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25",children:String(r)})]}),i&&x.jsx("div",{className:"ml-3 space-y-0.5",children:t})]})}function Rd({icon:n,label:e,to:t,status:r}){return x.jsxs(Iu,{to:t,className:({isActive:i})=>Sr("flex items-center gap-2.5 px-3 py-[6px] text-[13px] rounded-md transition-colors duration-150",i?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[n,x.jsx("span",{className:"flex-1 truncate",children:e}),r&&x.jsx("div",{className:Sr("h-1.5 w-1.5 rounded-full shrink-0",r==="connected"?"bg-emerald-400":r==="connecting"?"bg-amber-400 animate-pulse":r==="error"||r==="disconnected"?"bg-red-400":"bg-gray-400"),title:r})]})}function LR(){const{stores:n,connections:e,mcpServers:t,skills:r,automations:i,knowledge:s}=ec(),o=e.length+t.length,[l,c]=V.useState([]),[h,f]=V.useState([]),[p,m]=V.useState(new Set),[g,k]=V.useState(new Set),w=Ku(),C=Tl();return V.useEffect(()=>{fetch("/api/pages").then(Q=>Q.ok?Q.json():null).then(Q=>{if(Q&&typeof Q=="object"&&"pages"in Q&&Array.isArray(Q.pages)){const $=Q.pages;c($.map(E=>({name:E.name,filePath:""})))}}).catch(()=>{sR(()=>import("./_virtual_amodal-manifest-DIezHQq3.js"),[]).then(Q=>{c(Q.pages.filter($=>!$.hidden))}).catch(()=>{})})},[]),V.useEffect(()=>{const Q=()=>{fetch("/automations").then(E=>E.ok?E.json():{automations:[]}).then(E=>{if(E&&typeof E=="object"&&"automations"in E){const Z=E.automations,Y=new Set(Z.filter(_=>_.lastRun&&Date.now()-new Date(_.lastRun).getTime()<5e3).map(_=>_.name));m(Y),k(new Set(Z.filter(_=>_.running).map(_=>_.name)))}}).catch(()=>{})};Q();const $=setInterval(Q,3e3);return()=>clearInterval($)},[]),V.useEffect(()=>{fetch("/sessions").then(Q=>Q.ok?Q.json():{sessions:[]}).then(Q=>{if(Q&&typeof Q=="object"&&"sessions"in Q&&Array.isArray(Q.sessions)){const $=Q.sessions;f($.filter(E=>!E.automationName).slice(0,10))}}).catch(()=>{})},[C.pathname]),x.jsx("aside",{className:"w-[260px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex flex-col shrink-0 overflow-hidden",children:x.jsxs("nav",{className:"flex-1 overflow-y-auto scrollbar-thin px-2 py-2",children:[x.jsxs("button",{onClick:()=>{w("/")},className:"flex items-center gap-2.5 w-full px-3 py-2 mb-1 rounded-md text-[13px] text-gray-500 dark:text-white/60 hover:text-gray-800 dark:hover:text-white/90 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[x.jsx(eR,{className:"h-4 w-4 shrink-0"}),"New chat"]}),h.length>0&&x.jsxs(x.Fragment,{children:[x.jsx(eh,{action:x.jsx(Iu,{to:"/sessions",className:"text-[10px] text-gray-400 dark:text-white/20 hover:text-gray-600 dark:hover:text-white/40 transition-colors",children:"View all"}),children:"Recent"}),x.jsx("div",{className:"space-y-0.5",children:h.map(Q=>{const $=C.search.includes(Q.id);return x.jsxs("button",{onClick:()=>{w(`/?resume=${Q.id}`)},className:Sr("flex items-center gap-2 w-full px-3 py-[6px] rounded-md text-[12px] text-left transition-colors duration-150 truncate",$?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),children:[x.jsx(wp,{className:"h-3 w-3 shrink-0 opacity-40"}),x.jsx("span",{className:"truncate",children:Q.summary})]},Q.id)})})]}),l.length>0&&x.jsxs(x.Fragment,{children:[x.jsx(eh,{children:"Pages"}),x.jsx("div",{className:"space-y-0.5",children:l.map(Q=>x.jsxs(rO,{to:`/pages/${Q.name}`,children:[x.jsx(Wy,{className:"h-4 w-4 shrink-0"}),x.jsx("span",{className:"truncate",children:IR(Q.name)})]},Q.name))})]}),i.length>0&&x.jsxs(x.Fragment,{children:[x.jsx(eh,{children:"Automations"}),[...i].sort().map(Q=>{const $=g.has(Q),E=p.has(Q);return x.jsxs(rO,{to:`/automations/${encodeURIComponent(Q)}`,children:[E?x.jsx(ua,{className:"h-3.5 w-3.5 shrink-0 text-purple-400 animate-spin"}):x.jsx(Zu,{className:Sr("h-3.5 w-3.5 shrink-0",$?"text-purple-500":"text-purple-500/30")}),x.jsx("span",{className:Sr("truncate",!$&&!E&&"opacity-40"),children:Q.replace(/[-_]/g," ").replace(/\b\w/g,Z=>Z.toUpperCase())}),$&&x.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-emerald-400 shrink-0 ml-auto"})]},Q)})]}),(o>0||r.length>0||s.length>0)&&x.jsx(eh,{children:"Agent"}),o>0&&x.jsxs(iO,{label:"Connections",icon:x.jsx(p0,{className:"h-3.5 w-3.5 shrink-0 text-emerald-500/60"}),count:o,children:[e.map(Q=>x.jsx(Rd,{icon:x.jsx(p0,{className:"h-3 w-3 shrink-0 text-emerald-500/40"}),label:Q.name,to:`/inspect/connections/${encodeURIComponent(Q.name)}`,status:Q.status},Q.name)),t.map(Q=>x.jsx(Rd,{icon:x.jsx(NP,{className:"h-3 w-3 shrink-0 text-violet-500/40"}),label:Q.name,to:`/inspect/mcp/${encodeURIComponent(Q.name)}`,status:Q.status},`mcp-${Q.name}`))]}),r.length>0&&x.jsx(iO,{label:"Skills",icon:x.jsx(m0,{className:"h-3.5 w-3.5 shrink-0 text-amber-500/60"}),count:r.length,children:r.map(Q=>x.jsx(Rd,{icon:x.jsx(m0,{className:"h-3 w-3 shrink-0 text-amber-500/40"}),label:Q,to:`/inspect/skills/${encodeURIComponent(Q)}`},Q))}),s.length>0&&x.jsx(iO,{label:"Knowledge",icon:x.jsx(d0,{className:"h-3.5 w-3.5 shrink-0 text-blue-500/60"}),count:s.length,children:s.map(Q=>x.jsx(Rd,{icon:x.jsx(d0,{className:"h-3 w-3 shrink-0 text-blue-500/40"}),label:Q,to:`/inspect/knowledge/${encodeURIComponent(Q)}`},Q))}),n.length>0&&x.jsxs(x.Fragment,{children:[x.jsx(eh,{children:"Entities"}),x.jsx("div",{className:"space-y-0.5",children:n.map(Q=>x.jsxs(rO,{to:`/entities/${Q.name}`,children:[x.jsx(AP,{className:"h-4 w-4 shrink-0"}),x.jsx("span",{className:"flex-1 truncate",children:Q.entity.name}),Q.documentCount>0&&x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/30 tabular-nums bg-gray-200 dark:bg-white/[0.06] px-1.5 py-0.5 rounded-full",children:Q.documentCount.toLocaleString()})]},Q.name))})]})]})})}function IR(n){return n.replace(/[-_]/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function ZR(){const[n,e]=V.useState("checking"),t=V.useRef();return V.useEffect(()=>{const r=()=>{fetch("/inspect/health",{signal:AbortSignal.timeout(3e3)}).then(i=>{e(i.ok?"connected":"disconnected")}).catch(()=>{e("disconnected")})};return r(),t.current=setInterval(r,1e4),()=>clearInterval(t.current)},[]),n}function XR(){const[n,e]=V.useState(()=>document.documentElement.classList.contains("dark")),t=V.useCallback(()=>{const r=!n;e(r),document.documentElement.classList.toggle("dark",r);try{localStorage.setItem("amodal-theme",r?"dark":"light")}catch{}},[n]);return V.useEffect(()=>{try{localStorage.getItem("amodal-theme")==="light"&&(e(!1),document.documentElement.classList.remove("dark"))}catch{}},[]),{dark:n,toggle:t}}function VR(){const{name:n,model:e}=ec(),{dark:t,toggle:r}=XR(),i=ZR();return x.jsxs("div",{className:"flex flex-col h-screen overflow-hidden bg-white dark:bg-[#0a0a0f]",children:[x.jsxs("header",{className:"h-14 bg-gray-50 dark:bg-[#0f0f17] border-b border-gray-200 dark:border-white/[0.06] text-gray-900 dark:text-white flex items-center justify-between px-5 shrink-0 z-20",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[x.jsx("defs",{children:x.jsx("clipPath",{id:"logo-sq",children:x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#logo-sq)"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-semibold tracking-tight text-[15px] text-gray-900 dark:text-white/90",children:"amodal"}),n&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-gray-300 dark:text-white/20",children:"/"}),x.jsx("span",{className:"text-[13px] text-gray-500 dark:text-white/50 font-medium",children:n})]})]})]}),x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(cf,{to:"/config",className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:"Configuration",children:x.jsx(LP,{className:"h-4 w-4"})}),x.jsx("button",{onClick:r,className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:t?"Switch to light mode":"Switch to dark mode",children:t?x.jsx(IP,{className:"h-4 w-4"}):x.jsx(zP,{className:"h-4 w-4"})}),e&&x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25 font-mono",children:e.replace(/-\d{8}$/,"")}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:`h-2 w-2 rounded-full ${i==="connected"?"bg-emerald-400 animate-pulse":i==="checking"?"bg-amber-400 animate-pulse":"bg-red-400"}`}),x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/40 font-medium tracking-wide uppercase",children:i==="connected"?"Connected":i==="checking"?"Connecting":"Disconnected"})]})]})]}),x.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[x.jsx(LR,{}),x.jsx("main",{className:"flex-1 overflow-auto bg-white dark:bg-[#0a0a0f] scrollbar-thin",children:x.jsx(OP,{})})]})]})}function WR(n,e){const t={};return(n[n.length-1]===""?[...n,""]:n).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const FR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,BR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,YR={};function kw(n,e){return(YR.jsx?BR:FR).test(n)}const UR=/[ \t\n\f\r]/g;function qR(n){return typeof n=="object"?n.type==="text"?Sw(n.value):!1:Sw(n)}function Sw(n){return n.replace(UR,"")===""}let hf=class{constructor(e,t,r){this.normal=t,this.property=e,r&&(this.space=r)}};hf.prototype.normal={};hf.prototype.property={};hf.prototype.space=void 0;function YP(n,e){const t={},r={};for(const i of n)Object.assign(t,i.property),Object.assign(r,i.normal);return new hf(t,r,e)}function O0(n){return n.toLowerCase()}class Cr{constructor(e,t){this.attribute=t,this.property=e}}Cr.prototype.attribute="";Cr.prototype.booleanish=!1;Cr.prototype.boolean=!1;Cr.prototype.commaOrSpaceSeparated=!1;Cr.prototype.commaSeparated=!1;Cr.prototype.defined=!1;Cr.prototype.mustUseProperty=!1;Cr.prototype.number=!1;Cr.prototype.overloadedBoolean=!1;Cr.prototype.property="";Cr.prototype.spaceSeparated=!1;Cr.prototype.space=void 0;let HR=0;const dt=$l(),kn=$l(),y0=$l(),be=$l(),qt=$l(),ku=$l(),Lr=$l();function $l(){return 2**++HR}const x0=Object.freeze(Object.defineProperty({__proto__:null,boolean:dt,booleanish:kn,commaOrSpaceSeparated:Lr,commaSeparated:ku,number:be,overloadedBoolean:y0,spaceSeparated:qt},Symbol.toStringTag,{value:"Module"})),sO=Object.keys(x0);class Yy extends Cr{constructor(e,t,r,i){let s=-1;if(super(e,t),bw(this,"space",i),typeof r=="number")for(;++s<sO.length;){const o=sO[s];bw(this,sO[s],(r&x0[o])===x0[o])}}}Yy.prototype.defined=!0;function bw(n,e,t){t&&(n[e]=t)}function nc(n){const e={},t={};for(const[r,i]of Object.entries(n.properties)){const s=new Yy(r,n.transform(n.attributes||{},r),i,n.space);n.mustUseProperty&&n.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),e[r]=s,t[O0(r)]=r,t[O0(s.attribute)]=r}return new hf(e,t,n.space)}const UP=nc({properties:{ariaActiveDescendant:null,ariaAtomic:kn,ariaAutoComplete:null,ariaBusy:kn,ariaChecked:kn,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:kn,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:kn,ariaFlowTo:qt,ariaGrabbed:kn,ariaHasPopup:null,ariaHidden:kn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:be,ariaLive:null,ariaModal:kn,ariaMultiLine:kn,ariaMultiSelectable:kn,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:kn,ariaReadOnly:kn,ariaRelevant:null,ariaRequired:kn,ariaRoleDescription:qt,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:kn,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(n,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function qP(n,e){return e in n?n[e]:e}function HP(n,e){return qP(n,e.toLowerCase())}const GR=nc({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ku,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:dt,allowPaymentRequest:dt,allowUserMedia:dt,alt:null,as:null,async:dt,autoCapitalize:null,autoComplete:qt,autoFocus:dt,autoPlay:dt,blocking:qt,capture:null,charSet:null,checked:dt,cite:null,className:qt,cols:be,colSpan:null,content:null,contentEditable:kn,controls:dt,controlsList:qt,coords:be|ku,crossOrigin:null,data:null,dateTime:null,decoding:null,default:dt,defer:dt,dir:null,dirName:null,disabled:dt,download:y0,draggable:kn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:dt,formTarget:null,headers:qt,height:be,hidden:y0,high:be,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:dt,inputMode:null,integrity:null,is:null,isMap:dt,itemId:null,itemProp:qt,itemRef:qt,itemScope:dt,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:dt,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:dt,muted:dt,name:null,nonce:null,noModule:dt,noValidate:dt,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:dt,optimum:be,pattern:null,ping:qt,placeholder:null,playsInline:dt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:dt,referrerPolicy:null,rel:qt,required:dt,reversed:dt,rows:be,rowSpan:be,sandbox:qt,scope:null,scoped:dt,seamless:dt,selected:dt,shadowRootClonable:dt,shadowRootDelegatesFocus:dt,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:kn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:dt,useMap:null,value:kn,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:dt,declare:dt,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:dt,noHref:dt,noShade:dt,noWrap:dt,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:kn,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:dt,disableRemotePlayback:dt,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:HP}),KR=nc({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",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:Lr,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:qt,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:dt,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:ku,g2:ku,glyphName:ku,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Lr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Lr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Lr,rev:Lr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Lr,requiredFeatures:Lr,requiredFonts:Lr,requiredFormats:Lr,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Lr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Lr,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Lr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:qP}),GP=nc({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,e){return"xlink:"+e.slice(5).toLowerCase()}}),KP=nc({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:HP}),JP=nc({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,e){return"xml:"+e.slice(3).toLowerCase()}}),JR={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"},e5=/[A-Z]/g,Pw=/-[a-z]/g,t5=/^data[-\w.:]+$/i;function n5(n,e){const t=O0(e);let r=e,i=Cr;if(t in n.normal)return n.property[n.normal[t]];if(t.length>4&&t.slice(0,4)==="data"&&t5.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(Pw,i5);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!Pw.test(s)){let o=s.replace(e5,r5);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=Yy}return new i(r,e)}function r5(n){return"-"+n.toLowerCase()}function i5(n){return n.charAt(1).toUpperCase()}const s5=YP([UP,GR,GP,KP,JP],"html"),Uy=YP([UP,KR,GP,KP,JP],"svg");function o5(n){return n.join(" ").trim()}var pu={},oO,Qw;function a5(){if(Qw)return oO;Qw=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,t=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
298
+ `,h="/",f="*",p="",m="comment",g="declaration";function k(C,Q){if(typeof C!="string")throw new TypeError("First argument must be a string");if(!C)return[];Q=Q||{};var $=1,E=1;function Z(oe){var ne=oe.match(e);ne&&($+=ne.length);var de=oe.lastIndexOf(c);E=~de?oe.length-de:E+oe.length}function Y(){var oe={line:$,column:E};return function(ne){return ne.position=new _(oe),G(),ne}}function _(oe){this.start=oe,this.end={line:$,column:E},this.source=Q.source}_.prototype.content=C;function R(oe){var ne=new Error(Q.source+":"+$+":"+E+": "+oe);if(ne.reason=oe,ne.filename=Q.source,ne.line=$,ne.column=E,ne.source=C,!Q.silent)throw ne}function q(oe){var ne=oe.exec(C);if(ne){var de=ne[0];return Z(de),C=C.slice(de.length),ne}}function G(){q(t)}function W(oe){var ne;for(oe=oe||[];ne=z();)ne!==!1&&oe.push(ne);return oe}function z(){var oe=Y();if(!(h!=C.charAt(0)||f!=C.charAt(1))){for(var ne=2;p!=C.charAt(ne)&&(f!=C.charAt(ne)||h!=C.charAt(ne+1));)++ne;if(ne+=2,p===C.charAt(ne-1))return R("End of comment missing");var de=C.slice(2,ne-2);return E+=2,Z(de),C=C.slice(ne),E+=2,oe({type:m,comment:de})}}function D(){var oe=Y(),ne=q(r);if(ne){if(z(),!q(i))return R("property missing ':'");var de=q(s),ke=oe({type:g,property:w(ne[0].replace(n,p)),value:de?w(de[0].replace(n,p)):p});return q(o),ke}}function se(){var oe=[];W(oe);for(var ne;ne=D();)ne!==!1&&(oe.push(ne),W(oe));return oe}return G(),se()}function w(C){return C?C.replace(l,p):p}return oO=k,oO}var Cw;function l5(){if(Cw)return pu;Cw=1;var n=pu&&pu.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(pu,"__esModule",{value:!0}),pu.default=t;const e=n(a5());function t(r,i){let s=null;if(!r||typeof r!="string")return s;const o=(0,e.default)(r),l=typeof i=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:f}=c;l?i(h,f,c):f&&(s=s||{},s[h]=f)}),s}return pu}var th={},Tw;function u5(){if(Tw)return th;Tw=1,Object.defineProperty(th,"__esModule",{value:!0}),th.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,t=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(h){return!h||t.test(h)||n.test(h)},o=function(h,f){return f.toUpperCase()},l=function(h,f){return"".concat(f,"-")},c=function(h,f){return f===void 0&&(f={}),s(h)?h:(h=h.toLowerCase(),f.reactCompat?h=h.replace(i,l):h=h.replace(r,l),h.replace(e,o))};return th.camelCase=c,th}var nh,$w;function c5(){if($w)return nh;$w=1;var n=nh&&nh.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},e=n(l5()),t=u5();function r(i,s){var o={};return!i||typeof i!="string"||(0,e.default)(i,function(l,c){l&&c&&(o[(0,t.camelCase)(l,s)]=c)}),o}return r.default=r,nh=r,nh}var h5=c5();const f5=af(h5),e2=t2("end"),qy=t2("start");function t2(n){return e;function e(t){const r=t&&t.position&&t.position[n]||{};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 d5(n){const e=qy(n),t=e2(n);if(e&&t)return{start:e,end:t}}function Qh(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?Ew(n.position):"start"in n||"end"in n?Ew(n):"line"in n||"column"in n?v0(n):""}function v0(n){return Mw(n&&n.line)+":"+Mw(n&&n.column)}function Ew(n){return v0(n&&n.start)+"-"+v0(n&&n.end)}function Mw(n){return n&&typeof n=="number"?n:1}class qn extends Error{constructor(e,t,r){super(),typeof t=="string"&&(r=t,t=void 0);let i="",s={},o=!1;if(t&&("line"in t&&"column"in t?s={place:t}:"start"in t&&"end"in t?s={place:t}:"type"in t?s={ancestors:[t],place:t.position}:s={...t}),typeof e=="string"?i=e:!s.cause&&e&&(o=!0,i=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?s.ruleId=r:(s.source=r.slice(0,c),s.ruleId=r.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=l?l.line:void 0,this.name=Qh(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}qn.prototype.file="";qn.prototype.name="";qn.prototype.reason="";qn.prototype.message="";qn.prototype.stack="";qn.prototype.column=void 0;qn.prototype.line=void 0;qn.prototype.ancestors=void 0;qn.prototype.cause=void 0;qn.prototype.fatal=void 0;qn.prototype.place=void 0;qn.prototype.ruleId=void 0;qn.prototype.source=void 0;const Hy={}.hasOwnProperty,p5=new Map,m5=/[A-Z]/g,g5=new Set(["table","tbody","thead","tfoot","tr"]),O5=new Set(["td","th"]),n2="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function y5(n,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const t=e.filePath||void 0;let r;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Q5(t,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=P5(t,e.jsx,e.jsxs)}const i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:r,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:t,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Uy:s5,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=r2(i,n,void 0);return s&&typeof s!="string"?s:i.create(n,i.Fragment,{children:s||void 0},void 0)}function r2(n,e,t){if(e.type==="element")return x5(n,e,t);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return v5(n,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return k5(n,e,t);if(e.type==="mdxjsEsm")return w5(n,e);if(e.type==="root")return S5(n,e,t);if(e.type==="text")return b5(n,e)}function x5(n,e,t){const r=n.schema;let i=r;e.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Uy,n.schema=i),n.ancestors.push(e);const s=s2(n,e.tagName,!1),o=C5(n,e);let l=Ky(n,e);return g5.has(e.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!qR(c):!0})),i2(n,o,s,e),Gy(o,l),n.ancestors.pop(),n.schema=r,n.create(e,s,o,t)}function v5(n,e){if(e.data&&e.data.estree&&n.evaluater){const r=e.data.estree.body[0];return r.type,n.evaluater.evaluateExpression(r.expression)}Xh(n,e.position)}function w5(n,e){if(e.data&&e.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(e.data.estree);Xh(n,e.position)}function k5(n,e,t){const r=n.schema;let i=r;e.name==="svg"&&r.space==="html"&&(i=Uy,n.schema=i),n.ancestors.push(e);const s=e.name===null?n.Fragment:s2(n,e.name,!0),o=T5(n,e),l=Ky(n,e);return i2(n,o,s,e),Gy(o,l),n.ancestors.pop(),n.schema=r,n.create(e,s,o,t)}function S5(n,e,t){const r={};return Gy(r,Ky(n,e)),n.create(e,n.Fragment,r,t)}function b5(n,e){return e.value}function i2(n,e,t,r){typeof t!="string"&&t!==n.Fragment&&n.passNode&&(e.node=r)}function Gy(n,e){if(e.length>0){const t=e.length>1?e:e[0];t&&(n.children=t)}}function P5(n,e,t){return r;function r(i,s,o,l){const h=Array.isArray(o.children)?t:e;return l?h(s,o,l):h(s,o)}}function Q5(n,e){return t;function t(r,i,s,o){const l=Array.isArray(s.children),c=qy(r);return e(i,s,o,l,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function C5(n,e){const t={};let r,i;for(i in e.properties)if(i!=="children"&&Hy.call(e.properties,i)){const s=$5(n,i,e.properties[i]);if(s){const[o,l]=s;n.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&O5.has(e.tagName)?r=l:t[o]=l}}if(r){const s=t.style||(t.style={});s[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return t}function T5(n,e){const t={};for(const r of e.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&n.evaluater){const s=r.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(t,n.evaluater.evaluateExpression(l.argument))}else Xh(n,e.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&n.evaluater){const l=r.value.data.estree.body[0];l.type,s=n.evaluater.evaluateExpression(l.expression)}else Xh(n,e.position);else s=r.value===null?!0:r.value;t[i]=s}return t}function Ky(n,e){const t=[];let r=-1;const i=n.passKeys?new Map:p5;for(;++r<e.children.length;){const s=e.children[r];let o;if(n.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const h=i.get(c)||0;o=c+"-"+h,i.set(c,h+1)}}const l=r2(n,s,o);l!==void 0&&t.push(l)}return t}function $5(n,e,t){const r=n5(n.schema,e);if(!(t==null||typeof t=="number"&&Number.isNaN(t))){if(Array.isArray(t)&&(t=r.commaSeparated?WR(t):o5(t)),r.property==="style"){let i=typeof t=="object"?t:E5(n,String(t));return n.stylePropertyNameCase==="css"&&(i=M5(i)),["style",i]}return[n.elementAttributeNameCase==="react"&&r.space?JR[r.property]||r.property:r.attribute,t]}}function E5(n,e){try{return f5(e,{reactCompat:!0})}catch(t){if(n.ignoreInvalidStyle)return{};const r=t,i=new qn("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=n.filePath||void 0,i.url=n2+"#cannot-parse-style-attribute",i}}function s2(n,e,t){let r;if(!t)r={type:"Literal",value:e};else if(e.includes(".")){const i=e.split(".");let s=-1,o;for(;++s<i.length;){const l=kw(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}r=o}else r=kw(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(r.type==="Literal"){const i=r.value;return Hy.call(n.components,i)?n.components[i]:i}if(n.evaluater)return n.evaluater.evaluateExpression(r);Xh(n)}function Xh(n,e){const t=new qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw t.file=n.filePath||void 0,t.url=n2+"#cannot-handle-mdx-estrees-without-createevaluater",t}function M5(n){const e={};let t;for(t in n)Hy.call(n,t)&&(e[j5(t)]=n[t]);return e}function j5(n){let e=n.replace(m5,R5);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function R5(n){return"-"+n.toLowerCase()}const aO={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"]},N5={};function A5(n,e){const t=N5,r=typeof t.includeImageAlt=="boolean"?t.includeImageAlt:!0,i=typeof t.includeHtml=="boolean"?t.includeHtml:!0;return o2(n,r,i)}function o2(n,e,t){if(_5(n)){if("value"in n)return n.type==="html"&&!t?"":n.value;if(e&&"alt"in n&&n.alt)return n.alt;if("children"in n)return jw(n.children,e,t)}return Array.isArray(n)?jw(n,e,t):""}function jw(n,e,t){const r=[];let i=-1;for(;++i<n.length;)r[i]=o2(n[i],e,t);return r.join("")}function _5(n){return!!(n&&typeof n=="object")}const Rw=document.createElement("i");function Jy(n){const e="&"+n+";";Rw.innerHTML=e;const t=Rw.textContent;return t.charCodeAt(t.length-1)===59&&n!=="semi"||t===e?!1:t}function vs(n,e,t,r){const i=n.length;let s=0,o;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,t=t>0?t:0,r.length<1e4)o=Array.from(r),o.unshift(e,t),n.splice(...o);else for(t&&n.splice(e,t);s<r.length;)o=r.slice(s,s+1e4),o.unshift(e,0),n.splice(...o),s+=1e4,e+=1e4}function ci(n,e){return n.length>0?(vs(n,n.length,0,e),n):e}const Nw={}.hasOwnProperty;function z5(n){const e={};let t=-1;for(;++t<n.length;)D5(e,n[t]);return e}function D5(n,e){let t;for(t in e){const i=(Nw.call(n,t)?n[t]:void 0)||(n[t]={}),s=e[t];let o;if(s)for(o in s){Nw.call(i,o)||(i[o]=[]);const l=s[o];L5(i[o],Array.isArray(l)?l:l?[l]:[])}}}function L5(n,e){let t=-1;const r=[];for(;++t<e.length;)(e[t].add==="after"?n:r).push(e[t]);vs(n,0,0,r)}function a2(n,e){const t=Number.parseInt(n,e);return t<9||t===11||t>13&&t<32||t>126&&t<160||t>55295&&t<57344||t>64975&&t<65008||(t&65535)===65535||(t&65535)===65534||t>1114111?"�":String.fromCodePoint(t)}function Su(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const fs=ya(/[A-Za-z]/),Fr=ya(/[\dA-Za-z]/),I5=ya(/[#-'*+\--9=?A-Z^-~]/);function w0(n){return n!==null&&(n<32||n===127)}const k0=ya(/\d/),Z5=ya(/[\dA-Fa-f]/),X5=ya(/[!-/:-@[-`{-~]/);function ut(n){return n!==null&&n<-2}function br(n){return n!==null&&(n<0||n===32)}function Dt(n){return n===-2||n===-1||n===32}const V5=ya(new RegExp("\\p{P}|\\p{S}","u")),W5=ya(/\s/);function ya(n){return e;function e(t){return t!==null&&t>-1&&n.test(String.fromCharCode(t))}}function rc(n){const e=[];let t=-1,r=0,i=0;for(;++t<n.length;){const s=n.charCodeAt(t);let o="";if(s===37&&Fr(n.charCodeAt(t+1))&&Fr(n.charCodeAt(t+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const l=n.charCodeAt(t+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),i=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(n.slice(r,t),encodeURIComponent(o)),r=t+i+1,o=""),i&&(t+=i,i=0)}return e.join("")+n.slice(r)}function Gt(n,e,t,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(c){return Dt(c)?(n.enter(t),l(c)):e(c)}function l(c){return Dt(c)&&s++<i?(n.consume(c),l):(n.exit(t),e(c))}}const F5={tokenize:B5};function B5(n){const e=n.attempt(this.parser.constructs.contentInitial,r,i);let t;return e;function r(l){if(l===null){n.consume(l);return}return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Gt(n,e,"linePrefix")}function i(l){return n.enter("paragraph"),s(l)}function s(l){const c=n.enter("chunkText",{contentType:"text",previous:t});return t&&(t.next=c),t=c,o(l)}function o(l){if(l===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(l);return}return ut(l)?(n.consume(l),n.exit("chunkText"),s):(n.consume(l),o)}}const Y5={tokenize:U5},Aw={tokenize:q5};function U5(n){const e=this,t=[];let r=0,i,s,o;return l;function l(E){if(r<t.length){const Z=t[r];return e.containerState=Z[1],n.attempt(Z[0].continuation,c,h)(E)}return h(E)}function c(E){if(r++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&$();const Z=e.events.length;let Y=Z,_;for(;Y--;)if(e.events[Y][0]==="exit"&&e.events[Y][1].type==="chunkFlow"){_=e.events[Y][1].end;break}Q(r);let R=Z;for(;R<e.events.length;)e.events[R][1].end={..._},R++;return vs(e.events,Y+1,0,e.events.slice(Z)),e.events.length=R,h(E)}return l(E)}function h(E){if(r===t.length){if(!i)return m(E);if(i.currentConstruct&&i.currentConstruct.concrete)return k(E);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},n.check(Aw,f,p)(E)}function f(E){return i&&$(),Q(r),m(E)}function p(E){return e.parser.lazy[e.now().line]=r!==t.length,o=e.now().offset,k(E)}function m(E){return e.containerState={},n.attempt(Aw,g,k)(E)}function g(E){return r++,t.push([e.currentConstruct,e.containerState]),m(E)}function k(E){if(E===null){i&&$(),Q(0),n.consume(E);return}return i=i||e.parser.flow(e.now()),n.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),w(E)}function w(E){if(E===null){C(n.exit("chunkFlow"),!0),Q(0),n.consume(E);return}return ut(E)?(n.consume(E),C(n.exit("chunkFlow")),r=0,e.interrupt=void 0,l):(n.consume(E),w)}function C(E,Z){const Y=e.sliceStream(E);if(Z&&Y.push(null),E.previous=s,s&&(s.next=E),s=E,i.defineSkip(E.start),i.write(Y),e.parser.lazy[E.start.line]){let _=i.events.length;for(;_--;)if(i.events[_][1].start.offset<o&&(!i.events[_][1].end||i.events[_][1].end.offset>o))return;const R=e.events.length;let q=R,G,W;for(;q--;)if(e.events[q][0]==="exit"&&e.events[q][1].type==="chunkFlow"){if(G){W=e.events[q][1].end;break}G=!0}for(Q(r),_=R;_<e.events.length;)e.events[_][1].end={...W},_++;vs(e.events,q+1,0,e.events.slice(R)),e.events.length=_}}function Q(E){let Z=t.length;for(;Z-- >E;){const Y=t[Z];e.containerState=Y[1],Y[0].exit.call(e,n)}t.length=E}function $(){i.write([null]),s=void 0,i=void 0,e.containerState._closeFlow=void 0}}function q5(n,e,t){return Gt(n,n.attempt(this.parser.constructs.document,e,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function _w(n){if(n===null||br(n)||W5(n))return 1;if(V5(n))return 2}function ex(n,e,t){const r=[];let i=-1;for(;++i<n.length;){const s=n[i].resolveAll;s&&!r.includes(s)&&(e=s(e,t),r.push(s))}return e}const S0={name:"attention",resolveAll:H5,tokenize:G5};function H5(n,e){let t=-1,r,i,s,o,l,c,h,f;for(;++t<n.length;)if(n[t][0]==="enter"&&n[t][1].type==="attentionSequence"&&n[t][1]._close){for(r=t;r--;)if(n[r][0]==="exit"&&n[r][1].type==="attentionSequence"&&n[r][1]._open&&e.sliceSerialize(n[r][1]).charCodeAt(0)===e.sliceSerialize(n[t][1]).charCodeAt(0)){if((n[r][1]._close||n[t][1]._open)&&(n[t][1].end.offset-n[t][1].start.offset)%3&&!((n[r][1].end.offset-n[r][1].start.offset+n[t][1].end.offset-n[t][1].start.offset)%3))continue;c=n[r][1].end.offset-n[r][1].start.offset>1&&n[t][1].end.offset-n[t][1].start.offset>1?2:1;const p={...n[r][1].end},m={...n[t][1].start};zw(p,-c),zw(m,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...n[r][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...n[t][1].start},end:m},s={type:c>1?"strongText":"emphasisText",start:{...n[r][1].end},end:{...n[t][1].start}},i={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},n[r][1].end={...o.start},n[t][1].start={...l.end},h=[],n[r][1].end.offset-n[r][1].start.offset&&(h=ci(h,[["enter",n[r][1],e],["exit",n[r][1],e]])),h=ci(h,[["enter",i,e],["enter",o,e],["exit",o,e],["enter",s,e]]),h=ci(h,ex(e.parser.constructs.insideSpan.null,n.slice(r+1,t),e)),h=ci(h,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",i,e]]),n[t][1].end.offset-n[t][1].start.offset?(f=2,h=ci(h,[["enter",n[t][1],e],["exit",n[t][1],e]])):f=0,vs(n,r-1,t-r+3,h),t=r+h.length-f-2;break}}for(t=-1;++t<n.length;)n[t][1].type==="attentionSequence"&&(n[t][1].type="data");return n}function G5(n,e){const t=this.parser.constructs.attentionMarkers.null,r=this.previous,i=_w(r);let s;return o;function o(c){return s=c,n.enter("attentionSequence"),l(c)}function l(c){if(c===s)return n.consume(c),l;const h=n.exit("attentionSequence"),f=_w(c),p=!f||f===2&&i||t.includes(c),m=!i||i===2&&f||t.includes(r);return h._open=!!(s===42?p:p&&(i||!m)),h._close=!!(s===42?m:m&&(f||!p)),e(c)}}function zw(n,e){n.column+=e,n.offset+=e,n._bufferIndex+=e}const K5={name:"autolink",tokenize:J5};function J5(n,e,t){let r=0;return i;function i(g){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),s}function s(g){return fs(g)?(n.consume(g),o):g===64?t(g):h(g)}function o(g){return g===43||g===45||g===46||Fr(g)?(r=1,l(g)):h(g)}function l(g){return g===58?(n.consume(g),r=0,c):(g===43||g===45||g===46||Fr(g))&&r++<32?(n.consume(g),l):(r=0,h(g))}function c(g){return g===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.exit("autolink"),e):g===null||g===32||g===60||w0(g)?t(g):(n.consume(g),c)}function h(g){return g===64?(n.consume(g),f):I5(g)?(n.consume(g),h):t(g)}function f(g){return Fr(g)?p(g):t(g)}function p(g){return g===46?(n.consume(g),r=0,f):g===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(g),n.exit("autolinkMarker"),n.exit("autolink"),e):m(g)}function m(g){if((g===45||Fr(g))&&r++<63){const k=g===45?m:p;return n.consume(g),k}return t(g)}}const Jp={partial:!0,tokenize:eN};function eN(n,e,t){return r;function r(s){return Dt(s)?Gt(n,i,"linePrefix")(s):i(s)}function i(s){return s===null||ut(s)?e(s):t(s)}}const l2={continuation:{tokenize:nN},exit:rN,name:"blockQuote",tokenize:tN};function tN(n,e,t){const r=this;return i;function i(o){if(o===62){const l=r.containerState;return l.open||(n.enter("blockQuote",{_container:!0}),l.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(o),n.exit("blockQuoteMarker"),s}return t(o)}function s(o){return Dt(o)?(n.enter("blockQuotePrefixWhitespace"),n.consume(o),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),e):(n.exit("blockQuotePrefix"),e(o))}}function nN(n,e,t){const r=this;return i;function i(o){return Dt(o)?Gt(n,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return n.attempt(l2,e,t)(o)}}function rN(n){n.exit("blockQuote")}const u2={name:"characterEscape",tokenize:iN};function iN(n,e,t){return r;function r(s){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(s),n.exit("escapeMarker"),i}function i(s){return X5(s)?(n.enter("characterEscapeValue"),n.consume(s),n.exit("characterEscapeValue"),n.exit("characterEscape"),e):t(s)}}const c2={name:"characterReference",tokenize:sN};function sN(n,e,t){const r=this;let i=0,s,o;return l;function l(p){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),c}function c(p){return p===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(p),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),s=31,o=Fr,f(p))}function h(p){return p===88||p===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(p),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),s=6,o=Z5,f):(n.enter("characterReferenceValue"),s=7,o=k0,f(p))}function f(p){if(p===59&&i){const m=n.exit("characterReferenceValue");return o===Fr&&!Jy(r.sliceSerialize(m))?t(p):(n.enter("characterReferenceMarker"),n.consume(p),n.exit("characterReferenceMarker"),n.exit("characterReference"),e)}return o(p)&&i++<s?(n.consume(p),f):t(p)}}const Dw={partial:!0,tokenize:aN},Lw={concrete:!0,name:"codeFenced",tokenize:oN};function oN(n,e,t){const r=this,i={partial:!0,tokenize:Y};let s=0,o=0,l;return c;function c(_){return h(_)}function h(_){const R=r.events[r.events.length-1];return s=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,l=_,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),f(_)}function f(_){return _===l?(o++,n.consume(_),f):o<3?t(_):(n.exit("codeFencedFenceSequence"),Dt(_)?Gt(n,p,"whitespace")(_):p(_))}function p(_){return _===null||ut(_)?(n.exit("codeFencedFence"),r.interrupt?e(_):n.check(Dw,w,Z)(_)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),m(_))}function m(_){return _===null||ut(_)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),p(_)):Dt(_)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Gt(n,g,"whitespace")(_)):_===96&&_===l?t(_):(n.consume(_),m)}function g(_){return _===null||ut(_)?p(_):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),k(_))}function k(_){return _===null||ut(_)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),p(_)):_===96&&_===l?t(_):(n.consume(_),k)}function w(_){return n.attempt(i,Z,C)(_)}function C(_){return n.enter("lineEnding"),n.consume(_),n.exit("lineEnding"),Q}function Q(_){return s>0&&Dt(_)?Gt(n,$,"linePrefix",s+1)(_):$(_)}function $(_){return _===null||ut(_)?n.check(Dw,w,Z)(_):(n.enter("codeFlowValue"),E(_))}function E(_){return _===null||ut(_)?(n.exit("codeFlowValue"),$(_)):(n.consume(_),E)}function Z(_){return n.exit("codeFenced"),e(_)}function Y(_,R,q){let G=0;return W;function W(ne){return _.enter("lineEnding"),_.consume(ne),_.exit("lineEnding"),z}function z(ne){return _.enter("codeFencedFence"),Dt(ne)?Gt(_,D,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ne):D(ne)}function D(ne){return ne===l?(_.enter("codeFencedFenceSequence"),se(ne)):q(ne)}function se(ne){return ne===l?(G++,_.consume(ne),se):G>=o?(_.exit("codeFencedFenceSequence"),Dt(ne)?Gt(_,oe,"whitespace")(ne):oe(ne)):q(ne)}function oe(ne){return ne===null||ut(ne)?(_.exit("codeFencedFence"),R(ne)):q(ne)}}}function aN(n,e,t){const r=this;return i;function i(o){return o===null?t(o):(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),s)}function s(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}const lO={name:"codeIndented",tokenize:uN},lN={partial:!0,tokenize:cN};function uN(n,e,t){const r=this;return i;function i(h){return n.enter("codeIndented"),Gt(n,s,"linePrefix",5)(h)}function s(h){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?o(h):t(h)}function o(h){return h===null?c(h):ut(h)?n.attempt(lN,o,c)(h):(n.enter("codeFlowValue"),l(h))}function l(h){return h===null||ut(h)?(n.exit("codeFlowValue"),o(h)):(n.consume(h),l)}function c(h){return n.exit("codeIndented"),e(h)}}function cN(n,e,t){const r=this;return i;function i(o){return r.parser.lazy[r.now().line]?t(o):ut(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),i):Gt(n,s,"linePrefix",5)(o)}function s(o){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):ut(o)?i(o):t(o)}}const hN={name:"codeText",previous:dN,resolve:fN,tokenize:pN};function fN(n){let e=n.length-4,t=3,r,i;if((n[t][1].type==="lineEnding"||n[t][1].type==="space")&&(n[e][1].type==="lineEnding"||n[e][1].type==="space")){for(r=t;++r<e;)if(n[r][1].type==="codeTextData"){n[t][1].type="codeTextPadding",n[e][1].type="codeTextPadding",t+=2,e-=2;break}}for(r=t-1,e++;++r<=e;)i===void 0?r!==e&&n[r][1].type!=="lineEnding"&&(i=r):(r===e||n[r][1].type==="lineEnding")&&(n[i][1].type="codeTextData",r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),e-=r-i-2,r=i+2),i=void 0);return n}function dN(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pN(n,e,t){let r=0,i,s;return o;function o(p){return n.enter("codeText"),n.enter("codeTextSequence"),l(p)}function l(p){return p===96?(n.consume(p),r++,l):(n.exit("codeTextSequence"),c(p))}function c(p){return p===null?t(p):p===32?(n.enter("space"),n.consume(p),n.exit("space"),c):p===96?(s=n.enter("codeTextSequence"),i=0,f(p)):ut(p)?(n.enter("lineEnding"),n.consume(p),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||ut(p)?(n.exit("codeTextData"),c(p)):(n.consume(p),h)}function f(p){return p===96?(n.consume(p),i++,f):i===r?(n.exit("codeTextSequence"),n.exit("codeText"),e(p)):(s.type="codeTextData",h(p))}}class mN{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){const r=t??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(e,r):e>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(e,t,r){const i=t||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&rh(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),rh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),rh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const t=this.left.splice(e,Number.POSITIVE_INFINITY);rh(this.right,t.reverse())}else{const t=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);rh(this.left,t.reverse())}}}function rh(n,e){let t=0;if(e.length<1e4)n.push(...e);else for(;t<e.length;)n.push(...e.slice(t,t+1e4)),t+=1e4}function h2(n){const e={};let t=-1,r,i,s,o,l,c,h;const f=new mN(n);for(;++t<f.length;){for(;t in e;)t=e[t];if(r=f.get(t),t&&r[1].type==="chunkFlow"&&f.get(t-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(e,gN(f,t)),t=e[t],h=!0);else if(r[1]._container){for(s=t,i=void 0;s--;)if(o=f.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),o[1].type="lineEnding",i=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},l=f.slice(i,t),l.unshift(r),f.splice(i,t-i+1,l))}}return vs(n,0,Number.POSITIVE_INFINITY,f.slice(0)),!h}function gN(n,e){const t=n.get(e)[1],r=n.get(e)[2];let i=e-1;const s=[];let o=t._tokenizer;o||(o=r.parser[t.contentType](t.start),t._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],h={};let f,p,m=-1,g=t,k=0,w=0;const C=[w];for(;g;){for(;n.get(++i)[1]!==g;);s.push(i),g._tokenizer||(f=r.sliceStream(g),g.next||f.push(null),p&&o.defineSkip(g.start),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(f),g._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=g,g=g.next}for(g=t;++m<l.length;)l[m][0]==="exit"&&l[m-1][0]==="enter"&&l[m][1].type===l[m-1][1].type&&l[m][1].start.line!==l[m][1].end.line&&(w=m+1,C.push(w),g._tokenizer=void 0,g.previous=void 0,g=g.next);for(o.events=[],g?(g._tokenizer=void 0,g.previous=void 0):C.pop(),m=C.length;m--;){const Q=l.slice(C[m],C[m+1]),$=s.pop();c.push([$,$+Q.length-1]),n.splice($,2,Q)}for(c.reverse(),m=-1;++m<c.length;)h[k+c[m][0]]=k+c[m][1],k+=c[m][1]-c[m][0]-1;return h}const ON={resolve:xN,tokenize:vN},yN={partial:!0,tokenize:wN};function xN(n){return h2(n),n}function vN(n,e){let t;return r;function r(l){return n.enter("content"),t=n.enter("chunkContent",{contentType:"content"}),i(l)}function i(l){return l===null?s(l):ut(l)?n.check(yN,o,s)(l):(n.consume(l),i)}function s(l){return n.exit("chunkContent"),n.exit("content"),e(l)}function o(l){return n.consume(l),n.exit("chunkContent"),t.next=n.enter("chunkContent",{contentType:"content",previous:t}),t=t.next,i}}function wN(n,e,t){const r=this;return i;function i(o){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Gt(n,s,"linePrefix")}function s(o){if(o===null||ut(o))return t(o);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):n.interrupt(r.parser.constructs.flow,t,e)(o)}}function f2(n,e,t,r,i,s,o,l,c){const h=c||Number.POSITIVE_INFINITY;let f=0;return p;function p(Q){return Q===60?(n.enter(r),n.enter(i),n.enter(s),n.consume(Q),n.exit(s),m):Q===null||Q===32||Q===41||w0(Q)?t(Q):(n.enter(r),n.enter(o),n.enter(l),n.enter("chunkString",{contentType:"string"}),w(Q))}function m(Q){return Q===62?(n.enter(s),n.consume(Q),n.exit(s),n.exit(i),n.exit(r),e):(n.enter(l),n.enter("chunkString",{contentType:"string"}),g(Q))}function g(Q){return Q===62?(n.exit("chunkString"),n.exit(l),m(Q)):Q===null||Q===60||ut(Q)?t(Q):(n.consume(Q),Q===92?k:g)}function k(Q){return Q===60||Q===62||Q===92?(n.consume(Q),g):g(Q)}function w(Q){return!f&&(Q===null||Q===41||br(Q))?(n.exit("chunkString"),n.exit(l),n.exit(o),n.exit(r),e(Q)):f<h&&Q===40?(n.consume(Q),f++,w):Q===41?(n.consume(Q),f--,w):Q===null||Q===32||Q===40||w0(Q)?t(Q):(n.consume(Q),Q===92?C:w)}function C(Q){return Q===40||Q===41||Q===92?(n.consume(Q),w):w(Q)}}function d2(n,e,t,r,i,s){const o=this;let l=0,c;return h;function h(g){return n.enter(r),n.enter(i),n.consume(g),n.exit(i),n.enter(s),f}function f(g){return l>999||g===null||g===91||g===93&&!c||g===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?t(g):g===93?(n.exit(s),n.enter(i),n.consume(g),n.exit(i),n.exit(r),e):ut(g)?(n.enter("lineEnding"),n.consume(g),n.exit("lineEnding"),f):(n.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===null||g===91||g===93||ut(g)||l++>999?(n.exit("chunkString"),f(g)):(n.consume(g),c||(c=!Dt(g)),g===92?m:p)}function m(g){return g===91||g===92||g===93?(n.consume(g),l++,p):p(g)}}function p2(n,e,t,r,i,s){let o;return l;function l(m){return m===34||m===39||m===40?(n.enter(r),n.enter(i),n.consume(m),n.exit(i),o=m===40?41:m,c):t(m)}function c(m){return m===o?(n.enter(i),n.consume(m),n.exit(i),n.exit(r),e):(n.enter(s),h(m))}function h(m){return m===o?(n.exit(s),c(o)):m===null?t(m):ut(m)?(n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),Gt(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===o||m===null||ut(m)?(n.exit("chunkString"),h(m)):(n.consume(m),m===92?p:f)}function p(m){return m===o||m===92?(n.consume(m),f):f(m)}}function Ch(n,e){let t;return r;function r(i){return ut(i)?(n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),t=!0,r):Dt(i)?Gt(n,r,t?"linePrefix":"lineSuffix")(i):e(i)}}const kN={name:"definition",tokenize:bN},SN={partial:!0,tokenize:PN};function bN(n,e,t){const r=this;let i;return s;function s(g){return n.enter("definition"),o(g)}function o(g){return d2.call(r,n,l,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(g)}function l(g){return i=Su(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),g===58?(n.enter("definitionMarker"),n.consume(g),n.exit("definitionMarker"),c):t(g)}function c(g){return br(g)?Ch(n,h)(g):h(g)}function h(g){return f2(n,f,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(g)}function f(g){return n.attempt(SN,p,p)(g)}function p(g){return Dt(g)?Gt(n,m,"whitespace")(g):m(g)}function m(g){return g===null||ut(g)?(n.exit("definition"),r.parser.defined.push(i),e(g)):t(g)}}function PN(n,e,t){return r;function r(l){return br(l)?Ch(n,i)(l):t(l)}function i(l){return p2(n,s,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Dt(l)?Gt(n,o,"whitespace")(l):o(l)}function o(l){return l===null||ut(l)?e(l):t(l)}}const QN={name:"hardBreakEscape",tokenize:CN};function CN(n,e,t){return r;function r(s){return n.enter("hardBreakEscape"),n.consume(s),i}function i(s){return ut(s)?(n.exit("hardBreakEscape"),e(s)):t(s)}}const TN={name:"headingAtx",resolve:$N,tokenize:EN};function $N(n,e){let t=n.length-2,r=3,i,s;return n[r][1].type==="whitespace"&&(r+=2),t-2>r&&n[t][1].type==="whitespace"&&(t-=2),n[t][1].type==="atxHeadingSequence"&&(r===t-1||t-4>r&&n[t-2][1].type==="whitespace")&&(t-=r+1===t?2:4),t>r&&(i={type:"atxHeadingText",start:n[r][1].start,end:n[t][1].end},s={type:"chunkText",start:n[r][1].start,end:n[t][1].end,contentType:"text"},vs(n,r,t-r+1,[["enter",i,e],["enter",s,e],["exit",s,e],["exit",i,e]])),n}function EN(n,e,t){let r=0;return i;function i(f){return n.enter("atxHeading"),s(f)}function s(f){return n.enter("atxHeadingSequence"),o(f)}function o(f){return f===35&&r++<6?(n.consume(f),o):f===null||br(f)?(n.exit("atxHeadingSequence"),l(f)):t(f)}function l(f){return f===35?(n.enter("atxHeadingSequence"),c(f)):f===null||ut(f)?(n.exit("atxHeading"),e(f)):Dt(f)?Gt(n,l,"whitespace")(f):(n.enter("atxHeadingText"),h(f))}function c(f){return f===35?(n.consume(f),c):(n.exit("atxHeadingSequence"),l(f))}function h(f){return f===null||f===35||br(f)?(n.exit("atxHeadingText"),l(f)):(n.consume(f),h)}}const MN=["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"],Iw=["pre","script","style","textarea"],jN={concrete:!0,name:"htmlFlow",resolveTo:AN,tokenize:_N},RN={partial:!0,tokenize:DN},NN={partial:!0,tokenize:zN};function AN(n){let e=n.length;for(;e--&&!(n[e][0]==="enter"&&n[e][1].type==="htmlFlow"););return e>1&&n[e-2][1].type==="linePrefix"&&(n[e][1].start=n[e-2][1].start,n[e+1][1].start=n[e-2][1].start,n.splice(e-2,2)),n}function _N(n,e,t){const r=this;let i,s,o,l,c;return h;function h(L){return f(L)}function f(L){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(L),p}function p(L){return L===33?(n.consume(L),m):L===47?(n.consume(L),s=!0,w):L===63?(n.consume(L),i=3,r.interrupt?e:N):fs(L)?(n.consume(L),o=String.fromCharCode(L),C):t(L)}function m(L){return L===45?(n.consume(L),i=2,g):L===91?(n.consume(L),i=5,l=0,k):fs(L)?(n.consume(L),i=4,r.interrupt?e:N):t(L)}function g(L){return L===45?(n.consume(L),r.interrupt?e:N):t(L)}function k(L){const Re="CDATA[";return L===Re.charCodeAt(l++)?(n.consume(L),l===Re.length?r.interrupt?e:D:k):t(L)}function w(L){return fs(L)?(n.consume(L),o=String.fromCharCode(L),C):t(L)}function C(L){if(L===null||L===47||L===62||br(L)){const Re=L===47,_e=o.toLowerCase();return!Re&&!s&&Iw.includes(_e)?(i=1,r.interrupt?e(L):D(L)):MN.includes(o.toLowerCase())?(i=6,Re?(n.consume(L),Q):r.interrupt?e(L):D(L)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(L):s?$(L):E(L))}return L===45||Fr(L)?(n.consume(L),o+=String.fromCharCode(L),C):t(L)}function Q(L){return L===62?(n.consume(L),r.interrupt?e:D):t(L)}function $(L){return Dt(L)?(n.consume(L),$):W(L)}function E(L){return L===47?(n.consume(L),W):L===58||L===95||fs(L)?(n.consume(L),Z):Dt(L)?(n.consume(L),E):W(L)}function Z(L){return L===45||L===46||L===58||L===95||Fr(L)?(n.consume(L),Z):Y(L)}function Y(L){return L===61?(n.consume(L),_):Dt(L)?(n.consume(L),Y):E(L)}function _(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(n.consume(L),c=L,R):Dt(L)?(n.consume(L),_):q(L)}function R(L){return L===c?(n.consume(L),c=null,G):L===null||ut(L)?t(L):(n.consume(L),R)}function q(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||br(L)?Y(L):(n.consume(L),q)}function G(L){return L===47||L===62||Dt(L)?E(L):t(L)}function W(L){return L===62?(n.consume(L),z):t(L)}function z(L){return L===null||ut(L)?D(L):Dt(L)?(n.consume(L),z):t(L)}function D(L){return L===45&&i===2?(n.consume(L),de):L===60&&i===1?(n.consume(L),ke):L===62&&i===4?(n.consume(L),U):L===63&&i===3?(n.consume(L),N):L===93&&i===5?(n.consume(L),ye):ut(L)&&(i===6||i===7)?(n.exit("htmlFlowData"),n.check(RN,ue,se)(L)):L===null||ut(L)?(n.exit("htmlFlowData"),se(L)):(n.consume(L),D)}function se(L){return n.check(NN,oe,ue)(L)}function oe(L){return n.enter("lineEnding"),n.consume(L),n.exit("lineEnding"),ne}function ne(L){return L===null||ut(L)?se(L):(n.enter("htmlFlowData"),D(L))}function de(L){return L===45?(n.consume(L),N):D(L)}function ke(L){return L===47?(n.consume(L),o="",he):D(L)}function he(L){if(L===62){const Re=o.toLowerCase();return Iw.includes(Re)?(n.consume(L),U):D(L)}return fs(L)&&o.length<8?(n.consume(L),o+=String.fromCharCode(L),he):D(L)}function ye(L){return L===93?(n.consume(L),N):D(L)}function N(L){return L===62?(n.consume(L),U):L===45&&i===2?(n.consume(L),N):D(L)}function U(L){return L===null||ut(L)?(n.exit("htmlFlowData"),ue(L)):(n.consume(L),U)}function ue(L){return n.exit("htmlFlow"),e(L)}}function zN(n,e,t){const r=this;return i;function i(o){return ut(o)?(n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),s):t(o)}function s(o){return r.parser.lazy[r.now().line]?t(o):e(o)}}function DN(n,e,t){return r;function r(i){return n.enter("lineEnding"),n.consume(i),n.exit("lineEnding"),n.attempt(Jp,e,t)}}const LN={name:"htmlText",tokenize:IN};function IN(n,e,t){const r=this;let i,s,o;return l;function l(N){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(N),c}function c(N){return N===33?(n.consume(N),h):N===47?(n.consume(N),Y):N===63?(n.consume(N),E):fs(N)?(n.consume(N),q):t(N)}function h(N){return N===45?(n.consume(N),f):N===91?(n.consume(N),s=0,k):fs(N)?(n.consume(N),$):t(N)}function f(N){return N===45?(n.consume(N),g):t(N)}function p(N){return N===null?t(N):N===45?(n.consume(N),m):ut(N)?(o=p,ke(N)):(n.consume(N),p)}function m(N){return N===45?(n.consume(N),g):p(N)}function g(N){return N===62?de(N):N===45?m(N):p(N)}function k(N){const U="CDATA[";return N===U.charCodeAt(s++)?(n.consume(N),s===U.length?w:k):t(N)}function w(N){return N===null?t(N):N===93?(n.consume(N),C):ut(N)?(o=w,ke(N)):(n.consume(N),w)}function C(N){return N===93?(n.consume(N),Q):w(N)}function Q(N){return N===62?de(N):N===93?(n.consume(N),Q):w(N)}function $(N){return N===null||N===62?de(N):ut(N)?(o=$,ke(N)):(n.consume(N),$)}function E(N){return N===null?t(N):N===63?(n.consume(N),Z):ut(N)?(o=E,ke(N)):(n.consume(N),E)}function Z(N){return N===62?de(N):E(N)}function Y(N){return fs(N)?(n.consume(N),_):t(N)}function _(N){return N===45||Fr(N)?(n.consume(N),_):R(N)}function R(N){return ut(N)?(o=R,ke(N)):Dt(N)?(n.consume(N),R):de(N)}function q(N){return N===45||Fr(N)?(n.consume(N),q):N===47||N===62||br(N)?G(N):t(N)}function G(N){return N===47?(n.consume(N),de):N===58||N===95||fs(N)?(n.consume(N),W):ut(N)?(o=G,ke(N)):Dt(N)?(n.consume(N),G):de(N)}function W(N){return N===45||N===46||N===58||N===95||Fr(N)?(n.consume(N),W):z(N)}function z(N){return N===61?(n.consume(N),D):ut(N)?(o=z,ke(N)):Dt(N)?(n.consume(N),z):G(N)}function D(N){return N===null||N===60||N===61||N===62||N===96?t(N):N===34||N===39?(n.consume(N),i=N,se):ut(N)?(o=D,ke(N)):Dt(N)?(n.consume(N),D):(n.consume(N),oe)}function se(N){return N===i?(n.consume(N),i=void 0,ne):N===null?t(N):ut(N)?(o=se,ke(N)):(n.consume(N),se)}function oe(N){return N===null||N===34||N===39||N===60||N===61||N===96?t(N):N===47||N===62||br(N)?G(N):(n.consume(N),oe)}function ne(N){return N===47||N===62||br(N)?G(N):t(N)}function de(N){return N===62?(n.consume(N),n.exit("htmlTextData"),n.exit("htmlText"),e):t(N)}function ke(N){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(N),n.exit("lineEnding"),he}function he(N){return Dt(N)?Gt(n,ye,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ye(N)}function ye(N){return n.enter("htmlTextData"),o(N)}}const tx={name:"labelEnd",resolveAll:WN,resolveTo:FN,tokenize:BN},ZN={tokenize:YN},XN={tokenize:UN},VN={tokenize:qN};function WN(n){let e=-1;const t=[];for(;++e<n.length;){const r=n[e][1];if(t.push(n[e]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",e+=i}}return n.length!==t.length&&vs(n,0,n.length,t),n}function FN(n,e){let t=n.length,r=0,i,s,o,l;for(;t--;)if(i=n[t][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;n[t][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(o){if(n[t][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=t,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(o=t);const c={type:n[s][1].type==="labelLink"?"link":"image",start:{...n[s][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[s][1].start},end:{...n[o][1].end}},f={type:"labelText",start:{...n[s+r+2][1].end},end:{...n[o-2][1].start}};return l=[["enter",c,e],["enter",h,e]],l=ci(l,n.slice(s+1,s+r+3)),l=ci(l,[["enter",f,e]]),l=ci(l,ex(e.parser.constructs.insideSpan.null,n.slice(s+r+4,o-3),e)),l=ci(l,[["exit",f,e],n[o-2],n[o-1],["exit",h,e]]),l=ci(l,n.slice(o+1)),l=ci(l,[["exit",c,e]]),vs(n,s,n.length,l),n}function BN(n,e,t){const r=this;let i=r.events.length,s,o;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return l;function l(m){return s?s._inactive?p(m):(o=r.parser.defined.includes(Su(r.sliceSerialize({start:s.end,end:r.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(m),n.exit("labelMarker"),n.exit("labelEnd"),c):t(m)}function c(m){return m===40?n.attempt(ZN,f,o?f:p)(m):m===91?n.attempt(XN,f,o?h:p)(m):o?f(m):p(m)}function h(m){return n.attempt(VN,f,p)(m)}function f(m){return e(m)}function p(m){return s._balanced=!0,t(m)}}function YN(n,e,t){return r;function r(p){return n.enter("resource"),n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),i}function i(p){return br(p)?Ch(n,s)(p):s(p)}function s(p){return p===41?f(p):f2(n,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return br(p)?Ch(n,c)(p):f(p)}function l(p){return t(p)}function c(p){return p===34||p===39||p===40?p2(n,h,t,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):f(p)}function h(p){return br(p)?Ch(n,f)(p):f(p)}function f(p){return p===41?(n.enter("resourceMarker"),n.consume(p),n.exit("resourceMarker"),n.exit("resource"),e):t(p)}}function UN(n,e,t){const r=this;return i;function i(l){return d2.call(r,n,s,o,"reference","referenceMarker","referenceString")(l)}function s(l){return r.parser.defined.includes(Su(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?e(l):t(l)}function o(l){return t(l)}}function qN(n,e,t){return r;function r(s){return n.enter("reference"),n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),i}function i(s){return s===93?(n.enter("referenceMarker"),n.consume(s),n.exit("referenceMarker"),n.exit("reference"),e):t(s)}}const HN={name:"labelStartImage",resolveAll:tx.resolveAll,tokenize:GN};function GN(n,e,t){const r=this;return i;function i(l){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(l),n.exit("labelImageMarker"),s}function s(l){return l===91?(n.enter("labelMarker"),n.consume(l),n.exit("labelMarker"),n.exit("labelImage"),o):t(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(l):e(l)}}const KN={name:"labelStartLink",resolveAll:tx.resolveAll,tokenize:JN};function JN(n,e,t){const r=this;return i;function i(o){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?t(o):e(o)}}const uO={name:"lineEnding",tokenize:eA};function eA(n,e){return t;function t(r){return n.enter("lineEnding"),n.consume(r),n.exit("lineEnding"),Gt(n,e,"linePrefix")}}const ip={name:"thematicBreak",tokenize:tA};function tA(n,e,t){let r=0,i;return s;function s(h){return n.enter("thematicBreak"),o(h)}function o(h){return i=h,l(h)}function l(h){return h===i?(n.enter("thematicBreakSequence"),c(h)):r>=3&&(h===null||ut(h))?(n.exit("thematicBreak"),e(h)):t(h)}function c(h){return h===i?(n.consume(h),r++,c):(n.exit("thematicBreakSequence"),Dt(h)?Gt(n,l,"whitespace")(h):l(h))}}const xr={continuation:{tokenize:sA},exit:aA,name:"list",tokenize:iA},nA={partial:!0,tokenize:lA},rA={partial:!0,tokenize:oA};function iA(n,e,t){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,o=0;return l;function l(g){const k=r.containerState.type||(g===42||g===43||g===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!r.containerState.marker||g===r.containerState.marker:k0(g)){if(r.containerState.type||(r.containerState.type=k,n.enter(k,{_container:!0})),k==="listUnordered")return n.enter("listItemPrefix"),g===42||g===45?n.check(ip,t,h)(g):h(g);if(!r.interrupt||g===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(g)}return t(g)}function c(g){return k0(g)&&++o<10?(n.consume(g),c):(!r.interrupt||o<2)&&(r.containerState.marker?g===r.containerState.marker:g===41||g===46)?(n.exit("listItemValue"),h(g)):t(g)}function h(g){return n.enter("listItemMarker"),n.consume(g),n.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||g,n.check(Jp,r.interrupt?t:f,n.attempt(nA,m,p))}function f(g){return r.containerState.initialBlankLine=!0,s++,m(g)}function p(g){return Dt(g)?(n.enter("listItemPrefixWhitespace"),n.consume(g),n.exit("listItemPrefixWhitespace"),m):t(g)}function m(g){return r.containerState.size=s+r.sliceSerialize(n.exit("listItemPrefix"),!0).length,e(g)}}function sA(n,e,t){const r=this;return r.containerState._closeFlow=void 0,n.check(Jp,i,s);function i(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Gt(n,e,"listItemIndent",r.containerState.size+1)(l)}function s(l){return r.containerState.furtherBlankLines||!Dt(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,n.attempt(rA,e,o)(l))}function o(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,Gt(n,n.attempt(xr,e,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function oA(n,e,t){const r=this;return Gt(n,i,"listItemIndent",r.containerState.size+1);function i(s){const o=r.events[r.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===r.containerState.size?e(s):t(s)}}function aA(n){n.exit(this.containerState.type)}function lA(n,e,t){const r=this;return Gt(n,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const o=r.events[r.events.length-1];return!Dt(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):t(s)}}const Zw={name:"setextUnderline",resolveTo:uA,tokenize:cA};function uA(n,e){let t=n.length,r,i,s;for(;t--;)if(n[t][0]==="enter"){if(n[t][1].type==="content"){r=t;break}n[t][1].type==="paragraph"&&(i=t)}else n[t][1].type==="content"&&n.splice(t,1),!s&&n[t][1].type==="definition"&&(s=t);const o={type:"setextHeading",start:{...n[r][1].start},end:{...n[n.length-1][1].end}};return n[i][1].type="setextHeadingText",s?(n.splice(i,0,["enter",o,e]),n.splice(s+1,0,["exit",n[r][1],e]),n[r][1].end={...n[s][1].end}):n[r][1]=o,n.push(["exit",o,e]),n}function cA(n,e,t){const r=this;let i;return s;function s(h){let f=r.events.length,p;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){p=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(n.enter("setextHeadingLine"),i=h,o(h)):t(h)}function o(h){return n.enter("setextHeadingLineSequence"),l(h)}function l(h){return h===i?(n.consume(h),l):(n.exit("setextHeadingLineSequence"),Dt(h)?Gt(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||ut(h)?(n.exit("setextHeadingLine"),e(h)):t(h)}}const hA={tokenize:fA};function fA(n){const e=this,t=n.attempt(Jp,r,n.attempt(this.parser.constructs.flowInitial,i,Gt(n,n.attempt(this.parser.constructs.flow,i,n.attempt(ON,i)),"linePrefix")));return t;function r(s){if(s===null){n.consume(s);return}return n.enter("lineEndingBlank"),n.consume(s),n.exit("lineEndingBlank"),e.currentConstruct=void 0,t}function i(s){if(s===null){n.consume(s);return}return n.enter("lineEnding"),n.consume(s),n.exit("lineEnding"),e.currentConstruct=void 0,t}}const dA={resolveAll:g2()},pA=m2("string"),mA=m2("text");function m2(n){return{resolveAll:g2(n==="text"?gA:void 0),tokenize:e};function e(t){const r=this,i=this.parser.constructs[n],s=t.attempt(i,o,l);return o;function o(f){return h(f)?s(f):l(f)}function l(f){if(f===null){t.consume(f);return}return t.enter("data"),t.consume(f),c}function c(f){return h(f)?(t.exit("data"),s(f)):(t.consume(f),c)}function h(f){if(f===null)return!0;const p=i[f];let m=-1;if(p)for(;++m<p.length;){const g=p[m];if(!g.previous||g.previous.call(r,r.previous))return!0}return!1}}}function g2(n){return e;function e(t,r){let i=-1,s;for(;++i<=t.length;)s===void 0?t[i]&&t[i][1].type==="data"&&(s=i,i++):(!t[i]||t[i][1].type!=="data")&&(i!==s+2&&(t[s][1].end=t[i-1][1].end,t.splice(s+2,i-s-2),i=s+2),s=void 0);return n?n(t,r):t}}function gA(n,e){let t=0;for(;++t<=n.length;)if((t===n.length||n[t][1].type==="lineEnding")&&n[t-1][1].type==="data"){const r=n[t-1][1],i=e.sliceStream(r);let s=i.length,o=-1,l=0,c;for(;s--;){const h=i[s];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(h===-2)c=!0,l++;else if(h!==-1){s++;break}}if(e._contentTypeTextTrailing&&t===n.length&&(l=0),l){const h={type:t===n.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:r.start._bufferIndex+o,_index:r.start._index+s,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:{...r.end}};r.end={...h.start},r.start.offset===r.end.offset?Object.assign(r,h):(n.splice(t,0,["enter",h,e],["exit",h,e]),t+=2)}t++}return n}const OA={42:xr,43:xr,45:xr,48:xr,49:xr,50:xr,51:xr,52:xr,53:xr,54:xr,55:xr,56:xr,57:xr,62:l2},yA={91:kN},xA={[-2]:lO,[-1]:lO,32:lO},vA={35:TN,42:ip,45:[Zw,ip],60:jN,61:Zw,95:ip,96:Lw,126:Lw},wA={38:c2,92:u2},kA={[-5]:uO,[-4]:uO,[-3]:uO,33:HN,38:c2,42:S0,60:[K5,LN],91:KN,92:[QN,u2],93:tx,95:S0,96:hN},SA={null:[S0,dA]},bA={null:[42,95]},PA={null:[]},QA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:bA,contentInitial:yA,disable:PA,document:OA,flow:vA,flowInitial:xA,insideSpan:SA,string:wA,text:kA},Symbol.toStringTag,{value:"Module"}));function CA(n,e,t){let r={_bufferIndex:-1,_index:0,line:t&&t.line||1,column:t&&t.column||1,offset:t&&t.offset||0};const i={},s=[];let o=[],l=[];const c={attempt:R(Y),check:R(_),consume:$,enter:E,exit:Z,interrupt:R(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:n,previous:null,sliceSerialize:m,sliceStream:g,write:p};let f=e.tokenize.call(h,c);return e.resolveAll&&s.push(e),h;function p(z){return o=ci(o,z),C(),o[o.length-1]!==null?[]:(q(e,0),h.events=ex(s,h.events,h),h.events)}function m(z,D){return $A(g(z),D)}function g(z){return TA(o,z)}function k(){const{_bufferIndex:z,_index:D,line:se,column:oe,offset:ne}=r;return{_bufferIndex:z,_index:D,line:se,column:oe,offset:ne}}function w(z){i[z.line]=z.column,W()}function C(){let z;for(;r._index<o.length;){const D=o[r._index];if(typeof D=="string")for(z=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===z&&r._bufferIndex<D.length;)Q(D.charCodeAt(r._bufferIndex));else Q(D)}}function Q(z){f=f(z)}function $(z){ut(z)?(r.line++,r.column=1,r.offset+=z===-3?2:1,W()):z!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=z}function E(z,D){const se=D||{};return se.type=z,se.start=k(),h.events.push(["enter",se,h]),l.push(se),se}function Z(z){const D=l.pop();return D.end=k(),h.events.push(["exit",D,h]),D}function Y(z,D){q(z,D.from)}function _(z,D){D.restore()}function R(z,D){return se;function se(oe,ne,de){let ke,he,ye,N;return Array.isArray(oe)?ue(oe):"tokenize"in oe?ue([oe]):U(oe);function U($e){return rt;function rt(st){const mt=st!==null&&$e[st],Xt=st!==null&&$e.null,Gn=[...Array.isArray(mt)?mt:mt?[mt]:[],...Array.isArray(Xt)?Xt:Xt?[Xt]:[]];return ue(Gn)(st)}}function ue($e){return ke=$e,he=0,$e.length===0?de:L($e[he])}function L($e){return rt;function rt(st){return N=G(),ye=$e,$e.partial||(h.currentConstruct=$e),$e.name&&h.parser.constructs.disable.null.includes($e.name)?_e():$e.tokenize.call(D?Object.assign(Object.create(h),D):h,c,Re,_e)(st)}}function Re($e){return z(ye,N),ne}function _e($e){return N.restore(),++he<ke.length?L(ke[he]):de}}}function q(z,D){z.resolveAll&&!s.includes(z)&&s.push(z),z.resolve&&vs(h.events,D,h.events.length-D,z.resolve(h.events.slice(D),h)),z.resolveTo&&(h.events=z.resolveTo(h.events,h))}function G(){const z=k(),D=h.previous,se=h.currentConstruct,oe=h.events.length,ne=Array.from(l);return{from:oe,restore:de};function de(){r=z,h.previous=D,h.currentConstruct=se,h.events.length=oe,l=ne,W()}}function W(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function TA(n,e){const t=e.start._index,r=e.start._bufferIndex,i=e.end._index,s=e.end._bufferIndex;let o;if(t===i)o=[n[t].slice(r,s)];else{if(o=n.slice(t,i),r>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(r):o.shift()}s>0&&o.push(n[i].slice(0,s))}return o}function $A(n,e){let t=-1;const r=[];let i;for(;++t<n.length;){const s=n[t];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
299
+ `;break}case-3:{o=`\r
300
+ `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&i)continue;o=" ";break}default:o=String.fromCharCode(s)}i=s===-2,r.push(o)}return r.join("")}function EA(n){const r={constructs:z5([QA,...(n||{}).extensions||[]]),content:i(F5),defined:[],document:i(Y5),flow:i(hA),lazy:{},string:i(pA),text:i(mA)};return r;function i(s){return o;function o(l){return CA(r,s,l)}}}function MA(n){for(;!h2(n););return n}const Xw=/[\0\t\n\r]/g;function jA(){let n=1,e="",t=!0,r;return i;function i(s,o,l){const c=[];let h,f,p,m,g;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,e="",t&&(s.charCodeAt(0)===65279&&p++,t=void 0);p<s.length;){if(Xw.lastIndex=p,h=Xw.exec(s),m=h&&h.index!==void 0?h.index:s.length,g=s.charCodeAt(m),!h){e=s.slice(p);break}if(g===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(s.slice(p,m)),n+=m-p),g){case 0:{c.push(65533),n++;break}case 9:{for(f=Math.ceil(n/4)*4,c.push(-2);n++<f;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:r=!0,n=1}p=m+1}return l&&(r&&c.push(-5),e&&c.push(e),c.push(null)),c}}const RA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function NA(n){return n.replace(RA,AA)}function AA(n,e,t){if(e)return e;if(t.charCodeAt(0)===35){const i=t.charCodeAt(1),s=i===120||i===88;return a2(t.slice(s?2:1),s?16:10)}return Jy(t)||n}const O2={}.hasOwnProperty;function _A(n,e,t){return e&&typeof e=="object"&&(t=e,e=void 0),zA(t)(MA(EA(t).document().write(jA()(n,e,!0))))}function zA(n){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s($r),autolinkProtocol:G,autolinkEmail:G,atxHeading:s(Tr),blockQuote:s(Xt),characterEscape:G,characterReference:G,codeFenced:s(Gn),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(Gn,o),codeText:s(cn,o),codeTextData:G,data:G,codeFlowValue:G,definition:s(Nn),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(Zi),hardBreakEscape:s(Kn),hardBreakTrailing:s(Kn),htmlFlow:s(Yr,o),htmlFlowData:G,htmlText:s(Yr,o),htmlTextData:G,image:s(Ss),label:o,link:s($r),listItem:s(qr),listItemValue:m,listOrdered:s(Ur,p),listUnordered:s(Ur),paragraph:s(bs),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Tr),strong:s(io),thematicBreak:s(Jn)},exit:{atxHeading:c(),atxHeadingSequence:Y,autolink:c(),autolinkEmail:mt,autolinkProtocol:st,blockQuote:c(),characterEscapeValue:W,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:$e,characterReference:rt,codeFenced:c(C),codeFencedFence:w,codeFencedFenceInfo:g,codeFencedFenceMeta:k,codeFlowValue:W,codeIndented:c(Q),codeText:c(ne),codeTextData:W,data:W,definition:c(),definitionDestinationString:Z,definitionLabelString:$,definitionTitleString:E,emphasis:c(),hardBreakEscape:c(D),hardBreakTrailing:c(D),htmlFlow:c(se),htmlFlowData:W,htmlText:c(oe),htmlTextData:W,image:c(ke),label:ye,labelText:he,lineEnding:z,link:c(de),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:Re,resourceDestinationString:N,resourceTitleString:U,resource:ue,setextHeading:c(q),setextHeadingLineSequence:R,setextHeadingText:_,strong:c(),thematicBreak:c()}};y2(e,(n||{}).mdastExtensions||[]);const t={};return r;function r(fe){let Pe={type:"root",children:[]};const Fe={stack:[Pe],tokenStack:[],config:e,enter:l,exit:h,buffer:o,resume:f,data:t},nt=[];let yt=-1;for(;++yt<fe.length;)if(fe[yt][1].type==="listOrdered"||fe[yt][1].type==="listUnordered")if(fe[yt][0]==="enter")nt.push(yt);else{const Ke=nt.pop();yt=i(fe,Ke,yt)}for(yt=-1;++yt<fe.length;){const Ke=e[fe[yt][0]];O2.call(Ke,fe[yt][1].type)&&Ke[fe[yt][1].type].call(Object.assign({sliceSerialize:fe[yt][2].sliceSerialize},Fe),fe[yt][1])}if(Fe.tokenStack.length>0){const Ke=Fe.tokenStack[Fe.tokenStack.length-1];(Ke[1]||Vw).call(Fe,void 0,Ke[0])}for(Pe.position={start:Fo(fe.length>0?fe[0][1].start:{line:1,column:1,offset:0}),end:Fo(fe.length>0?fe[fe.length-2][1].end:{line:1,column:1,offset:0})},yt=-1;++yt<e.transforms.length;)Pe=e.transforms[yt](Pe)||Pe;return Pe}function i(fe,Pe,Fe){let nt=Pe-1,yt=-1,Ke=!1,er,xt,hr,bn;for(;++nt<=Fe;){const nn=fe[nt];switch(nn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{nn[0]==="enter"?yt++:yt--,bn=void 0;break}case"lineEndingBlank":{nn[0]==="enter"&&(er&&!bn&&!yt&&!hr&&(hr=nt),bn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:bn=void 0}if(!yt&&nn[0]==="enter"&&nn[1].type==="listItemPrefix"||yt===-1&&nn[0]==="exit"&&(nn[1].type==="listUnordered"||nn[1].type==="listOrdered")){if(er){let tr=nt;for(xt=void 0;tr--;){const Tn=fe[tr];if(Tn[1].type==="lineEnding"||Tn[1].type==="lineEndingBlank"){if(Tn[0]==="exit")continue;xt&&(fe[xt][1].type="lineEndingBlank",Ke=!0),Tn[1].type="lineEnding",xt=tr}else if(!(Tn[1].type==="linePrefix"||Tn[1].type==="blockQuotePrefix"||Tn[1].type==="blockQuotePrefixWhitespace"||Tn[1].type==="blockQuoteMarker"||Tn[1].type==="listItemIndent"))break}hr&&(!xt||hr<xt)&&(er._spread=!0),er.end=Object.assign({},xt?fe[xt][1].start:nn[1].end),fe.splice(xt||nt,0,["exit",er,nn[2]]),nt++,Fe++}if(nn[1].type==="listItemPrefix"){const tr={type:"listItem",_spread:!1,start:Object.assign({},nn[1].start),end:void 0};er=tr,fe.splice(nt,0,["enter",tr,nn[2]]),nt++,Fe++,hr=void 0,bn=!0}}}return fe[Pe][1]._spread=Ke,Fe}function s(fe,Pe){return Fe;function Fe(nt){l.call(this,fe(nt),nt),Pe&&Pe.call(this,nt)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(fe,Pe,Fe){this.stack[this.stack.length-1].children.push(fe),this.stack.push(fe),this.tokenStack.push([Pe,Fe||void 0]),fe.position={start:Fo(Pe.start),end:void 0}}function c(fe){return Pe;function Pe(Fe){fe&&fe.call(this,Fe),h.call(this,Fe)}}function h(fe,Pe){const Fe=this.stack.pop(),nt=this.tokenStack.pop();if(nt)nt[0].type!==fe.type&&(Pe?Pe.call(this,fe,nt[0]):(nt[1]||Vw).call(this,fe,nt[0]));else throw new Error("Cannot close `"+fe.type+"` ("+Qh({start:fe.start,end:fe.end})+"): it’s not open");Fe.position.end=Fo(fe.end)}function f(){return A5(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(fe){if(this.data.expectingFirstListItemValue){const Pe=this.stack[this.stack.length-2];Pe.start=Number.parseInt(this.sliceSerialize(fe),10),this.data.expectingFirstListItemValue=void 0}}function g(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.lang=fe}function k(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.meta=fe}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function Q(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe.replace(/(\r?\n|\r)$/g,"")}function $(fe){const Pe=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Pe,Fe.identifier=Su(this.sliceSerialize(fe)).toLowerCase()}function E(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.title=fe}function Z(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.url=fe}function Y(fe){const Pe=this.stack[this.stack.length-1];if(!Pe.depth){const Fe=this.sliceSerialize(fe).length;Pe.depth=Fe}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function R(fe){const Pe=this.stack[this.stack.length-1];Pe.depth=this.sliceSerialize(fe).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function G(fe){const Fe=this.stack[this.stack.length-1].children;let nt=Fe[Fe.length-1];(!nt||nt.type!=="text")&&(nt=cr(),nt.position={start:Fo(fe.start),end:void 0},Fe.push(nt)),this.stack.push(nt)}function W(fe){const Pe=this.stack.pop();Pe.value+=this.sliceSerialize(fe),Pe.position.end=Fo(fe.end)}function z(fe){const Pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Fe=Pe.children[Pe.children.length-1];Fe.position.end=Fo(fe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Pe.type)&&(G.call(this,fe),W.call(this,fe))}function D(){this.data.atHardBreak=!0}function se(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function oe(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function ne(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.value=fe}function de(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Pe=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Pe,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function ke(){const fe=this.stack[this.stack.length-1];if(this.data.inReference){const Pe=this.data.referenceType||"shortcut";fe.type+="Reference",fe.referenceType=Pe,delete fe.url,delete fe.title}else delete fe.identifier,delete fe.label;this.data.referenceType=void 0}function he(fe){const Pe=this.sliceSerialize(fe),Fe=this.stack[this.stack.length-2];Fe.label=NA(Pe),Fe.identifier=Su(Pe).toLowerCase()}function ye(){const fe=this.stack[this.stack.length-1],Pe=this.resume(),Fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Fe.type==="link"){const nt=fe.children;Fe.children=nt}else Fe.alt=Pe}function N(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.url=fe}function U(){const fe=this.resume(),Pe=this.stack[this.stack.length-1];Pe.title=fe}function ue(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function Re(fe){const Pe=this.resume(),Fe=this.stack[this.stack.length-1];Fe.label=Pe,Fe.identifier=Su(this.sliceSerialize(fe)).toLowerCase(),this.data.referenceType="full"}function _e(fe){this.data.characterReferenceType=fe.type}function $e(fe){const Pe=this.sliceSerialize(fe),Fe=this.data.characterReferenceType;let nt;Fe?(nt=a2(Pe,Fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):nt=Jy(Pe);const yt=this.stack[this.stack.length-1];yt.value+=nt}function rt(fe){const Pe=this.stack.pop();Pe.position.end=Fo(fe.end)}function st(fe){W.call(this,fe);const Pe=this.stack[this.stack.length-1];Pe.url=this.sliceSerialize(fe)}function mt(fe){W.call(this,fe);const Pe=this.stack[this.stack.length-1];Pe.url="mailto:"+this.sliceSerialize(fe)}function Xt(){return{type:"blockquote",children:[]}}function Gn(){return{type:"code",lang:null,meta:null,value:""}}function cn(){return{type:"inlineCode",value:""}}function Nn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Zi(){return{type:"emphasis",children:[]}}function Tr(){return{type:"heading",depth:0,children:[]}}function Kn(){return{type:"break"}}function Yr(){return{type:"html",value:""}}function Ss(){return{type:"image",title:null,url:"",alt:null}}function $r(){return{type:"link",title:null,url:"",children:[]}}function Ur(fe){return{type:"list",ordered:fe.type==="listOrdered",start:null,spread:fe._spread,children:[]}}function qr(fe){return{type:"listItem",spread:fe._spread,checked:null,children:[]}}function bs(){return{type:"paragraph",children:[]}}function io(){return{type:"strong",children:[]}}function cr(){return{type:"text",value:""}}function Jn(){return{type:"thematicBreak"}}}function Fo(n){return{line:n.line,column:n.column,offset:n.offset}}function y2(n,e){let t=-1;for(;++t<e.length;){const r=e[t];Array.isArray(r)?y2(n,r):DA(n,r)}}function DA(n,e){let t;for(t in e)if(O2.call(e,t))switch(t){case"canContainEols":{const r=e[t];r&&n[t].push(...r);break}case"transforms":{const r=e[t];r&&n[t].push(...r);break}case"enter":case"exit":{const r=e[t];r&&Object.assign(n[t],r);break}}}function Vw(n,e){throw n?new Error("Cannot close `"+n.type+"` ("+Qh({start:n.start,end:n.end})+"): a different token (`"+e.type+"`, "+Qh({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Qh({start:e.start,end:e.end})+") is still open")}function LA(n){const e=this;e.parser=t;function t(r){return _A(r,{...e.data("settings"),...n,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function IA(n,e){const t={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(e),!0)};return n.patch(e,t),n.applyData(e,t)}function ZA(n,e){const t={type:"element",tagName:"br",properties:{},children:[]};return n.patch(e,t),[n.applyData(e,t),{type:"text",value:`
301
+ `}]}function XA(n,e){const t=e.value?e.value+`
302
+ `:"",r={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:t}]};return e.meta&&(s.data={meta:e.meta}),n.patch(e,s),s=n.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},n.patch(e,s),s}function VA(n,e){const t={type:"element",tagName:"del",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function WA(n,e){const t={type:"element",tagName:"em",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function FA(n,e){const t=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",r=String(e.identifier).toUpperCase(),i=rc(r.toLowerCase()),s=n.footnoteOrder.indexOf(r);let o,l=n.footnoteCounts.get(r);l===void 0?(l=0,n.footnoteOrder.push(r),o=n.footnoteOrder.length):o=s+1,l+=1,n.footnoteCounts.set(r,l);const c={type:"element",tagName:"a",properties:{href:"#"+t+"fn-"+i,id:t+"fnref-"+i+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};n.patch(e,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(e,h),n.applyData(e,h)}function BA(n,e){const t={type:"element",tagName:"h"+e.depth,properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function YA(n,e){if(n.options.allowDangerousHtml){const t={type:"raw",value:e.value};return n.patch(e,t),n.applyData(e,t)}}function x2(n,e){const t=e.referenceType;let r="]";if(t==="collapsed"?r+="[]":t==="full"&&(r+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+r}];const i=n.all(e),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const o=i[i.length-1];return o&&o.type==="text"?o.value+=r:i.push({type:"text",value:r}),i}function UA(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return x2(n,e);const i={src:rc(r.url||""),alt:e.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return n.patch(e,s),n.applyData(e,s)}function qA(n,e){const t={src:rc(e.url)};e.alt!==null&&e.alt!==void 0&&(t.alt=e.alt),e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"img",properties:t,children:[]};return n.patch(e,r),n.applyData(e,r)}function HA(n,e){const t={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};n.patch(e,t);const r={type:"element",tagName:"code",properties:{},children:[t]};return n.patch(e,r),n.applyData(e,r)}function GA(n,e){const t=String(e.identifier).toUpperCase(),r=n.definitionById.get(t);if(!r)return x2(n,e);const i={href:rc(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:n.all(e)};return n.patch(e,s),n.applyData(e,s)}function KA(n,e){const t={href:rc(e.url)};e.title!==null&&e.title!==void 0&&(t.title=e.title);const r={type:"element",tagName:"a",properties:t,children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function JA(n,e,t){const r=n.all(e),i=t?e_(t):v2(e),s={},o=[];if(typeof e.checked=="boolean"){const f=r[0];let p;f&&f.type==="element"&&f.tagName==="p"?p=f:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const f=r[l];(i||l!==0||f.type!=="element"||f.tagName!=="p")&&o.push({type:"text",value:`
303
+ `}),f.type==="element"&&f.tagName==="p"&&!i?o.push(...f.children):o.push(f)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
304
+ `});const h={type:"element",tagName:"li",properties:s,children:o};return n.patch(e,h),n.applyData(e,h)}function e_(n){let e=!1;if(n.type==="list"){e=n.spread||!1;const t=n.children;let r=-1;for(;!e&&++r<t.length;)e=v2(t[r])}return e}function v2(n){const e=n.spread;return e??n.children.length>1}function t_(n,e){const t={},r=n.all(e);let i=-1;for(typeof e.start=="number"&&e.start!==1&&(t.start=e.start);++i<r.length;){const o=r[i];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){t.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:t,children:n.wrap(r,!0)};return n.patch(e,s),n.applyData(e,s)}function n_(n,e){const t={type:"element",tagName:"p",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function r_(n,e){const t={type:"root",children:n.wrap(n.all(e))};return n.patch(e,t),n.applyData(e,t)}function i_(n,e){const t={type:"element",tagName:"strong",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}function s_(n,e){const t=n.all(e),r=t.shift(),i=[];if(r){const o={type:"element",tagName:"thead",properties:{},children:n.wrap([r],!0)};n.patch(e.children[0],o),i.push(o)}if(t.length>0){const o={type:"element",tagName:"tbody",properties:{},children:n.wrap(t,!0)},l=qy(e.children[1]),c=e2(e.children[e.children.length-1]);l&&c&&(o.position={start:l,end:c}),i.push(o)}const s={type:"element",tagName:"table",properties:{},children:n.wrap(i,!0)};return n.patch(e,s),n.applyData(e,s)}function o_(n,e,t){const r=t?t.children:void 0,s=(r?r.indexOf(e):1)===0?"th":"td",o=t&&t.type==="table"?t.align:void 0,l=o?o.length:e.children.length;let c=-1;const h=[];for(;++c<l;){const p=e.children[c],m={},g=o?o[c]:void 0;g&&(m.align=g);let k={type:"element",tagName:s,properties:m,children:[]};p&&(k.children=n.all(p),n.patch(p,k),k=n.applyData(p,k)),h.push(k)}const f={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(e,f),n.applyData(e,f)}function a_(n,e){const t={type:"element",tagName:"td",properties:{},children:n.all(e)};return n.patch(e,t),n.applyData(e,t)}const Ww=9,Fw=32;function l_(n){const e=String(n),t=/\r?\n|\r/g;let r=t.exec(e),i=0;const s=[];for(;r;)s.push(Bw(e.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=t.exec(e);return s.push(Bw(e.slice(i),i>0,!1)),s.join("")}function Bw(n,e,t){let r=0,i=n.length;if(e){let s=n.codePointAt(r);for(;s===Ww||s===Fw;)r++,s=n.codePointAt(r)}if(t){let s=n.codePointAt(i-1);for(;s===Ww||s===Fw;)i--,s=n.codePointAt(i-1)}return i>r?n.slice(r,i):""}function u_(n,e){const t={type:"text",value:l_(String(e.value))};return n.patch(e,t),n.applyData(e,t)}function c_(n,e){const t={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(e,t),n.applyData(e,t)}const h_={blockquote:IA,break:ZA,code:XA,delete:VA,emphasis:WA,footnoteReference:FA,heading:BA,html:YA,imageReference:UA,image:qA,inlineCode:HA,linkReference:GA,link:KA,listItem:JA,list:t_,paragraph:n_,root:r_,strong:i_,table:s_,tableCell:a_,tableRow:o_,text:u_,thematicBreak:c_,toml:Nd,yaml:Nd,definition:Nd,footnoteDefinition:Nd};function Nd(){}const w2=-1,em=0,Th=1,kp=2,nx=3,rx=4,ix=5,sx=6,k2=7,S2=8,Yw=typeof self=="object"?self:globalThis,f_=(n,e)=>{const t=(i,s)=>(n.set(s,i),i),r=i=>{if(n.has(i))return n.get(i);const[s,o]=e[i];switch(s){case em:case w2:return t(o,i);case Th:{const l=t([],i);for(const c of o)l.push(r(c));return l}case kp:{const l=t({},i);for(const[c,h]of o)l[r(c)]=r(h);return l}case nx:return t(new Date(o),i);case rx:{const{source:l,flags:c}=o;return t(new RegExp(l,c),i)}case ix:{const l=t(new Map,i);for(const[c,h]of o)l.set(r(c),r(h));return l}case sx:{const l=t(new Set,i);for(const c of o)l.add(r(c));return l}case k2:{const{name:l,message:c}=o;return t(new Yw[l](c),i)}case S2:return t(BigInt(o),i);case"BigInt":return t(Object(BigInt(o)),i);case"ArrayBuffer":return t(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return t(new DataView(l),o)}}return t(new Yw[s](o),i)};return r},Uw=n=>f_(new Map,n)(0),mu="",{toString:d_}={},{keys:p_}=Object,ih=n=>{const e=typeof n;if(e!=="object"||!n)return[em,e];const t=d_.call(n).slice(8,-1);switch(t){case"Array":return[Th,mu];case"Object":return[kp,mu];case"Date":return[nx,mu];case"RegExp":return[rx,mu];case"Map":return[ix,mu];case"Set":return[sx,mu];case"DataView":return[Th,t]}return t.includes("Array")?[Th,t]:t.includes("Error")?[k2,t]:[kp,t]},Ad=([n,e])=>n===em&&(e==="function"||e==="symbol"),m_=(n,e,t,r)=>{const i=(o,l)=>{const c=r.push(o)-1;return t.set(l,c),c},s=o=>{if(t.has(o))return t.get(o);let[l,c]=ih(o);switch(l){case em:{let f=o;switch(c){case"bigint":l=S2,f=o.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);f=null;break;case"undefined":return i([w2],o)}return i([l,f],o)}case Th:{if(c){let m=o;return c==="DataView"?m=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(o)),i([c,[...m]],o)}const f=[],p=i([l,f],o);for(const m of o)f.push(s(m));return p}case kp:{if(c)switch(c){case"BigInt":return i([c,o.toString()],o);case"Boolean":case"Number":case"String":return i([c,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const f=[],p=i([l,f],o);for(const m of p_(o))(n||!Ad(ih(o[m])))&&f.push([s(m),s(o[m])]);return p}case nx:return i([l,o.toISOString()],o);case rx:{const{source:f,flags:p}=o;return i([l,{source:f,flags:p}],o)}case ix:{const f=[],p=i([l,f],o);for(const[m,g]of o)(n||!(Ad(ih(m))||Ad(ih(g))))&&f.push([s(m),s(g)]);return p}case sx:{const f=[],p=i([l,f],o);for(const m of o)(n||!Ad(ih(m)))&&f.push(s(m));return p}}const{message:h}=o;return i([l,{name:c,message:h}],o)};return s},qw=(n,{json:e,lossy:t}={})=>{const r=[];return m_(!(e||t),!!e,new Map,r)(n),r},Sp=typeof structuredClone=="function"?(n,e)=>e&&("json"in e||"lossy"in e)?Uw(qw(n,e)):structuredClone(n):(n,e)=>Uw(qw(n,e));function g_(n,e){const t=[{type:"text",value:"↩"}];return e>1&&t.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),t}function O_(n,e){return"Back to reference "+(n+1)+(e>1?"-"+e:"")}function y_(n){const e=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",t=n.options.footnoteBackContent||g_,r=n.options.footnoteBackLabel||O_,i=n.options.footnoteLabel||"Footnotes",s=n.options.footnoteLabelTagName||"h2",o=n.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const f=n.all(h),p=String(h.identifier).toUpperCase(),m=rc(p.toLowerCase());let g=0;const k=[],w=n.footnoteCounts.get(p);for(;w!==void 0&&++g<=w;){k.length>0&&k.push({type:"text",value:" "});let $=typeof t=="string"?t:t(c,g);typeof $=="string"&&($={type:"text",value:$}),k.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(g>1?"-"+g:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,g),className:["data-footnote-backref"]},children:Array.isArray($)?$:[$]})}const C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const $=C.children[C.children.length-1];$&&$.type==="text"?$.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...k)}else f.push(...k);const Q={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:n.wrap(f,!0)};n.patch(h,Q),l.push(Q)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Sp(o),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
305
+ `},{type:"element",tagName:"ol",properties:{},children:n.wrap(l,!0)},{type:"text",value:`
306
+ `}]}}const b2=function(n){if(n==null)return k_;if(typeof n=="function")return tm(n);if(typeof n=="object")return Array.isArray(n)?x_(n):v_(n);if(typeof n=="string")return w_(n);throw new Error("Expected function, string, or object as test")};function x_(n){const e=[];let t=-1;for(;++t<n.length;)e[t]=b2(n[t]);return tm(r);function r(...i){let s=-1;for(;++s<e.length;)if(e[s].apply(this,i))return!0;return!1}}function v_(n){const e=n;return tm(t);function t(r){const i=r;let s;for(s in n)if(i[s]!==e[s])return!1;return!0}}function w_(n){return tm(e);function e(t){return t&&t.type===n}}function tm(n){return e;function e(t,r,i){return!!(S_(t)&&n.call(this,t,typeof r=="number"?r:void 0,i||void 0))}}function k_(){return!0}function S_(n){return n!==null&&typeof n=="object"&&"type"in n}const P2=[],b_=!0,Hw=!1,P_="skip";function Q_(n,e,t,r){let i;typeof e=="function"&&typeof t!="function"?(r=t,t=e):i=e;const s=b2(i),o=r?-1:1;l(n,void 0,[])();function l(c,h,f){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const g=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(g?"<"+g+">":""))+")"})}return m;function m(){let g=P2,k,w,C;if((!e||s(c,h,f[f.length-1]||void 0))&&(g=C_(t(c,f)),g[0]===Hw))return g;if("children"in c&&c.children){const Q=c;if(Q.children&&g[0]!==P_)for(w=(r?Q.children.length:-1)+o,C=f.concat(Q);w>-1&&w<Q.children.length;){const $=Q.children[w];if(k=l($,w,C)(),k[0]===Hw)return k;w=typeof k[1]=="number"?k[1]:w+o}}return g}}}function C_(n){return Array.isArray(n)?n:typeof n=="number"?[b_,n]:n==null?P2:[n]}function Q2(n,e,t,r){let i,s,o;typeof e=="function"&&typeof t!="function"?(s=void 0,o=e,i=t):(s=e,o=t,i=r),Q_(n,s,l,i);function l(c,h){const f=h[h.length-1],p=f?f.children.indexOf(c):void 0;return o(c,p,f)}}const b0={}.hasOwnProperty,T_={};function $_(n,e){const t=e||T_,r=new Map,i=new Map,s=new Map,o={...h_,...t.handlers},l={all:h,applyData:M_,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:o,one:c,options:t,patch:E_,wrap:R_};return Q2(n,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const p=f.type==="definition"?r:i,m=String(f.identifier).toUpperCase();p.has(m)||p.set(m,f)}}),l;function c(f,p){const m=f.type,g=l.handlers[m];if(b0.call(l.handlers,m)&&g)return g(l,f,p);if(l.options.passThrough&&l.options.passThrough.includes(m)){if("children"in f){const{children:w,...C}=f,Q=Sp(C);return Q.children=l.all(f),Q}return Sp(f)}return(l.options.unknownHandler||j_)(l,f,p)}function h(f){const p=[];if("children"in f){const m=f.children;let g=-1;for(;++g<m.length;){const k=l.one(m[g],f);if(k){if(g&&m[g-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Gw(k.value)),!Array.isArray(k)&&k.type==="element")){const w=k.children[0];w&&w.type==="text"&&(w.value=Gw(w.value))}Array.isArray(k)?p.push(...k):p.push(k)}}}return p}}function E_(n,e){n.position&&(e.position=d5(n))}function M_(n,e){let t=e;if(n&&n.data){const r=n.data.hName,i=n.data.hChildren,s=n.data.hProperties;if(typeof r=="string")if(t.type==="element")t.tagName=r;else{const o="children"in t?t.children:[t];t={type:"element",tagName:r,properties:{},children:o}}t.type==="element"&&s&&Object.assign(t.properties,Sp(s)),"children"in t&&t.children&&i!==null&&i!==void 0&&(t.children=i)}return t}function j_(n,e){const t=e.data||{},r="value"in e&&!(b0.call(t,"hProperties")||b0.call(t,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:n.all(e)};return n.patch(e,r),n.applyData(e,r)}function R_(n,e){const t=[];let r=-1;for(e&&t.push({type:"text",value:`
307
+ `});++r<n.length;)r&&t.push({type:"text",value:`
308
+ `}),t.push(n[r]);return e&&n.length>0&&t.push({type:"text",value:`
309
+ `}),t}function Gw(n){let e=0,t=n.charCodeAt(e);for(;t===9||t===32;)e++,t=n.charCodeAt(e);return n.slice(e)}function Kw(n,e){const t=$_(n,e),r=t.one(n,void 0),i=y_(t),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
310
+ `},i),s}function N_(n,e){return n&&"run"in n?async function(t,r){const i=Kw(t,{file:r,...e});await n.run(i,r)}:function(t,r){return Kw(t,{file:r,...n||e})}}function Jw(n){if(n)throw n}var cO,ek;function A_(){if(ek)return cO;ek=1;var n=Object.prototype.hasOwnProperty,e=Object.prototype.toString,t=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(h){return typeof Array.isArray=="function"?Array.isArray(h):e.call(h)==="[object Array]"},s=function(h){if(!h||e.call(h)!=="[object Object]")return!1;var f=n.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!f&&!p)return!1;var m;for(m in h);return typeof m>"u"||n.call(h,m)},o=function(h,f){t&&f.name==="__proto__"?t(h,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):h[f.name]=f.newValue},l=function(h,f){if(f==="__proto__")if(n.call(h,f)){if(r)return r(h,f).value}else return;return h[f]};return cO=function c(){var h,f,p,m,g,k,w=arguments[0],C=1,Q=arguments.length,$=!1;for(typeof w=="boolean"&&($=w,w=arguments[1]||{},C=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});C<Q;++C)if(h=arguments[C],h!=null)for(f in h)p=l(w,f),m=l(h,f),w!==m&&($&&m&&(s(m)||(g=i(m)))?(g?(g=!1,k=p&&i(p)?p:[]):k=p&&s(p)?p:{},o(w,{name:f,newValue:c($,k,m)})):typeof m<"u"&&o(w,{name:f,newValue:m}));return w},cO}var __=A_();const hO=af(__);function P0(n){if(typeof n!="object"||n===null)return!1;const e=Object.getPrototypeOf(n);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function z_(){const n=[],e={run:t,use:r};return e;function t(...i){let s=-1;const o=i.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...i);function l(c,...h){const f=n[++s];let p=-1;if(c){o(c);return}for(;++p<i.length;)(h[p]===null||h[p]===void 0)&&(h[p]=i[p]);i=h,f?D_(f,l)(...h):o(null,...h)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return n.push(i),e}}function D_(n,e){let t;return r;function r(...o){const l=n.length>o.length;let c;l&&o.push(i);try{c=n.apply(this,o)}catch(h){const f=h;if(l&&t)throw f;return i(f)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,i):c instanceof Error?i(c):s(c))}function i(o,...l){t||(t=!0,e(o,...l))}function s(o){i(null,o)}}const ls={basename:L_,dirname:I_,extname:Z_,join:X_,sep:"/"};function L_(n,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');ff(n);let t=0,r=-1,i=n.length,s;if(e===void 0||e.length===0||e.length>n.length){for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":n.slice(t,r)}if(e===n)return"";let o=-1,l=e.length-1;for(;i--;)if(n.codePointAt(i)===47){if(s){t=i+1;break}}else o<0&&(s=!0,o=i+1),l>-1&&(n.codePointAt(i)===e.codePointAt(l--)?l<0&&(r=i):(l=-1,r=o));return t===r?r=o:r<0&&(r=n.length),n.slice(t,r)}function I_(n){if(ff(n),n.length===0)return".";let e=-1,t=n.length,r;for(;--t;)if(n.codePointAt(t)===47){if(r){e=t;break}}else r||(r=!0);return e<0?n.codePointAt(0)===47?"/":".":e===1&&n.codePointAt(0)===47?"//":n.slice(0,e)}function Z_(n){ff(n);let e=n.length,t=-1,r=0,i=-1,s=0,o;for(;e--;){const l=n.codePointAt(e);if(l===47){if(o){r=e+1;break}continue}t<0&&(o=!0,t=e+1),l===46?i<0?i=e:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||t<0||s===0||s===1&&i===t-1&&i===r+1?"":n.slice(i,t)}function X_(...n){let e=-1,t;for(;++e<n.length;)ff(n[e]),n[e]&&(t=t===void 0?n[e]:t+"/"+n[e]);return t===void 0?".":V_(t)}function V_(n){ff(n);const e=n.codePointAt(0)===47;let t=W_(n,!e);return t.length===0&&!e&&(t="."),t.length>0&&n.codePointAt(n.length-1)===47&&(t+="/"),e?"/"+t:t}function W_(n,e){let t="",r=0,i=-1,s=0,o=-1,l,c;for(;++o<=n.length;){if(o<n.length)l=n.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(i===o-1||s===1))if(i!==o-1&&s===2){if(t.length<2||r!==2||t.codePointAt(t.length-1)!==46||t.codePointAt(t.length-2)!==46){if(t.length>2){if(c=t.lastIndexOf("/"),c!==t.length-1){c<0?(t="",r=0):(t=t.slice(0,c),r=t.length-1-t.lastIndexOf("/")),i=o,s=0;continue}}else if(t.length>0){t="",r=0,i=o,s=0;continue}}e&&(t=t.length>0?t+"/..":"..",r=2)}else t.length>0?t+="/"+n.slice(i+1,o):t=n.slice(i+1,o),r=o-i-1;i=o,s=0}else l===46&&s>-1?s++:s=-1}return t}function ff(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const F_={cwd:B_};function B_(){return"/"}function Q0(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Y_(n){if(typeof n=="string")n=new URL(n);else if(!Q0(n)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(n.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return U_(n)}function U_(n){if(n.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 e=n.pathname;let t=-1;for(;++t<e.length;)if(e.codePointAt(t)===37&&e.codePointAt(t+1)===50){const r=e.codePointAt(t+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(e)}const fO=["history","path","basename","stem","extname","dirname"];class C2{constructor(e){let t;e?Q0(e)?t={path:e}:typeof e=="string"||q_(e)?t={value:e}:t=e:t={},this.cwd="cwd"in t?"":F_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fO.length;){const s=fO[r];s in t&&t[s]!==void 0&&t[s]!==null&&(this[s]=s==="history"?[...t[s]]:t[s])}let i;for(i in t)fO.includes(i)||(this[i]=t[i])}get basename(){return typeof this.path=="string"?ls.basename(this.path):void 0}set basename(e){pO(e,"basename"),dO(e,"basename"),this.path=ls.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?ls.dirname(this.path):void 0}set dirname(e){tk(this.basename,"dirname"),this.path=ls.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?ls.extname(this.path):void 0}set extname(e){if(dO(e,"extname"),tk(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ls.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Q0(e)&&(e=Y_(e)),pO(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?ls.basename(this.path,this.extname):void 0}set stem(e){pO(e,"stem"),dO(e,"stem"),this.path=ls.join(this.dirname||"",e+(this.extname||""))}fail(e,t,r){const i=this.message(e,t,r);throw i.fatal=!0,i}info(e,t,r){const i=this.message(e,t,r);return i.fatal=void 0,i}message(e,t,r){const i=new qn(e,t,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function dO(n,e){if(n&&n.includes(ls.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+ls.sep+"`")}function pO(n,e){if(!n)throw new Error("`"+e+"` cannot be empty")}function tk(n,e){if(!n)throw new Error("Setting `"+e+"` requires `path` to be set too")}function q_(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const H_=function(n){const r=this.constructor.prototype,i=r[n],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},G_={}.hasOwnProperty;class ox extends H_{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=z_()}copy(){const e=new ox;let t=-1;for(;++t<this.attachers.length;){const r=this.attachers[t];e.use(...r)}return e.data(hO(!0,{},this.namespace)),e}data(e,t){return typeof e=="string"?arguments.length===2?(OO("data",this.frozen),this.namespace[e]=t,this):G_.call(this.namespace,e)&&this.namespace[e]||void 0:e?(OO("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[t,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=t.call(e,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const t=_d(e),r=this.parser||this.Parser;return mO("parse",r),r(String(t),t)}process(e,t){const r=this;return this.freeze(),mO("process",this.parser||this.Parser),gO("process",this.compiler||this.Compiler),t?i(void 0,t):new Promise(i);function i(s,o){const l=_d(e),c=r.parse(l);r.run(c,l,function(f,p,m){if(f||!p||!m)return h(f);const g=p,k=r.stringify(g,m);e4(k)?m.value=k:m.result=k,h(f,m)});function h(f,p){f||!p?o(f):s?s(p):t(void 0,p)}}}processSync(e){let t=!1,r;return this.freeze(),mO("processSync",this.parser||this.Parser),gO("processSync",this.compiler||this.Compiler),this.process(e,i),rk("processSync","process",t),r;function i(s,o){t=!0,Jw(s),r=o}}run(e,t,r){nk(e),this.freeze();const i=this.transformers;return!r&&typeof t=="function"&&(r=t,t=void 0),r?s(void 0,r):new Promise(s);function s(o,l){const c=_d(t);i.run(e,c,h);function h(f,p,m){const g=p||e;f?l(f):o?o(g):r(void 0,g,m)}}}runSync(e,t){let r=!1,i;return this.run(e,t,s),rk("runSync","run",r),i;function s(o,l){Jw(o),i=l,r=!0}}stringify(e,t){this.freeze();const r=_d(t),i=this.compiler||this.Compiler;return gO("stringify",i),nk(e),i(e,r)}use(e,...t){const r=this.attachers,i=this.namespace;if(OO("use",this.frozen),e!=null)if(typeof e=="function")c(e,t);else if(typeof e=="object")Array.isArray(e)?l(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[f,...p]=h;c(f,p)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(h.plugins),h.settings&&(i.settings=hO(!0,i.settings,h.settings))}function l(h){let f=-1;if(h!=null)if(Array.isArray(h))for(;++f<h.length;){const p=h[f];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,f){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===h){m=p;break}if(m===-1)r.push([h,...f]);else if(f.length>0){let[g,...k]=f;const w=r[m][1];P0(w)&&P0(g)&&(g=hO(!0,w,g)),r[m]=[h,g,...k]}}}}const K_=new ox().freeze();function mO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function gO(n,e){if(typeof e!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function OO(n,e){if(e)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nk(n){if(!P0(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function rk(n,e,t){if(!t)throw new Error("`"+n+"` finished async. Use `"+e+"` instead")}function _d(n){return J_(n)?n:new C2(n)}function J_(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function e4(n){return typeof n=="string"||t4(n)}function t4(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const n4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ik=[],sk={allowDangerousHtml:!0},r4=/^(https?|ircs?|mailto|xmpp)$/i,i4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ws(n){const e=s4(n),t=o4(n);return a4(e.runSync(e.parse(t),t),n)}function s4(n){const e=n.rehypePlugins||ik,t=n.remarkPlugins||ik,r=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...sk}:sk;return K_().use(LA).use(t).use(N_,r).use(e)}function o4(n){const e=n.children||"",t=new C2;return typeof e=="string"&&(t.value=e),t}function a4(n,e){const t=e.allowedElements,r=e.allowElement,i=e.components,s=e.disallowedElements,o=e.skipHtml,l=e.unwrapDisallowed,c=e.urlTransform||l4;for(const f of i4)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+n4+f.id,void 0);return Q2(n,h),y5(n,{Fragment:x.Fragment,components:i,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(f,p,m){if(f.type==="raw"&&m&&typeof p=="number")return o?m.children.splice(p,1):m.children[p]={type:"text",value:f.value},p;if(f.type==="element"){let g;for(g in aO)if(Object.hasOwn(aO,g)&&Object.hasOwn(f.properties,g)){const k=f.properties[g],w=aO[g];(w===null||w.includes(f.tagName))&&(f.properties[g]=c(String(k||""),g,f))}}if(f.type==="element"){let g=t?!t.includes(f.tagName):s?s.includes(f.tagName):!1;if(!g&&r&&typeof p=="number"&&(g=!r(f,p,m)),g&&m&&typeof p=="number")return l&&f.children?m.children.splice(p,1,...f.children):m.children.splice(p,1),p}}}function l4(n){const e=n.indexOf(":"),t=n.indexOf("?"),r=n.indexOf("#"),i=n.indexOf("/");return e===-1||i!==-1&&e>i||t!==-1&&e>t||r!==-1&&e>r||r4.test(n.slice(0,e))?n:""}function u4({call:n}){const e=n.status==="running",t=n.status==="error";return x.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 my-1.5 rounded-lg bg-gray-100 dark:bg-zinc-800/50 border border-gray-200 dark:border-zinc-700/50 text-xs font-mono",children:[e?x.jsx(ua,{className:"h-3.5 w-3.5 text-indigo-400 animate-spin shrink-0"}):t?x.jsx(Xy,{className:"h-3.5 w-3.5 text-red-400 shrink-0"}):x.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-400 shrink-0"}),x.jsx("span",{className:"text-indigo-600 dark:text-indigo-300 font-semibold",children:n.toolName}),n.duration_ms!=null&&x.jsxs("span",{className:"text-zinc-500 ml-auto",children:[String(n.duration_ms),"ms"]})]})}function c4({confirmation:n,onApprove:e,onDeny:t}){const r=n.status==="approved"||n.status==="denied";return x.jsxs("div",{className:"my-2 p-3 rounded-lg border border-amber-500/30 bg-amber-500/5",children:[x.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium text-amber-300 mb-1",children:[x.jsx(tR,{className:"h-4 w-4"}),x.jsx("span",{className:"uppercase text-[11px] font-bold bg-indigo-500 text-white px-1.5 py-0.5 rounded",children:n.method}),x.jsx("span",{className:"text-zinc-300",children:n.endpoint})]}),n.reason&&x.jsx("p",{className:"text-xs text-zinc-400 mb-2",children:n.reason}),r?x.jsx("span",{className:`text-xs font-semibold ${n.status==="approved"?"text-emerald-400":"text-red-400"}`,children:n.status==="approved"?"Approved":"Denied"}):x.jsxs("div",{className:"flex gap-2",children:[x.jsx("button",{onClick:e,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-emerald-600 text-white hover:bg-emerald-500 transition-colors",children:"Approve"}),x.jsx("button",{onClick:t,className:"px-3 py-1.5 text-xs font-medium rounded-md bg-zinc-700 text-zinc-300 border border-zinc-600 hover:bg-zinc-600 transition-colors",children:"Deny"})]})]})}function h4({blocks:n,respondToConfirmation:e}){return x.jsx(x.Fragment,{children:n.map((t,r)=>{switch(t.type){case"text":return x.jsx("div",{className:"prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-gray-100 dark:prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-gray-200 dark:prose-pre:border-zinc-700/50 prose-a:text-indigo-700 dark:prose-a:text-indigo-400 prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:x.jsx(ws,{children:t.text})},`t-${String(r)}`);case"tool_calls":return x.jsx("div",{children:t.calls.map(i=>x.jsx(u4,{call:i},i.toolId))},`tc-${String(r)}`);case"confirmation":{const i=t.confirmation;return x.jsx(c4,{confirmation:i,onApprove:()=>{i.correlationId&&e(i.correlationId,!0)},onDeny:()=>{i.correlationId&&e(i.correlationId,!1)}},`cf-${String(r)}`)}default:return null}})})}function f4(){const{resumeSessionId:n}=ec(),[e]=nj(),t=e.get("resume"),r=V.useMemo(()=>t??n,[t,n]),{messages:i,send:s,isStreaming:o,activeToolCalls:l,respondToConfirmation:c,usage:h}=Lj({initialSessionId:r}),[f,p]=V.useState(""),[m,g]=V.useState([]),k=V.useRef(null),w=V.useRef(null);V.useEffect(()=>{if(!r){g([]);return}fetch(`/session/${encodeURIComponent(r)}`).then(E=>E.ok?E.json():null).then(E=>{if(E&&typeof E=="object"&&"messages"in E&&Array.isArray(E.messages)){const Z=E.messages;g(Z.filter(Y=>Y.role==="user"||Y.role==="assistant"))}}).catch(()=>{})},[r]),V.useEffect(()=>{var E;(E=k.current)==null||E.scrollIntoView({behavior:"smooth"})},[i,m]),V.useEffect(()=>{var E;o||(E=w.current)==null||E.focus()},[o]);const C=V.useCallback(E=>{E.preventDefault();const Z=f.trim();!Z||o||(p(""),w.current&&(w.current.style.height="auto"),s(Z))},[f,o,s]),Q=V.useCallback(E=>{if(E.key==="Enter"&&!E.shiftKey){E.preventDefault();const Z=f.trim();Z&&!o&&(p(""),w.current&&(w.current.style.height="auto"),s(Z))}},[f,o,s]),$=i.length>0||m.length>0;return x.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[x.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:$?x.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[m.map((E,Z)=>x.jsx("div",{className:E.role==="user"?"mb-6 flex justify-end":"mb-6",children:E.role==="user"?x.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/60 text-white/80 text-[14px] leading-relaxed",children:E.text}):x.jsx("div",{className:"text-[14px] text-gray-400 dark:text-zinc-400 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-400 dark:prose-headings:text-zinc-400 prose-p:text-gray-400 dark:prose-p:text-zinc-400 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-a:text-indigo-500/60 dark:prose-a:text-indigo-400/60",children:x.jsx(ws,{children:E.text})})},`hist-${String(Z)}`)),m.length>0&&i.length===0&&x.jsx("div",{className:"text-center text-xs text-gray-400 dark:text-zinc-600 mb-4 py-2 border-t border-gray-200 dark:border-zinc-800/50",children:"Session resumed"}),i.map(E=>{switch(E.type){case"user":return x.jsx("div",{className:"mb-6 flex justify-end",children:x.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600 text-white text-[14px] leading-relaxed",children:E.text})},E.id);case"assistant_text":return x.jsx("div",{className:"mb-6",children:x.jsx("div",{className:"text-[14px] text-gray-900 dark:text-zinc-200",children:x.jsx(h4,{blocks:E.contentBlocks,respondToConfirmation:c})})},E.id);case"error":return x.jsx("div",{className:"mb-6 px-4 py-3 rounded-xl bg-red-500/10 border border-red-500/20 text-red-300 text-sm",children:E.message},E.id);default:return null}}),o&&l.length===0&&x.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-sm mb-4",children:[x.jsx(ua,{className:"h-4 w-4 animate-spin"}),x.jsx("span",{children:"Thinking..."})]}),x.jsx("div",{ref:k})]}):x.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center px-4",children:[x.jsxs("svg",{width:"48",height:"48",viewBox:"0 0 32 32",fill:"none",className:"mb-5 opacity-30",children:[x.jsx("defs",{children:x.jsx("clipPath",{id:"empty-sq",children:x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#empty-sq)"})]}),x.jsx("h2",{className:"text-lg font-medium text-gray-400 dark:text-zinc-400 mb-1",children:"What can I help with?"}),x.jsx("p",{className:"text-sm text-gray-400 dark:text-zinc-600 max-w-sm",children:"Ask me anything. I can search, analyze, and connect to your tools."})]})}),x.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800/80 bg-gray-50 dark:bg-[#0f0f17] px-4 py-4",children:[x.jsxs("form",{onSubmit:C,className:"max-w-3xl mx-auto relative",children:[x.jsx("textarea",{ref:w,value:f,onChange:E=>{p(E.target.value);const Z=E.target;Z.style.height="auto",Z.style.height=`${Math.min(Z.scrollHeight,160)}px`},onKeyDown:Q,placeholder:"Message...",disabled:o,rows:1,className:"w-full resize-none rounded-xl bg-white dark:bg-zinc-800/80 border border-gray-300 dark:border-zinc-700/60 px-4 py-3 pr-12 text-[14px] text-gray-900 dark:text-zinc-100 placeholder-gray-400 dark:placeholder-zinc-500 outline-none focus:border-indigo-500/60 focus:ring-1 focus:ring-indigo-500/20 transition-colors disabled:opacity-50 overflow-y-auto",style:{minHeight:"48px",maxHeight:"160px"}}),x.jsx("button",{type:"submit",disabled:o||f.trim().length===0,className:"absolute right-2 bottom-2 h-8 w-8 rounded-lg bg-indigo-600 text-white flex items-center justify-center hover:bg-indigo-500 transition-colors disabled:opacity-20 disabled:hover:bg-indigo-600",children:x.jsx(DP,{className:"h-4 w-4"})})]}),(h.inputTokens>0||h.outputTokens>0)&&x.jsxs("div",{className:"max-w-3xl mx-auto mt-1.5 text-[11px] text-gray-400 dark:text-zinc-600 font-mono text-right",children:[(h.inputTokens+h.outputTokens).toLocaleString()," tokens (",h.inputTokens.toLocaleString()," in / ",h.outputTokens.toLocaleString()," out)"]})]})]})}function d4(n){const e=Date.now()-n,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function p4(n){return new Date(n).toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function m4(){const[n,e]=V.useState([]),[t,r]=V.useState(!0);return V.useEffect(()=>{fetch("/sessions").then(i=>i.ok?i.json():{sessions:[]}).then(i=>{i&&typeof i=="object"&&"sessions"in i&&Array.isArray(i.sessions)&&e(i.sessions)}).catch(()=>{}).finally(()=>r(!1))},[]),x.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[x.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4",children:[x.jsx("h1",{className:"text-lg font-semibold text-zinc-200",children:"Sessions"}),x.jsxs("p",{className:"text-sm text-zinc-500 mt-0.5",children:[n.length," conversation",n.length!==1?"s":""]})]}),x.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:t?x.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):n.length===0?x.jsxs("div",{className:"flex flex-col items-center justify-center h-64 text-center px-4",children:[x.jsx(wp,{className:"h-8 w-8 text-zinc-700 mb-3"}),x.jsx("p",{className:"text-sm text-zinc-500",children:"No sessions yet. Start a conversation from the Chat page."})]}):x.jsx("div",{className:"divide-y divide-zinc-800/50",children:n.map(i=>x.jsxs(cf,{to:`/sessions/${i.id}`,className:"flex items-center gap-4 px-6 py-4 hover:bg-white/[0.02] transition-colors group",children:[x.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-500/10 flex items-center justify-center shrink-0",children:x.jsx(wp,{className:"h-4 w-4 text-indigo-400"})}),x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-sm font-medium text-zinc-300 truncate font-mono",children:i.id.slice(0,8)}),x.jsx("span",{className:"text-xs text-zinc-600",children:i.tenantId})]}),x.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[x.jsxs("span",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[x.jsx(Kp,{className:"h-3 w-3"}),p4(i.createdAt)]}),x.jsxs("span",{className:"text-xs text-zinc-600",children:["Last active ",d4(i.lastAccessedAt)]})]})]}),x.jsx(Zy,{className:"h-4 w-4 text-zinc-700 group-hover:text-zinc-500 transition-colors shrink-0"})]},i.id))})})]})}function g4(){const{sessionId:n}=Ju(),e=Ku(),[t,r]=V.useState([]),[i,s]=V.useState(!0),[o,l]=V.useState(null);V.useEffect(()=>{n&&fetch(`/session/${encodeURIComponent(n)}`).then(f=>{if(!f.ok)throw new Error("Session not found");return f.json()}).then(f=>{f&&typeof f=="object"&&"messages"in f&&Array.isArray(f.messages)&&r(f.messages)}).catch(f=>{l(f instanceof Error?f.message:"Failed to load session")}).finally(()=>s(!1))},[n]);const c=t.filter(f=>f.role==="user"),h=t.filter(f=>f.role==="assistant");return x.jsxs("div",{className:"h-full flex flex-col bg-[#0a0a0f]",children:[x.jsxs("div",{className:"border-b border-zinc-800/50 px-6 py-4 flex items-center justify-between",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(cf,{to:"/sessions",className:"text-zinc-500 hover:text-zinc-300 transition-colors",children:x.jsx(Iy,{className:"h-4 w-4"})}),x.jsxs("div",{children:[x.jsxs("h1",{className:"text-sm font-semibold text-zinc-200 font-mono",children:[n==null?void 0:n.slice(0,8),"..."]}),x.jsxs("div",{className:"flex items-center gap-3 mt-0.5",children:[x.jsxs("span",{className:"text-xs text-zinc-500",children:[c.length," messages"]}),x.jsxs("span",{className:"text-xs text-zinc-500",children:[h.length," responses"]})]})]})]}),x.jsxs("button",{onClick:()=>{e(`/?resume=${n??""}`)},className:"flex items-center gap-1.5 px-3 py-1.5 text-xs font-medium rounded-md bg-indigo-600 text-white hover:bg-indigo-500 transition-colors",children:[x.jsx(Fy,{className:"h-3 w-3"}),"Resume"]})]}),x.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:i?x.jsx("div",{className:"flex items-center justify-center h-32 text-zinc-500 text-sm",children:"Loading..."}):o?x.jsx("div",{className:"flex items-center justify-center h-32 text-red-400 text-sm",children:o}):x.jsx("div",{className:"max-w-3xl mx-auto px-4 py-6",children:t.map((f,p)=>x.jsx("div",{className:f.role==="user"?"mb-6 flex justify-end":"mb-6",children:f.role==="user"?x.jsx("div",{className:"max-w-[85%] px-4 py-3 rounded-2xl rounded-br-md bg-indigo-600/70 text-white text-[14px] leading-relaxed",children:f.text}):x.jsx("div",{className:"text-[14px] text-zinc-300 prose prose-invert prose-sm max-w-none prose-headings:text-zinc-200 prose-p:text-zinc-300 prose-strong:text-zinc-200 prose-code:text-indigo-300 prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-pre:bg-zinc-800/80 prose-pre:border prose-pre:border-zinc-700/50 prose-a:text-indigo-400 prose-li:text-zinc-300",children:x.jsx(ws,{children:f.text})})},`msg-${String(p)}`))})})]})}const ok=["bg-blue-100 dark:bg-blue-500/10 text-blue-800 dark:text-blue-400","bg-green-100 dark:bg-green-500/10 text-green-800 dark:text-green-400","bg-yellow-100 dark:bg-yellow-500/10 text-yellow-800 dark:text-yellow-400","bg-red-100 dark:bg-red-500/10 text-red-800 dark:text-red-400","bg-purple-100 dark:bg-purple-500/10 text-purple-800 dark:text-purple-400","bg-pink-100 dark:bg-pink-500/10 text-pink-800 dark:text-pink-400","bg-indigo-100 dark:bg-indigo-500/10 text-indigo-800 dark:text-indigo-400","bg-orange-100 dark:bg-orange-500/10 text-orange-800 dark:text-orange-400","bg-teal-100 dark:bg-teal-500/10 text-teal-800 dark:text-teal-400","bg-cyan-100 dark:bg-cyan-500/10 text-cyan-800 dark:text-cyan-400"];function O4(n){let e=0;for(let t=0;t<n.length;t++)e=(e<<5)-e+n.charCodeAt(t)|0;return Math.abs(e)}const y4={P1:"bg-red-100 text-red-800",P2:"bg-orange-100 text-orange-800",P3:"bg-yellow-100 text-yellow-800",P4:"bg-blue-100 text-blue-800",critical:"bg-red-100 text-red-800",at_risk:"bg-orange-100 text-orange-800",attention:"bg-yellow-100 text-yellow-800",healthy:"bg-green-100 text-green-800",active:"bg-green-100 text-green-800",resolved:"bg-gray-100 text-gray-800",false_positive:"bg-gray-100 text-gray-600",immediate:"bg-red-100 text-red-800",soon:"bg-yellow-100 text-yellow-800",when_convenient:"bg-blue-100 text-blue-800"};function T2({value:n,className:e}){const t=y4[n]??ok[O4(n)%ok.length];return x.jsx("span",{className:Sr("inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",t,e),children:n})}function x4(n){const e=new Date(String(n)),t=Date.now()-e.getTime(),r=Math.floor(t/6e4);if(r<1)return"just now";if(r<60)return`${String(r)}m ago`;const i=Math.floor(r/60);if(i<24)return`${String(i)}h ago`;const s=Math.floor(i/24);return s<30?`${String(s)}d ago`:e.toLocaleDateString()}function v4(n,e){const t=Object.entries(n);let r=null;const i=[],s=[];let o=null;for(const[l,c]of t)if(l!==e){if(c.type==="enum"){i.push(l);continue}if(c.type==="datetime"&&!o){o=l;continue}if(!r&&c.type==="string"&&["title","name","summary","subject"].includes(l)){r=l;continue}c.type==="string"&&s.push(l)}return!r&&s.length>0&&(r=s.shift()??null),{title:r,badges:i,textFields:s.slice(0,2),dateField:o}}function w4({storeName:n,schema:e,keyTemplate:t,documents:r,total:i}){const s=Ku(),o=t.replace(/[{}]/g,""),l=v4(e,o);return r.length===0?x.jsx("div",{className:"text-center py-16 text-gray-400 dark:text-zinc-600 text-sm",children:"No documents yet."}):x.jsxs("div",{children:[x.jsx("div",{className:"space-y-2",children:r.map(c=>{const h=c.payload,f=l.title?String(h[l.title]??c.key):c.key;return x.jsx("div",{onClick:()=>{s(`/entities/${n}/${c.key}`)},className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-4 cursor-pointer hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:x.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsx("div",{className:"text-sm font-medium text-gray-900 dark:text-zinc-200 mb-1",children:f}),l.textFields.map(p=>{const m=h[p];if(!m)return null;const g=String(m);return x.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-400 mb-1.5 line-clamp-2",children:g.length>150?g.slice(0,150)+"...":g},p)}),l.badges.length>0&&x.jsx("div",{className:"flex items-center gap-1.5 flex-wrap mt-1",children:l.badges.map(p=>{const m=h[p];return m?x.jsx(T2,{value:String(m)},p):null})})]}),x.jsxs("div",{className:"flex flex-col items-end gap-1 shrink-0",children:[x.jsx("span",{className:"text-[11px] font-mono text-gray-400 dark:text-zinc-600",children:c.key}),l.dateField&&h[l.dateField]&&x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600",children:x4(h[l.dateField])})]})]})},c.key)})}),i>r.length&&x.jsxs("div",{className:"mt-4 text-center text-xs text-gray-400 dark:text-zinc-600",children:["Showing ",r.length," of ",i.toLocaleString()]})]})}function k4(){const{storeName:n}=Ju(),{stores:e}=ec(),[t,r]=V.useState(),[i,s]=V.useState(),o=e.find(g=>g.name===n),{documents:l,total:c,isLoading:h,error:f}=Zj(n??"",{sort:t,filter:i,limit:50,refreshInterval:15e3}),p=V.useCallback(g=>{r(g)},[]),m=V.useCallback(g=>{s(Object.keys(g).length>0?g:void 0)},[]);return o?x.jsxs("div",{className:"max-w-[1200px] mx-auto px-6 pt-8 pb-12",children:[x.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[x.jsx("div",{className:"h-9 w-9 rounded-lg bg-indigo-100 dark:bg-indigo-500/10 flex items-center justify-center",children:x.jsx(AP,{className:"h-5 w-5 text-indigo-600 dark:text-indigo-400"})}),x.jsxs("div",{children:[x.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:o.entity.name}),x.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:[c.toLocaleString()," document",c!==1?"s":""," in ",x.jsx("span",{className:"font-mono text-xs",children:o.name})]})]})]}),f&&x.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:f}),h?x.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):x.jsx(w4,{storeName:n??"",schema:o.entity.schema,keyTemplate:o.entity.key,documents:l,total:c,onSortChange:p,onFilterChange:m})]}):x.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",n,"” not found."]})}function ax({field:n,value:e,mode:t}){if(e==null)return x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"—"});switch(n.type){case"string":return x.jsx(S4,{value:e,mode:t});case"number":return x.jsx(b4,{value:e,field:n,mode:t});case"boolean":return x.jsx(P4,{value:e});case"datetime":return x.jsx(Q4,{value:e,mode:t});case"enum":return x.jsx(T2,{value:String(e)});case"array":return x.jsx(C4,{value:e,field:n,mode:t});case"object":return x.jsx(T4,{value:e,field:n,mode:t});case"ref":return x.jsx($4,{value:e,field:n});default:return x.jsx("span",{children:String(e)})}}function S4({value:n,mode:e}){const t=String(n);return e==="table"&&t.length>50?x.jsxs("span",{title:t,children:[t.slice(0,50),"…"]}):x.jsx("span",{children:t})}function b4({value:n,field:e,mode:t}){const r=Number(n);if(e.min===0&&e.max===1){const i=Math.round(r*100);return t==="table"?x.jsxs("span",{className:"tabular-nums",children:[i,"%"]}):x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:"flex-1 h-2 bg-gray-100 dark:bg-zinc-800 rounded-full max-w-[200px]",children:x.jsx("div",{className:"h-2 bg-indigo-600 dark:bg-indigo-500 rounded-full",style:{width:`${i}%`}})}),x.jsxs("span",{className:"text-sm tabular-nums",children:[i,"%"]})]})}return x.jsx("span",{className:"tabular-nums",children:r.toLocaleString()})}function P4({value:n}){return n?x.jsx(Bj,{className:"h-4 w-4 text-green-600"}):x.jsx(nR,{className:"h-4 w-4 text-gray-400 dark:text-zinc-500"})}function Q4({value:n,mode:e}){const t=new Date(String(n)),r=E4(t);return e==="table"?x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",title:t.toISOString(),children:r}):x.jsxs("div",{children:[x.jsx("div",{children:t.toLocaleString()}),x.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-500",children:r})]})}function C4({value:n,field:e,mode:t}){return Array.isArray(n)?t==="table"?x.jsxs("span",{className:"inline-flex items-center rounded-full bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 text-xs",children:[n.length," item",n.length!==1?"s":""]}):n.length===0?x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"Empty array"}):x.jsx("div",{className:"space-y-1",children:n.map((r,i)=>x.jsx("div",{className:"pl-3 border-l-2 border-gray-200 dark:border-zinc-700",children:e.item?x.jsx(ax,{field:e.item,value:r,mode:"detail"}):x.jsx("span",{children:String(r)})},i))}):x.jsx("span",{children:String(n)})}function T4({value:n,field:e,mode:t}){if(typeof n!="object"||n===null)return x.jsx("span",{children:String(n)});if(t==="table")return x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:"{...}"});const r=n;return e.fields?x.jsx("div",{className:"border rounded-md divide-y",children:Object.entries(e.fields).map(([i,s])=>x.jsxs("div",{className:"px-3 py-2 flex",children:[x.jsx("div",{className:"w-32 text-xs font-medium text-gray-400 dark:text-zinc-500 shrink-0",children:i}),x.jsx("div",{className:"flex-1 min-w-0 text-sm",children:x.jsx(ax,{field:s,value:r[i],mode:"detail"})})]},i))}):x.jsx("pre",{className:"text-xs whitespace-pre-wrap bg-gray-100 dark:bg-zinc-800/30 rounded p-2",children:JSON.stringify(n,null,2)})}function $4({value:n,field:e}){const t=e.store;return t?x.jsx(cf,{to:`/entities/${t}/${String(n)}`,className:"text-indigo-600 dark:text-indigo-400 hover:underline",children:String(n)}):x.jsx("span",{children:String(n)})}function E4(n){const t=Date.now()-n.getTime();if(t<0)return"just now";const r=Math.floor(t/1e3);if(r<60)return`${r}s ago`;const i=Math.floor(r/60);if(i<60)return`${i} min ago`;const s=Math.floor(i/60);if(s<24)return`${s}h ago`;const o=Math.floor(s/24);return o<30?`${o}d ago`:n.toLocaleDateString()}/**
311
+ * @license
312
+ * Copyright 2025 Amodal Labs, Inc.
313
+ * SPDX-License-Identifier: MIT
314
+ */function M4({history:n}){return n.length===0?null:x.jsxs("div",{className:"border rounded-lg p-4 space-y-3",children:[x.jsx("h2",{className:"text-sm font-semibold text-muted-foreground uppercase tracking-wider",children:"Version History"}),x.jsx("div",{className:"space-y-3",children:n.map(e=>x.jsxs("div",{className:"relative pl-6 pb-3 border-l-2 border-muted last:pb-0",children:[x.jsx("div",{className:"absolute -left-[5px] top-1 h-2 w-2 rounded-full bg-muted-foreground"}),x.jsxs("div",{className:"flex items-center justify-between mb-1",children:[x.jsxs("span",{className:"text-sm font-medium",children:["v",e.version]}),x.jsx("span",{className:"text-xs text-muted-foreground",children:new Date(e.meta.computedAt).toLocaleString()})]}),x.jsxs("details",{className:"text-xs",children:[x.jsx("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:"View payload"}),x.jsx("pre",{className:"mt-1 whitespace-pre-wrap bg-muted/30 rounded p-2 overflow-auto max-h-40",children:JSON.stringify(e.payload,null,2)})]})]},e.version))})]})}function j4({schema:n,document:e,meta:t,history:r,hasTrace:i}){return x.jsxs("div",{className:"space-y-5",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("h1",{className:"text-xl font-semibold tracking-tight text-gray-900 dark:text-zinc-200",children:e.key}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-500 bg-gray-100 dark:bg-zinc-800 px-2 py-0.5 rounded font-mono",children:["v",String(e.version)]}),t.stale&&x.jsx("span",{className:"px-2 py-0.5 rounded bg-amber-50 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 border border-amber-200 dark:border-amber-500/20 text-xs font-medium",children:"Stale"})]})]}),x.jsx("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl divide-y divide-gray-100 dark:divide-zinc-800/50",children:Object.entries(n).map(([s,o])=>x.jsxs("div",{className:"px-5 py-3.5 flex",children:[x.jsxs("div",{className:"w-44 text-sm font-medium text-gray-500 dark:text-zinc-400 shrink-0 pt-0.5",children:[s,o.nullable&&x.jsx("span",{className:"text-[10px] ml-1 text-gray-300 dark:text-zinc-600",children:"?"})]}),x.jsx("div",{className:"text-sm flex-1 min-w-0 text-gray-900 dark:text-zinc-200",children:x.jsx(ax,{field:o,value:e.payload[s],mode:"detail"})})]},s))}),x.jsxs("div",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-5",children:[x.jsx("h2",{className:"text-xs font-semibold text-gray-400 dark:text-zinc-500 uppercase tracking-widest mb-3",children:"Metadata"}),x.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-3 gap-3",children:[x.jsx(Bo,{icon:x.jsx(Kp,{className:"h-3.5 w-3.5"}),label:"Computed",value:R4(t.computedAt)}),t.ttl!==void 0&&x.jsx(Bo,{icon:x.jsx(tO,{className:"h-3.5 w-3.5"}),label:"TTL",value:`${String(t.ttl)}s`}),t.modelUsed&&x.jsx(Bo,{icon:x.jsx(Vy,{className:"h-3.5 w-3.5"}),label:"Model",value:t.modelUsed}),t.durationMs!==void 0&&x.jsx(Bo,{icon:x.jsx(Zu,{className:"h-3.5 w-3.5"}),label:"Duration",value:`${String(t.durationMs)}ms`}),t.tokenCost!==void 0&&x.jsx(Bo,{icon:x.jsx(tO,{className:"h-3.5 w-3.5"}),label:"Tokens",value:t.tokenCost.toLocaleString()}),t.estimatedCostUsd!==void 0&&x.jsx(Bo,{icon:x.jsx(Uj,{className:"h-3.5 w-3.5"}),label:"Cost",value:`$${t.estimatedCostUsd.toFixed(4)}`}),t.automationId&&x.jsx(Bo,{icon:x.jsx(Zu,{className:"h-3.5 w-3.5"}),label:"Automation",value:t.automationId}),t.skillId&&x.jsx(Bo,{icon:x.jsx(tO,{className:"h-3.5 w-3.5"}),label:"Skill",value:t.skillId})]})]}),i&&t.trace&&x.jsxs("details",{className:"bg-white dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl group",children:[x.jsx("summary",{className:"px-5 py-3.5 cursor-pointer text-sm font-medium text-gray-500 dark:text-zinc-400 hover:text-gray-700 dark:hover:text-zinc-300 transition-colors",children:"Reasoning Trace"}),x.jsx("pre",{className:"px-5 py-4 border-t border-gray-100 dark:border-zinc-800 text-xs whitespace-pre-wrap text-gray-600 dark:text-zinc-400 bg-gray-50/50 dark:bg-zinc-900/30 overflow-auto max-h-96 scrollbar-thin font-mono",children:t.trace})]}),x.jsx(M4,{history:r})]})}function Bo({icon:n,label:e,value:t}){return x.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:n}),x.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:[e,":"]}),x.jsx("span",{className:"text-gray-700 dark:text-zinc-300 font-mono text-xs truncate",children:t})]})}function R4(n){const e=new Date(n),r=Date.now()-e.getTime();return r<6e4?"just now":r<36e5?`${String(Math.floor(r/6e4))} min ago`:r<864e5?`${String(Math.floor(r/36e5))}h ago`:e.toLocaleString()}function N4(){const{storeName:n,key:e}=Ju(),t=Ku(),{stores:r}=ec(),i=r.find(f=>f.name===n),{document:s,meta:o,history:l,isLoading:c,error:h}=Ij(n??"",{key:e??"",refreshInterval:15e3});return i?x.jsx("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:x.jsxs("div",{className:"max-w-[900px] mx-auto px-6 pt-8 pb-12",children:[x.jsxs("button",{onClick:()=>{t(`/entities/${n??""}`)},className:"flex items-center gap-1.5 text-sm text-gray-500 dark:text-zinc-400 hover:text-indigo-600 dark:hover:text-indigo-400 mb-5 transition-colors",children:[x.jsx(Iy,{className:"h-4 w-4"}),"Back to ",i.entity.name]}),h&&x.jsx("div",{className:"mb-4 p-3 rounded-md bg-red-50 dark:bg-red-500/10 border border-red-200 dark:border-red-500/20 text-red-700 dark:text-red-300 text-sm",children:h}),c?x.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."}):!s||!o?x.jsx("div",{className:"flex items-center justify-center py-16 text-gray-400 dark:text-zinc-500 text-sm",children:"Document not found."}):x.jsx(j4,{schema:i.entity.schema,document:s,meta:o,history:l,hasTrace:i.trace})]})}):x.jsxs("div",{className:"flex items-center justify-center h-full text-gray-400 dark:text-zinc-500 text-sm",children:["Store “",n,"” not found."]})}var Ja={},_r={},sh={},el={},yO={},ak;function A4(){return ak||(ak=1,Object.defineProperty(yO,"__esModule",{value:!0})),yO}var oh={},ah={},lk;function El(){var e,t,r,i,s,$2,l;if(lk)return ah;lk=1,Object.defineProperty(ah,"__esModule",{value:!0}),ah.CronField=void 0;let n=(l=class{constructor(h,f={rawValue:""}){Ie(this,s);Ie(this,e,!1);Ie(this,t,!1);Ie(this,r,!1);Ie(this,i,[]);Yc(this,"options",{rawValue:""});if(!Array.isArray(h))throw new Error(`${this.constructor.name} Validation error, values is not an array`);if(!(h.length>0))throw new Error(`${this.constructor.name} Validation error, values contains no values`);this.options={...f,rawValue:f.rawValue??""},Oe(this,i,h.sort(l.sorter)),Oe(this,r,this.options.wildcard!==void 0?this.options.wildcard:Ee(this,s,$2).call(this)),Oe(this,e,this.options.rawValue.includes("L")||h.includes("L")),Oe(this,t,this.options.rawValue.includes("?")||h.includes("?"))}static get min(){throw new Error("min must be overridden")}static get max(){throw new Error("max must be overridden")}static get chars(){return Object.freeze([])}static get validChars(){return/^[?,*\dH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}static get constraints(){return{min:this.min,max:this.max,chars:this.chars,validChars:this.validChars}}get min(){return this.constructor.min}get max(){return this.constructor.max}get chars(){return this.constructor.chars}get hasLastChar(){return I(this,e)}get hasQuestionMarkChar(){return I(this,t)}get isWildcard(){return I(this,r)}get values(){return I(this,i)}static sorter(h,f){const p=typeof h=="number",m=typeof f=="number";return p&&m?h-f:!p&&!m?h.localeCompare(f):p?-1:1}static findNearestValueInList(h,f,p=!1){if(p){for(let m=h.length-1;m>=0;m--)if(h[m]<f)return h[m];return null}for(let m=0;m<h.length;m++)if(h[m]>f)return h[m];return null}findNearestValue(h,f=!1){return this.constructor.findNearestValueInList(this.values,h,f)}serialize(){return{wildcard:I(this,r),values:I(this,i)}}validate(){let h;const f=this.chars.length>0?` or chars ${this.chars.join("")}`:"",p=w=>C=>new RegExp(`^\\d{0,2}${C}$`).test(w),m=w=>(h=w,typeof w=="number"?w>=this.min&&w<=this.max:this.chars.some(p(w)));if(!I(this,i).every(m))throw new Error(`${this.constructor.name} Validation error, got value ${h} expected range ${this.min}-${this.max}${f}`);const k=I(this,i).find((w,C)=>I(this,i).indexOf(w)!==C);if(k)throw new Error(`${this.constructor.name} Validation error, duplicate values found: ${k}`)}},e=new WeakMap,t=new WeakMap,r=new WeakMap,i=new WeakMap,s=new WeakSet,$2=function(){return this.options.rawValue.length>0?["*","?"].includes(this.options.rawValue):Array.from({length:this.max-this.min+1},(h,f)=>f+this.min).every(h=>I(this,i).includes(h))},l);return ah.CronField=n,ah}var uk;function _4(){if(uk)return oh;uk=1,Object.defineProperty(oh,"__esModule",{value:!0}),oh.CronDayOfMonth=void 0;const n=El(),e=1,t=31,r=Object.freeze(["L"]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}static get validChars(){return/^[?,*\dLH/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return oh.CronDayOfMonth=i,oh}var lh={},ck;function z4(){if(ck)return lh;ck=1,Object.defineProperty(lh,"__esModule",{value:!0}),lh.CronDayOfWeek=void 0;const n=El(),e=0,t=7,r=Object.freeze(["L"]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}static get validChars(){return/^[?,*\dLH#/-]+$|^.*H\(\d+-\d+\)\/\d+.*$|^.*H\(\d+-\d+\).*$|^.*H\/\d+.*$/}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}get nthDay(){return this.options.nthDayOfWeek??0}};return lh.CronDayOfWeek=i,lh}var uh={},hk;function D4(){if(hk)return uh;hk=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.CronHour=void 0;const n=El(),e=0,t=23,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return uh.CronHour=i,uh}var ch={},fk;function L4(){if(fk)return ch;fk=1,Object.defineProperty(ch,"__esModule",{value:!0}),ch.CronMinute=void 0;const n=El(),e=0,t=59,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return ch.CronMinute=i,ch}var hh={},xO={},yr={},dk;function I4(){if(dk)return yr;dk=1,Object.defineProperty(yr,"__esModule",{value:!0});class n extends Error{}class e extends n{constructor(O){super(`Invalid DateTime: ${O.toMessage()}`)}}class t extends n{constructor(O){super(`Invalid Interval: ${O.toMessage()}`)}}class r extends n{constructor(O){super(`Invalid Duration: ${O.toMessage()}`)}}class i extends n{}class s extends n{constructor(O){super(`Invalid unit ${O}`)}}class o extends n{}class l extends n{constructor(){super("Zone is an abstract class")}}const c="numeric",h="short",f="long",p={year:c,month:c,day:c},m={year:c,month:h,day:c},g={year:c,month:h,day:c,weekday:h},k={year:c,month:f,day:c},w={year:c,month:f,day:c,weekday:f},C={hour:c,minute:c},Q={hour:c,minute:c,second:c},$={hour:c,minute:c,second:c,timeZoneName:h},E={hour:c,minute:c,second:c,timeZoneName:f},Z={hour:c,minute:c,hourCycle:"h23"},Y={hour:c,minute:c,second:c,hourCycle:"h23"},_={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:h},R={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:f},q={year:c,month:c,day:c,hour:c,minute:c},G={year:c,month:c,day:c,hour:c,minute:c,second:c},W={year:c,month:h,day:c,hour:c,minute:c},z={year:c,month:h,day:c,hour:c,minute:c,second:c},D={year:c,month:h,day:c,weekday:h,hour:c,minute:c},se={year:c,month:f,day:c,hour:c,minute:c,timeZoneName:h},oe={year:c,month:f,day:c,hour:c,minute:c,second:c,timeZoneName:h},ne={year:c,month:f,day:c,weekday:f,hour:c,minute:c,timeZoneName:f},de={year:c,month:f,day:c,weekday:f,hour:c,minute:c,second:c,timeZoneName:f};class ke{get type(){throw new l}get name(){throw new l}get ianaName(){return this.name}get isUniversal(){throw new l}offsetName(O,S){throw new l}formatOffset(O,S){throw new l}offset(O){throw new l}equals(O){throw new l}get isValid(){throw new l}}let he=null;class ye extends ke{static get instance(){return he===null&&(he=new ye),he}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(O,{format:S,locale:T}){return Sf(O,S,T)}formatOffset(O,S){return fo(this.offset(O),S)}offset(O){return-new Date(O).getTimezoneOffset()}equals(O){return O.type==="system"}get isValid(){return!0}}const N=new Map;function U(P){let O=N.get(P);return O===void 0&&(O=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:P,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),N.set(P,O)),O}const ue={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function L(P,O){const S=P.format(O).replace(/\u200E/g,""),T=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(S),[,j,F,K,te,re,xe,He]=T;return[K,j,F,te,re,xe,He]}function Re(P,O){const S=P.formatToParts(O),T=[];for(let j=0;j<S.length;j++){const{type:F,value:K}=S[j],te=ue[F];F==="era"?T[te]=K:qe(te)||(T[te]=parseInt(K,10))}return T}const _e=new Map;class $e extends ke{static create(O){let S=_e.get(O);return S===void 0&&_e.set(O,S=new $e(O)),S}static resetCache(){_e.clear(),N.clear()}static isValidSpecifier(O){return this.isValidZone(O)}static isValidZone(O){if(!O)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:O}).format(),!0}catch{return!1}}constructor(O){super(),this.zoneName=O,this.valid=$e.isValidZone(O)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(O,{format:S,locale:T}){return Sf(O,S,T,this.name)}formatOffset(O,S){return fo(this.offset(O),S)}offset(O){if(!this.valid)return NaN;const S=new Date(O);if(isNaN(S))return NaN;const T=U(this.name);let[j,F,K,te,re,xe,He]=T.formatToParts?Re(T,S):L(T,S);te==="BC"&&(j=-Math.abs(j)+1);const wt=co({year:j,month:F,day:K,hour:re===24?0:re,minute:xe,second:He,millisecond:0});let Ge=+S;const It=Ge%1e3;return Ge-=It>=0?It:1e3+It,(wt-Ge)/(60*1e3)}equals(O){return O.type==="iana"&&O.name===this.name}get isValid(){return this.valid}}let rt={};function st(P,O={}){const S=JSON.stringify([P,O]);let T=rt[S];return T||(T=new Intl.ListFormat(P,O),rt[S]=T),T}const mt=new Map;function Xt(P,O={}){const S=JSON.stringify([P,O]);let T=mt.get(S);return T===void 0&&(T=new Intl.DateTimeFormat(P,O),mt.set(S,T)),T}const Gn=new Map;function cn(P,O={}){const S=JSON.stringify([P,O]);let T=Gn.get(S);return T===void 0&&(T=new Intl.NumberFormat(P,O),Gn.set(S,T)),T}const Nn=new Map;function Zi(P,O={}){const{base:S,...T}=O,j=JSON.stringify([P,T]);let F=Nn.get(j);return F===void 0&&(F=new Intl.RelativeTimeFormat(P,O),Nn.set(j,F)),F}let Tr=null;function Kn(){return Tr||(Tr=new Intl.DateTimeFormat().resolvedOptions().locale,Tr)}const Yr=new Map;function Ss(P){let O=Yr.get(P);return O===void 0&&(O=new Intl.DateTimeFormat(P).resolvedOptions(),Yr.set(P,O)),O}const $r=new Map;function Ur(P){let O=$r.get(P);if(!O){const S=new Intl.Locale(P);O="getWeekInfo"in S?S.getWeekInfo():S.weekInfo,"minimalDays"in O||(O={...yt,...O}),$r.set(P,O)}return O}function qr(P){const O=P.indexOf("-x-");O!==-1&&(P=P.substring(0,O));const S=P.indexOf("-u-");if(S===-1)return[P];{let T,j;try{T=Xt(P).resolvedOptions(),j=P}catch{const re=P.substring(0,S);T=Xt(re).resolvedOptions(),j=re}const{numberingSystem:F,calendar:K}=T;return[j,F,K]}}function bs(P,O,S){return(S||O)&&(P.includes("-u-")||(P+="-u"),S&&(P+=`-ca-${S}`),O&&(P+=`-nu-${O}`)),P}function io(P){const O=[];for(let S=1;S<=12;S++){const T=it.utc(2009,S,1);O.push(P(T))}return O}function cr(P){const O=[];for(let S=1;S<=7;S++){const T=it.utc(2016,11,13+S);O.push(P(T))}return O}function Jn(P,O,S,T){const j=P.listingMode();return j==="error"?null:j==="en"?S(O):T(O)}function fe(P){return P.numberingSystem&&P.numberingSystem!=="latn"?!1:P.numberingSystem==="latn"||!P.locale||P.locale.startsWith("en")||Ss(P.locale).numberingSystem==="latn"}class Pe{constructor(O,S,T){this.padTo=T.padTo||0,this.floor=T.floor||!1;const{padTo:j,floor:F,...K}=T;if(!S||Object.keys(K).length>0){const te={useGrouping:!1,...T};T.padTo>0&&(te.minimumIntegerDigits=T.padTo),this.inf=cn(O,te)}}format(O){if(this.inf){const S=this.floor?Math.floor(O):O;return this.inf.format(S)}else{const S=this.floor?Math.floor(O):Ps(O,3);return Kt(S,this.padTo)}}}class Fe{constructor(O,S,T){this.opts=T,this.originalZone=void 0;let j;if(this.opts.timeZone)this.dt=O;else if(O.zone.type==="fixed"){const K=-1*(O.offset/60),te=K>=0?`Etc/GMT+${K}`:`Etc/GMT${K}`;O.offset!==0&&$e.create(te).valid?(j=te,this.dt=O):(j="UTC",this.dt=O.offset===0?O:O.setZone("UTC").plus({minutes:O.offset}),this.originalZone=O.zone)}else O.zone.type==="system"?this.dt=O:O.zone.type==="iana"?(this.dt=O,j=O.zone.name):(j="UTC",this.dt=O.setZone("UTC").plus({minutes:O.offset}),this.originalZone=O.zone);const F={...this.opts};F.timeZone=F.timeZone||j,this.dtf=Xt(S,F)}format(){return this.originalZone?this.formatToParts().map(({value:O})=>O).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const O=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?O.map(S=>{if(S.type==="timeZoneName"){const T=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...S,value:T}}else return S}):O}resolvedOptions(){return this.dtf.resolvedOptions()}}class nt{constructor(O,S,T){this.opts={style:"long",...T},!S&&Er()&&(this.rtf=Zi(O,T))}format(O,S){return this.rtf?this.rtf.format(O,S):Cf(S,O,this.opts.numeric,this.opts.style!=="long")}formatToParts(O,S){return this.rtf?this.rtf.formatToParts(O,S):[]}}const yt={firstDay:1,minimalDays:4,weekend:[6,7]};class Ke{static fromOpts(O){return Ke.create(O.locale,O.numberingSystem,O.outputCalendar,O.weekSettings,O.defaultToEN)}static create(O,S,T,j,F=!1){const K=O||B.defaultLocale,te=K||(F?"en-US":Kn()),re=S||B.defaultNumberingSystem,xe=T||B.defaultOutputCalendar,He=vi(j)||B.defaultWeekSettings;return new Ke(te,re,xe,He,K)}static resetCache(){Tr=null,mt.clear(),Gn.clear(),Nn.clear(),Yr.clear(),$r.clear()}static fromObject({locale:O,numberingSystem:S,outputCalendar:T,weekSettings:j}={}){return Ke.create(O,S,T,j)}constructor(O,S,T,j,F){const[K,te,re]=qr(O);this.locale=K,this.numberingSystem=S||te||null,this.outputCalendar=T||re||null,this.weekSettings=j,this.intl=bs(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=F,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=fe(this)),this.fastNumbersCached}listingMode(){const O=this.isEnglish(),S=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return O&&S?"en":"intl"}clone(O){return!O||Object.getOwnPropertyNames(O).length===0?this:Ke.create(O.locale||this.specifiedLocale,O.numberingSystem||this.numberingSystem,O.outputCalendar||this.outputCalendar,vi(O.weekSettings)||this.weekSettings,O.defaultToEN||!1)}redefaultToEN(O={}){return this.clone({...O,defaultToEN:!0})}redefaultToSystem(O={}){return this.clone({...O,defaultToEN:!1})}months(O,S=!1){return Jn(this,O,_l,()=>{const T=this.intl==="ja"||this.intl.startsWith("ja-");S&=!T;const j=S?{month:O,day:"numeric"}:{month:O},F=S?"format":"standalone";if(!this.monthsCache[F][O]){const K=T?te=>this.dtFormatter(te,j).format():te=>this.extract(te,j,"month");this.monthsCache[F][O]=io(K)}return this.monthsCache[F][O]})}weekdays(O,S=!1){return Jn(this,O,ki,()=>{const T=S?{weekday:O,year:"numeric",month:"long",day:"numeric"}:{weekday:O},j=S?"format":"standalone";return this.weekdaysCache[j][O]||(this.weekdaysCache[j][O]=cr(F=>this.extract(F,T,"weekday"))),this.weekdaysCache[j][O]})}meridiems(){return Jn(this,void 0,()=>mo,()=>{if(!this.meridiemCache){const O={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[it.utc(2016,11,13,9),it.utc(2016,11,13,19)].map(S=>this.extract(S,O,"dayperiod"))}return this.meridiemCache})}eras(O){return Jn(this,O,uc,()=>{const S={era:O};return this.eraCache[O]||(this.eraCache[O]=[it.utc(-40,1,1),it.utc(2017,1,1)].map(T=>this.extract(T,S,"era"))),this.eraCache[O]})}extract(O,S,T){const j=this.dtFormatter(O,S),F=j.formatToParts(),K=F.find(te=>te.type.toLowerCase()===T);return K?K.value:null}numberFormatter(O={}){return new Pe(this.intl,O.forceSimple||this.fastNumbers,O)}dtFormatter(O,S={}){return new Fe(O,this.intl,S)}relFormatter(O={}){return new nt(this.intl,this.isEnglish(),O)}listFormatter(O={}){return st(this.intl,O)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Ss(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Kr()?Ur(this.locale):yt}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(O){return this.locale===O.locale&&this.numberingSystem===O.numberingSystem&&this.outputCalendar===O.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let er=null;class xt extends ke{static get utcInstance(){return er===null&&(er=new xt(0)),er}static instance(O){return O===0?xt.utcInstance:new xt(O)}static parseSpecifier(O){if(O){const S=O.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(S)return new xt(ho(S[1],S[2]))}return null}constructor(O){super(),this.fixed=O}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fo(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fo(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(O,S){return fo(this.fixed,S)}get isUniversal(){return!0}offset(){return this.fixed}equals(O){return O.type==="fixed"&&O.fixed===this.fixed}get isValid(){return!0}}class hr extends ke{constructor(O){super(),this.zoneName=O}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function bn(P,O){if(qe(P)||P===null)return O;if(P instanceof ke)return P;if(Sa(P)){const S=P.toLowerCase();return S==="default"?O:S==="local"||S==="system"?ye.instance:S==="utc"||S==="gmt"?xt.utcInstance:xt.parseSpecifier(S)||$e.create(P)}else return vn(P)?xt.instance(P):typeof P=="object"&&"offset"in P&&typeof P.offset=="function"?P:new hr(P)}const nn={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},tr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Tn=nn.hanidec.replace(/[\[|\]]/g,"").split("");function Xi(P){let O=parseInt(P,10);if(isNaN(O)){O="";for(let S=0;S<P.length;S++){const T=P.charCodeAt(S);if(P[S].search(nn.hanidec)!==-1)O+=Tn.indexOf(P[S]);else for(const j in tr){const[F,K]=tr[j];T>=F&&T<=K&&(O+=T-F)}}return parseInt(O,10)}else return O}const Vi=new Map;function Hr(){Vi.clear()}function hn({numberingSystem:P},O=""){const S=P||"latn";let T=Vi.get(S);T===void 0&&(T=new Map,Vi.set(S,T));let j=T.get(O);return j===void 0&&(j=new RegExp(`${nn[S]}${O}`),T.set(O,j)),j}let va=()=>Date.now(),so="system",wa=null,oo=null,Wi=null,yi=60,ka,Fi=null;class B{static get now(){return va}static set now(O){va=O}static set defaultZone(O){so=O}static get defaultZone(){return bn(so,ye.instance)}static get defaultLocale(){return wa}static set defaultLocale(O){wa=O}static get defaultNumberingSystem(){return oo}static set defaultNumberingSystem(O){oo=O}static get defaultOutputCalendar(){return Wi}static set defaultOutputCalendar(O){Wi=O}static get defaultWeekSettings(){return Fi}static set defaultWeekSettings(O){Fi=vi(O)}static get twoDigitCutoffYear(){return yi}static set twoDigitCutoffYear(O){yi=O%100}static get throwOnInvalid(){return ka}static set throwOnInvalid(O){ka=O}static resetCaches(){Ke.resetCache(),$e.resetCache(),it.resetCache(),Hr()}}class ee{constructor(O,S){this.reason=O,this.explanation=S}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ce=[0,31,59,90,120,151,181,212,243,273,304,334],pe=[0,31,60,91,121,152,182,213,244,274,305,335];function Se(P,O){return new ee("unit out of range",`you specified ${O} (of type ${typeof O}) as a ${P}, which is invalid`)}function Xe(P,O,S){const T=new Date(Date.UTC(P,O-1,S));P<100&&P>=0&&T.setUTCFullYear(T.getUTCFullYear()-1900);const j=T.getUTCDay();return j===0?7:j}function Je(P,O,S){return S+(Yi(P)?pe:ce)[O-1]}function Ae(P,O){const S=Yi(P)?pe:ce,T=S.findIndex(F=>F<O),j=O-S[T];return{month:T+1,day:j}}function ze(P,O){return(P-O+7)%7+1}function Me(P,O=4,S=1){const{year:T,month:j,day:F}=P,K=Je(T,j,F),te=ze(Xe(T,j,F),S);let re=Math.floor((K-te+14-O)/7),xe;return re<1?(xe=T-1,re=Qs(xe,O,S)):re>Qs(T,O,S)?(xe=T+1,re=1):xe=T,{weekYear:xe,weekNumber:re,weekday:te,...po(P)}}function Ne(P,O=4,S=1){const{weekYear:T,weekNumber:j,weekday:F}=P,K=ze(Xe(T,1,O),S),te=uo(T);let re=j*7+F-K-7+O,xe;re<1?(xe=T-1,re+=uo(xe)):re>te?(xe=T+1,re-=uo(T)):xe=T;const{month:He,day:at}=Ae(xe,re);return{year:xe,month:He,day:at,...po(P)}}function ot(P){const{year:O,month:S,day:T}=P,j=Je(O,S,T);return{year:O,ordinal:j,...po(P)}}function gt(P){const{year:O,ordinal:S}=P,{month:T,day:j}=Ae(O,S);return{year:O,month:T,day:j,...po(P)}}function fn(P,O){if(!qe(P.localWeekday)||!qe(P.localWeekNumber)||!qe(P.localWeekYear)){if(!qe(P.weekday)||!qe(P.weekNumber)||!qe(P.weekYear))throw new i("Cannot mix locale-based week fields with ISO-based week fields");return qe(P.localWeekday)||(P.weekday=P.localWeekday),qe(P.localWeekNumber)||(P.weekNumber=P.localWeekNumber),qe(P.localWeekYear)||(P.weekYear=P.localWeekYear),delete P.localWeekday,delete P.localWeekNumber,delete P.localWeekYear,{minDaysInFirstWeek:O.getMinDaysInFirstWeek(),startOfWeek:O.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function _t(P,O=4,S=1){const T=bt(P.weekYear),j=ht(P.weekNumber,1,Qs(P.weekYear,O,S)),F=ht(P.weekday,1,7);return T?j?F?!1:Se("weekday",P.weekday):Se("week",P.weekNumber):Se("weekYear",P.weekYear)}function Qt(P){const O=bt(P.year),S=ht(P.ordinal,1,uo(P.year));return O?S?!1:Se("ordinal",P.ordinal):Se("year",P.year)}function Ft(P){const O=bt(P.year),S=ht(P.month,1,12),T=ht(P.day,1,Al(P.year,P.month));return O?S?T?!1:Se("day",P.day):Se("month",P.month):Se("year",P.year)}function Gr(P){const{hour:O,minute:S,second:T,millisecond:j}=P,F=ht(O,0,23)||O===24&&S===0&&T===0&&j===0,K=ht(S,0,59),te=ht(T,0,59),re=ht(j,0,999);return F?K?te?re?!1:Se("millisecond",j):Se("second",T):Se("minute",S):Se("hour",O)}function qe(P){return typeof P>"u"}function vn(P){return typeof P=="number"}function bt(P){return typeof P=="number"&&P%1===0}function Sa(P){return typeof P=="string"}function xi(P){return Object.prototype.toString.call(P)==="[object Date]"}function Er(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Kr(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function ao(P){return Array.isArray(P)?P:[P]}function vt(P,O,S){if(P.length!==0)return P.reduce((T,j)=>{const F=[O(j),j];return T&&S(T[0],F[0])===T[0]?T:F},null)[1]}function Vt(P,O){return O.reduce((S,T)=>(S[T]=P[T],S),{})}function rn(P,O){return Object.prototype.hasOwnProperty.call(P,O)}function vi(P){if(P==null)return null;if(typeof P!="object")throw new o("Week settings must be an object");if(!ht(P.firstDay,1,7)||!ht(P.minimalDays,1,7)||!Array.isArray(P.weekend)||P.weekend.some(O=>!ht(O,1,7)))throw new o("Invalid week settings");return{firstDay:P.firstDay,minimalDays:P.minimalDays,weekend:Array.from(P.weekend)}}function ht(P,O,S){return bt(P)&&P>=O&&P<=S}function Bi(P,O){return P-O*Math.floor(P/O)}function Kt(P,O=2){const S=P<0;let T;return S?T="-"+(""+-P).padStart(O,"0"):T=(""+P).padStart(O,"0"),T}function Jr(P){if(!(qe(P)||P===null||P===""))return parseInt(P,10)}function ei(P){if(!(qe(P)||P===null||P===""))return parseFloat(P)}function lo(P){if(!(qe(P)||P===null||P==="")){const O=parseFloat("0."+P)*1e3;return Math.floor(O)}}function Ps(P,O,S="round"){const T=10**O;switch(S){case"expand":return P>0?Math.ceil(P*T)/T:Math.floor(P*T)/T;case"trunc":return Math.trunc(P*T)/T;case"round":return Math.round(P*T)/T;case"floor":return Math.floor(P*T)/T;case"ceil":return Math.ceil(P*T)/T;default:throw new RangeError(`Value rounding ${S} is out of range`)}}function Yi(P){return P%4===0&&(P%100!==0||P%400===0)}function uo(P){return Yi(P)?366:365}function Al(P,O){const S=Bi(O-1,12)+1,T=P+(O-S)/12;return S===2?Yi(T)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][S-1]}function co(P){let O=Date.UTC(P.year,P.month-1,P.day,P.hour,P.minute,P.second,P.millisecond);return P.year<100&&P.year>=0&&(O=new Date(O),O.setUTCFullYear(P.year,P.month-1,P.day)),+O}function ac(P,O,S){return-ze(Xe(P,1,O),S)+O-1}function Qs(P,O=4,S=1){const T=ac(P,O,S),j=ac(P+1,O,S);return(uo(P)-T+j)/7}function Cs(P){return P>99?P:P>B.twoDigitCutoffYear?1900+P:2e3+P}function Sf(P,O,S,T=null){const j=new Date(P),F={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};T&&(F.timeZone=T);const K={timeZoneName:O,...F},te=new Intl.DateTimeFormat(S,K).formatToParts(j).find(re=>re.type.toLowerCase()==="timezonename");return te?te.value:null}function ho(P,O){let S=parseInt(P,10);Number.isNaN(S)&&(S=0);const T=parseInt(O,10)||0,j=S<0||Object.is(S,-0)?-T:T;return S*60+j}function jt(P){const O=Number(P);if(typeof P=="boolean"||P===""||!Number.isFinite(O))throw new o(`Invalid unit value ${P}`);return O}function ba(P,O){const S={};for(const T in P)if(rn(P,T)){const j=P[T];if(j==null)continue;S[O(T)]=jt(j)}return S}function fo(P,O){const S=Math.trunc(Math.abs(P/60)),T=Math.trunc(Math.abs(P%60)),j=P>=0?"+":"-";switch(O){case"short":return`${j}${Kt(S,2)}:${Kt(T,2)}`;case"narrow":return`${j}${S}${T>0?`:${T}`:""}`;case"techie":return`${j}${Kt(S,2)}${Kt(T,2)}`;default:throw new RangeError(`Value format ${O} is out of range for property format`)}}function po(P){return Vt(P,["hour","minute","second","millisecond"])}const bf=["January","February","March","April","May","June","July","August","September","October","November","December"],lc=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Pf=["J","F","M","A","M","J","J","A","S","O","N","D"];function _l(P){switch(P){case"narrow":return[...Pf];case"short":return[...lc];case"long":return[...bf];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const Pa=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],wi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Ui=["M","T","W","T","F","S","S"];function ki(P){switch(P){case"narrow":return[...Ui];case"short":return[...wi];case"long":return[...Pa];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const mo=["AM","PM"],Qa=["Before Christ","Anno Domini"],qi=["BC","AD"],gm=["B","A"];function uc(P){switch(P){case"narrow":return[...gm];case"short":return[...qi];case"long":return[...Qa];default:return null}}function Ca(P){return mo[P.hour<12?0:1]}function Om(P,O){return ki(O)[P.weekday-1]}function Qf(P,O){return _l(O)[P.month-1]}function zl(P,O){return uc(O)[P.year<0?0:1]}function Cf(P,O,S="always",T=!1){const j={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},F=["hours","minutes","seconds"].indexOf(P)===-1;if(S==="auto"&&F){const at=P==="days";switch(O){case 1:return at?"tomorrow":`next ${j[P][0]}`;case-1:return at?"yesterday":`last ${j[P][0]}`;case 0:return at?"today":`this ${j[P][0]}`}}const K=Object.is(O,-0)||O<0,te=Math.abs(O),re=te===1,xe=j[P],He=T?re?xe[1]:xe[2]||xe[1]:re?j[P][0]:P;return K?`${te} ${He} ago`:`in ${te} ${He}`}function Tf(P,O){let S="";for(const T of P)T.literal?S+=T.val:S+=O(T.val);return S}const Ta={D:p,DD:m,DDD:k,DDDD:w,t:C,tt:Q,ttt:$,tttt:E,T:Z,TT:Y,TTT:_,TTTT:R,f:q,ff:W,fff:se,ffff:ne,F:G,FF:z,FFF:oe,FFFF:de};class dn{static create(O,S={}){return new dn(O,S)}static parseFormat(O){let S=null,T="",j=!1;const F=[];for(let K=0;K<O.length;K++){const te=O.charAt(K);te==="'"?((T.length>0||j)&&F.push({literal:j||/^\s+$/.test(T),val:T===""?"'":T}),S=null,T="",j=!j):j||te===S?T+=te:(T.length>0&&F.push({literal:/^\s+$/.test(T),val:T}),T=te,S=te)}return T.length>0&&F.push({literal:j||/^\s+$/.test(T),val:T}),F}static macroTokenToFormatOpts(O){return Ta[O]}constructor(O,S){this.opts=S,this.loc=O,this.systemLoc=null}formatWithSystemDefault(O,S){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(O,{...this.opts,...S}).format()}dtFormatter(O,S={}){return this.loc.dtFormatter(O,{...this.opts,...S})}formatDateTime(O,S){return this.dtFormatter(O,S).format()}formatDateTimeParts(O,S){return this.dtFormatter(O,S).formatToParts()}formatInterval(O,S){return this.dtFormatter(O.start,S).dtf.formatRange(O.start.toJSDate(),O.end.toJSDate())}resolvedOptions(O,S){return this.dtFormatter(O,S).resolvedOptions()}num(O,S=0,T=void 0){if(this.opts.forceSimple)return Kt(O,S);const j={...this.opts};return S>0&&(j.padTo=S),T&&(j.signDisplay=T),this.loc.numberFormatter(j).format(O)}formatDateTimeFromString(O,S){const T=this.loc.listingMode()==="en",j=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",F=(Ge,It)=>this.loc.extract(O,Ge,It),K=Ge=>O.isOffsetFixed&&O.offset===0&&Ge.allowZ?"Z":O.isValid?O.zone.formatOffset(O.ts,Ge.format):"",te=()=>T?Ca(O):F({hour:"numeric",hourCycle:"h12"},"dayperiod"),re=(Ge,It)=>T?Qf(O,Ge):F(It?{month:Ge}:{month:Ge,day:"numeric"},"month"),xe=(Ge,It)=>T?Om(O,Ge):F(It?{weekday:Ge}:{weekday:Ge,month:"long",day:"numeric"},"weekday"),He=Ge=>{const It=dn.macroTokenToFormatOpts(Ge);return It?this.formatWithSystemDefault(O,It):Ge},at=Ge=>T?zl(O,Ge):F({era:Ge},"era"),wt=Ge=>{switch(Ge){case"S":return this.num(O.millisecond);case"u":case"SSS":return this.num(O.millisecond,3);case"s":return this.num(O.second);case"ss":return this.num(O.second,2);case"uu":return this.num(Math.floor(O.millisecond/10),2);case"uuu":return this.num(Math.floor(O.millisecond/100));case"m":return this.num(O.minute);case"mm":return this.num(O.minute,2);case"h":return this.num(O.hour%12===0?12:O.hour%12);case"hh":return this.num(O.hour%12===0?12:O.hour%12,2);case"H":return this.num(O.hour);case"HH":return this.num(O.hour,2);case"Z":return K({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return K({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return K({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return O.zone.offsetName(O.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return O.zone.offsetName(O.ts,{format:"long",locale:this.loc.locale});case"z":return O.zoneName;case"a":return te();case"d":return j?F({day:"numeric"},"day"):this.num(O.day);case"dd":return j?F({day:"2-digit"},"day"):this.num(O.day,2);case"c":return this.num(O.weekday);case"ccc":return xe("short",!0);case"cccc":return xe("long",!0);case"ccccc":return xe("narrow",!0);case"E":return this.num(O.weekday);case"EEE":return xe("short",!1);case"EEEE":return xe("long",!1);case"EEEEE":return xe("narrow",!1);case"L":return j?F({month:"numeric",day:"numeric"},"month"):this.num(O.month);case"LL":return j?F({month:"2-digit",day:"numeric"},"month"):this.num(O.month,2);case"LLL":return re("short",!0);case"LLLL":return re("long",!0);case"LLLLL":return re("narrow",!0);case"M":return j?F({month:"numeric"},"month"):this.num(O.month);case"MM":return j?F({month:"2-digit"},"month"):this.num(O.month,2);case"MMM":return re("short",!1);case"MMMM":return re("long",!1);case"MMMMM":return re("narrow",!1);case"y":return j?F({year:"numeric"},"year"):this.num(O.year);case"yy":return j?F({year:"2-digit"},"year"):this.num(O.year.toString().slice(-2),2);case"yyyy":return j?F({year:"numeric"},"year"):this.num(O.year,4);case"yyyyyy":return j?F({year:"numeric"},"year"):this.num(O.year,6);case"G":return at("short");case"GG":return at("long");case"GGGGG":return at("narrow");case"kk":return this.num(O.weekYear.toString().slice(-2),2);case"kkkk":return this.num(O.weekYear,4);case"W":return this.num(O.weekNumber);case"WW":return this.num(O.weekNumber,2);case"n":return this.num(O.localWeekNumber);case"nn":return this.num(O.localWeekNumber,2);case"ii":return this.num(O.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(O.localWeekYear,4);case"o":return this.num(O.ordinal);case"ooo":return this.num(O.ordinal,3);case"q":return this.num(O.quarter);case"qq":return this.num(O.quarter,2);case"X":return this.num(Math.floor(O.ts/1e3));case"x":return this.num(O.ts);default:return He(Ge)}};return Tf(dn.parseFormat(S),wt)}formatDurationFromString(O,S){const T=this.opts.signMode==="negativeLargestOnly"?-1:1,j=He=>{switch(He[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},F=(He,at)=>wt=>{const Ge=j(wt);if(Ge){const It=at.isNegativeDuration&&Ge!==at.largestUnit?T:1;let ir;return this.opts.signMode==="negativeLargestOnly"&&Ge!==at.largestUnit?ir="never":this.opts.signMode==="all"?ir="always":ir="auto",this.num(He.get(Ge)*It,wt.length,ir)}else return wt},K=dn.parseFormat(S),te=K.reduce((He,{literal:at,val:wt})=>at?He:He.concat(wt),[]),re=O.shiftTo(...te.map(j).filter(He=>He)),xe={isNegativeDuration:re<0,largestUnit:Object.keys(re.values)[0]};return Tf(K,F(re,xe))}}const Ts=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Si(...P){const O=P.reduce((S,T)=>S+T.source,"");return RegExp(`^${O}$`)}function go(...P){return O=>P.reduce(([S,T,j],F)=>{const[K,te,re]=F(O,j);return[{...S,...K},te||T,re]},[{},null,1]).slice(0,2)}function Oo(P,...O){if(P==null)return[null,null];for(const[S,T]of O){const j=S.exec(P);if(j)return T(j)}return[null,null]}function Dl(...P){return(O,S)=>{const T={};let j;for(j=0;j<P.length;j++)T[P[j]]=Jr(O[S+j]);return[T,null,S+j]}}const $a=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,cc=`(?:${$a.source}?(?:\\[(${Ts.source})\\])?)?`,Ll=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,bi=RegExp(`${Ll.source}${cc}`),Ea=RegExp(`(?:[Tt]${bi.source})?`),Il=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$f=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Zl=/(\d{4})-?(\d{3})/,Xl=Dl("weekYear","weekNumber","weekDay"),Ef=Dl("year","ordinal"),nr=/(\d{4})-(\d\d)-(\d\d)/,$s=RegExp(`${Ll.source} ?(?:${$a.source}|(${Ts.source}))?`),hc=RegExp(`(?: ${$s.source})?`);function ti(P,O,S){const T=P[O];return qe(T)?S:Jr(T)}function ym(P,O){return[{year:ti(P,O),month:ti(P,O+1,1),day:ti(P,O+2,1)},null,O+3]}function Hi(P,O){return[{hours:ti(P,O,0),minutes:ti(P,O+1,0),seconds:ti(P,O+2,0),milliseconds:lo(P[O+3])},null,O+4]}function Es(P,O){const S=!P[O]&&!P[O+1],T=ho(P[O+1],P[O+2]),j=S?null:xt.instance(T);return[{},j,O+3]}function Pi(P,O){const S=P[O]?$e.create(P[O]):null;return[{},S,O+1]}const Vl=RegExp(`^T?${Ll.source}$`),Mf=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function xm(P){const[O,S,T,j,F,K,te,re,xe]=P,He=O[0]==="-",at=re&&re[0]==="-",wt=(Ge,It=!1)=>Ge!==void 0&&(It||Ge&&He)?-Ge:Ge;return[{years:wt(ei(S)),months:wt(ei(T)),weeks:wt(ei(j)),days:wt(ei(F)),hours:wt(ei(K)),minutes:wt(ei(te)),seconds:wt(ei(re),re==="-0"),milliseconds:wt(lo(xe),at)}]}const vm={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function fc(P,O,S,T,j,F,K){const te={year:O.length===2?Cs(Jr(O)):Jr(O),month:lc.indexOf(S)+1,day:Jr(T),hour:Jr(j),minute:Jr(F)};return K&&(te.second=Jr(K)),P&&(te.weekday=P.length>3?Pa.indexOf(P)+1:wi.indexOf(P)+1),te}const dc=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function wm(P){const[,O,S,T,j,F,K,te,re,xe,He,at]=P,wt=fc(O,j,T,S,F,K,te);let Ge;return re?Ge=vm[re]:xe?Ge=0:Ge=ho(He,at),[wt,new xt(Ge)]}function km(P){return P.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Sm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,bm=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Pm=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function pc(P){const[,O,S,T,j,F,K,te]=P;return[fc(O,j,T,S,F,K,te),xt.utcInstance]}function Qm(P){const[,O,S,T,j,F,K,te]=P;return[fc(O,te,S,T,j,F,K),xt.utcInstance]}const Cm=Si(Il,Ea),Tm=Si($f,Ea),$m=Si(Zl,Ea),mc=Si(bi),jf=go(ym,Hi,Es,Pi),Em=go(Xl,Hi,Es,Pi),Mm=go(Ef,Hi,Es,Pi),Rf=go(Hi,Es,Pi);function jm(P){return Oo(P,[Cm,jf],[Tm,Em],[$m,Mm],[mc,Rf])}function Rm(P){return Oo(km(P),[dc,wm])}function Nm(P){return Oo(P,[Sm,pc],[bm,pc],[Pm,Qm])}function Am(P){return Oo(P,[Mf,xm])}const _m=go(Hi);function zm(P){return Oo(P,[Vl,_m])}const Dm=Si(nr,hc),gc=Si($s),Ma=go(Hi,Es,Pi);function Lm(P){return Oo(P,[Dm,jf],[gc,Ma])}const Oc="Invalid Duration",yc={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Nf={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...yc},rr=146097/400,Ms=146097/4800,yo={years:{quarters:4,months:12,weeks:rr/7,days:rr,hours:rr*24,minutes:rr*24*60,seconds:rr*24*60*60,milliseconds:rr*24*60*60*1e3},quarters:{months:3,weeks:rr/28,days:rr/4,hours:rr*24/4,minutes:rr*24*60/4,seconds:rr*24*60*60/4,milliseconds:rr*24*60*60*1e3/4},months:{weeks:Ms/7,days:Ms,hours:Ms*24,minutes:Ms*24*60,seconds:Ms*24*60*60,milliseconds:Ms*24*60*60*1e3},...yc},js=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Im=js.slice(0).reverse();function Qi(P,O,S=!1){const T={values:S?O.values:{...P.values,...O.values||{}},loc:P.loc.clone(O.loc),conversionAccuracy:O.conversionAccuracy||P.conversionAccuracy,matrix:O.matrix||P.matrix};return new Ot(T)}function xc(P,O){var S;let T=(S=O.milliseconds)!=null?S:0;for(const j of Im.slice(1))O[j]&&(T+=O[j]*P[j].milliseconds);return T}function vc(P,O){const S=xc(P,O)<0?-1:1;js.reduceRight((T,j)=>{if(qe(O[j]))return T;if(T){const F=O[T]*S,K=P[j][T],te=Math.floor(F/K);O[j]+=te*S,O[T]-=te*K*S}return j},null),js.reduce((T,j)=>{if(qe(O[j]))return T;if(T){const F=O[T]%1;O[T]-=F,O[j]+=F*P[T][j]}return j},null)}function xo(P){const O={};for(const[S,T]of Object.entries(P))T!==0&&(O[S]=T);return O}class Ot{constructor(O){const S=O.conversionAccuracy==="longterm"||!1;let T=S?yo:Nf;O.matrix&&(T=O.matrix),this.values=O.values,this.loc=O.loc||Ke.create(),this.conversionAccuracy=S?"longterm":"casual",this.invalid=O.invalid||null,this.matrix=T,this.isLuxonDuration=!0}static fromMillis(O,S){return Ot.fromObject({milliseconds:O},S)}static fromObject(O,S={}){if(O==null||typeof O!="object")throw new o(`Duration.fromObject: argument expected to be an object, got ${O===null?"null":typeof O}`);return new Ot({values:ba(O,Ot.normalizeUnit),loc:Ke.fromObject(S),conversionAccuracy:S.conversionAccuracy,matrix:S.matrix})}static fromDurationLike(O){if(vn(O))return Ot.fromMillis(O);if(Ot.isDuration(O))return O;if(typeof O=="object")return Ot.fromObject(O);throw new o(`Unknown duration argument ${O} of type ${typeof O}`)}static fromISO(O,S){const[T]=Am(O);return T?Ot.fromObject(T,S):Ot.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static fromISOTime(O,S){const[T]=zm(O);return T?Ot.fromObject(T,S):Ot.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the Duration is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new r(T);return new Ot({invalid:T})}static normalizeUnit(O){const S={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[O&&O.toLowerCase()];if(!S)throw new s(O);return S}static isDuration(O){return O&&O.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(O,S={}){const T={...S,floor:S.round!==!1&&S.floor!==!1};return this.isValid?dn.create(this.loc,T).formatDurationFromString(this,O):Oc}toHuman(O={}){if(!this.isValid)return Oc;const S=O.showZeros!==!1,T=js.map(j=>{const F=this.values[j];return qe(F)||F===0&&!S?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...O,unit:j.slice(0,-1)}).format(F)}).filter(j=>j);return this.loc.listFormatter({type:"conjunction",style:O.listStyle||"narrow",...O}).format(T)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let O="P";return this.years!==0&&(O+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(O+=this.months+this.quarters*3+"M"),this.weeks!==0&&(O+=this.weeks+"W"),this.days!==0&&(O+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(O+="T"),this.hours!==0&&(O+=this.hours+"H"),this.minutes!==0&&(O+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(O+=Ps(this.seconds+this.milliseconds/1e3,3)+"S"),O==="P"&&(O+="T0S"),O}toISOTime(O={}){if(!this.isValid)return null;const S=this.toMillis();return S<0||S>=864e5?null:(O={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...O,includeOffset:!1},it.fromMillis(S,{zone:"UTC"}).toISOTime(O))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?xc(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O),T={};for(const j of js)(rn(S.values,j)||rn(this.values,j))&&(T[j]=S.get(j)+this.get(j));return Qi(this,{values:T},!0)}minus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O);return this.plus(S.negate())}mapUnits(O){if(!this.isValid)return this;const S={};for(const T of Object.keys(this.values))S[T]=jt(O(this.values[T],T));return Qi(this,{values:S},!0)}get(O){return this[Ot.normalizeUnit(O)]}set(O){if(!this.isValid)return this;const S={...this.values,...ba(O,Ot.normalizeUnit)};return Qi(this,{values:S})}reconfigure({locale:O,numberingSystem:S,conversionAccuracy:T,matrix:j}={}){const K={loc:this.loc.clone({locale:O,numberingSystem:S}),matrix:j,conversionAccuracy:T};return Qi(this,K)}as(O){return this.isValid?this.shiftTo(O).get(O):NaN}normalize(){if(!this.isValid)return this;const O=this.toObject();return vc(this.matrix,O),Qi(this,{values:O},!0)}rescale(){if(!this.isValid)return this;const O=xo(this.normalize().shiftToAll().toObject());return Qi(this,{values:O},!0)}shiftTo(...O){if(!this.isValid)return this;if(O.length===0)return this;O=O.map(K=>Ot.normalizeUnit(K));const S={},T={},j=this.toObject();let F;for(const K of js)if(O.indexOf(K)>=0){F=K;let te=0;for(const xe in T)te+=this.matrix[xe][K]*T[xe],T[xe]=0;vn(j[K])&&(te+=j[K]);const re=Math.trunc(te);S[K]=re,T[K]=(te*1e3-re*1e3)/1e3}else vn(j[K])&&(T[K]=j[K]);for(const K in T)T[K]!==0&&(S[F]+=K===F?T[K]:T[K]/this.matrix[F][K]);return vc(this.matrix,S),Qi(this,{values:S},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const O={};for(const S of Object.keys(this.values))O[S]=this.values[S]===0?0:-this.values[S];return Qi(this,{values:O},!0)}removeZeros(){if(!this.isValid)return this;const O=xo(this.values);return Qi(this,{values:O},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(O){if(!this.isValid||!O.isValid||!this.loc.equals(O.loc))return!1;function S(T,j){return T===void 0||T===0?j===void 0||j===0:T===j}for(const T of js)if(!S(this.values[T],O.values[T]))return!1;return!0}}const vo="Invalid Interval";function Wl(P,O){return!P||!P.isValid?Jt.invalid("missing or invalid start"):!O||!O.isValid?Jt.invalid("missing or invalid end"):O<P?Jt.invalid("end before start",`The end of an interval must be after its start, but you had start=${P.toISO()} and end=${O.toISO()}`):null}class Jt{constructor(O){this.s=O.start,this.e=O.end,this.invalid=O.invalid||null,this.isLuxonInterval=!0}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the Interval is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new t(T);return new Jt({invalid:T})}static fromDateTimes(O,S){const T=Ki(O),j=Ki(S),F=Wl(T,j);return F??new Jt({start:T,end:j})}static after(O,S){const T=Ot.fromDurationLike(S),j=Ki(O);return Jt.fromDateTimes(j,j.plus(T))}static before(O,S){const T=Ot.fromDurationLike(S),j=Ki(O);return Jt.fromDateTimes(j.minus(T),j)}static fromISO(O,S){const[T,j]=(O||"").split("/",2);if(T&&j){let F,K;try{F=it.fromISO(T,S),K=F.isValid}catch{K=!1}let te,re;try{te=it.fromISO(j,S),re=te.isValid}catch{re=!1}if(K&&re)return Jt.fromDateTimes(F,te);if(K){const xe=Ot.fromISO(j,S);if(xe.isValid)return Jt.after(F,xe)}else if(re){const xe=Ot.fromISO(T,S);if(xe.isValid)return Jt.before(te,xe)}}return Jt.invalid("unparsable",`the input "${O}" can't be parsed as ISO 8601`)}static isInterval(O){return O&&O.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(O="milliseconds"){return this.isValid?this.toDuration(O).get(O):NaN}count(O="milliseconds",S){if(!this.isValid)return NaN;const T=this.start.startOf(O,S);let j;return S!=null&&S.useLocaleWeeks?j=this.end.reconfigure({locale:T.locale}):j=this.end,j=j.startOf(O,S),Math.floor(j.diff(T,O).get(O))+(j.valueOf()!==this.end.valueOf())}hasSame(O){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,O):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(O){return this.isValid?this.s>O:!1}isBefore(O){return this.isValid?this.e<=O:!1}contains(O){return this.isValid?this.s<=O&&this.e>O:!1}set({start:O,end:S}={}){return this.isValid?Jt.fromDateTimes(O||this.s,S||this.e):this}splitAt(...O){if(!this.isValid)return[];const S=O.map(Ki).filter(K=>this.contains(K)).sort((K,te)=>K.toMillis()-te.toMillis()),T=[];let{s:j}=this,F=0;for(;j<this.e;){const K=S[F]||this.e,te=+K>+this.e?this.e:K;T.push(Jt.fromDateTimes(j,te)),j=te,F+=1}return T}splitBy(O){const S=Ot.fromDurationLike(O);if(!this.isValid||!S.isValid||S.as("milliseconds")===0)return[];let{s:T}=this,j=1,F;const K=[];for(;T<this.e;){const te=this.start.plus(S.mapUnits(re=>re*j));F=+te>+this.e?this.e:te,K.push(Jt.fromDateTimes(T,F)),T=F,j+=1}return K}divideEqually(O){return this.isValid?this.splitBy(this.length()/O).slice(0,O):[]}overlaps(O){return this.e>O.s&&this.s<O.e}abutsStart(O){return this.isValid?+this.e==+O.s:!1}abutsEnd(O){return this.isValid?+O.e==+this.s:!1}engulfs(O){return this.isValid?this.s<=O.s&&this.e>=O.e:!1}equals(O){return!this.isValid||!O.isValid?!1:this.s.equals(O.s)&&this.e.equals(O.e)}intersection(O){if(!this.isValid)return this;const S=this.s>O.s?this.s:O.s,T=this.e<O.e?this.e:O.e;return S>=T?null:Jt.fromDateTimes(S,T)}union(O){if(!this.isValid)return this;const S=this.s<O.s?this.s:O.s,T=this.e>O.e?this.e:O.e;return Jt.fromDateTimes(S,T)}static merge(O){const[S,T]=O.sort((j,F)=>j.s-F.s).reduce(([j,F],K)=>F?F.overlaps(K)||F.abutsStart(K)?[j,F.union(K)]:[j.concat([F]),K]:[j,K],[[],null]);return T&&S.push(T),S}static xor(O){let S=null,T=0;const j=[],F=O.map(re=>[{time:re.s,type:"s"},{time:re.e,type:"e"}]),K=Array.prototype.concat(...F),te=K.sort((re,xe)=>re.time-xe.time);for(const re of te)T+=re.type==="s"?1:-1,T===1?S=re.time:(S&&+S!=+re.time&&j.push(Jt.fromDateTimes(S,re.time)),S=null);return Jt.merge(j)}difference(...O){return Jt.xor([this].concat(O)).map(S=>this.intersection(S)).filter(S=>S&&!S.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:vo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(O=p,S={}){return this.isValid?dn.create(this.s.loc.clone(S),O).formatInterval(this):vo}toISO(O){return this.isValid?`${this.s.toISO(O)}/${this.e.toISO(O)}`:vo}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:vo}toISOTime(O){return this.isValid?`${this.s.toISOTime(O)}/${this.e.toISOTime(O)}`:vo}toFormat(O,{separator:S=" – "}={}){return this.isValid?`${this.s.toFormat(O)}${S}${this.e.toFormat(O)}`:vo}toDuration(O,S){return this.isValid?this.e.diff(this.s,O,S):Ot.invalid(this.invalidReason)}mapEndpoints(O){return Jt.fromDateTimes(O(this.s),O(this.e))}}class wo{static hasDST(O=B.defaultZone){const S=it.now().setZone(O).set({month:12});return!O.isUniversal&&S.offset!==S.set({month:6}).offset}static isValidIANAZone(O){return $e.isValidZone(O)}static normalizeZone(O){return bn(O,B.defaultZone)}static getStartOfWeek({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:O=null,locObj:S=null}={}){return(S||Ke.create(O)).getWeekendDays().slice()}static months(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null,outputCalendar:F="gregory"}={}){return(j||Ke.create(S,T,F)).months(O)}static monthsFormat(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null,outputCalendar:F="gregory"}={}){return(j||Ke.create(S,T,F)).months(O,!0)}static weekdays(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null}={}){return(j||Ke.create(S,T,null)).weekdays(O)}static weekdaysFormat(O="long",{locale:S=null,numberingSystem:T=null,locObj:j=null}={}){return(j||Ke.create(S,T,null)).weekdays(O,!0)}static meridiems({locale:O=null}={}){return Ke.create(O).meridiems()}static eras(O="short",{locale:S=null}={}){return Ke.create(S,null,"gregory").eras(O)}static features(){return{relative:Er(),localeWeek:Kr()}}}function Fl(P,O){const S=j=>j.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),T=S(O)-S(P);return Math.floor(Ot.fromMillis(T).as("days"))}function wc(P,O,S){const T=[["years",(re,xe)=>xe.year-re.year],["quarters",(re,xe)=>xe.quarter-re.quarter+(xe.year-re.year)*4],["months",(re,xe)=>xe.month-re.month+(xe.year-re.year)*12],["weeks",(re,xe)=>{const He=Fl(re,xe);return(He-He%7)/7}],["days",Fl]],j={},F=P;let K,te;for(const[re,xe]of T)S.indexOf(re)>=0&&(K=re,j[re]=xe(P,O),te=F.plus(j),te>O?(j[re]--,P=F.plus(j),P>O&&(te=P,j[re]--,P=F.plus(j))):P=te);return[P,j,te,K]}function Af(P,O,S,T){let[j,F,K,te]=wc(P,O,S);const re=O-j,xe=S.filter(at=>["hours","minutes","seconds","milliseconds"].indexOf(at)>=0);xe.length===0&&(K<O&&(K=j.plus({[te]:1})),K!==j&&(F[te]=(F[te]||0)+re/(K-j)));const He=Ot.fromObject(F,T);return xe.length>0?Ot.fromMillis(re,T).shiftTo(...xe).plus(He):He}const _f="missing Intl.DateTimeFormat.formatToParts support";function Tt(P,O=S=>S){return{regex:P,deser:([S])=>O(Xi(S))}}const zf="[  ]",Df=new RegExp(zf,"g");function Zm(P){return P.replace(/\./g,"\\.?").replace(Df,zf)}function Lf(P){return P.replace(/\./g,"").replace(Df," ").toLowerCase()}function an(P,O){return P===null?null:{regex:RegExp(P.map(Zm).join("|")),deser:([S])=>P.findIndex(T=>Lf(S)===Lf(T))+O}}function ko(P,O){return{regex:P,deser:([,S,T])=>ho(S,T),groups:O}}function ja(P){return{regex:P,deser:([O])=>O}}function If(P){return P.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Zf(P,O){const S=hn(O),T=hn(O,"{2}"),j=hn(O,"{3}"),F=hn(O,"{4}"),K=hn(O,"{6}"),te=hn(O,"{1,2}"),re=hn(O,"{1,3}"),xe=hn(O,"{1,6}"),He=hn(O,"{1,9}"),at=hn(O,"{2,4}"),wt=hn(O,"{4,6}"),Ge=ni=>({regex:RegExp(If(ni.val)),deser:([$o])=>$o,literal:!0}),ir=(ni=>{if(P.literal)return Ge(ni);switch(ni.val){case"G":return an(O.eras("short"),0);case"GG":return an(O.eras("long"),0);case"y":return Tt(xe);case"yy":return Tt(at,Cs);case"yyyy":return Tt(F);case"yyyyy":return Tt(wt);case"yyyyyy":return Tt(K);case"M":return Tt(te);case"MM":return Tt(T);case"MMM":return an(O.months("short",!0),1);case"MMMM":return an(O.months("long",!0),1);case"L":return Tt(te);case"LL":return Tt(T);case"LLL":return an(O.months("short",!1),1);case"LLLL":return an(O.months("long",!1),1);case"d":return Tt(te);case"dd":return Tt(T);case"o":return Tt(re);case"ooo":return Tt(j);case"HH":return Tt(T);case"H":return Tt(te);case"hh":return Tt(T);case"h":return Tt(te);case"mm":return Tt(T);case"m":return Tt(te);case"q":return Tt(te);case"qq":return Tt(T);case"s":return Tt(te);case"ss":return Tt(T);case"S":return Tt(re);case"SSS":return Tt(j);case"u":return ja(He);case"uu":return ja(te);case"uuu":return Tt(S);case"a":return an(O.meridiems(),0);case"kkkk":return Tt(F);case"kk":return Tt(at,Cs);case"W":return Tt(te);case"WW":return Tt(T);case"E":case"c":return Tt(S);case"EEE":return an(O.weekdays("short",!1),1);case"EEEE":return an(O.weekdays("long",!1),1);case"ccc":return an(O.weekdays("short",!0),1);case"cccc":return an(O.weekdays("long",!0),1);case"Z":case"ZZ":return ko(new RegExp(`([+-]${te.source})(?::(${T.source}))?`),2);case"ZZZ":return ko(new RegExp(`([+-]${te.source})(${T.source})?`),2);case"z":return ja(/[a-z_+-/]{1,256}?/i);case" ":return ja(/[^\S\n\r]/);default:return Ge(ni)}})(P)||{invalidReason:_f};return ir.token=P,ir}const Xf={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function kc(P,O,S){const{type:T,value:j}=P;if(T==="literal"){const re=/^\s+$/.test(j);return{literal:!re,val:re?" ":j}}const F=O[T];let K=T;T==="hour"&&(O.hour12!=null?K=O.hour12?"hour12":"hour24":O.hourCycle!=null?O.hourCycle==="h11"||O.hourCycle==="h12"?K="hour12":K="hour24":K=S.hour12?"hour12":"hour24");let te=Xf[K];if(typeof te=="object"&&(te=te[F]),te)return{literal:!1,val:te}}function Xm(P){return[`^${P.map(S=>S.regex).reduce((S,T)=>`${S}(${T.source})`,"")}$`,P]}function Vm(P,O,S){const T=P.match(O);if(T){const j={};let F=1;for(const K in S)if(rn(S,K)){const te=S[K],re=te.groups?te.groups+1:1;!te.literal&&te.token&&(j[te.token.val[0]]=te.deser(T.slice(F,F+re))),F+=re}return[T,j]}else return[T,{}]}function So(P){const O=F=>{switch(F){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let S=null,T;return qe(P.z)||(S=$e.create(P.z)),qe(P.Z)||(S||(S=new xt(P.Z)),T=P.Z),qe(P.q)||(P.M=(P.q-1)*3+1),qe(P.h)||(P.h<12&&P.a===1?P.h+=12:P.h===12&&P.a===0&&(P.h=0)),P.G===0&&P.y&&(P.y=-P.y),qe(P.u)||(P.S=lo(P.u)),[Object.keys(P).reduce((F,K)=>{const te=O(K);return te&&(F[te]=P[K]),F},{}),S,T]}let Ra=null;function Na(){return Ra||(Ra=it.fromMillis(1555555555555)),Ra}function Sc(P,O){if(P.literal)return P;const S=dn.macroTokenToFormatOpts(P.val),T=Qc(S,O);return T==null||T.includes(void 0)?P:T}function bc(P,O){return Array.prototype.concat(...P.map(S=>Sc(S,O)))}class Aa{constructor(O,S){if(this.locale=O,this.format=S,this.tokens=bc(dn.parseFormat(S),O),this.units=this.tokens.map(T=>Zf(T,O)),this.disqualifyingUnit=this.units.find(T=>T.invalidReason),!this.disqualifyingUnit){const[T,j]=Xm(this.units);this.regex=RegExp(T,"i"),this.handlers=j}}explainFromTokens(O){if(this.isValid){const[S,T]=Vm(O,this.regex,this.handlers),[j,F,K]=T?So(T):[null,null,void 0];if(rn(T,"a")&&rn(T,"H"))throw new i("Can't include meridiem when specifying 24-hour format");return{input:O,tokens:this.tokens,regex:this.regex,rawMatches:S,matches:T,result:j,zone:F,specificOffset:K}}else return{input:O,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Rs(P,O,S){return new Aa(P,S).explainFromTokens(O)}function Pc(P,O,S){const{result:T,zone:j,specificOffset:F,invalidReason:K}=Rs(P,O,S);return[T,j,F,K]}function Qc(P,O){if(!P)return null;const T=dn.create(O,P).dtFormatter(Na()),j=T.formatToParts(),F=T.resolvedOptions();return j.map(K=>kc(K,P,F))}const bo="Invalid DateTime",Cc=864e13;function Po(P){return new ee("unsupported zone",`the zone "${P.name}" is not supported`)}function Bl(P){return P.weekData===null&&(P.weekData=Me(P.c)),P.weekData}function Yl(P){return P.localWeekData===null&&(P.localWeekData=Me(P.c,P.loc.getMinDaysInFirstWeek(),P.loc.getStartOfWeek())),P.localWeekData}function Gi(P,O){const S={ts:P.ts,zone:P.zone,c:P.c,o:P.o,loc:P.loc,invalid:P.invalid};return new it({...S,...O,old:S})}function Tc(P,O,S){let T=P-O*60*1e3;const j=S.offset(T);if(O===j)return[T,O];T-=(j-O)*60*1e3;const F=S.offset(T);return j===F?[T,j]:[P-Math.min(j,F)*60*1e3,Math.max(j,F)]}function Mr(P,O){P+=O*60*1e3;const S=new Date(P);return{year:S.getUTCFullYear(),month:S.getUTCMonth()+1,day:S.getUTCDate(),hour:S.getUTCHours(),minute:S.getUTCMinutes(),second:S.getUTCSeconds(),millisecond:S.getUTCMilliseconds()}}function Qo(P,O,S){return Tc(co(P),O,S)}function Ul(P,O){const S=P.o,T=P.c.year+Math.trunc(O.years),j=P.c.month+Math.trunc(O.months)+Math.trunc(O.quarters)*3,F={...P.c,year:T,month:j,day:Math.min(P.c.day,Al(T,j))+Math.trunc(O.days)+Math.trunc(O.weeks)*7},K=Ot.fromObject({years:O.years-Math.trunc(O.years),quarters:O.quarters-Math.trunc(O.quarters),months:O.months-Math.trunc(O.months),weeks:O.weeks-Math.trunc(O.weeks),days:O.days-Math.trunc(O.days),hours:O.hours,minutes:O.minutes,seconds:O.seconds,milliseconds:O.milliseconds}).as("milliseconds"),te=co(F);let[re,xe]=Tc(te,S,P.zone);return K!==0&&(re+=K,xe=P.zone.offset(re)),{ts:re,o:xe}}function Co(P,O,S,T,j,F){const{setZone:K,zone:te}=S;if(P&&Object.keys(P).length!==0||O){const re=O||te,xe=it.fromObject(P,{...S,zone:re,specificOffset:F});return K?xe:xe.setZone(te)}else return it.invalid(new ee("unparsable",`the input "${j}" can't be parsed as ${T}`))}function ql(P,O,S=!0){return P.isValid?dn.create(Ke.create("en-US"),{allowZ:S,forceSimple:!0}).formatDateTimeFromString(P,O):null}function Ns(P,O,S){const T=P.c.year>9999||P.c.year<0;let j="";if(T&&P.c.year>=0&&(j+="+"),j+=Kt(P.c.year,T?6:4),S==="year")return j;if(O){if(j+="-",j+=Kt(P.c.month),S==="month")return j;j+="-"}else if(j+=Kt(P.c.month),S==="month")return j;return j+=Kt(P.c.day),j}function Vf(P,O,S,T,j,F,K){let te=!S||P.c.millisecond!==0||P.c.second!==0,re="";switch(K){case"day":case"month":case"year":break;default:if(re+=Kt(P.c.hour),K==="hour")break;if(O){if(re+=":",re+=Kt(P.c.minute),K==="minute")break;te&&(re+=":",re+=Kt(P.c.second))}else{if(re+=Kt(P.c.minute),K==="minute")break;te&&(re+=Kt(P.c.second))}if(K==="second")break;te&&(!T||P.c.millisecond!==0)&&(re+=".",re+=Kt(P.c.millisecond,3))}return j&&(P.isOffsetFixed&&P.offset===0&&!F?re+="Z":P.o<0?(re+="-",re+=Kt(Math.trunc(-P.o/60)),re+=":",re+=Kt(Math.trunc(-P.o%60))):(re+="+",re+=Kt(Math.trunc(P.o/60)),re+=":",re+=Kt(Math.trunc(P.o%60)))),F&&(re+="["+P.zone.ianaName+"]"),re}const $c={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Wf={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Bt={ordinal:1,hour:0,minute:0,second:0,millisecond:0},To=["year","month","day","hour","minute","second","millisecond"],Hl=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],_a=["year","ordinal","hour","minute","second","millisecond"];function za(P){const O={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[P.toLowerCase()];if(!O)throw new s(P);return O}function Gl(P){switch(P.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return za(P)}}function Da(P){if(Ia===void 0&&(Ia=B.now()),P.type!=="iana")return P.offset(Ia);const O=P.name;let S=Mc.get(O);return S===void 0&&(S=P.offset(Ia),Mc.set(O,S)),S}function La(P,O){const S=bn(O.zone,B.defaultZone);if(!S.isValid)return it.invalid(Po(S));const T=Ke.fromObject(O);let j,F;if(qe(P.year))j=B.now();else{for(const re of To)qe(P[re])&&(P[re]=$c[re]);const K=Ft(P)||Gr(P);if(K)return it.invalid(K);const te=Da(S);[j,F]=Qo(P,te,S)}return new it({ts:j,zone:S,loc:T,o:F})}function As(P,O,S){const T=qe(S.round)?!0:S.round,j=qe(S.rounding)?"trunc":S.rounding,F=(te,re)=>(te=Ps(te,T||S.calendary?0:2,S.calendary?"round":j),O.loc.clone(S).relFormatter(S).format(te,re)),K=te=>S.calendary?O.hasSame(P,te)?0:O.startOf(te).diff(P.startOf(te),te).get(te):O.diff(P,te).get(te);if(S.unit)return F(K(S.unit),S.unit);for(const te of S.units){const re=K(te);if(Math.abs(re)>=1)return F(re,te)}return F(P>O?-0:0,S.units[S.units.length-1])}function Ec(P){let O={},S;return P.length>0&&typeof P[P.length-1]=="object"?(O=P[P.length-1],S=Array.from(P).slice(0,P.length-1)):S=Array.from(P),[O,S]}let Ia;const Mc=new Map;class it{constructor(O){const S=O.zone||B.defaultZone;let T=O.invalid||(Number.isNaN(O.ts)?new ee("invalid input"):null)||(S.isValid?null:Po(S));this.ts=qe(O.ts)?B.now():O.ts;let j=null,F=null;if(!T)if(O.old&&O.old.ts===this.ts&&O.old.zone.equals(S))[j,F]=[O.old.c,O.old.o];else{const te=vn(O.o)&&!O.old?O.o:S.offset(this.ts);j=Mr(this.ts,te),T=Number.isNaN(j.year)?new ee("invalid input"):null,j=T?null:j,F=T?null:te}this._zone=S,this.loc=O.loc||Ke.create(),this.invalid=T,this.weekData=null,this.localWeekData=null,this.c=j,this.o=F,this.isLuxonDateTime=!0}static now(){return new it({})}static local(){const[O,S]=Ec(arguments),[T,j,F,K,te,re,xe]=S;return La({year:T,month:j,day:F,hour:K,minute:te,second:re,millisecond:xe},O)}static utc(){const[O,S]=Ec(arguments),[T,j,F,K,te,re,xe]=S;return O.zone=xt.utcInstance,La({year:T,month:j,day:F,hour:K,minute:te,second:re,millisecond:xe},O)}static fromJSDate(O,S={}){const T=xi(O)?O.valueOf():NaN;if(Number.isNaN(T))return it.invalid("invalid input");const j=bn(S.zone,B.defaultZone);return j.isValid?new it({ts:T,zone:j,loc:Ke.fromObject(S)}):it.invalid(Po(j))}static fromMillis(O,S={}){if(vn(O))return O<-Cc||O>Cc?it.invalid("Timestamp out of range"):new it({ts:O,zone:bn(S.zone,B.defaultZone),loc:Ke.fromObject(S)});throw new o(`fromMillis requires a numerical input, but received a ${typeof O} with value ${O}`)}static fromSeconds(O,S={}){if(vn(O))return new it({ts:O*1e3,zone:bn(S.zone,B.defaultZone),loc:Ke.fromObject(S)});throw new o("fromSeconds requires a numerical input")}static fromObject(O,S={}){O=O||{};const T=bn(S.zone,B.defaultZone);if(!T.isValid)return it.invalid(Po(T));const j=Ke.fromObject(S),F=ba(O,Gl),{minDaysInFirstWeek:K,startOfWeek:te}=fn(F,j),re=B.now(),xe=qe(S.specificOffset)?T.offset(re):S.specificOffset,He=!qe(F.ordinal),at=!qe(F.year),wt=!qe(F.month)||!qe(F.day),Ge=at||wt,It=F.weekYear||F.weekNumber;if((Ge||He)&&It)throw new i("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(wt&&He)throw new i("Can't mix ordinal dates with month/day");const ir=It||F.weekday&&!Ge;let ni,$o,jr=Mr(re,xe);ir?(ni=Hl,$o=Wf,jr=Me(jr,K,te)):He?(ni=_a,$o=Bt,jr=ot(jr)):(ni=To,$o=$c);let Eo=!1;for(const Rt of ni){const es=F[Rt];qe(es)?Eo?F[Rt]=$o[Rt]:F[Rt]=jr[Rt]:Eo=!0}const Mo=ir?_t(F,K,te):He?Qt(F):Ft(F),Za=Mo||Gr(F);if(Za)return it.invalid(Za);const jc=ir?Ne(F,K,te):He?gt(F):F,[jo,Ji]=Qo(jc,xe,T),zt=new it({ts:jo,zone:T,o:Ji,loc:j});return F.weekday&&Ge&&O.weekday!==zt.weekday?it.invalid("mismatched weekday",`you can't specify both a weekday of ${F.weekday} and a date of ${zt.toISO()}`):zt.isValid?zt:it.invalid(zt.invalid)}static fromISO(O,S={}){const[T,j]=jm(O);return Co(T,j,S,"ISO 8601",O)}static fromRFC2822(O,S={}){const[T,j]=Rm(O);return Co(T,j,S,"RFC 2822",O)}static fromHTTP(O,S={}){const[T,j]=Nm(O);return Co(T,j,S,"HTTP",S)}static fromFormat(O,S,T={}){if(qe(O)||qe(S))throw new o("fromFormat requires an input string and a format");const{locale:j=null,numberingSystem:F=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:F,defaultToEN:!0}),[te,re,xe,He]=Pc(K,O,S);return He?it.invalid(He):Co(te,re,T,`format ${S}`,O,xe)}static fromString(O,S,T={}){return it.fromFormat(O,S,T)}static fromSQL(O,S={}){const[T,j]=Lm(O);return Co(T,j,S,"SQL",O)}static invalid(O,S=null){if(!O)throw new o("need to specify a reason the DateTime is invalid");const T=O instanceof ee?O:new ee(O,S);if(B.throwOnInvalid)throw new e(T);return new it({invalid:T})}static isDateTime(O){return O&&O.isLuxonDateTime||!1}static parseFormatForOpts(O,S={}){const T=Qc(O,Ke.fromObject(S));return T?T.map(j=>j?j.val:null).join(""):null}static expandFormat(O,S={}){return bc(dn.parseFormat(O),Ke.fromObject(S)).map(j=>j.val).join("")}static resetCache(){Ia=void 0,Mc.clear()}get(O){return this[O]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Bl(this).weekYear:NaN}get weekNumber(){return this.isValid?Bl(this).weekNumber:NaN}get weekday(){return this.isValid?Bl(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Yl(this).weekday:NaN}get localWeekNumber(){return this.isValid?Yl(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Yl(this).weekYear:NaN}get ordinal(){return this.isValid?ot(this.c).ordinal:NaN}get monthShort(){return this.isValid?wo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?wo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?wo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?wo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const O=864e5,S=6e4,T=co(this.c),j=this.zone.offset(T-O),F=this.zone.offset(T+O),K=this.zone.offset(T-j*S),te=this.zone.offset(T-F*S);if(K===te)return[this];const re=T-K*S,xe=T-te*S,He=Mr(re,K),at=Mr(xe,te);return He.hour===at.hour&&He.minute===at.minute&&He.second===at.second&&He.millisecond===at.millisecond?[Gi(this,{ts:re}),Gi(this,{ts:xe})]:[this]}get isInLeapYear(){return Yi(this.year)}get daysInMonth(){return Al(this.year,this.month)}get daysInYear(){return this.isValid?uo(this.year):NaN}get weeksInWeekYear(){return this.isValid?Qs(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Qs(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(O={}){const{locale:S,numberingSystem:T,calendar:j}=dn.create(this.loc.clone(O),O).resolvedOptions(this);return{locale:S,numberingSystem:T,outputCalendar:j}}toUTC(O=0,S={}){return this.setZone(xt.instance(O),S)}toLocal(){return this.setZone(B.defaultZone)}setZone(O,{keepLocalTime:S=!1,keepCalendarTime:T=!1}={}){if(O=bn(O,B.defaultZone),O.equals(this.zone))return this;if(O.isValid){let j=this.ts;if(S||T){const F=O.offset(this.ts),K=this.toObject();[j]=Qo(K,F,O)}return Gi(this,{ts:j,zone:O})}else return it.invalid(Po(O))}reconfigure({locale:O,numberingSystem:S,outputCalendar:T}={}){const j=this.loc.clone({locale:O,numberingSystem:S,outputCalendar:T});return Gi(this,{loc:j})}setLocale(O){return this.reconfigure({locale:O})}set(O){if(!this.isValid)return this;const S=ba(O,Gl),{minDaysInFirstWeek:T,startOfWeek:j}=fn(S,this.loc),F=!qe(S.weekYear)||!qe(S.weekNumber)||!qe(S.weekday),K=!qe(S.ordinal),te=!qe(S.year),re=!qe(S.month)||!qe(S.day),xe=te||re,He=S.weekYear||S.weekNumber;if((xe||K)&&He)throw new i("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(re&&K)throw new i("Can't mix ordinal dates with month/day");let at;F?at=Ne({...Me(this.c,T,j),...S},T,j):qe(S.ordinal)?(at={...this.toObject(),...S},qe(S.day)&&(at.day=Math.min(Al(at.year,at.month),at.day))):at=gt({...ot(this.c),...S});const[wt,Ge]=Qo(at,this.o,this.zone);return Gi(this,{ts:wt,o:Ge})}plus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O);return Gi(this,Ul(this,S))}minus(O){if(!this.isValid)return this;const S=Ot.fromDurationLike(O).negate();return Gi(this,Ul(this,S))}startOf(O,{useLocaleWeeks:S=!1}={}){if(!this.isValid)return this;const T={},j=Ot.normalizeUnit(O);switch(j){case"years":T.month=1;case"quarters":case"months":T.day=1;case"weeks":case"days":T.hour=0;case"hours":T.minute=0;case"minutes":T.second=0;case"seconds":T.millisecond=0;break}if(j==="weeks")if(S){const F=this.loc.getStartOfWeek(),{weekday:K}=this;K<F&&(T.weekNumber=this.weekNumber-1),T.weekday=F}else T.weekday=1;if(j==="quarters"){const F=Math.ceil(this.month/3);T.month=(F-1)*3+1}return this.set(T)}endOf(O,S){return this.isValid?this.plus({[O]:1}).startOf(O,S).minus(1):this}toFormat(O,S={}){return this.isValid?dn.create(this.loc.redefaultToEN(S)).formatDateTimeFromString(this,O):bo}toLocaleString(O=p,S={}){return this.isValid?dn.create(this.loc.clone(S),O).formatDateTime(this):bo}toLocaleParts(O={}){return this.isValid?dn.create(this.loc.clone(O),O).formatDateTimeParts(this):[]}toISO({format:O="extended",suppressSeconds:S=!1,suppressMilliseconds:T=!1,includeOffset:j=!0,extendedZone:F=!1,precision:K="milliseconds"}={}){if(!this.isValid)return null;K=za(K);const te=O==="extended";let re=Ns(this,te,K);return To.indexOf(K)>=3&&(re+="T"),re+=Vf(this,te,S,T,j,F,K),re}toISODate({format:O="extended",precision:S="day"}={}){return this.isValid?Ns(this,O==="extended",za(S)):null}toISOWeekDate(){return ql(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:O=!1,suppressSeconds:S=!1,includeOffset:T=!0,includePrefix:j=!1,extendedZone:F=!1,format:K="extended",precision:te="milliseconds"}={}){return this.isValid?(te=za(te),(j&&To.indexOf(te)>=3?"T":"")+Vf(this,K==="extended",S,O,T,F,te)):null}toRFC2822(){return ql(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return ql(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ns(this,!0):null}toSQLTime({includeOffset:O=!0,includeZone:S=!1,includeOffsetSpace:T=!0}={}){let j="HH:mm:ss.SSS";return(S||O)&&(T&&(j+=" "),S?j+="z":O&&(j+="ZZ")),ql(this,j,!0)}toSQL(O={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(O)}`:null}toString(){return this.isValid?this.toISO():bo}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(O={}){if(!this.isValid)return{};const S={...this.c};return O.includeConfig&&(S.outputCalendar=this.outputCalendar,S.numberingSystem=this.loc.numberingSystem,S.locale=this.loc.locale),S}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(O,S="milliseconds",T={}){if(!this.isValid||!O.isValid)return Ot.invalid("created by diffing an invalid DateTime");const j={locale:this.locale,numberingSystem:this.numberingSystem,...T},F=ao(S).map(Ot.normalizeUnit),K=O.valueOf()>this.valueOf(),te=K?this:O,re=K?O:this,xe=Af(te,re,F,j);return K?xe.negate():xe}diffNow(O="milliseconds",S={}){return this.diff(it.now(),O,S)}until(O){return this.isValid?Jt.fromDateTimes(this,O):this}hasSame(O,S,T){if(!this.isValid)return!1;const j=O.valueOf(),F=this.setZone(O.zone,{keepLocalTime:!0});return F.startOf(S,T)<=j&&j<=F.endOf(S,T)}equals(O){return this.isValid&&O.isValid&&this.valueOf()===O.valueOf()&&this.zone.equals(O.zone)&&this.loc.equals(O.loc)}toRelative(O={}){if(!this.isValid)return null;const S=O.base||it.fromObject({},{zone:this.zone}),T=O.padding?this<S?-O.padding:O.padding:0;let j=["years","months","days","hours","minutes","seconds"],F=O.unit;return Array.isArray(O.unit)&&(j=O.unit,F=void 0),As(S,this.plus(T),{...O,numeric:"always",units:j,unit:F})}toRelativeCalendar(O={}){return this.isValid?As(O.base||it.fromObject({},{zone:this.zone}),this,{...O,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...O){if(!O.every(it.isDateTime))throw new o("min requires all arguments be DateTimes");return vt(O,S=>S.valueOf(),Math.min)}static max(...O){if(!O.every(it.isDateTime))throw new o("max requires all arguments be DateTimes");return vt(O,S=>S.valueOf(),Math.max)}static fromFormatExplain(O,S,T={}){const{locale:j=null,numberingSystem:F=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:F,defaultToEN:!0});return Rs(K,O,S)}static fromStringExplain(O,S,T={}){return it.fromFormatExplain(O,S,T)}static buildFormatParser(O,S={}){const{locale:T=null,numberingSystem:j=null}=S,F=Ke.fromOpts({locale:T,numberingSystem:j,defaultToEN:!0});return new Aa(F,O)}static fromFormatParser(O,S,T={}){if(qe(O)||qe(S))throw new o("fromFormatParser requires an input string and a format parser");const{locale:j=null,numberingSystem:F=null}=T,K=Ke.fromOpts({locale:j,numberingSystem:F,defaultToEN:!0});if(!K.equals(S.locale))throw new o(`fromFormatParser called with a locale of ${K}, but the format parser was created for ${S.locale}`);const{result:te,zone:re,specificOffset:xe,invalidReason:He}=S.explainFromTokens(O);return He?it.invalid(He):Co(te,re,T,`format ${S.format}`,O,xe)}static get DATE_SHORT(){return p}static get DATE_MED(){return m}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return k}static get DATE_HUGE(){return w}static get TIME_SIMPLE(){return C}static get TIME_WITH_SECONDS(){return Q}static get TIME_WITH_SHORT_OFFSET(){return $}static get TIME_WITH_LONG_OFFSET(){return E}static get TIME_24_SIMPLE(){return Z}static get TIME_24_WITH_SECONDS(){return Y}static get TIME_24_WITH_SHORT_OFFSET(){return _}static get TIME_24_WITH_LONG_OFFSET(){return R}static get DATETIME_SHORT(){return q}static get DATETIME_SHORT_WITH_SECONDS(){return G}static get DATETIME_MED(){return W}static get DATETIME_MED_WITH_SECONDS(){return z}static get DATETIME_MED_WITH_WEEKDAY(){return D}static get DATETIME_FULL(){return se}static get DATETIME_FULL_WITH_SECONDS(){return oe}static get DATETIME_HUGE(){return ne}static get DATETIME_HUGE_WITH_SECONDS(){return de}}function Ki(P){if(it.isDateTime(P))return P;if(P&&P.valueOf&&vn(P.valueOf()))return it.fromJSDate(P);if(P&&typeof P=="object")return it.fromObject(P);throw new o(`Unknown datetime argument: ${P}, of type ${typeof P}`)}const Kl="3.7.2";return yr.DateTime=it,yr.Duration=Ot,yr.FixedOffsetZone=xt,yr.IANAZone=$e,yr.Info=wo,yr.Interval=Jt,yr.InvalidZone=hr,yr.Settings=B,yr.SystemZone=ye,yr.VERSION=Kl,yr.Zone=ke,yr}var pk;function lx(){return pk||(pk=1,function(n){var s,o,l,c,h,C0,p,Ho;Object.defineProperty(n,"__esModule",{value:!0}),n.CronDate=n.DAYS_IN_MONTH=n.DateMathOp=n.TimeUnit=void 0;const e=I4();var t;(function(k){k.Second="Second",k.Minute="Minute",k.Hour="Hour",k.Day="Day",k.Month="Month",k.Year="Year"})(t||(n.TimeUnit=t={}));var r;(function(k){k.Add="Add",k.Subtract="Subtract"})(r||(n.DateMathOp=r={})),n.DAYS_IN_MONTH=Object.freeze([31,29,31,30,31,30,31,31,30,31,30,31]);const g=class g{constructor(w,C){Ie(this,p);Ie(this,s);Ie(this,o,null);Ie(this,l,null);Ie(this,c,{add:{[t.Year]:this.addYear.bind(this),[t.Month]:this.addMonth.bind(this),[t.Day]:this.addDay.bind(this),[t.Hour]:this.addHour.bind(this),[t.Minute]:this.addMinute.bind(this),[t.Second]:this.addSecond.bind(this)},subtract:{[t.Year]:this.subtractYear.bind(this),[t.Month]:this.subtractMonth.bind(this),[t.Day]:this.subtractDay.bind(this),[t.Hour]:this.subtractHour.bind(this),[t.Minute]:this.subtractMinute.bind(this),[t.Second]:this.subtractSecond.bind(this)}});const Q={zone:C};if(w?w instanceof g?(Oe(this,s,I(w,s)),Oe(this,o,I(w,o)),Oe(this,l,I(w,l))):w instanceof Date?Oe(this,s,e.DateTime.fromJSDate(w,Q)):typeof w=="number"?Oe(this,s,e.DateTime.fromMillis(w,Q)):(Oe(this,s,e.DateTime.fromISO(w,Q)),I(this,s).isValid||Oe(this,s,e.DateTime.fromRFC2822(w,Q)),I(this,s).isValid||Oe(this,s,e.DateTime.fromSQL(w,Q)),I(this,s).isValid||Oe(this,s,e.DateTime.fromFormat(w,"EEE, d MMM yyyy HH:mm:ss",Q))):Oe(this,s,e.DateTime.local()),!I(this,s).isValid)throw new Error(`CronDate: unhandled timestamp: ${w}`);C&&C!==I(this,s).zoneName&&Oe(this,s,I(this,s).setZone(C))}get dstStart(){return I(this,o)}set dstStart(w){Oe(this,o,w)}get dstEnd(){return I(this,l)}set dstEnd(w){Oe(this,l,w)}addYear(){Oe(this,s,I(this,s).plus({years:1}))}addMonth(){Oe(this,s,I(this,s).plus({months:1}).startOf("month"))}addDay(){Oe(this,s,I(this,s).plus({days:1}).startOf("day"))}addHour(){Oe(this,s,I(this,s).plus({hours:1}).startOf("hour"))}addMinute(){Oe(this,s,I(this,s).plus({minutes:1}).startOf("minute"))}addSecond(){Oe(this,s,I(this,s).plus({seconds:1}))}subtractYear(){Oe(this,s,I(this,s).minus({years:1}))}subtractMonth(){Oe(this,s,I(this,s).minus({months:1}).endOf("month").startOf("second"))}subtractDay(){Oe(this,s,I(this,s).minus({days:1}).endOf("day").startOf("second"))}subtractHour(){Oe(this,s,I(this,s).minus({hours:1}).endOf("hour").startOf("second"))}subtractMinute(){Oe(this,s,I(this,s).minus({minutes:1}).endOf("minute").startOf("second"))}subtractSecond(){Oe(this,s,I(this,s).minus({seconds:1}))}addUnit(w){I(this,c).add[w]()}subtractUnit(w){I(this,c).subtract[w]()}invokeDateOperation(w,C){if(w===r.Add){this.addUnit(C);return}if(w===r.Subtract){this.subtractUnit(C);return}throw new Error(`Invalid verb: ${w}`)}getDate(){return I(this,s).day}getFullYear(){return I(this,s).year}getDay(){const w=I(this,s).weekday;return w===7?0:w}getMonth(){return I(this,s).month-1}getHours(){return I(this,s).hour}getMinutes(){return I(this,s).minute}getSeconds(){return I(this,s).second}getMilliseconds(){return I(this,s).millisecond}getUTCOffset(){return I(this,s).offset}setStartOfDay(){Oe(this,s,I(this,s).startOf("day"))}setEndOfDay(){Oe(this,s,I(this,s).endOf("day"))}getTime(){return I(this,s).valueOf()}getUTCDate(){return Ee(this,p,Ho).call(this).day}getUTCFullYear(){return Ee(this,p,Ho).call(this).year}getUTCDay(){const w=Ee(this,p,Ho).call(this).weekday;return w===7?0:w}getUTCMonth(){return Ee(this,p,Ho).call(this).month-1}getUTCHours(){return Ee(this,p,Ho).call(this).hour}getUTCMinutes(){return Ee(this,p,Ho).call(this).minute}getUTCSeconds(){return Ee(this,p,Ho).call(this).second}toISOString(){return I(this,s).toUTC().toISO()}toJSON(){return I(this,s).toJSON()}setDate(w){Oe(this,s,I(this,s).set({day:w}))}setFullYear(w){Oe(this,s,I(this,s).set({year:w}))}setDay(w){Oe(this,s,I(this,s).set({weekday:w}))}setMonth(w){Oe(this,s,I(this,s).set({month:w+1}))}setHours(w){Oe(this,s,I(this,s).set({hour:w}))}setMinutes(w){Oe(this,s,I(this,s).set({minute:w}))}setSeconds(w){Oe(this,s,I(this,s).set({second:w}))}setMilliseconds(w){Oe(this,s,I(this,s).set({millisecond:w}))}toString(){return this.toDate().toString()}toDate(){return I(this,s).toJSDate()}isLastDayOfMonth(){var Q;const{day:w,month:C}=I(this,s);if(C===2){const $=Ee(Q=g,h,C0).call(Q,I(this,s).year);return w===n.DAYS_IN_MONTH[C-1]-($?0:1)}return w===n.DAYS_IN_MONTH[C-1]}isLastWeekdayOfMonth(){var $;const{day:w,month:C}=I(this,s);let Q;return C===2?Q=n.DAYS_IN_MONTH[C-1]-(Ee($=g,h,C0).call($,I(this,s).year)?0:1):Q=n.DAYS_IN_MONTH[C-1],w>Q-7}applyDateOperation(w,C,Q){if(C===t.Month||C===t.Day){this.invokeDateOperation(w,C);return}const $=this.getHours();this.invokeDateOperation(w,C);const E=this.getHours(),Z=E-$;Z===2?Q!==24&&(this.dstStart=E):Z===0&&this.getMinutes()===0&&this.getSeconds()===0&&Q!==24&&(this.dstEnd=E)}};s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakSet,C0=function(w){return w%4===0&&w%100!==0||w%400===0},p=new WeakSet,Ho=function(){return I(this,s).toUTC()},Ie(g,h);let i=g;n.CronDate=i,n.default=i}(xO)),xO}var mk;function Z4(){if(mk)return hh;mk=1,Object.defineProperty(hh,"__esModule",{value:!0}),hh.CronMonth=void 0;const n=lx(),e=El(),t=1,r=12,i=Object.freeze([]);let s=class extends e.CronField{static get min(){return t}static get max(){return r}static get chars(){return i}static get daysInMonth(){return n.DAYS_IN_MONTH}constructor(l,c){super(l,c),this.validate()}get values(){return super.values}};return hh.CronMonth=s,hh}var fh={},gk;function X4(){if(gk)return fh;gk=1,Object.defineProperty(fh,"__esModule",{value:!0}),fh.CronSecond=void 0;const n=El(),e=0,t=59,r=Object.freeze([]);let i=class extends n.CronField{static get min(){return e}static get max(){return t}static get chars(){return r}constructor(o,l){super(o,l),this.validate()}get values(){return super.values}};return fh.CronSecond=i,fh}var Ok;function ux(){return Ok||(Ok=1,function(n){var e=el&&el.__createBinding||(Object.create?function(r,i,s,o){o===void 0&&(o=s);var l=Object.getOwnPropertyDescriptor(i,s);(!l||("get"in l?!i.__esModule:l.writable||l.configurable))&&(l={enumerable:!0,get:function(){return i[s]}}),Object.defineProperty(r,o,l)}:function(r,i,s,o){o===void 0&&(o=s),r[o]=i[s]}),t=el&&el.__exportStar||function(r,i){for(var s in r)s!=="default"&&!Object.prototype.hasOwnProperty.call(i,s)&&e(i,r,s)};Object.defineProperty(n,"__esModule",{value:!0}),t(A4(),n),t(_4(),n),t(z4(),n),t(El(),n),t(D4(),n),t(L4(),n),t(Z4(),n),t(X4(),n)}(el)),el}var yk;function j2(){var t,r,i,s,o,l,c,h,E2,M2;if(yk)return sh;yk=1,Object.defineProperty(sh,"__esModule",{value:!0}),sh.CronFieldCollection=void 0;const n=ux();let e=(h=class{constructor({second:g,minute:k,hour:w,dayOfMonth:C,month:Q,dayOfWeek:$}){Ie(this,t);Ie(this,r);Ie(this,i);Ie(this,s);Ie(this,o);Ie(this,l);if(!g)throw new Error("Validation error, Field second is missing");if(!k)throw new Error("Validation error, Field minute is missing");if(!w)throw new Error("Validation error, Field hour is missing");if(!C)throw new Error("Validation error, Field dayOfMonth is missing");if(!Q)throw new Error("Validation error, Field month is missing");if(!$)throw new Error("Validation error, Field dayOfWeek is missing");if(Q.values.length===1&&!C.hasLastChar&&!(parseInt(C.values[0],10)<=n.CronMonth.daysInMonth[Q.values[0]-1]))throw new Error("Invalid explicit day of month definition");Oe(this,t,g),Oe(this,r,k),Oe(this,i,w),Oe(this,o,Q),Oe(this,l,$),Oe(this,s,C)}static from(g,k){return new h({second:this.resolveField(n.CronSecond,g.second,k.second),minute:this.resolveField(n.CronMinute,g.minute,k.minute),hour:this.resolveField(n.CronHour,g.hour,k.hour),dayOfMonth:this.resolveField(n.CronDayOfMonth,g.dayOfMonth,k.dayOfMonth),month:this.resolveField(n.CronMonth,g.month,k.month),dayOfWeek:this.resolveField(n.CronDayOfWeek,g.dayOfWeek,k.dayOfWeek)})}static resolveField(g,k,w){return w?w instanceof n.CronField?w:new g(w):k}get second(){return I(this,t)}get minute(){return I(this,r)}get hour(){return I(this,i)}get dayOfMonth(){return I(this,s)}get month(){return I(this,o)}get dayOfWeek(){return I(this,l)}static compactField(g){if(g.length===0)return[];const k=[];let w;return g.forEach((C,Q,$)=>{if(w===void 0){w={start:C,count:1};return}const E=$[Q-1]||w.start,Z=$[Q+1];if(C==="L"||C==="W"){k.push(w),k.push({start:C,count:1}),w=void 0;return}if(w.step===void 0&&Z!==void 0){const Y=C-E,_=Z-C;if(Y<=_){w={...w,count:2,end:C,step:Y};return}w.step=1}C-(w.end??0)===w.step?(w.count++,w.end=C):(w.count===1?k.push({start:w.start,count:1}):w.count===2?(k.push({start:w.start,count:1}),k.push({start:w.end??E,count:1})):k.push(w),w={start:C,count:1})}),w&&k.push(w),k}stringifyField(g){var Q;let k=g.max,w=g.values;if(g instanceof n.CronDayOfWeek){k=6;const $=I(this,l).values;w=$[$.length-1]===7?$.slice(0,-1):$}g instanceof n.CronDayOfMonth&&(k=I(this,o).values.length===1?n.CronMonth.daysInMonth[I(this,o).values[0]-1]:g.max);const C=h.compactField(w);if(C.length===1){const $=Ee(Q=h,c,E2).call(Q,g,C[0],k);if($)return $}return C.map($=>{var Z;const E=$.count===1?$.start.toString():Ee(Z=h,c,M2).call(Z,$,k);return g instanceof n.CronDayOfWeek&&g.nthDay>0?`${E}#${g.nthDay}`:E}).join(",")}stringify(g=!1){const k=[];return g&&k.push(this.stringifyField(I(this,t))),k.push(this.stringifyField(I(this,r)),this.stringifyField(I(this,i)),this.stringifyField(I(this,s)),this.stringifyField(I(this,o)),this.stringifyField(I(this,l))),k.join(" ")}serialize(){return{second:I(this,t).serialize(),minute:I(this,r).serialize(),hour:I(this,i).serialize(),dayOfMonth:I(this,s).serialize(),month:I(this,o).serialize(),dayOfWeek:I(this,l).serialize()}}},t=new WeakMap,r=new WeakMap,i=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakSet,E2=function(g,k,w){const C=k.step;return C?C===1&&k.start===g.min&&k.end&&k.end>=w?g.hasQuestionMarkChar?"?":"*":C!==1&&k.start===g.min&&k.end&&k.end>=w-C+1?`*/${C}`:null:null},M2=function(g,k){const w=g.step;if(w===1)return`${g.start}-${g.end}`;const C=g.start===0?g.count-1:g.count;if(!w)throw new Error("Unexpected range step");if(!g.end)throw new Error("Unexpected range end");if(w*C>g.end){const Q=(E,Z)=>{if(typeof g.start!="number")throw new Error("Unexpected range start");return Z%w===0?g.start+Z:null};if(typeof g.start!="number")throw new Error("Unexpected range start");const $={length:g.end-g.start+1};return Array.from($,Q).filter(E=>E!==null).join(",")}return g.end===k-w+1?`${g.start}/${w}`:`${g.start}-${g.end}/${w}`},Ie(h,c),h);return sh.CronFieldCollection=e,sh}var vO={},xk;function L2(){return xk||(xk=1,function(n){var i,s,o,l,c,h,f,p,m,Go,k,rl,R2,N2,A2,_2,T0,z2,D2,Ou;Object.defineProperty(n,"__esModule",{value:!0}),n.CronExpression=n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE=n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE=void 0;const e=lx();n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE="Out of the time span range",n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE="Invalid expression, loop limit exceeded";const t=1e4,q=class q{constructor(W,z){Ie(this,k);Ie(this,i);Ie(this,s);Ie(this,o);Ie(this,l);Ie(this,c);Ie(this,h);Ie(this,f,null);Ie(this,p,!1);Oe(this,i,z),Oe(this,s,z.tz),Oe(this,l,z.startDate?new e.CronDate(z.startDate,I(this,s)):null),Oe(this,c,z.endDate?new e.CronDate(z.endDate,I(this,s)):null);let D=z.currentDate??z.startDate;if(D){const se=new e.CronDate(D,I(this,s));I(this,l)&&se.getTime()<I(this,l).getTime()?D=I(this,l):I(this,c)&&se.getTime()>I(this,c).getTime()&&(D=I(this,c))}Oe(this,o,new e.CronDate(D,I(this,s))),Oe(this,h,W)}get fields(){return I(this,h)}static fieldsToExpression(W,z){return new q(W,z||{})}next(){return Ee(this,k,Ou).call(this)}prev(){return Ee(this,k,Ou).call(this,!0)}hasNext(){const W=I(this,o);try{return Ee(this,k,Ou).call(this),!0}catch{return!1}finally{Oe(this,o,W)}}hasPrev(){const W=I(this,o);try{return Ee(this,k,Ou).call(this,!0),!0}catch{return!1}finally{Oe(this,o,W)}}take(W){const z=[];if(W>=0)for(let D=0;D<W;D++)try{z.push(this.next())}catch{return z}else for(let D=0;D>W;D--)try{z.push(this.prev())}catch{return z}return z}reset(W){Oe(this,o,new e.CronDate(W||I(this,i).currentDate))}stringify(W=!1){return I(this,h).stringify(W)}includesDate(W){const{second:z,minute:D,hour:se,month:oe}=I(this,h),ne=new e.CronDate(W,I(this,s));return!(!z.values.includes(ne.getSeconds())||!D.values.includes(ne.getMinutes())||!se.values.includes(ne.getHours())||!oe.values.includes(ne.getMonth()+1)||!Ee(this,k,T0).call(this,ne)||I(this,h).dayOfWeek.nthDay>0&&Math.ceil(ne.getDate()/7)!==I(this,h).dayOfWeek.nthDay)}toString(){return I(this,i).expression||this.stringify(!0)}[Symbol.iterator](){return{next:()=>({value:Ee(this,k,Ou).call(this),done:!this.hasNext()})}}};i=new WeakMap,s=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap,f=new WeakMap,p=new WeakMap,m=new WeakSet,Go=function(W,z){return z.some(D=>D===W)},k=new WeakSet,rl=function(W,z){return W[z?W.length-1:0]},R2=function(W){const z=`${W.getFullYear()}-${W.getMonth()+1}-${W.getDate()}`;if(I(this,f)===z)return I(this,p);const D=new e.CronDate(W);D.setStartOfDay();const se=new e.CronDate(W);return se.setEndOfDay(),Oe(this,f,z),Oe(this,p,D.getUTCOffset()!==se.getUTCOffset()),I(this,p)},N2=function(W,z,D){const se=I(this,h).second.values,oe=W.getSeconds(),ne=I(this,h).second.findNearestValue(oe,D);if(ne!==null){W.setSeconds(ne);return}W.applyDateOperation(z,e.TimeUnit.Minute,I(this,h).hour.values.length),W.setSeconds(Ee(this,k,rl).call(this,se,D))},A2=function(W,z,D){const se=I(this,h).minute.values,oe=I(this,h).second.values,ne=W.getMinutes(),de=I(this,h).minute.findNearestValue(ne,D);if(de!==null){W.setMinutes(de),W.setSeconds(Ee(this,k,rl).call(this,oe,D));return}W.applyDateOperation(z,e.TimeUnit.Hour,I(this,h).hour.values.length),W.setMinutes(Ee(this,k,rl).call(this,se,D)),W.setSeconds(Ee(this,k,rl).call(this,oe,D))},_2=function(W,z){const D=z.isLastWeekdayOfMonth();return W.some(se=>{const oe=parseInt(se.toString().charAt(0),10)%7;if(Number.isNaN(oe))throw new Error(`Invalid last weekday of the month expression: ${se}`);return z.getDay()===oe&&D})},T0=function(W){var ke,he,ye;const z=I(this,h).dayOfMonth.isWildcard,D=!z,se=I(this,h).dayOfWeek.isWildcard,oe=!se,ne=Ee(ke=q,m,Go).call(ke,W.getDate(),I(this,h).dayOfMonth.values)||I(this,h).dayOfMonth.hasLastChar&&W.isLastDayOfMonth(),de=Ee(he=q,m,Go).call(he,W.getDay(),I(this,h).dayOfWeek.values)||I(this,h).dayOfWeek.hasLastChar&&Ee(ye=q,m,_2).call(ye,I(this,h).dayOfWeek.values,W);return!!(D&&oe&&(ne||de)||ne&&!oe||z&&!se&&de)},z2=function(W,z,D){var N,U;const se=I(this,h).hour.values,oe=se,ne=W.getHours(),de=Ee(N=q,m,Go).call(N,ne,se),ke=W.dstStart===ne,he=W.dstEnd===ne;if(ke)return Ee(U=q,m,Go).call(U,ne-1,se)?!0:(W.invokeDateOperation(z,e.TimeUnit.Hour),!1);if(he&&!D)return W.dstEnd=null,W.applyDateOperation(e.DateMathOp.Add,e.TimeUnit.Hour,oe.length),!1;if(de)return!0;W.dstStart=null;const ye=I(this,h).hour.findNearestValue(ne,D);if(ye===null)return W.applyDateOperation(z,e.TimeUnit.Day,oe.length),!1;if(Ee(this,k,R2).call(this,W)){const ue=D?ne-ye:ye-ne;for(let L=0;L<ue;L++)W.applyDateOperation(z,e.TimeUnit.Hour,oe.length)}else W.setHours(ye);return W.setMinutes(Ee(this,k,rl).call(this,I(this,h).minute.values,D)),W.setSeconds(Ee(this,k,rl).call(this,I(this,h).second.values,D)),!1},D2=function(W){if(!I(this,l)&&!I(this,c))return;const z=W.getTime();if(I(this,l)&&z<I(this,l).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE);if(I(this,c)&&z>I(this,c).getTime())throw new Error(n.TIME_SPAN_OUT_OF_BOUNDS_ERROR_MESSAGE)},Ou=function(W=!1){var ne,de,ke;const z=W?e.DateMathOp.Subtract:e.DateMathOp.Add,D=new e.CronDate(I(this,o)),se=D.getTime();let oe=0;for(;++oe<t;){if(Ee(this,k,D2).call(this,D),!Ee(this,k,T0).call(this,D)){D.applyDateOperation(z,e.TimeUnit.Day,I(this,h).hour.values.length);continue}if(!(I(this,h).dayOfWeek.nthDay<=0||Math.ceil(D.getDate()/7)===I(this,h).dayOfWeek.nthDay)){D.applyDateOperation(z,e.TimeUnit.Day,I(this,h).hour.values.length);continue}if(!Ee(ne=q,m,Go).call(ne,D.getMonth()+1,I(this,h).month.values)){D.applyDateOperation(z,e.TimeUnit.Month,I(this,h).hour.values.length);continue}if(Ee(this,k,z2).call(this,D,z,W)){if(!Ee(de=q,m,Go).call(de,D.getMinutes(),I(this,h).minute.values)){Ee(this,k,A2).call(this,D,z,W);continue}if(!Ee(ke=q,m,Go).call(ke,D.getSeconds(),I(this,h).second.values)){Ee(this,k,N2).call(this,D,z,W);continue}if(se===D.getTime()){(z==="Add"||D.getMilliseconds()===0)&&D.applyDateOperation(z,e.TimeUnit.Second,I(this,h).hour.values.length);continue}break}}if(oe>t)throw new Error(n.LOOPS_LIMIT_EXCEEDED_ERROR_MESSAGE);return D.getMilliseconds()!==0&&D.setMilliseconds(0),Oe(this,o,D),D},Ie(q,m);let r=q;n.CronExpression=r,n.default=r}(vO)),vO}var zd={},vk;function V4(){if(vk)return zd;vk=1,Object.defineProperty(zd,"__esModule",{value:!0}),zd.seededRandom=t;function n(r){let i=2166136261;for(let s=0;s<r.length;s++)i^=r.charCodeAt(s),i=Math.imul(i,16777619);return()=>i>>>0}function e(r){return()=>{let i=r+=1831565813;return i=Math.imul(i^i>>>15,i|1),i^=i+Math.imul(i^i>>>7,i|61),((i^i>>>14)>>>0)/4294967296}}function t(r){const i=r?n(r)():Math.floor(Math.random()*1e10);return e(i)}return zd}var wk;function E0(){var h,f,I2,il,Z2,X2,V2,W2,F2,B2,Y2,$0,U2,q2;if(wk)return _r;wk=1,Object.defineProperty(_r,"__esModule",{value:!0}),_r.CronExpressionParser=_r.DayOfWeek=_r.Months=_r.CronUnit=_r.PredefinedExpressions=void 0;const n=j2(),e=L2(),t=V4(),r=ux();var i;(function(R){R["@yearly"]="0 0 0 1 1 *",R["@annually"]="0 0 0 1 1 *",R["@monthly"]="0 0 0 1 * *",R["@weekly"]="0 0 0 * * 0",R["@daily"]="0 0 0 * * *",R["@hourly"]="0 0 * * * *",R["@minutely"]="0 * * * * *",R["@secondly"]="* * * * * *",R["@weekdays"]="0 0 0 * * 1-5",R["@weekends"]="0 0 0 * * 0,6"})(i||(_r.PredefinedExpressions=i={}));var s;(function(R){R.Second="Second",R.Minute="Minute",R.Hour="Hour",R.DayOfMonth="DayOfMonth",R.Month="Month",R.DayOfWeek="DayOfWeek"})(s||(_r.CronUnit=s={}));var o;(function(R){R[R.jan=1]="jan",R[R.feb=2]="feb",R[R.mar=3]="mar",R[R.apr=4]="apr",R[R.may=5]="may",R[R.jun=6]="jun",R[R.jul=7]="jul",R[R.aug=8]="aug",R[R.sep=9]="sep",R[R.oct=10]="oct",R[R.nov=11]="nov",R[R.dec=12]="dec"})(o||(_r.Months=o={}));var l;(function(R){R[R.sun=0]="sun",R[R.mon=1]="mon",R[R.tue=2]="tue",R[R.wed=3]="wed",R[R.thu=4]="thu",R[R.fri=5]="fri",R[R.sat=6]="sat"})(l||(_r.DayOfWeek=l={}));let c=(f=class{static parse(q,G={}){var L,Re,_e,$e,rt,st,mt,Xt;const{strict:W=!1,hashSeed:z}=G,D=(0,t.seededRandom)(z);q=i[q]||q;const se=Ee(L=f,h,I2).call(L,q,W);if(!(se.dayOfMonth==="*"||se.dayOfWeek==="*"||!W))throw new Error("Cannot use both dayOfMonth and dayOfWeek together in strict mode!");const oe=Ee(Re=f,h,il).call(Re,s.Second,se.second,r.CronSecond.constraints,D),ne=Ee(_e=f,h,il).call(_e,s.Minute,se.minute,r.CronMinute.constraints,D),de=Ee($e=f,h,il).call($e,s.Hour,se.hour,r.CronHour.constraints,D),ke=Ee(rt=f,h,il).call(rt,s.Month,se.month,r.CronMonth.constraints,D),he=Ee(st=f,h,il).call(st,s.DayOfMonth,se.dayOfMonth,r.CronDayOfMonth.constraints,D),{dayOfWeek:ye,nthDayOfWeek:N}=Ee(mt=f,h,U2).call(mt,se.dayOfWeek),U=Ee(Xt=f,h,il).call(Xt,s.DayOfWeek,ye,r.CronDayOfWeek.constraints,D),ue=new n.CronFieldCollection({second:new r.CronSecond(oe,{rawValue:se.second}),minute:new r.CronMinute(ne,{rawValue:se.minute}),hour:new r.CronHour(de,{rawValue:se.hour}),dayOfMonth:new r.CronDayOfMonth(he,{rawValue:se.dayOfMonth}),month:new r.CronMonth(ke,{rawValue:se.month}),dayOfWeek:new r.CronDayOfWeek(U,{rawValue:se.dayOfWeek,nthDayOfWeek:N})});return new e.CronExpression(ue,{...G,expression:q})}},h=new WeakSet,I2=function(q,G){if(G&&!q.length)throw new Error("Invalid cron expression");q=q||"0 * * * * *";const W=q.trim().split(/\s+/);if(G&&W.length<6)throw new Error("Invalid cron expression, expected 6 fields");if(W.length>6)throw new Error("Invalid cron expression, too many fields");const z=["*","*","*","*","*","0"];W.length<z.length&&W.unshift(...z.slice(W.length));const[D,se,oe,ne,de,ke]=W;return{second:D,minute:se,hour:oe,dayOfMonth:ne,month:de,dayOfWeek:ke}},il=function(q,G,W,z){if((q===s.Month||q===s.DayOfWeek)&&(G=G.replace(/[a-z]{3}/gi,D=>{D=D.toLowerCase();const se=o[D]||l[D];if(se===void 0)throw new Error(`Validation error, cannot resolve alias "${D}"`);return se.toString()})),!W.validChars.test(G))throw new Error(`Invalid characters, got value: ${G}`);return G=Ee(this,h,Z2).call(this,G,W),G=Ee(this,h,X2).call(this,G,W,z),Ee(this,h,V2).call(this,q,G,W)},Z2=function(q,G){return q.replace(/[*?]/g,G.min+"-"+G.max)},X2=function(q,G,W){const z=W();return q.replace(/H(?:\((\d+)-(\d+)\))?(?:\/(\d+))?/g,(D,se,oe,ne)=>{if(se&&oe&&ne){const de=parseInt(se,10),ke=parseInt(oe,10),he=parseInt(ne,10);if(de>ke)throw new Error(`Invalid range: ${de}-${ke}, min > max`);if(he<=0)throw new Error(`Invalid step: ${he}, must be positive`);const ye=Math.max(de,G.min),N=Math.floor(z*he),U=[];for(let ue=Math.floor(ye/he)*he+N;ue<=ke;ue+=he)ue>=ye&&U.push(ue);return U.join(",")}else if(se&&oe){const de=parseInt(se,10),ke=parseInt(oe,10);if(de>ke)throw new Error(`Invalid range: ${de}-${ke}, min > max`);return String(Math.floor(z*(ke-de+1))+de)}else if(ne){const de=parseInt(ne,10);if(de<=0)throw new Error(`Invalid step: ${de}, must be positive`);const ke=Math.floor(z*de),he=[];for(let ye=Math.floor(G.min/de)*de+ke;ye<=G.max;ye+=de)ye>=G.min&&he.push(ye);return he.join(",")}else return String(Math.floor(z*(G.max-G.min+1)+G.min))})},V2=function(q,G,W){const z=[];function D(oe,ne){var de;if(Array.isArray(oe))z.push(...oe);else if(Ee(de=f,h,q2).call(de,ne,oe))z.push(oe);else{const ke=parseInt(oe.toString(),10);if(!(ke>=ne.min&&ke<=ne.max))throw new Error(`Constraint error, got value ${oe} expected range ${ne.min}-${ne.max}`);z.push(q===s.DayOfWeek?ke%7:oe)}}return G.split(",").forEach(oe=>{var ne;if(!(oe.length>0))throw new Error("Invalid list value format");D(Ee(ne=f,h,W2).call(ne,q,oe,W),W)}),z},W2=function(q,G,W){var D,se;const z=G.split("/");if(z.length>2)throw new Error(`Invalid repeat: ${G}`);return z.length===2?(isNaN(parseInt(z[0],10))||(z[0]=`${z[0]}-${W.max}`),Ee(D=f,h,$0).call(D,q,z[0],parseInt(z[1],10),W)):Ee(se=f,h,$0).call(se,q,G,1,W)},F2=function(q,G,W){if(!(!isNaN(q)&&!isNaN(G)&&q>=W.min&&G<=W.max))throw new Error(`Constraint error, got range ${q}-${G} expected range ${W.min}-${W.max}`);if(q>G)throw new Error(`Invalid range: ${q}-${G}, min(${q}) > max(${G})`)},B2=function(q){if(!(!isNaN(q)&&q>0))throw new Error(`Constraint error, cannot repeat at every ${q} time.`)},Y2=function(q,G,W,z){const D=[];q===s.DayOfWeek&&W%7===0&&D.push(0);for(let se=G;se<=W;se+=z)D.indexOf(se)===-1&&D.push(se);return D},$0=function(q,G,W,z){const D=G.split("-");if(D.length<=1)return isNaN(+G)?G:+G;const[se,oe]=D.map(ne=>parseInt(ne,10));return Ee(this,h,F2).call(this,se,oe,z),Ee(this,h,B2).call(this,W),Ee(this,h,Y2).call(this,q,se,oe,W)},U2=function(q){const G=q.split("#");if(G.length<=1)return{dayOfWeek:G[0]};const W=+G[G.length-1],z=q.match(/([,-/])/);if(z!==null)throw new Error(`Constraint error, invalid dayOfWeek \`#\` and \`${z==null?void 0:z[0]}\` special characters are incompatible`);if(!(G.length<=2&&!isNaN(W)&&W>=1&&W<=5))throw new Error("Constraint error, invalid dayOfWeek occurrence number (#)");return{dayOfWeek:G[0],nthDayOfWeek:W}},q2=function(q,G){return q.chars.some(W=>G.toString().includes(W))},Ie(f,h),f);return _r.CronExpressionParser=c,_r}var ji={};const W4={},F4=Object.freeze(Object.defineProperty({__proto__:null,default:W4},Symbol.toStringTag,{value:"Module"})),kk=lE(F4);var Sk;function B4(){var s,o,M0,H2;if(Sk)return ji;Sk=1;var n=ji&&ji.__createBinding||(Object.create?function(h,f,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(f,p);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(h,m,g)}:function(h,f,p,m){m===void 0&&(m=p),h[m]=f[p]}),e=ji&&ji.__setModuleDefault||(Object.create?function(h,f){Object.defineProperty(h,"default",{enumerable:!0,value:f})}:function(h,f){h.default=f}),t=ji&&ji.__importStar||function(){var h=function(f){return h=Object.getOwnPropertyNames||function(p){var m=[];for(var g in p)Object.prototype.hasOwnProperty.call(p,g)&&(m[m.length]=g);return m},h(f)};return function(f){if(f&&f.__esModule)return f;var p={};if(f!=null)for(var m=h(f),g=0;g<m.length;g++)m[g]!=="default"&&n(p,f,m[g]);return e(p,f),p}}();Object.defineProperty(ji,"__esModule",{value:!0}),ji.CronFileParser=void 0;const r=E0();let i=(o=class{static async parseFile(f){var g;const{readFile:p}=await Promise.resolve().then(()=>t(kk)),m=await p(f,"utf8");return Ee(g=o,s,M0).call(g,m)}static parseFileSync(f){var g;const{readFileSync:p}=kk,m=p(f,"utf8");return Ee(g=o,s,M0).call(g,m)}},s=new WeakSet,M0=function(f){var g;const p=f.split(`
315
+ `),m={variables:{},expressions:[],errors:{}};for(const k of p){const w=k.trim();if(w.length===0||w.startsWith("#"))continue;const C=w.match(/^(.*)=(.*)$/);if(C){const[,Q,$]=C;m.variables[Q]=$.replace(/["']/g,"");continue}try{const Q=Ee(g=o,s,H2).call(g,w);m.expressions.push(Q.interval)}catch(Q){m.errors[w]=Q}}return m},H2=function(f){const p=f.split(" ");return{interval:r.CronExpressionParser.parse(p.slice(0,5).join(" ")),command:p.slice(5,p.length)}},Ie(o,s),o);return ji.CronFileParser=i,ji}var bk;function Y4(){return bk||(bk=1,function(n){var e=Ja&&Ja.__createBinding||(Object.create?function(h,f,p,m){m===void 0&&(m=p);var g=Object.getOwnPropertyDescriptor(f,p);(!g||("get"in g?!f.__esModule:g.writable||g.configurable))&&(g={enumerable:!0,get:function(){return f[p]}}),Object.defineProperty(h,m,g)}:function(h,f,p,m){m===void 0&&(m=p),h[m]=f[p]}),t=Ja&&Ja.__exportStar||function(h,f){for(var p in h)p!=="default"&&!Object.prototype.hasOwnProperty.call(f,p)&&e(f,h,p)};Object.defineProperty(n,"__esModule",{value:!0}),n.CronFileParser=n.CronExpressionParser=n.CronExpression=n.CronFieldCollection=n.CronDate=void 0;const r=E0();var i=lx();Object.defineProperty(n,"CronDate",{enumerable:!0,get:function(){return i.CronDate}});var s=j2();Object.defineProperty(n,"CronFieldCollection",{enumerable:!0,get:function(){return s.CronFieldCollection}});var o=L2();Object.defineProperty(n,"CronExpression",{enumerable:!0,get:function(){return o.CronExpression}});var l=E0();Object.defineProperty(n,"CronExpressionParser",{enumerable:!0,get:function(){return l.CronExpressionParser}});var c=B4();Object.defineProperty(n,"CronFileParser",{enumerable:!0,get:function(){return c.CronFileParser}}),t(ux(),n),n.default=r.CronExpressionParser}(Ja)),Ja}var G2=Y4(),wO={exports:{}},Pk;function U4(){return Pk||(Pk=1,function(n,e){(function(r,i){n.exports=i()})(globalThis,()=>(()=>{var t={949(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.CronParser=void 0;var h=c(515),f=function(){function p(m,g,k){g===void 0&&(g=!0),k===void 0&&(k=!1),this.expression=m,this.dayOfWeekStartIndexZero=g,this.monthStartIndexZero=k}return p.prototype.parse=function(){var m,g,k=(m=this.expression)!==null&&m!==void 0?m:"";if(k==="@reboot")return g=["@reboot","","","","","",""],g;if(k.startsWith("@")){var w=this.parseSpecial(this.expression);g=this.extractParts(w)}else g=this.extractParts(this.expression);return this.normalize(g),this.validate(g),g},p.prototype.parseSpecial=function(m){var g={"@yearly":"0 0 1 1 *","@annually":"0 0 1 1 *","@monthly":"0 0 1 * *","@weekly":"0 0 * * 0","@daily":"0 0 * * *","@midnight":"0 0 * * *","@hourly":"0 * * * *","@reboot":"@reboot"},k=g[m];if(!k)throw new Error("Unknown special expression.");return k},p.prototype.extractParts=function(m){if(!this.expression)throw new Error("cron expression is empty");for(var g=m.trim().split(/[ ]+/),k=0;k<g.length;k++)if(g[k].includes(",")){var w=g[k].split(",").map(function(Q){return Q.trim()}).filter(function(Q){return Q!==""}).map(function(Q){return isNaN(Number(Q))?Q:Number(Q)}).filter(function(Q){return Q!==null&&Q!==""});w.length===0&&w.push("*"),w.sort(function(Q,$){return Q!==null&&$!==null?Q-$:0}),g[k]=w.map(function(Q){return Q!==null?Q.toString():""}).join(",")}if(g.length<5)throw new Error("Expression has only ".concat(g.length," part").concat(g.length==1?"":"s",". At least 5 parts are required."));if(g.length==5)g.unshift(""),g.push("");else if(g.length==6){var C=/\d{4}$/.test(g[5])||g[4]=="?"||g[2]=="?";C?g.unshift(""):g.push("")}else if(g.length>7)throw new Error("Expression has ".concat(g.length," parts; too many!"));return g},p.prototype.normalize=function(m){var g=this;if(m[3]=m[3].replace("?","*"),m[5]=m[5].replace("?","*"),m[2]=m[2].replace("?","*"),m[0].indexOf("0/")==0&&(m[0]=m[0].replace("0/","*/")),m[1].indexOf("0/")==0&&(m[1]=m[1].replace("0/","*/")),m[2].indexOf("0/")==0&&(m[2]=m[2].replace("0/","*/")),m[3].indexOf("1/")==0&&(m[3]=m[3].replace("1/","*/")),m[4].indexOf("1/")==0&&(m[4]=m[4].replace("1/","*/")),m[6].indexOf("1/")==0&&(m[6]=m[6].replace("1/","*/")),m[5]=m[5].replace(/(^\d)|([^#/\s]\d)/g,function(Y){var _=Y.replace(/\D/,""),R=_;return g.dayOfWeekStartIndexZero?_=="7"&&(R="0"):R=(parseInt(_)-1).toString(),Y.replace(_,R)}),m[5]=="L"&&(m[5]="6"),m[3]=="?"&&(m[3]="*"),m[3].indexOf("W")>-1&&(m[3].indexOf(",")>-1||m[3].indexOf("-")>-1))throw new Error("The 'W' character can be specified only when the day-of-month is a single day, not a range or list of days.");var k={SUN:0,MON:1,TUE:2,WED:3,THU:4,FRI:5,SAT:6};for(var w in k)m[5]=m[5].replace(new RegExp(w,"gi"),k[w].toString());m[4]=m[4].replace(/(^\d{1,2})|([^#/\s]\d{1,2})/g,function(Y){var _=Y.replace(/\D/,""),R=_;return g.monthStartIndexZero&&(R=(parseInt(_)+1).toString()),Y.replace(_,R)});var C={JAN:1,FEB:2,MAR:3,APR:4,MAY:5,JUN:6,JUL:7,AUG:8,SEP:9,OCT:10,NOV:11,DEC:12};for(var Q in C)m[4]=m[4].replace(new RegExp(Q,"gi"),C[Q].toString());m[0]=="0"&&(m[0]=""),!/\*|\-|\,|\//.test(m[2])&&(/\*|\//.test(m[1])||/\*|\//.test(m[0]))&&(m[2]+="-".concat(m[2]));for(var $=0;$<m.length;$++)if(m[$].indexOf(",")!=-1&&(m[$]=m[$].split(",").filter(function(Y){return Y!==""}).join(",")||"*"),m[$]=="*/1"&&(m[$]="*"),m[$].indexOf("/")>-1&&!/^\*|\-|\,/.test(m[$])){var E=null;switch($){case 4:E="12";break;case 5:E="6";break;case 6:E="9999";break;default:E=null;break}if(E!==null){var Z=m[$].split("/");m[$]="".concat(Z[0],"-").concat(E,"/").concat(Z[1])}}},p.prototype.validate=function(m){var g="0-9,\\-*/";this.validateOnlyExpectedCharactersFound(m[0],g),this.validateOnlyExpectedCharactersFound(m[1],g),this.validateOnlyExpectedCharactersFound(m[2],g),this.validateOnlyExpectedCharactersFound(m[3],"0-9,\\-*/LW"),this.validateOnlyExpectedCharactersFound(m[4],g),this.validateOnlyExpectedCharactersFound(m[5],"0-9,\\-*/L#"),this.validateOnlyExpectedCharactersFound(m[6],g),this.validateAnyRanges(m)},p.prototype.validateAnyRanges=function(m){h.default.secondRange(m[0]),h.default.minuteRange(m[1]),h.default.hourRange(m[2]),h.default.dayOfMonthRange(m[3]),h.default.monthRange(m[4],this.monthStartIndexZero),h.default.dayOfWeekRange(m[5],this.dayOfWeekStartIndexZero)},p.prototype.validateOnlyExpectedCharactersFound=function(m,g){var k=m.match(new RegExp("[^".concat(g,"]+"),"gi"));if(k&&k.length)throw new Error("Expression contains invalid values: '".concat(k.toString(),"'"))},p}();l.CronParser=f},333(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.ExpressionDescriptor=void 0;var h=c(823),f=c(949),p=function(){function m(g,k){if(this.expression=g,this.options=k,this.expressionParts=new Array(5),!this.options.locale&&m.defaultLocale&&(this.options.locale=m.defaultLocale),!m.locales[this.options.locale]){var w=Object.keys(m.locales)[0];console.warn("Locale '".concat(this.options.locale,"' could not be found; falling back to '").concat(w,"'.")),this.options.locale=w}this.i18n=m.locales[this.options.locale],k.use24HourTimeFormat===void 0&&(k.use24HourTimeFormat=this.i18n.use24HourTimeFormatByDefault())}return m.toString=function(g,k){var w=k===void 0?{}:k,C=w.throwExceptionOnParseError,Q=C===void 0?!0:C,$=w.verbose,E=$===void 0?!1:$,Z=w.dayOfWeekStartIndexZero,Y=Z===void 0?!0:Z,_=w.monthStartIndexZero,R=_===void 0?!1:_,q=w.use24HourTimeFormat,G=w.trimHoursLeadingZero,W=G===void 0?!1:G,z=w.locale,D=z===void 0?null:z,se=w.logicalAndDayFields,oe=se===void 0?!1:se,ne={throwExceptionOnParseError:Q,verbose:E,dayOfWeekStartIndexZero:Y,monthStartIndexZero:R,use24HourTimeFormat:q,trimHoursLeadingZero:W,locale:D,logicalAndDayFields:oe};ne.tzOffset&&console.warn("'tzOffset' option has been deprecated and is no longer supported.");var de=new m(g,ne);return de.getFullDescription()},m.initialize=function(g,k){k===void 0&&(k="en"),m.specialCharacters=["/","-",",","*"],m.defaultLocale=k,g.load(m.locales)},m.prototype.getFullDescription=function(){var g,k,w="";try{var C=new f.CronParser(this.expression,this.options.dayOfWeekStartIndexZero,this.options.monthStartIndexZero);if(this.expressionParts=C.parse(),this.expressionParts[0]==="@reboot")return((k=(g=this.i18n).atReboot)===null||k===void 0?void 0:k.call(g))||"Run once, at startup";var Q=this.getTimeOfDayDescription(),$=this.getDayOfMonthDescription(),E=this.getMonthDescription(),Z=this.getDayOfWeekDescription(),Y=this.getYearDescription();w+=Q+$+Z+E+Y,w=this.transformVerbosity(w,!!this.options.verbose),w=w.charAt(0).toLocaleUpperCase()+w.substr(1)}catch(_){if(!this.options.throwExceptionOnParseError)w=this.i18n.anErrorOccuredWhenGeneratingTheExpressionD();else throw"".concat(_)}return w},m.prototype.getTimeOfDayDescription=function(){var g=this.expressionParts[0],k=this.expressionParts[1],w=this.expressionParts[2],C="";if(!h.StringUtilities.containsAny(k,m.specialCharacters)&&!h.StringUtilities.containsAny(w,m.specialCharacters)&&!h.StringUtilities.containsAny(g,m.specialCharacters))C+=this.i18n.atSpace()+this.formatTime(w,k,g);else if(!g&&k.indexOf("-")>-1&&!(k.indexOf(",")>-1)&&!(k.indexOf("/")>-1)&&!h.StringUtilities.containsAny(w,m.specialCharacters)){var Q=k.split("-");C+=h.StringUtilities.format(this.i18n.everyMinuteBetweenX0AndX1(),this.formatTime(w,Q[0],""),this.formatTime(w,Q[1],""))}else if(!g&&w.indexOf(",")>-1&&w.indexOf("-")==-1&&w.indexOf("/")==-1&&!h.StringUtilities.containsAny(k,m.specialCharacters)){var $=w.split(",");C+=this.i18n.at();for(var E=0;E<$.length;E++)C+=" ",C+=this.formatTime($[E],k,""),E<$.length-2&&(C+=","),E==$.length-2&&(C+=this.i18n.spaceAnd())}else{var Z=this.getSecondsDescription(),Y=this.getMinutesDescription(),_=this.getHoursDescription();if(C+=Z,C&&Y&&(C+=", "),C+=Y,Y===_)return C;C&&_&&(C+=", "),C+=_}return C},m.prototype.getSecondsDescription=function(){var g=this,k=this.getSegmentDescription(this.expressionParts[0],this.i18n.everySecond(),function(w){return w},function(w){return h.StringUtilities.format(g.i18n.everyX0Seconds(w),w)},function(w){return g.i18n.secondsX0ThroughX1PastTheMinute()},function(w){return w=="0"?"":parseInt(w)<20?g.i18n.atX0SecondsPastTheMinute(w):g.i18n.atX0SecondsPastTheMinuteGt20()||g.i18n.atX0SecondsPastTheMinute(w)});return k},m.prototype.getMinutesDescription=function(){var g=this,k=this.expressionParts[0],w=this.expressionParts[2],C=this.getSegmentDescription(this.expressionParts[1],this.i18n.everyMinute(),function(Q){return Q},function(Q){return h.StringUtilities.format(g.i18n.everyX0Minutes(Q),Q)},function(Q){return g.i18n.minutesX0ThroughX1PastTheHour()},function(Q){var $,E;try{return Q=="0"&&w.indexOf("/")==-1&&k==""?g.i18n.everyHour():Q=="0"?((E=($=g.i18n).onTheHour)===null||E===void 0?void 0:E.call($))||g.i18n.atX0MinutesPastTheHour(Q):parseInt(Q)<20?g.i18n.atX0MinutesPastTheHour(Q):g.i18n.atX0MinutesPastTheHourGt20()||g.i18n.atX0MinutesPastTheHour(Q)}catch{return g.i18n.atX0MinutesPastTheHour(Q)}});return C},m.prototype.getHoursDescription=function(){var g=this,k=this.expressionParts[2],w=0,C=[];k.split("/")[0].split(",").forEach(function(E){var Z=E.split("-");Z.length===2&&C.push({value:Z[1],index:w+1}),w+=Z.length});var Q=0,$=this.getSegmentDescription(k,this.i18n.everyHour(),function(E){var Z=C.find(function(_){return _.value===E&&_.index===Q}),Y=Z&&g.expressionParts[1]!=="0";return Q++,Y?g.formatTime(E,"59",""):g.formatTime(E,"0","")},function(E){return h.StringUtilities.format(g.i18n.everyX0Hours(E),E)},function(E){return g.i18n.betweenX0AndX1()},function(E){return g.i18n.atX0()});return $},m.prototype.getDayOfWeekDescription=function(){var g=this,k=this.i18n.daysOfTheWeek(),w=null;return this.expressionParts[5]=="*"?w="":w=this.getSegmentDescription(this.expressionParts[5],this.i18n.commaEveryDay(),function(C,Q){var $=C;C.indexOf("#")>-1?$=C.substring(0,C.indexOf("#")):C.indexOf("L")>-1&&($=$.replace("L",""));var E=parseInt($),Z=g.i18n.daysOfTheWeekInCase?g.i18n.daysOfTheWeekInCase(Q)[E]:k[E];if(C.indexOf("#")>-1){var Y=null,_=C.substring(C.indexOf("#")+1),R=C.substring(0,C.indexOf("#"));switch(_){case"1":Y=g.i18n.first(R);break;case"2":Y=g.i18n.second(R);break;case"3":Y=g.i18n.third(R);break;case"4":Y=g.i18n.fourth(R);break;case"5":Y=g.i18n.fifth(R);break}Z=Y+" "+Z}return Z},function(C){return parseInt(C)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0DaysOfTheWeek(C),C)},function(C){var Q=C.substring(0,C.indexOf("-")),$=g.expressionParts[3]!="*";return $?g.i18n.commaAndX0ThroughX1(Q):g.i18n.commaX0ThroughX1(Q)},function(C){var Q=null;if(C.indexOf("#")>-1){var $=C.substring(C.indexOf("#")+1),E=C.substring(0,C.indexOf("#"));Q=g.i18n.commaOnThe($,E).trim()+g.i18n.spaceX0OfTheMonth()}else if(C.indexOf("L")>-1)Q=g.i18n.commaOnTheLastX0OfTheMonth(C.replace("L",""));else{var Z=g.expressionParts[3]!="*";Z?g.options.logicalAndDayFields?Q=g.i18n.commaOnlyOnX0(C):Q=g.i18n.commaAndOnX0():Q=g.i18n.commaOnlyOnX0(C)}return Q}),w},m.prototype.getMonthDescription=function(){var g=this,k=this.i18n.monthsOfTheYear(),w=this.getSegmentDescription(this.expressionParts[4],"",function(C,Q){return Q&&g.i18n.monthsOfTheYearInCase?g.i18n.monthsOfTheYearInCase(Q)[parseInt(C)-1]:k[parseInt(C)-1]},function(C){return parseInt(C)==1?"":h.StringUtilities.format(g.i18n.commaEveryX0Months(C),C)},function(C){return g.i18n.commaMonthX0ThroughMonthX1()||g.i18n.commaX0ThroughX1()},function(C){return g.i18n.commaOnlyInMonthX0?g.i18n.commaOnlyInMonthX0():g.i18n.commaOnlyInX0()});return w},m.prototype.getDayOfMonthDescription=function(){var g=this,k=null,w=this.expressionParts[3];switch(w){case"L":k=this.i18n.commaOnTheLastDayOfTheMonth();break;case"WL":case"LW":k=this.i18n.commaOnTheLastWeekdayOfTheMonth();break;default:var C=w.match(/(\d{1,2}W)|(W\d{1,2})/);if(C){var Q=parseInt(C[0].replace("W","")),$=Q==1?this.i18n.firstWeekday():h.StringUtilities.format(this.i18n.weekdayNearestDayX0(),Q.toString());k=h.StringUtilities.format(this.i18n.commaOnTheX0OfTheMonth(),$);break}else{var E=w.match(/L-(\d{1,2})/);if(E){var Z=E[1];k=h.StringUtilities.format(this.i18n.commaDaysBeforeTheLastDayOfTheMonth(Z),Z);break}else{if(w=="*"&&this.expressionParts[5]!="*")return"";k=this.getSegmentDescription(w,this.i18n.commaEveryDay(),function(Y){return Y=="L"?g.i18n.lastDay():g.i18n.dayX0?h.StringUtilities.format(g.i18n.dayX0(),Y):Y},function(Y){return Y=="1"?g.i18n.commaEveryDay():g.i18n.commaEveryX0Days(Y)},function(Y){return g.i18n.commaBetweenDayX0AndX1OfTheMonth(Y)},function(Y){return g.i18n.commaOnDayX0OfTheMonth(Y)})}break}}return k},m.prototype.getYearDescription=function(){var g=this,k=this.getSegmentDescription(this.expressionParts[6],"",function(w){return/^\d+$/.test(w)?new Date(parseInt(w),1).getFullYear().toString():w},function(w){return h.StringUtilities.format(g.i18n.commaEveryX0Years(w),w)},function(w){return g.i18n.commaYearX0ThroughYearX1()||g.i18n.commaX0ThroughX1()},function(w){return g.i18n.commaOnlyInYearX0?g.i18n.commaOnlyInYearX0():g.i18n.commaOnlyInX0()});return k},m.prototype.getSegmentDescription=function(g,k,w,C,Q,$){var E=null,Z=g.indexOf("/")>-1,Y=g.indexOf("-")>-1,_=g.indexOf(",")>-1;if(!g)E="";else if(g==="*")E=k;else if(!Z&&!Y&&!_)E=h.StringUtilities.format($(g),w(g));else if(_){for(var R=g.split(","),q="",G=0;G<R.length;G++)if(G>0&&R.length>2&&(q+=",",G<R.length-1&&(q+=" ")),G>0&&R.length>1&&(G==R.length-1||R.length==2)&&(q+="".concat(this.i18n.spaceAnd()," ")),R[G].indexOf("/")>-1||R[G].indexOf("-")>-1){var W=R[G].indexOf("-")>-1&&R[G].indexOf("/")==-1,z=this.getSegmentDescription(R[G],k,w,C,W?this.i18n.commaX0ThroughX1:Q,$);W&&(z=z.replace(", ","")),q+=z}else if(!Z)q+=w(R[G]);else{var D=this.getSegmentDescription(R[G],k,w,C,Q,$);D&&D.startsWith(", ")&&(D=D.substring(2)),q+=D}Z?E=q:E=h.StringUtilities.format($(g),q)}else if(Z){var R=g.split("/");if(E=h.StringUtilities.format(C(R[1]),R[1]),R[0].indexOf("-")>-1){var se=this.generateRangeSegmentDescription(R[0],Q,w);se.indexOf(", ")!=0&&(E+=", "),E+=se}else if(R[0].indexOf("*")==-1){var oe=h.StringUtilities.format($(R[0]),w(R[0]));oe=oe.replace(", ",""),E+=h.StringUtilities.format(this.i18n.commaStartingX0(),oe)}}else Y&&(E=this.generateRangeSegmentDescription(g,Q,w));return E},m.prototype.generateRangeSegmentDescription=function(g,k,w){var C="",Q=g.split("-"),$=w(Q[0],1),E=w(Q[1],2),Z=k(g);return C+=h.StringUtilities.format(Z,$,E),C},m.prototype.formatTime=function(g,k,w){var C=0,Q=0,$=parseInt(g)+C,E=parseInt(k)+Q;E>=60?(E-=60,$+=1):E<0&&(E+=60,$-=1),$>=24?$=$-24:$<0&&($=24+$);var Z="",Y=!1;this.options.use24HourTimeFormat||(Y=!!(this.i18n.setPeriodBeforeTime&&this.i18n.setPeriodBeforeTime()),Z=Y?"".concat(this.getPeriod($)," "):" ".concat(this.getPeriod($)),$>12&&($-=12),$===0&&($=12));var _="";w&&(_=":".concat(("00"+w).substring(w.length)));var R=$.toString(),q=("00"+R).substring(R.length),G=E.toString(),W=("00"+G).substring(G.length),z=this.options.trimHoursLeadingZero?R:q;return"".concat(Y?Z:"").concat(z,":").concat(W).concat(_).concat(Y?"":Z)},m.prototype.transformVerbosity=function(g,k){if(!k&&(g=g.replace(new RegExp(", ".concat(this.i18n.everyMinute()),"g"),""),g=g.replace(new RegExp(", ".concat(this.i18n.everyHour()),"g"),""),g=g.replace(new RegExp(this.i18n.commaEveryDay(),"g"),""),g=g.replace(/\, ?$/,""),this.i18n.conciseVerbosityReplacements))for(var w=0,C=Object.entries(this.i18n.conciseVerbosityReplacements());w<C.length;w++){var Q=C[w],$=Q[0],E=Q[1];g=g.replace(new RegExp($,"g"),E)}return g},m.prototype.getPeriod=function(g){return g>=12?this.i18n.pm&&this.i18n.pm()||"PM":this.i18n.am&&this.i18n.am()||"AM"},m.locales={},m}();l.ExpressionDescriptor=p},747(o,l,c){Object.defineProperty(l,"__esModule",{value:!0}),l.enLocaleLoader=void 0;var h=c(486),f=function(){function p(){}return p.prototype.load=function(m){m.en=new h.en},p}();l.enLocaleLoader=f},486(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.en=void 0;var c=function(){function h(){}return h.prototype.atX0SecondsPastTheMinuteGt20=function(){return null},h.prototype.atX0MinutesPastTheHourGt20=function(){return null},h.prototype.commaMonthX0ThroughMonthX1=function(){return null},h.prototype.commaYearX0ThroughYearX1=function(){return null},h.prototype.use24HourTimeFormatByDefault=function(){return!1},h.prototype.anErrorOccuredWhenGeneratingTheExpressionD=function(){return"An error occurred when generating the expression description. Check the cron expression syntax."},h.prototype.everyMinute=function(){return"every minute"},h.prototype.everyHour=function(){return"every hour"},h.prototype.atSpace=function(){return"At "},h.prototype.everyMinuteBetweenX0AndX1=function(){return"Every minute between %s and %s"},h.prototype.at=function(){return"At"},h.prototype.spaceAnd=function(){return" and"},h.prototype.everySecond=function(){return"every second"},h.prototype.everyX0Seconds=function(){return"every %s seconds"},h.prototype.secondsX0ThroughX1PastTheMinute=function(){return"seconds %s through %s past the minute"},h.prototype.atX0SecondsPastTheMinute=function(){return"at %s seconds past the minute"},h.prototype.everyX0Minutes=function(){return"every %s minutes"},h.prototype.minutesX0ThroughX1PastTheHour=function(){return"minutes %s through %s past the hour"},h.prototype.atX0MinutesPastTheHour=function(){return"at %s minutes past the hour"},h.prototype.everyX0Hours=function(){return"every %s hours"},h.prototype.betweenX0AndX1=function(){return"between %s and %s"},h.prototype.atX0=function(){return"at %s"},h.prototype.commaEveryDay=function(){return", every day"},h.prototype.commaEveryX0DaysOfTheWeek=function(){return", every %s days of the week"},h.prototype.commaX0ThroughX1=function(){return", %s through %s"},h.prototype.commaAndX0ThroughX1=function(){return", %s through %s"},h.prototype.first=function(){return"first"},h.prototype.second=function(){return"second"},h.prototype.third=function(){return"third"},h.prototype.fourth=function(){return"fourth"},h.prototype.fifth=function(){return"fifth"},h.prototype.commaOnThe=function(){return", on the "},h.prototype.spaceX0OfTheMonth=function(){return" %s of the month"},h.prototype.lastDay=function(){return"the last day"},h.prototype.commaOnTheLastX0OfTheMonth=function(){return", on the last %s of the month"},h.prototype.commaOnlyOnX0=function(){return", only on %s"},h.prototype.commaAndOnX0=function(){return", and on %s"},h.prototype.commaEveryX0Months=function(){return", every %s months"},h.prototype.commaOnlyInX0=function(){return", only in %s"},h.prototype.commaOnTheLastDayOfTheMonth=function(){return", on the last day of the month"},h.prototype.commaOnTheLastWeekdayOfTheMonth=function(){return", on the last weekday of the month"},h.prototype.commaDaysBeforeTheLastDayOfTheMonth=function(){return", %s days before the last day of the month"},h.prototype.firstWeekday=function(){return"first weekday"},h.prototype.weekdayNearestDayX0=function(){return"weekday nearest day %s"},h.prototype.commaOnTheX0OfTheMonth=function(){return", on the %s of the month"},h.prototype.commaEveryX0Days=function(){return", every %s days in a month"},h.prototype.commaBetweenDayX0AndX1OfTheMonth=function(){return", between day %s and %s of the month"},h.prototype.commaOnDayX0OfTheMonth=function(){return", on day %s of the month"},h.prototype.commaEveryHour=function(){return", every hour"},h.prototype.commaEveryX0Years=function(){return", every %s years"},h.prototype.commaStartingX0=function(){return", starting %s"},h.prototype.daysOfTheWeek=function(){return["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},h.prototype.monthsOfTheYear=function(){return["January","February","March","April","May","June","July","August","September","October","November","December"]},h.prototype.atReboot=function(){return"Run once, at startup"},h.prototype.onTheHour=function(){return"on the hour"},h}();l.en=c},515(o,l){Object.defineProperty(l,"__esModule",{value:!0});function c(f,p){if(!f)throw new Error(p)}var h=function(){function f(){}return f.secondRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var k=parseInt(m[g],10);c(k>=0&&k<=59,"seconds part must be >= 0 and <= 59")}},f.minuteRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var k=parseInt(m[g],10);c(k>=0&&k<=59,"minutes part must be >= 0 and <= 59")}},f.hourRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var k=parseInt(m[g],10);c(k>=0&&k<=23,"hours part must be >= 0 and <= 23")}},f.dayOfMonthRange=function(p){for(var m=p.split(","),g=0;g<m.length;g++)if(!isNaN(parseInt(m[g],10))){var k=parseInt(m[g],10);c(k>=1&&k<=31,"DOM part must be >= 1 and <= 31")}},f.monthRange=function(p,m){for(var g=p.split(","),k=0;k<g.length;k++)if(!isNaN(parseInt(g[k],10))){var w=parseInt(g[k],10);c(w>=1&&w<=12,m?"month part must be >= 0 and <= 11":"month part must be >= 1 and <= 12")}},f.dayOfWeekRange=function(p,m){for(var g=p.split(","),k=0;k<g.length;k++)if(!isNaN(parseInt(g[k],10))){var w=parseInt(g[k],10);c(w>=0&&w<=6,m?"DOW part must be >= 0 and <= 6":"DOW part must be >= 1 and <= 7")}},f}();l.default=h},823(o,l){Object.defineProperty(l,"__esModule",{value:!0}),l.StringUtilities=void 0;var c=function(){function h(){}return h.format=function(f){for(var p=[],m=1;m<arguments.length;m++)p[m-1]=arguments[m];return f.replace(/%s/g,function(g){return p.shift()})},h.containsAny=function(f,p){return p.some(function(m){return f.indexOf(m)>-1})},h}();l.StringUtilities=c}},r={};function i(o){var l=r[o];if(l!==void 0)return l.exports;var c=r[o]={exports:{}};return t[o](c,c.exports,i),c.exports}var s={};return(()=>{var o=s;Object.defineProperty(o,"__esModule",{value:!0}),o.toString=void 0;var l=i(333),c=i(747);l.ExpressionDescriptor.initialize(new c.enLocaleLoader),o.default=l.ExpressionDescriptor;var h=l.ExpressionDescriptor.toString;o.toString=h})(),s})())}(wO)),wO.exports}var q4=U4();const K2=af(q4);function H4(n){const r=G2.CronExpressionParser.parse(n).next().toDate().getTime()-Date.now(),i=Math.floor(r/6e4);if(i<1)return"less than 1m";if(i<60)return`${String(i)}m`;const s=Math.floor(i/60),o=i%60;if(s<24)return o>0?`${String(s)}h ${String(o)}m`:`${String(s)}h`;const l=Math.floor(s/24);return`${String(l)}d`}function G4(n){const e=Date.now()-new Date(n).getTime(),t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function K4(){const[n,e]=V.useState([]),[t,r]=V.useState(!0),[i,s]=V.useState(new Set),o=V.useCallback(async()=>{try{const c=await fetch("/automations");if(c.ok){const h=await c.json();e(h.automations)}}catch{}finally{r(!1)}},[]);V.useEffect(()=>{o()},[o]);const l=V.useCallback(async c=>{s(h=>new Set([...h,c]));try{await fetch(`/automations/${encodeURIComponent(c)}/run`,{method:"POST"})}catch{}finally{s(h=>{const f=new Set(h);return f.delete(c),f}),o()}},[o]);return x.jsxs("div",{className:"h-full bg-white dark:bg-[#0a0a0f]",children:[x.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:"Automations"}),x.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mt-0.5",children:[n.length," automation",n.length!==1?"s":""," configured"]})]}),x.jsx("div",{className:"p-6 max-w-3xl",children:t?x.jsx("div",{className:"text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."}):n.length===0?x.jsxs("div",{className:"text-center py-12",children:[x.jsx(Zu,{className:"h-8 w-8 text-gray-300 dark:text-zinc-700 mx-auto mb-3"}),x.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500",children:["No automations defined. Add ",x.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:".json"})," files to ",x.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"automations/"}),"."]})]}):x.jsx("div",{className:"space-y-3",children:n.map(c=>{const h=i.has(c.name);return x.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-5 bg-gray-50 dark:bg-zinc-900/50",children:x.jsxs("div",{className:"flex items-start justify-between gap-4",children:[x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("a",{href:`/automations/${encodeURIComponent(c.name)}`,className:"flex items-center gap-2 mb-1 hover:opacity-80 transition-opacity",children:[x.jsx(Zu,{className:"h-4 w-4 text-purple-500 shrink-0"}),x.jsx("h3",{className:"text-sm font-semibold text-gray-900 dark:text-zinc-200",children:c.title})]}),x.jsxs("div",{className:"flex items-center gap-3 mb-3",children:[x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:c.trigger}),c.schedule&&x.jsxs(x.Fragment,{children:[x.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[x.jsx(Kp,{className:"h-3 w-3"}),K2.toString(c.schedule,{use24HourTimeFormat:!0})]}),(()=>{const f=H4(c.schedule);return f?x.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",f]}):null})()]})]}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed line-clamp-2",children:c.prompt}),c.lastRun&&x.jsxs("div",{className:"flex items-center gap-2 mt-3 text-xs",children:[c.lastRunStatus==="success"?x.jsx(Zh,{className:"h-3 w-3 text-emerald-500"}):x.jsx(Xy,{className:"h-3 w-3 text-red-400"}),x.jsxs("span",{className:"text-gray-500 dark:text-zinc-500",children:["Last run ",G4(c.lastRun),c.lastRunStatus==="error"&&c.lastRunError&&x.jsxs("span",{className:"text-red-400 ml-1",children:["— ",c.lastRunError]})]}),c.lastRunSessionId&&x.jsx("a",{href:`/sessions/${c.lastRunSessionId}`,className:"text-xs text-indigo-500 hover:text-indigo-400 ml-2",children:"View session"})]})]}),x.jsx("button",{onClick:()=>{l(c.name)},disabled:h,className:"flex items-center gap-1.5 px-3 py-2 text-xs font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50 disabled:cursor-not-allowed shrink-0",children:h?x.jsxs(x.Fragment,{children:[x.jsx(ua,{className:"h-3.5 w-3.5 animate-spin"}),"Running..."]}):x.jsxs(x.Fragment,{children:[x.jsx(Fy,{className:"h-3.5 w-3.5"}),"Run Now"]})})]})},c.name)})})})]})}function J4(n){const e=Date.now()-n,t=Math.floor(e/6e4);if(t<1)return"just now";if(t<60)return`${String(t)}m ago`;const r=Math.floor(t/60);if(r<24)return`${String(r)}h ago`;const i=Math.floor(r/24);return`${String(i)}d ago`}function ez(n){const r=G2.CronExpressionParser.parse(n).next().toDate().getTime()-Date.now(),i=Math.floor(r/6e4);if(i<1)return"less than 1m";if(i<60)return`${String(i)}m`;const s=Math.floor(i/60),o=i%60;return s<24?o>0?`${String(s)}h ${String(o)}m`:`${String(s)}h`:`${String(Math.floor(s/24))}d`}function tz(){const{automationName:n}=Ju(),[e,t]=V.useState(null),[r,i]=V.useState([]),[s,o]=V.useState(null),[l,c]=V.useState({}),[h,f]=V.useState(!1),[p,m]=V.useState(""),[g,k]=V.useState(!0),w=V.useCallback(async()=>{if(n){try{const E=await fetch("/automations");if(E.ok){const _=(await E.json()).automations.find(R=>R.name===n);_&&t(_)}const Z=await fetch(`/sessions?automation=${encodeURIComponent(n)}&_t=${Date.now()}`);if(Z.ok){const Y=await Z.json();i(Y.sessions)}}catch{}k(!1)}},[n]);V.useEffect(()=>{w()},[w]);const C=V.useCallback(async()=>{var E;if(n){f(!0),m("");try{const Y=(E=(await fetch(`/automations/${encodeURIComponent(n)}/stream`,{method:"POST"})).body)==null?void 0:E.getReader(),_=new TextDecoder;if(Y){let R="";for(;;){const{done:q,value:G}=await Y.read();if(q)break;R+=_.decode(G,{stream:!0});const W=R.split(`
316
+ `);R=W.pop()??"";for(const z of W)if(z.startsWith("data: "))try{const D=JSON.parse(z.substring(6));D.type==="text_delta"&&typeof D.content=="string"&&m(se=>se+String(D.content))}catch{}}}}catch{}f(!1),w()}},[n,w]),Q=V.useCallback(async E=>{if(l[E]){o(s===E?null:E);return}try{const Z=await fetch(`/session/${encodeURIComponent(E)}`);if(Z.ok){const Y=await Z.json();c(_=>({..._,[E]:Y.messages})),o(E)}}catch{}},[l,s]);if(g)return x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(!e)return x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Automation not found"});const $=e.schedule?ez(e.schedule):null;return x.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[x.jsx("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("div",{className:"flex items-center gap-3",children:x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Zu,{className:"h-4 w-4 text-purple-500"}),x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:e.title})]}),x.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-purple-100 dark:bg-purple-500/10 text-purple-700 dark:text-purple-400 font-medium",children:e.trigger}),e.schedule&&x.jsxs("span",{className:"flex items-center gap-1 text-xs text-gray-500 dark:text-zinc-500",children:[x.jsx(Kp,{className:"h-3 w-3"}),K2.toString(e.schedule,{use24HourTimeFormat:!0})]}),$&&x.jsxs("span",{className:"text-xs text-gray-400 dark:text-zinc-600",children:["Next in ",$]})]}),x.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 leading-relaxed mt-2 max-w-2xl line-clamp-3",children:e.prompt})]})}),x.jsxs("div",{className:"flex items-center gap-3 shrink-0",children:[e.schedule&&x.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[x.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-400",children:e.running?"Scheduled":"Paused"}),x.jsx("button",{onClick:()=>{const E=e.running?"stop":"start";fetch(`/automations/${encodeURIComponent(n??"")}/${E}`,{method:"POST"}).then(()=>w())},className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e.running?"bg-emerald-500":"bg-gray-300 dark:bg-zinc-700"}`,children:x.jsx("span",{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${e.running?"translate-x-6":"translate-x-1"}`})})]}),x.jsx("button",{onClick:()=>{C()},disabled:h,className:"flex items-center gap-1.5 px-4 py-2 text-sm font-medium rounded-lg bg-purple-600 text-white hover:bg-purple-500 transition-colors disabled:opacity-50",children:h?x.jsxs(x.Fragment,{children:[x.jsx(ua,{className:"h-4 w-4 animate-spin"})," Running..."]}):x.jsxs(x.Fragment,{children:[x.jsx(Fy,{className:"h-4 w-4"})," Run Now"]})})]})]})}),x.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:x.jsxs("div",{className:"max-w-3xl mx-auto px-4 py-6",children:[(h||p)&&x.jsxs("div",{className:"mb-6 border border-purple-500/20 rounded-xl p-4 bg-purple-500/5",children:[x.jsx("div",{className:"flex items-center gap-2 mb-3 text-xs text-purple-400 font-medium",children:h?x.jsxs(x.Fragment,{children:[x.jsx(ua,{className:"h-3.5 w-3.5 animate-spin"})," Running now..."]}):x.jsxs(x.Fragment,{children:[x.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-500"})," Latest run"]})}),p?x.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:x.jsx(ws,{children:p})}):x.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"Waiting for agent response..."})]}),r.length===0&&!h?x.jsx("div",{className:"text-center py-12 text-gray-400 dark:text-zinc-600 text-sm",children:"No runs yet. Click Run Now to trigger this automation."}):x.jsx("div",{className:"space-y-4",children:r.map(E=>{const Z=s===E.id,Y=l[E.id];return x.jsxs("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl overflow-hidden",children:[x.jsxs("button",{onClick:()=>{Q(E.id)},className:"w-full flex items-center justify-between px-4 py-3 text-left hover:bg-gray-50 dark:hover:bg-zinc-900/50 transition-colors",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Zh,{className:"h-3.5 w-3.5 text-emerald-500 shrink-0"}),x.jsxs("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:["Run ",J4(E.createdAt)]})]}),x.jsx("span",{className:"text-xs text-gray-400 dark:text-zinc-600 font-mono",children:E.id.slice(0,8)})]}),Z&&Y&&x.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800 px-4 py-4 bg-gray-50 dark:bg-zinc-900/30",children:[Y.filter(_=>_.role==="assistant"&&_.text).map((_,R)=>x.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-800 dark:prose-headings:text-zinc-200 prose-p:text-gray-700 dark:prose-p:text-zinc-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded",children:x.jsx(ws,{children:_.text})},`msg-${String(R)}`)),Y.filter(_=>_.role==="assistant"&&_.text).length===0&&x.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600",children:"No response text captured"})]})]},E.id)})})]})})]})}function nz(){const{pageName:n}=Ju(),[e,t]=V.useState(null),[r,i]=V.useState(!1);return V.useEffect(()=>{if(!n)return;t(null),i(!1);const s=window.__AMODAL_PAGES__;if(s!=null&&s[n]){t(()=>s[n]);return}const o=document.createElement("script");o.src=`/pages-bundle/${n}.js`,o.onload=()=>{const l=window.__AMODAL_PAGES__;l!=null&&l[n]?t(()=>l[n]):i(!0)},o.onerror=()=>i(!0),document.head.appendChild(o)},[n]),r?x.jsx(rz,{name:n??""}):e?x.jsx(e,{}):x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading page..."})}function rz({name:n}){return x.jsxs("div",{className:"p-6",children:[x.jsx("h1",{className:"text-xl font-bold mb-2 text-gray-900 dark:text-zinc-200",children:"Page Not Found"}),x.jsx("p",{className:"text-gray-500 dark:text-zinc-500",children:n?`No page named "${n}" found in pages/.`:"No page specified."})]})}const iz={connections:{icon:p0,color:"emerald",label:"REST Connection"},mcp:{icon:NP,color:"violet",label:"MCP Server"},skills:{icon:m0,color:"amber",label:"Skill"},knowledge:{icon:d0,color:"blue",label:"Knowledge"}};function sz({data:n}){return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-wrap gap-2",children:[x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400 font-medium",children:n.spec.format}),x.jsxs("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-600 dark:text-zinc-400 font-medium",children:["auth: ",n.spec.authType]}),n.spec.baseUrl&&x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.spec.baseUrl})]}),n.surface.length>0&&x.jsxs("section",{children:[x.jsxs("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:["API Surface (",String(n.surface.length)," endpoints)"]}),x.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:x.jsxs("table",{className:"w-full text-[13px]",children:[x.jsx("thead",{children:x.jsxs("tr",{className:"bg-gray-50 dark:bg-zinc-900/50",children:[x.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium w-20",children:"Method"}),x.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Path"}),x.jsx("th",{className:"text-left px-3 py-2 text-gray-500 dark:text-zinc-500 font-medium",children:"Description"})]})}),x.jsx("tbody",{children:n.surface.map((e,t)=>x.jsxs("tr",{className:"border-t border-gray-100 dark:border-zinc-800/50",children:[x.jsx("td",{className:"px-3 py-2",children:x.jsx("span",{className:`text-[10px] font-mono font-bold uppercase ${e.method==="GET"?"text-blue-500":e.method==="POST"?"text-emerald-500":e.method==="PUT"?"text-amber-500":e.method==="DELETE"?"text-red-500":"text-gray-500"}`,children:e.method})}),x.jsx("td",{className:"px-3 py-2 font-mono text-gray-700 dark:text-zinc-300",children:e.path}),x.jsx("td",{className:"px-3 py-2 text-gray-500 dark:text-zinc-500",children:e.description})]},`endpoint-${String(t)}`))})]})})]}),n.entities&&x.jsxs("section",{children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Entities"}),x.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:x.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:x.jsx(ws,{children:n.entities})})})]}),n.rules&&x.jsxs("section",{children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Rules"}),x.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4",children:x.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:x.jsx(ws,{children:n.rules})})})]})]})}function oz({data:n}){return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"flex flex-wrap gap-2",children:[x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-violet-100 dark:bg-violet-500/10 text-violet-700 dark:text-violet-400 font-medium",children:n.transport}),x.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full font-medium ${n.status==="connected"?"bg-emerald-100 dark:bg-emerald-500/10 text-emerald-700 dark:text-emerald-400":"bg-red-100 dark:bg-red-500/10 text-red-700 dark:text-red-400"}`,children:n.status}),n.command&&x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.command}),n.url&&x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-gray-100 dark:bg-white/[0.06] text-gray-500 dark:text-zinc-500 font-mono",children:n.url})]}),n.error&&x.jsx("div",{className:"bg-red-50 dark:bg-red-500/5 border border-red-200 dark:border-red-500/20 rounded-lg px-4 py-3",children:x.jsx("p",{className:"text-sm text-red-700 dark:text-red-400 font-mono",children:n.error})}),n.tools.length>0&&x.jsxs("section",{children:[x.jsxs("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:["Tools (",String(n.tools.length),")"]}),x.jsx("div",{className:"space-y-3",children:n.tools.map(e=>x.jsxs("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-lg overflow-hidden",children:[x.jsxs("div",{className:"px-4 py-3 bg-gray-50 dark:bg-zinc-900/50",children:[x.jsx("div",{className:"flex items-center gap-2",children:x.jsx("span",{className:"text-sm font-mono font-semibold text-gray-800 dark:text-zinc-200",children:e.name})}),e.description&&x.jsx("p",{className:"text-xs text-gray-500 dark:text-zinc-500 mt-1",children:e.description})]}),e.parameters&&Object.keys(e.parameters).length>0&&x.jsx("div",{className:"px-4 py-3 border-t border-gray-100 dark:border-zinc-800/50",children:x.jsx("pre",{className:"text-[12px] text-gray-600 dark:text-zinc-400 font-mono whitespace-pre-wrap overflow-auto leading-relaxed",children:JSON.stringify(e.parameters,null,2)})})]},e.name))})]}),n.tools.length===0&&n.status==="connected"&&x.jsx("div",{className:"text-center py-8 text-gray-400 dark:text-zinc-600 text-sm",children:"Connected but no tools discovered."})]})}function az({data:n}){return x.jsxs("div",{className:"space-y-6",children:[x.jsxs("div",{className:"space-y-2",children:[n.description&&x.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:n.description}),n.trigger&&x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-amber-100 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400 font-medium",children:"trigger"}),x.jsx("span",{className:"text-xs text-gray-500 dark:text-zinc-500 font-mono",children:n.trigger})]})]}),x.jsxs("section",{children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-200 mb-3",children:"Skill Definition"}),x.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto prose dark:prose-invert prose-sm max-w-none prose-headings:text-gray-900 dark:prose-headings:text-zinc-200 prose-p:text-gray-900 dark:prose-p:text-zinc-300 prose-strong:text-gray-900 dark:prose-strong:text-zinc-200 prose-code:text-indigo-700 dark:prose-code:text-indigo-300 prose-code:bg-gray-100 dark:prose-code:bg-zinc-800 prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-li:text-gray-900 dark:prose-li:text-zinc-300",children:x.jsx(ws,{children:n.body})})]})]})}function lz({data:n}){return x.jsxs("div",{className:"space-y-6",children:[n.title&&n.title!==n.name&&x.jsx("p",{className:"text-sm text-gray-600 dark:text-zinc-400",children:n.title}),x.jsx("section",{children:x.jsx("div",{className:"bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg p-4 overflow-auto",children:x.jsx("div",{className:"text-[13px] text-gray-700 dark:text-zinc-300 prose dark:prose-invert prose-sm max-w-none",children:x.jsx(ws,{children:n.body})})})})]})}function uz(){const{kind:n,name:e}=Ju(),[t,r]=V.useState(null),[i,s]=V.useState(!0),[o,l]=V.useState(null),h=n&&new Set(["connections","mcp","skills","knowledge"]).has(n)?n:void 0,f=h?iz[h]:void 0;if(V.useEffect(()=>{!h||!e||(s(!0),l(null),fetch(`/inspect/${h}/${encodeURIComponent(e)}`).then(g=>{if(!g.ok)throw new Error(`${String(g.status)} ${g.statusText}`);return g.json()}).then(g=>{r(g)}).catch(g=>{l(g instanceof Error?g.message:"Failed to load")}).finally(()=>{s(!1)}))},[h,e]),!f)return x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500",children:"Unknown inspect type"});if(i)return x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."});if(o||!t)return x.jsx("div",{className:"p-6 text-red-500 text-sm",children:o??"Not found"});const p=f.icon,m=(e==null?void 0:e.replace(/[-_]/g," ").replace(/\b\w/g,g=>g.toUpperCase()))??"";return x.jsxs("div",{className:"h-full flex flex-col bg-white dark:bg-[#0a0a0f]",children:[x.jsxs("div",{className:"border-b border-gray-200 dark:border-zinc-800/50 px-6 py-4",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(p,{className:`h-4 w-4 text-${f.color}-500`}),x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200",children:m})]}),x.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[x.jsx("span",{className:`text-[11px] px-2 py-0.5 rounded-full bg-${f.color}-100 dark:bg-${f.color}-500/10 text-${f.color}-700 dark:text-${f.color}-400 font-medium`,children:f.label}),"location"in t&&t.location&&x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-600 font-mono",children:t.location})]})]}),x.jsx("div",{className:"flex-1 overflow-y-auto scrollbar-thin",children:x.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[h==="connections"&&x.jsx(sz,{data:t}),h==="mcp"&&x.jsx(oz,{data:t}),h==="skills"&&x.jsx(az,{data:t}),h==="knowledge"&&x.jsx(lz,{data:t})]})})]})}function cz(){const[n,e]=V.useState("checking"),t=V.useRef();return V.useEffect(()=>{const r=()=>{fetch("/inspect/health",{signal:AbortSignal.timeout(3e3)}).then(i=>{e(i.ok?"connected":"disconnected")}).catch(()=>{e("disconnected")})};return r(),t.current=setInterval(r,1e4),()=>clearInterval(t.current)},[]),n}function hz(){const[n,e]=V.useState(()=>document.documentElement.classList.contains("dark")),t=V.useCallback(()=>{const r=!n;e(r),document.documentElement.classList.toggle("dark",r);try{localStorage.setItem("amodal-theme",r?"dark":"light")}catch{}},[n]);return V.useEffect(()=>{try{localStorage.getItem("amodal-theme")==="light"&&(e(!1),document.documentElement.classList.remove("dark"))}catch{}},[]),{dark:n,toggle:t}}function tl({to:n,children:e,end:t}){return x.jsx(Iu,{to:n,end:t,className:({isActive:r})=>Sr("flex items-center gap-2.5 px-3 py-[7px] rounded-md text-[13px] transition-colors duration-150",r?"bg-indigo-500/10 text-indigo-600 dark:text-indigo-400 font-medium":"text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.04]"),children:e})}function fz(){const{name:n,model:e}=ec(),{dark:t,toggle:r}=hz(),i=cz();return x.jsxs("div",{className:"flex flex-col h-screen overflow-hidden bg-white dark:bg-[#0a0a0f]",children:[x.jsxs("header",{className:"h-14 bg-gray-50 dark:bg-[#0f0f17] border-b border-gray-200 dark:border-white/[0.06] text-gray-900 dark:text-white flex items-center justify-between px-5 shrink-0 z-20",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 32 32",fill:"none",children:[x.jsx("defs",{children:x.jsx("clipPath",{id:"logo-sq",children:x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3"})})}),x.jsx("rect",{x:"2",y:"10",width:"17",height:"17",rx:"3",fill:"#1E40AF"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#60A5FA",fillOpacity:"0.85"}),x.jsx("circle",{cx:"22",cy:"11",r:"10",fill:"#3B82F6",clipPath:"url(#logo-sq)"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"font-semibold tracking-tight text-[15px] text-gray-900 dark:text-white/90",children:"amodal"}),n&&x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-gray-300 dark:text-white/20",children:"/"}),x.jsx("span",{className:"text-[13px] text-gray-500 dark:text-white/50 font-medium",children:n})]})]})]}),x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Iu,{to:"/config",className:"h-8 w-8 rounded-lg flex items-center justify-center text-indigo-500 dark:text-indigo-400 bg-indigo-500/10 transition-colors",title:"Configuration",children:x.jsx(LP,{className:"h-4 w-4"})}),x.jsx("button",{onClick:r,className:"h-8 w-8 rounded-lg flex items-center justify-center text-gray-400 dark:text-white/30 hover:text-gray-600 dark:hover:text-white/60 hover:bg-gray-100 dark:hover:bg-white/[0.06] transition-colors",title:t?"Switch to light mode":"Switch to dark mode",children:t?x.jsx(IP,{className:"h-4 w-4"}):x.jsx(zP,{className:"h-4 w-4"})}),e&&x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/25 font-mono",children:e.replace(/-\d{8}$/,"")}),x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("div",{className:`h-2 w-2 rounded-full ${i==="connected"?"bg-emerald-400 animate-pulse":i==="checking"?"bg-amber-400 animate-pulse":"bg-red-400"}`}),x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-white/40 font-medium tracking-wide uppercase",children:i==="connected"?"Connected":i==="checking"?"Connecting":"Disconnected"})]})]})]}),x.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[x.jsx("aside",{className:"w-[260px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex flex-col shrink-0 overflow-hidden",children:x.jsxs("nav",{className:"flex-1 overflow-y-auto scrollbar-thin px-2 py-2",children:[x.jsxs(Iu,{to:"/",className:"flex items-center gap-2.5 w-full px-3 py-2 mb-1 rounded-md text-[13px] text-gray-500 dark:text-white/60 hover:text-gray-800 dark:hover:text-white/90 hover:bg-gray-100 dark:hover:bg-white/[0.04] transition-colors",children:[x.jsx(Iy,{className:"h-4 w-4 shrink-0"}),"Back to app"]}),x.jsx("div",{className:"px-3 pt-5 pb-1.5",children:x.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:"Configuration"})}),x.jsxs("div",{className:"space-y-0.5",children:[x.jsxs(tl,{to:"/config",end:!0,children:[x.jsx(wp,{className:"h-4 w-4 shrink-0"}),"Chat"]}),x.jsxs(tl,{to:"/config/agent",children:[x.jsx(RP,{className:"h-4 w-4 shrink-0"}),"Agent"]}),x.jsxs(tl,{to:"/config/models",children:[x.jsx(Vy,{className:"h-4 w-4 shrink-0"}),"Models"]}),x.jsxs(tl,{to:"/config/prompt",children:[x.jsx(Wy,{className:"h-4 w-4 shrink-0"}),"Prompt"]}),x.jsxs(tl,{to:"/config/secrets",children:[x.jsx(_P,{className:"h-4 w-4 shrink-0"}),"Secrets"]}),x.jsxs(tl,{to:"/config/files",children:[x.jsx(qj,{className:"h-4 w-4 shrink-0"}),"Files"]}),x.jsxs(tl,{to:"/config/system",children:[x.jsx(gu,{className:"h-4 w-4 shrink-0"}),"System"]})]})]})}),x.jsx("main",{className:"flex-1 overflow-auto bg-white dark:bg-[#0a0a0f] scrollbar-thin",children:x.jsx(OP,{})})]})]})}function dz(){const[n,e]=V.useState(null);if(V.useEffect(()=>{fetch("/api/config").then(r=>r.ok?r.json():null).then(r=>{r&&e(r)}).catch(()=>{})},[]),!n)return x.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."});const t=n.models.main;return x.jsxs("div",{className:"p-8 max-w-2xl",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-6",children:"Agent"}),x.jsxs("div",{className:"space-y-6",children:[x.jsx(Dd,{label:"Name",value:n.name||"(unnamed)"}),x.jsx(Dd,{label:"Version",value:n.version}),n.description&&x.jsx(Dd,{label:"Description",value:n.description}),x.jsx(Dd,{label:"Repo Path",value:n.repoPath,mono:!0}),x.jsxs("div",{className:"border-t border-gray-200 dark:border-zinc-800 pt-6",children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-4",children:"Primary Model"}),t?x.jsxs("div",{className:"bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-4 space-y-3",children:[x.jsxs("div",{className:"flex items-center justify-between",children:[x.jsx("span",{className:"text-sm text-gray-900 dark:text-zinc-200 font-medium",children:t.model.replace(/-\d{8}$/,"")}),x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 font-medium",children:t.provider})]}),x.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-500 font-mono",children:t.model})]}):x.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No model configured"})]}),Object.keys(n.models).length>1&&x.jsxs("div",{children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-3",children:"Other Models"}),x.jsx("div",{className:"space-y-2",children:Object.entries(n.models).filter(([r])=>r!=="main").map(([r,i])=>x.jsxs("div",{className:"flex items-center justify-between bg-gray-50 dark:bg-zinc-900/30 border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[x.jsxs("div",{children:[x.jsx("span",{className:"text-sm text-gray-700 dark:text-zinc-300",children:r}),x.jsx("span",{className:"text-xs text-gray-400 dark:text-zinc-500 ml-2 font-mono",children:i.model})]}),x.jsx("span",{className:"text-[11px] text-gray-400 dark:text-zinc-500",children:i.provider})]},r))})]})]})]})}function Dd({label:n,value:e,mono:t}){return x.jsxs("div",{children:[x.jsx("div",{className:"text-xs font-medium text-gray-500 dark:text-zinc-400 mb-1",children:n}),x.jsx("div",{className:`text-sm text-gray-900 dark:text-zinc-200 ${t?"font-mono text-xs":""}`,children:e})]})}function pz(){const[n,e]=V.useState({});V.useEffect(()=>{fetch("/api/config").then(r=>r.ok?r.json():null).then(r=>{r&&typeof r=="object"&&"models"in r&&e(r.models)}).catch(()=>{})},[]);const t=Object.entries(n);return x.jsxs("div",{className:"p-8 max-w-2xl",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"Models"}),x.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:["Configured in ",x.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"amodal.json"})," under ",x.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:"models"}),"."]}),t.length===0?x.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No models configured."}):x.jsx("div",{className:"space-y-3",children:t.map(([r,i])=>x.jsx("div",{className:"border border-gray-200 dark:border-zinc-800 rounded-xl p-5 bg-gray-50 dark:bg-zinc-900/50",children:x.jsx("div",{className:"flex items-start justify-between gap-3",children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Vy,{className:"h-5 w-5 text-indigo-500 shrink-0"}),x.jsxs("div",{children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-sm font-semibold text-gray-900 dark:text-zinc-200",children:i.model.replace(/-\d{8}$/,"")}),x.jsx("span",{className:"text-[11px] px-2 py-0.5 rounded-full bg-indigo-100 dark:bg-indigo-500/10 text-indigo-700 dark:text-indigo-400 font-medium",children:r})]}),x.jsxs("div",{className:"text-xs text-gray-500 dark:text-zinc-500 mt-1",children:["Provider: ",x.jsx("span",{className:"font-medium text-gray-700 dark:text-zinc-300",children:i.provider})]}),x.jsx("div",{className:"text-xs text-gray-400 dark:text-zinc-600 font-mono mt-0.5",children:i.model})]})]})})},r))})]})}function mz(){const[n,e]=V.useState(null),[t,r]=V.useState(!1);if(V.useEffect(()=>{fetch("/inspect/context").then(s=>s.ok?s.json():null).then(s=>{s&&e(s)}).catch(()=>{})},[]),!n)return x.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."});const i=Math.round(n.token_usage.used/n.token_usage.total*100);return x.jsxs("div",{className:"p-8 max-w-2xl",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"System Prompt"}),x.jsx("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:"The compiled prompt the LLM receives at the start of every session."}),x.jsxs("div",{className:"mb-6",children:[x.jsxs("div",{className:"flex items-center justify-between text-xs text-gray-500 dark:text-zinc-400 mb-1.5",children:[x.jsxs("span",{children:[n.token_usage.used.toLocaleString()," tokens used"]}),x.jsxs("span",{children:[n.token_usage.total.toLocaleString()," context window"]})]}),x.jsx("div",{className:"h-3 bg-gray-200 dark:bg-zinc-800 rounded-full overflow-hidden",children:x.jsx("div",{className:`h-full rounded-full transition-all ${i>80?"bg-amber-500":"bg-indigo-500"}`,style:{width:`${String(i)}%`}})}),x.jsxs("div",{className:"text-xs text-gray-400 dark:text-zinc-600 mt-1",children:[i,"% used — ",n.token_usage.remaining.toLocaleString()," tokens remaining for conversation"]})]}),x.jsxs("div",{className:"mb-6",children:[x.jsx("h2",{className:"text-sm font-semibold text-gray-800 dark:text-zinc-300 mb-3",children:"Sections"}),x.jsx("div",{className:"space-y-2",children:n.sections.map(s=>{const o=n.token_usage.used>0?Math.round(s.tokens/n.token_usage.used*100):0;return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx("div",{className:"w-28 text-xs text-gray-600 dark:text-zinc-400 font-medium truncate",children:s.name}),x.jsx("div",{className:"flex-1 h-2 bg-gray-200 dark:bg-zinc-800 rounded-full overflow-hidden",children:x.jsx("div",{className:"h-full bg-indigo-400/60 rounded-full",style:{width:`${String(o)}%`}})}),x.jsx("div",{className:"w-20 text-right text-xs text-gray-500 dark:text-zinc-500 tabular-nums",children:s.tokens.toLocaleString()}),s.trimmed&&x.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-100 dark:bg-amber-500/10 text-amber-700 dark:text-amber-400",children:"trimmed"})]},s.name)})})]}),x.jsxs("div",{children:[x.jsxs("button",{onClick:()=>r(!t),className:"flex items-center gap-2 text-sm text-gray-600 dark:text-zinc-400 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors mb-3",children:[x.jsx(Wy,{className:"h-4 w-4"}),t?"Hide full prompt":"View full prompt"," (",n.system_prompt_length.toLocaleString()," chars)"]}),t&&x.jsx("pre",{className:"bg-gray-50 dark:bg-zinc-900/50 border border-gray-200 dark:border-zinc-800 rounded-xl p-4 text-xs text-gray-700 dark:text-zinc-300 font-mono whitespace-pre-wrap overflow-auto max-h-[600px] scrollbar-thin leading-relaxed",children:n.system_prompt})]})]})}function gz(){const[n,e]=V.useState([]),[t,r]=V.useState(!0);V.useEffect(()=>{fetch("/api/config").then(o=>o.ok?o.json():null).then(o=>{o&&typeof o=="object"&&"envRefs"in o&&e(o.envRefs)}).catch(()=>{}).finally(()=>r(!1))},[]);const i=n.filter(o=>o.set).length,s=n.filter(o=>!o.set).length;return x.jsxs("div",{className:"p-8 max-w-2xl",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-2",children:"Secrets"}),x.jsxs("p",{className:"text-sm text-gray-500 dark:text-zinc-500 mb-6",children:["Environment variables referenced by connection specs. Values are read from ",x.jsx("code",{className:"text-xs bg-gray-100 dark:bg-zinc-800 px-1.5 py-0.5 rounded",children:".env"}),"."]}),t?x.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"Loading..."}):n.length===0?x.jsx("div",{className:"text-sm text-gray-400 dark:text-zinc-500",children:"No environment variables referenced by connections."}):x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"flex items-center gap-4 mb-4 text-xs",children:[x.jsxs("span",{className:"flex items-center gap-1 text-emerald-600 dark:text-emerald-400",children:[x.jsx(Zh,{className:"h-3.5 w-3.5"})," ",String(i)," set"]}),s>0&&x.jsxs("span",{className:"flex items-center gap-1 text-red-500 dark:text-red-400",children:[x.jsx(Xy,{className:"h-3.5 w-3.5"})," ",String(s)," missing"]})]}),x.jsx("div",{className:"space-y-2",children:n.map(o=>x.jsxs("div",{className:"flex items-center justify-between border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(_P,{className:`h-4 w-4 shrink-0 ${o.set?"text-emerald-500":"text-red-400"}`}),x.jsxs("div",{children:[x.jsx("div",{className:"text-sm font-mono text-gray-900 dark:text-zinc-200",children:o.name}),x.jsxs("div",{className:"text-xs text-gray-400 dark:text-zinc-500",children:["Used by ",o.connection]})]})]}),o.set?x.jsx("span",{className:"text-xs text-emerald-600 dark:text-emerald-400 font-medium",children:"Set"}):x.jsx("span",{className:"text-xs text-red-500 dark:text-red-400 font-medium",children:"Missing"})]},`${o.connection}-${o.name}`))})]})]})}function Oz(n){if(n<60)return`${String(n)}s`;const e=Math.floor(n/60);if(e<60)return`${String(e)}m ${String(n%60)}s`;const t=Math.floor(e/60);return`${String(t)}h ${String(e%60)}m`}function yz(){const[n,e]=V.useState(null);return V.useEffect(()=>{fetch("/api/config").then(t=>t.ok?t.json():null).then(t=>{t&&e(t)}).catch(()=>{})},[]),n?x.jsxs("div",{className:"p-8 max-w-2xl",children:[x.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-zinc-200 mb-6",children:"System"}),x.jsxs("div",{className:"space-y-4",children:[x.jsx(dh,{icon:x.jsx(gu,{className:"h-4 w-4"}),label:"Runtime Version",value:n.runtimeVersion}),x.jsx(dh,{icon:x.jsx(gu,{className:"h-4 w-4"}),label:"Node.js",value:n.nodeVersion}),x.jsx(dh,{icon:x.jsx(gu,{className:"h-4 w-4"}),label:"Uptime",value:Oz(n.uptime)}),x.jsx(dh,{icon:x.jsx(gu,{className:"h-4 w-4"}),label:"Repo Path",value:n.repoPath,mono:!0}),n.stores&&x.jsx(dh,{icon:x.jsx(gu,{className:"h-4 w-4"}),label:"Store Backend",value:n.stores.backend??"pglite"})]})]}):x.jsx("div",{className:"p-8 text-gray-400 dark:text-zinc-500 text-sm",children:"Loading..."})}function dh({icon:n,label:e,value:t,mono:r}){return x.jsxs("div",{className:"flex items-center gap-3 border border-gray-200 dark:border-zinc-800 rounded-lg px-4 py-3",children:[x.jsx("span",{className:"text-gray-400 dark:text-zinc-500",children:n}),x.jsxs("div",{className:"flex-1",children:[x.jsx("div",{className:"text-xs text-gray-500 dark:text-zinc-500",children:e}),x.jsx("div",{className:`text-sm text-gray-900 dark:text-zinc-200 ${r?"font-mono text-xs":""}`,children:t})]})]})}let j0=[],J2=[];(()=>{let n="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b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,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,t=0;e<n.length;e++)(e%2?J2:j0).push(t=t+n[e])})();function xz(n){if(n<768)return!1;for(let e=0,t=j0.length;;){let r=e+t>>1;if(n<j0[r])t=r;else if(n>=J2[r])e=r+1;else return!0;if(e==t)return!1}}function Qk(n){return n>=127462&&n<=127487}const Ck=8205;function vz(n,e,t=!0,r=!0){return(t?eQ:wz)(n,e,r)}function eQ(n,e,t){if(e==n.length)return e;e&&tQ(n.charCodeAt(e))&&nQ(n.charCodeAt(e-1))&&e--;let r=kO(n,e);for(e+=Tk(r);e<n.length;){let i=kO(n,e);if(r==Ck||i==Ck||t&&xz(i))e+=Tk(i),r=i;else if(Qk(i)){let s=0,o=e-2;for(;o>=0&&Qk(kO(n,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function wz(n,e,t){for(;e>0;){let r=eQ(n,e-2,t);if(r<e)return r;e--}return 0}function kO(n,e){let t=n.charCodeAt(e);if(!nQ(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return tQ(r)?(t-55296<<10)+(r-56320)+65536:t}function tQ(n){return n>=56320&&n<57344}function nQ(n){return n>=55296&&n<56320}function Tk(n){return n<65536?1:2}class Et{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,r){[e,t]=Xu(this,e,t);let i=[];return this.decompose(0,e,i,2),r.length&&r.decompose(0,r.length,i,3),this.decompose(t,this.length,i,1),ds.from(i,this.length-(t-e)+r.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){[e,t]=Xu(this,e,t);let r=[];return this.decompose(e,t,r,0),ds.from(r,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),r=this.length-this.scanIdentical(e,-1),i=new $h(this),s=new $h(e);for(let o=t,l=t;;){if(i.next(o),s.next(o),o=0,i.lineBreak!=s.lineBreak||i.done!=s.done||i.value!=s.value)return!1;if(l+=i.value.length,i.done||l>=r)return!0}}iter(e=1){return new $h(this,e)}iterRange(e,t=this.length){return new rQ(this,e,t)}iterLines(e,t){let r;if(e==null)r=this.iter();else{t==null&&(t=this.lines+1);let i=this.line(e).from;r=this.iterRange(i,Math.max(i,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new iQ(r)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?Et.empty:e.length<=32?new yn(e):ds.from(yn.split(e,[]))}}class yn extends Et{constructor(e,t=kz(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.text[s],l=i+o.length;if((t?r:l)>=e)return new Sz(i,l,r,o);i=l+1,r++}}decompose(e,t,r,i){let s=e<=0&&t>=this.length?this:new yn($k(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(i&1){let o=r.pop(),l=sp(s.text,o.text.slice(),0,s.length);if(l.length<=32)r.push(new yn(l,o.length+s.length));else{let c=l.length>>1;r.push(new yn(l.slice(0,c)),new yn(l.slice(c)))}}else r.push(s)}replace(e,t,r){if(!(r instanceof yn))return super.replace(e,t,r);[e,t]=Xu(this,e,t);let i=sp(this.text,sp(r.text,$k(this.text,0,e)),t),s=this.length+r.length-(t-e);return i.length<=32?new yn(i,s):ds.from(yn.split(i,[]),s)}sliceString(e,t=this.length,r=`
317
+ `){[e,t]=Xu(this,e,t);let i="";for(let s=0,o=0;s<=t&&o<this.text.length;o++){let l=this.text[o],c=s+l.length;s>e&&o&&(i+=r),e<c&&t>s&&(i+=l.slice(Math.max(0,e-s),t-s)),s=c+1}return i}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let r=[],i=-1;for(let s of e)r.push(s),i+=s.length+1,r.length==32&&(t.push(new yn(r,i)),r=[],i=-1);return i>-1&&t.push(new yn(r,i)),t}}class ds extends Et{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let r of e)this.lines+=r.lines}lineInner(e,t,r,i){for(let s=0;;s++){let o=this.children[s],l=i+o.length,c=r+o.lines-1;if((t?c:l)>=e)return o.lineInner(e,t,r,i);i=l+1,r=c+1}}decompose(e,t,r,i){for(let s=0,o=0;o<=t&&s<this.children.length;s++){let l=this.children[s],c=o+l.length;if(e<=c&&t>=o){let h=i&((o<=e?1:0)|(c>=t?2:0));o>=e&&c<=t&&!h?r.push(l):l.decompose(e-o,t-o,r,h)}o=c+1}}replace(e,t,r){if([e,t]=Xu(this,e,t),r.lines<this.lines)for(let i=0,s=0;i<this.children.length;i++){let o=this.children[i],l=s+o.length;if(e>=s&&t<=l){let c=o.replace(e-s,t-s,r),h=this.lines-o.lines+c.lines;if(c.lines<h>>4&&c.lines>h>>6){let f=this.children.slice();return f[i]=c,new ds(f,this.length-(t-e)+r.length)}return super.replace(s,l,c)}s=l+1}return super.replace(e,t,r)}sliceString(e,t=this.length,r=`
318
+ `){[e,t]=Xu(this,e,t);let i="";for(let s=0,o=0;s<this.children.length&&o<=t;s++){let l=this.children[s],c=o+l.length;o>e&&s&&(i+=r),e<c&&t>o&&(i+=l.sliceString(e-o,t-o,r)),o=c+1}return i}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof ds))return 0;let r=0,[i,s,o,l]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;i+=t,s+=t){if(i==o||s==l)return r;let c=this.children[i],h=e.children[s];if(c!=h)return r+c.scanIdentical(h,t);r+=c.length+1}}static from(e,t=e.reduce((r,i)=>r+i.length+1,-1)){let r=0;for(let g of e)r+=g.lines;if(r<32){let g=[];for(let k of e)k.flatten(g);return new yn(g,t)}let i=Math.max(32,r>>5),s=i<<1,o=i>>1,l=[],c=0,h=-1,f=[];function p(g){let k;if(g.lines>s&&g instanceof ds)for(let w of g.children)p(w);else g.lines>o&&(c>o||!c)?(m(),l.push(g)):g instanceof yn&&c&&(k=f[f.length-1])instanceof yn&&g.lines+k.lines<=32?(c+=g.lines,h+=g.length+1,f[f.length-1]=new yn(k.text.concat(g.text),k.length+1+g.length)):(c+g.lines>i&&m(),c+=g.lines,h+=g.length+1,f.push(g))}function m(){c!=0&&(l.push(f.length==1?f[0]:ds.from(f,h)),h=-1,c=f.length=0)}for(let g of e)p(g);return m(),l.length==1?l[0]:new ds(l,t)}}Et.empty=new yn([""],0);function kz(n){let e=-1;for(let t of n)e+=t.length+1;return e}function sp(n,e,t=0,r=1e9){for(let i=0,s=0,o=!0;s<n.length&&i<=r;s++){let l=n[s],c=i+l.length;c>=t&&(c>r&&(l=l.slice(0,r-i)),i<t&&(l=l.slice(t-i)),o?(e[e.length-1]+=l,o=!1):e.push(l)),i=c+1}return e}function $k(n,e,t){return sp(n,[""],e,t)}class $h{constructor(e,t=1){this.dir=t,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[t>0?1:(e instanceof yn?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let r=this.nodes.length-1,i=this.nodes[r],s=this.offsets[r],o=s>>1,l=i instanceof yn?i.text.length:i.children.length;if(o==(t>0?l:0)){if(r==0)return this.done=!0,this.value="",this;t>0&&this.offsets[r-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(t>0?0:1)){if(this.offsets[r]+=t,e==0)return this.lineBreak=!0,this.value=`
319
+ `,this;e--}else if(i instanceof yn){let c=i.text[o+(t<0?-1:0)];if(this.offsets[r]+=t,c.length>Math.max(0,e))return this.value=e==0?c:t>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=i.children[o+(t<0?-1:0)];e>c.length?(e-=c.length,this.offsets[r]+=t):(t<0&&this.offsets[r]--,this.nodes.push(c),this.offsets.push(t>0?1:(c instanceof yn?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class rQ{constructor(e,t,r){this.value="",this.done=!1,this.cursor=new $h(e,t>r?-1:1),this.pos=t>r?e.length:0,this.from=Math.min(t,r),this.to=Math.max(t,r)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let r=t<0?this.pos-this.from:this.to-this.pos;e>r&&(e=r),r-=e;let{value:i}=this.cursor.next(e);return this.pos+=(i.length+e)*t,this.value=i.length<=r?i:t<0?i.slice(i.length-r):i.slice(0,r),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class iQ{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:r,value:i}=this.inner.next(e);return t&&this.afterBreak?(this.value="",this.afterBreak=!1):t?(this.done=!0,this.value=""):r?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=i,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(Et.prototype[Symbol.iterator]=function(){return this.iter()},$h.prototype[Symbol.iterator]=rQ.prototype[Symbol.iterator]=iQ.prototype[Symbol.iterator]=function(){return this});let Sz=class{constructor(e,t,r,i){this.from=e,this.to=t,this.number=r,this.text=i}get length(){return this.to-this.from}};function Xu(n,e,t){return e=Math.max(0,Math.min(n.length,e)),[e,Math.max(e,Math.min(n.length,t))]}function Yn(n,e,t=!0,r=!0){return vz(n,e,t,r)}function bz(n){return n>=56320&&n<57344}function Pz(n){return n>=55296&&n<56320}function df(n,e){let t=n.charCodeAt(e);if(!Pz(t)||e+1==n.length)return t;let r=n.charCodeAt(e+1);return bz(r)?(t-55296<<10)+(r-56320)+65536:t}function sQ(n){return n<=65535?String.fromCharCode(n):(n-=65536,String.fromCharCode((n>>10)+55296,(n&1023)+56320))}function nm(n){return n<65536?1:2}const R0=/\r\n?|\n/;var Bn=function(n){return n[n.Simple=0]="Simple",n[n.TrackDel=1]="TrackDel",n[n.TrackBefore=2]="TrackBefore",n[n.TrackAfter=3]="TrackAfter",n}(Bn||(Bn={}));class Hs{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;t<this.sections.length;t+=2)e+=this.sections[t];return e}get newLength(){let e=0;for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t+1];e+=r<0?this.sections[t]:r}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let t=0,r=0,i=0;t<this.sections.length;){let s=this.sections[t++],o=this.sections[t++];o<0?(e(r,i,s),i+=s):i+=o,r+=s}}iterChangedRanges(e,t=!1){N0(this,e,t)}get invertedDesc(){let e=[];for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];i<0?e.push(r,i):e.push(i,r)}return new Hs(e)}composeDesc(e){return this.empty?e:e.empty?this:oQ(this,e)}mapDesc(e,t=!1){return e.empty?this:A0(this,e,t)}mapPos(e,t=-1,r=Bn.Simple){let i=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],c=this.sections[o++],h=i+l;if(c<0){if(h>e)return s+(e-i);s+=l}else{if(r!=Bn.Simple&&h>=e&&(r==Bn.TrackDel&&i<e&&h>e||r==Bn.TrackBefore&&i<e||r==Bn.TrackAfter&&h>e))return null;if(h>e||h==e&&t<0&&!l)return e==i||t<0?s:s+c;s+=c}i=h}if(e>i)throw new RangeError(`Position ${e} is out of range for changeset of length ${i}`);return s}touchesRange(e,t=e){for(let r=0,i=0;r<this.sections.length&&i<=t;){let s=this.sections[r++],o=this.sections[r++],l=i+s;if(o>=0&&i<=t&&l>=e)return i<e&&l>t?"cover":!0;i=l}return!1}toString(){let e="";for(let t=0;t<this.sections.length;){let r=this.sections[t++],i=this.sections[t++];e+=(e?" ":"")+r+(i>=0?":"+i:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(t=>typeof t!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new Hs(e)}static create(e){return new Hs(e)}}class Rn extends Hs{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return N0(this,(t,r,i,s,o)=>e=e.replace(i,i+(r-t),o),!1),e}mapDesc(e,t=!1){return A0(this,e,t,!0)}invert(e){let t=this.sections.slice(),r=[];for(let i=0,s=0;i<t.length;i+=2){let o=t[i],l=t[i+1];if(l>=0){t[i]=l,t[i+1]=o;let c=i>>1;for(;r.length<c;)r.push(Et.empty);r.push(o?e.slice(s,s+o):Et.empty)}s+=o}return new Rn(t,r)}compose(e){return this.empty?e:e.empty?this:oQ(this,e,!0)}map(e,t=!1){return e.empty?this:A0(this,e,t,!0)}iterChanges(e,t=!1){N0(this,e,t)}get desc(){return Hs.create(this.sections)}filter(e){let t=[],r=[],i=[],s=new Vh(this);e:for(let o=0,l=0;;){let c=o==e.length?1e9:e[o++];for(;l<c||l==c&&s.len==0;){if(s.done)break e;let f=Math.min(s.len,c-l);Fn(i,f,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;Fn(t,f,p),p>0&&la(r,t,s.text),s.forward(f),l+=f}let h=e[o++];for(;l<h;){if(s.done)break e;let f=Math.min(s.len,h-l);Fn(t,f,-1),Fn(i,f,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(f),l+=f}}return{changes:new Rn(t,r),filtered:Hs.create(i)}}toJSON(){let e=[];for(let t=0;t<this.sections.length;t+=2){let r=this.sections[t],i=this.sections[t+1];i<0?e.push(r):i==0?e.push([r]):e.push([r].concat(this.inserted[t>>1].toJSON()))}return e}static of(e,t,r){let i=[],s=[],o=0,l=null;function c(f=!1){if(!f&&!i.length)return;o<t&&Fn(i,t-o,-1);let p=new Rn(i,s);l=l?l.compose(p.map(l)):p,i=[],s=[],o=0}function h(f){if(Array.isArray(f))for(let p of f)h(p);else if(f instanceof Rn){if(f.length!=t)throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${t})`);c(),l=l?l.compose(f.map(l)):f}else{let{from:p,to:m=p,insert:g}=f;if(p>m||p<0||m>t)throw new RangeError(`Invalid change range ${p} to ${m} (in doc of length ${t})`);let k=g?typeof g=="string"?Et.of(g.split(r||R0)):g:Et.empty,w=k.length;if(p==m&&w==0)return;p<o&&c(),p>o&&Fn(i,p-o,-1),Fn(i,m-p,w),la(s,i,k),o=m}}return h(e),c(!l),l}static empty(e){return new Rn(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],r=[];for(let i=0;i<e.length;i++){let s=e[i];if(typeof s=="number")t.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)t.push(s[0],0);else{for(;r.length<i;)r.push(Et.empty);r[i]=Et.of(s.slice(1)),t.push(s[0],r[i].length)}}}return new Rn(t,r)}static createSet(e,t){return new Rn(e,t)}}function Fn(n,e,t,r=!1){if(e==0&&t<=0)return;let i=n.length-2;i>=0&&t<=0&&t==n[i+1]?n[i]+=e:i>=0&&e==0&&n[i]==0?n[i+1]+=t:r?(n[i]+=e,n[i+1]+=t):n.push(e,t)}function la(n,e,t){if(t.length==0)return;let r=e.length-2>>1;if(r<n.length)n[n.length-1]=n[n.length-1].append(t);else{for(;n.length<r;)n.push(Et.empty);n.push(t)}}function N0(n,e,t){let r=n.inserted;for(let i=0,s=0,o=0;o<n.sections.length;){let l=n.sections[o++],c=n.sections[o++];if(c<0)i+=l,s+=l;else{let h=i,f=s,p=Et.empty;for(;h+=l,f+=c,c&&r&&(p=p.append(r[o-2>>1])),!(t||o==n.sections.length||n.sections[o+1]<0);)l=n.sections[o++],c=n.sections[o++];e(i,h,s,f,p),i=h,s=f}}}function A0(n,e,t,r=!1){let i=[],s=r?[]:null,o=new Vh(n),l=new Vh(e);for(let c=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);Fn(i,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!t))){let h=l.len;for(Fn(i,l.ins,-1);h;){let f=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=f&&(Fn(i,0,o.ins),s&&la(s,i,o.text),c=o.i),o.forward(f),h-=f}l.next()}else if(o.ins>=0){let h=0,f=o.len;for(;f;)if(l.ins==-1){let p=Math.min(f,l.len);h+=p,f-=p,l.forward(p)}else if(l.ins==0&&l.len<f)f-=l.len,l.next();else break;Fn(i,h,c<o.i?o.ins:0),s&&c<o.i&&la(s,i,o.text),c=o.i,o.forward(o.len-f)}else{if(o.done&&l.done)return s?Rn.createSet(i,s):Hs.create(i);throw new Error("Mismatched change set lengths")}}}function oQ(n,e,t=!1){let r=[],i=t?[]:null,s=new Vh(n),o=new Vh(e);for(let l=!1;;){if(s.done&&o.done)return i?Rn.createSet(r,i):Hs.create(r);if(s.ins==0)Fn(r,s.len,0,l),s.next();else if(o.len==0&&!o.done)Fn(r,0,o.ins,l),i&&la(i,r,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(s.len2,o.len),h=r.length;if(s.ins==-1){let f=o.ins==-1?-1:o.off?0:o.ins;Fn(r,c,f,l),i&&f&&la(i,r,o.text)}else o.ins==-1?(Fn(r,s.off?0:s.len,c,l),i&&la(i,r,s.textBit(c))):(Fn(r,s.off?0:s.len,o.off?0:o.ins,l),i&&!o.off&&la(i,r,o.text));l=(s.ins>c||o.ins>=0&&o.len>c)&&(l||r.length>h),s.forward2(c),o.forward(c)}}}}class Vh{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,t=this.i-2>>1;return t>=e.length?Et.empty:e[t]}textBit(e){let{inserted:t}=this.set,r=this.i-2>>1;return r>=t.length&&!e?Et.empty:t[r].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class hl{constructor(e,t,r){this.from=e,this.to=t,this.flags=r}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,t=-1){let r,i;return this.empty?r=i=e.mapPos(this.from,t):(r=e.mapPos(this.from,1),i=e.mapPos(this.to,-1)),r==this.from&&i==this.to?this:new hl(r,i,this.flags)}extend(e,t=e,r=0){if(e<=this.anchor&&t>=this.anchor)return me.range(e,t,void 0,void 0,r);let i=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return me.range(this.anchor,i,void 0,void 0,r)}eq(e,t=!1){return this.anchor==e.anchor&&this.head==e.head&&this.goalColumn==e.goalColumn&&(!t||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return me.range(e.anchor,e.head)}static create(e,t,r){return new hl(e,t,r)}}class me{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:me.create(this.ranges.map(r=>r.map(e,t)),this.mainIndex)}eq(e,t=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let r=0;r<this.ranges.length;r++)if(!this.ranges[r].eq(e.ranges[r],t))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new me([this.main],0)}addRange(e,t=!0){return me.create([e].concat(this.ranges),t?0:this.mainIndex+1)}replaceRange(e,t=this.mainIndex){let r=this.ranges.slice();return r[t]=e,me.create(r,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new me(e.ranges.map(t=>hl.fromJSON(t)),e.main)}static single(e,t=e){return new me([me.range(e,t)],0)}static create(e,t=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let r=0,i=0;i<e.length;i++){let s=e[i];if(s.empty?s.from<=r:s.from<r)return me.normalized(e.slice(),t);r=s.to}return new me(e,t)}static cursor(e,t=0,r,i){return hl.create(e,e,(t==0?0:t<0?8:16)|(r==null?7:Math.min(6,r))|(i??16777215)<<6)}static range(e,t,r,i,s){let o=(r??16777215)<<6|(i==null?7:Math.min(6,i));return!s&&e!=t&&(s=t<e?1:-1),t<e?hl.create(t,e,48|o):hl.create(e,t,(s?s<0?8:16:0)|o)}static normalized(e,t=0){let r=e[t];e.sort((i,s)=>i.from-s.from),t=e.indexOf(r);for(let i=1;i<e.length;i++){let s=e[i],o=e[i-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,c=Math.max(s.to,o.to);i<=t&&t--,e.splice(--i,2,s.anchor>s.head?me.range(c,l):me.range(l,c))}}return new me(e,t)}}function aQ(n,e){for(let t of n.ranges)if(t.to>e)throw new RangeError("Selection points outside of document")}let cx=0;class Ye{constructor(e,t,r,i,s){this.combine=e,this.compareInput=t,this.compare=r,this.isStatic=i,this.id=cx++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new Ye(e.combine||(t=>t),e.compareInput||((t,r)=>t===r),e.compare||(e.combine?(t,r)=>t===r:hx),!!e.static,e.enables)}of(e){return new op([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new op(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new op(e,this,2,t)}from(e,t){return t||(t=r=>r),this.compute([e],r=>t(r.field(e)))}}function hx(n,e){return n==e||n.length==e.length&&n.every((t,r)=>t===e[r])}class op{constructor(e,t,r,i){this.dependencies=e,this.facet=t,this.type=r,this.value=i,this.id=cx++}dynamicSlot(e){var t;let r=this.value,i=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,c=!1,h=!1,f=[];for(let p of this.dependencies)p=="doc"?c=!0:p=="selection"?h=!0:(((t=e[p.id])!==null&&t!==void 0?t:1)&1)==0&&f.push(e[p.id]);return{create(p){return p.values[o]=r(p),1},update(p,m){if(c&&m.docChanged||h&&(m.docChanged||m.selection)||_0(p,f)){let g=r(p);if(l?!Ek(g,p.values[o],i):!i(g,p.values[o]))return p.values[o]=g,1}return 0},reconfigure:(p,m)=>{let g,k=m.config.address[s];if(k!=null){let w=Pp(m,k);if(this.dependencies.every(C=>C instanceof Ye?m.facet(C)===p.facet(C):C instanceof ks?m.field(C,!1)==p.field(C,!1):!0)||(l?Ek(g=r(p),w,i):i(g=r(p),w)))return p.values[o]=w,0}else g=r(p);return p.values[o]=g,1}}}}function Ek(n,e,t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!t(n[r],e[r]))return!1;return!0}function _0(n,e){let t=!1;for(let r of e)Eh(n,r)&1&&(t=!0);return t}function Qz(n,e,t){let r=t.map(c=>n[c.id]),i=t.map(c=>c.type),s=r.filter(c=>!(c&1)),o=n[e.id]>>1;function l(c){let h=[];for(let f=0;f<r.length;f++){let p=Pp(c,r[f]);if(i[f]==2)for(let m of p)h.push(m);else h.push(p)}return e.combine(h)}return{create(c){for(let h of r)Eh(c,h);return c.values[o]=l(c),1},update(c,h){if(!_0(c,s))return 0;let f=l(c);return e.compare(f,c.values[o])?0:(c.values[o]=f,1)},reconfigure(c,h){let f=_0(c,r),p=h.config.facets[e.id],m=h.facet(e);if(p&&!f&&hx(t,p))return c.values[o]=m,0;let g=l(c);return e.compare(g,m)?(c.values[o]=m,0):(c.values[o]=g,1)}}}const Ld=Ye.define({static:!0});class ks{constructor(e,t,r,i,s){this.id=e,this.createF=t,this.updateF=r,this.compareF=i,this.spec=s,this.provides=void 0}static define(e){let t=new ks(cx++,e.create,e.update,e.compare||((r,i)=>r===i),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ld).find(r=>r.field==this);return((t==null?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:r=>(r.values[t]=this.create(r),1),update:(r,i)=>{let s=r.values[t],o=this.updateF(s,i);return this.compareF(s,o)?0:(r.values[t]=o,1)},reconfigure:(r,i)=>{let s=r.facet(Ld),o=i.facet(Ld),l;return(l=s.find(c=>c.field==this))&&l!=o.find(c=>c.field==this)?(r.values[t]=l.create(r),1):i.config.address[this.id]!=null?(r.values[t]=i.field(this),0):(r.values[t]=this.create(r),1)}}}init(e){return[this,Ld.of({field:this,create:e})]}get extension(){return this}}const ll={lowest:4,low:3,default:2,high:1,highest:0};function ph(n){return e=>new lQ(e,n)}const pf={highest:ph(ll.highest),high:ph(ll.high),default:ph(ll.default),low:ph(ll.low),lowest:ph(ll.lowest)};class lQ{constructor(e,t){this.inner=e,this.prec=t}}class rm{of(e){return new z0(this,e)}reconfigure(e){return rm.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class z0{constructor(e,t){this.compartment=e,this.inner=t}}class bp{constructor(e,t,r,i,s,o){for(this.base=e,this.compartments=t,this.dynamicSlots=r,this.address=i,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<r.length;)this.statusTemplate.push(0)}staticFacet(e){let t=this.address[e.id];return t==null?e.default:this.staticValues[t>>1]}static resolve(e,t,r){let i=[],s=Object.create(null),o=new Map;for(let m of Cz(e,t,o))m instanceof ks?i.push(m):(s[m.facet.id]||(s[m.facet.id]=[])).push(m);let l=Object.create(null),c=[],h=[];for(let m of i)l[m.id]=h.length<<1,h.push(g=>m.slot(g));let f=r==null?void 0:r.config.facets;for(let m in s){let g=s[m],k=g[0].facet,w=f&&f[m]||[];if(g.every(C=>C.type==0))if(l[k.id]=c.length<<1|1,hx(w,g))c.push(r.facet(k));else{let C=k.combine(g.map(Q=>Q.value));c.push(r&&k.compare(C,r.facet(k))?r.facet(k):C)}else{for(let C of g)C.type==0?(l[C.id]=c.length<<1|1,c.push(C.value)):(l[C.id]=h.length<<1,h.push(Q=>C.dynamicSlot(Q)));l[k.id]=h.length<<1,h.push(C=>Qz(C,k,g))}}let p=h.map(m=>m(l));return new bp(e,o,p,l,c,s)}}function Cz(n,e,t){let r=[[],[],[],[],[]],i=new Map;function s(o,l){let c=i.get(o);if(c!=null){if(c<=l)return;let h=r[c].indexOf(o);h>-1&&r[c].splice(h,1),o instanceof z0&&t.delete(o.compartment)}if(i.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof z0){if(t.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;t.set(o.compartment,h),s(h,l)}else if(o instanceof lQ)s(o.inner,o.prec);else if(o instanceof ks)r[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof op)r[l].push(o),o.facet.extensions&&s(o.facet.extensions,ll.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(n,ll.default),r.reduce((o,l)=>o.concat(l))}function Eh(n,e){if(e&1)return 2;let t=e>>1,r=n.status[t];if(r==4)throw new Error("Cyclic dependency between fields and/or facets");if(r&2)return r;n.status[t]=4;let i=n.computeSlot(n,n.config.dynamicSlots[t]);return n.status[t]=2|i}function Pp(n,e){return e&1?n.config.staticValues[e>>1]:n.values[e>>1]}const uQ=Ye.define(),D0=Ye.define({combine:n=>n.some(e=>e),static:!0}),cQ=Ye.define({combine:n=>n.length?n[0]:void 0,static:!0}),hQ=Ye.define(),fQ=Ye.define(),dQ=Ye.define(),pQ=Ye.define({combine:n=>n.length?n[0]:!1});class Ml{constructor(e,t){this.type=e,this.value=t}static define(){return new Tz}}class Tz{of(e){return new Ml(this,e)}}class $z{constructor(e){this.map=e}of(e){return new tn(this,e)}}class tn{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return t===void 0?void 0:t==this.value?this:new tn(this.type,t)}is(e){return this.type==e}static define(e={}){return new $z(e.map||(t=>t))}static mapEffects(e,t){if(!e.length)return e;let r=[];for(let i of e){let s=i.map(t);s&&r.push(s)}return r}}tn.reconfigure=tn.define();tn.appendConfig=tn.define();class Ln{constructor(e,t,r,i,s,o){this.startState=e,this.changes=t,this.selection=r,this.effects=i,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,r&&aQ(r,t.newLength),s.some(l=>l.type==Ln.time)||(this.annotations=s.concat(Ln.time.of(Date.now())))}static create(e,t,r,i,s,o){return new Ln(e,t,r,i,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Ln.userEvent);return!!(t&&(t==e||t.length>e.length&&t.slice(0,e.length)==e&&t[e.length]=="."))}}Ln.time=Ml.define();Ln.userEvent=Ml.define();Ln.addToHistory=Ml.define();Ln.remote=Ml.define();function Ez(n,e){let t=[];for(let r=0,i=0;;){let s,o;if(r<n.length&&(i==e.length||e[i]>=n[r]))s=n[r++],o=n[r++];else if(i<e.length)s=e[i++],o=e[i++];else return t;!t.length||t[t.length-1]<s?t.push(s,o):t[t.length-1]<o&&(t[t.length-1]=o)}}function mQ(n,e,t){var r;let i,s,o;return t?(i=e.changes,s=Rn.empty(e.changes.length),o=n.changes.compose(e.changes)):(i=e.changes.map(n.changes),s=n.changes.mapDesc(e.changes,!0),o=n.changes.compose(i)),{changes:o,selection:e.selection?e.selection.map(s):(r=n.selection)===null||r===void 0?void 0:r.map(i),effects:tn.mapEffects(n.effects,i).concat(tn.mapEffects(e.effects,s)),annotations:n.annotations.length?n.annotations.concat(e.annotations):e.annotations,scrollIntoView:n.scrollIntoView||e.scrollIntoView}}function L0(n,e,t){let r=e.selection,i=bu(e.annotations);return e.userEvent&&(i=i.concat(Ln.userEvent.of(e.userEvent))),{changes:e.changes instanceof Rn?e.changes:Rn.of(e.changes||[],t,n.facet(cQ)),selection:r&&(r instanceof me?r:me.single(r.anchor,r.head)),effects:bu(e.effects),annotations:i,scrollIntoView:!!e.scrollIntoView}}function gQ(n,e,t){let r=L0(n,e.length?e[0]:{},n.doc.length);e.length&&e[0].filter===!1&&(t=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(t=!1);let o=!!e[s].sequential;r=mQ(r,L0(n,e[s],o?r.changes.newLength:n.doc.length),o)}let i=Ln.create(n,r.changes,r.selection,r.effects,r.annotations,r.scrollIntoView);return jz(t?Mz(i):i)}function Mz(n){let e=n.startState,t=!0;for(let i of e.facet(hQ)){let s=i(n);if(s===!1){t=!1;break}Array.isArray(s)&&(t=t===!0?s:Ez(t,s))}if(t!==!0){let i,s;if(t===!1)s=n.changes.invertedDesc,i=Rn.empty(e.doc.length);else{let o=n.changes.filter(t);i=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}n=Ln.create(e,i,n.selection&&n.selection.map(s),tn.mapEffects(n.effects,s),n.annotations,n.scrollIntoView)}let r=e.facet(fQ);for(let i=r.length-1;i>=0;i--){let s=r[i](n);s instanceof Ln?n=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Ln?n=s[0]:n=gQ(e,bu(s),!1)}return n}function jz(n){let e=n.startState,t=e.facet(dQ),r=n;for(let i=t.length-1;i>=0;i--){let s=t[i](n);s&&Object.keys(s).length&&(r=mQ(r,L0(e,s,n.changes.newLength),!0))}return r==n?n:Ln.create(e,n.changes,n.selection,r.effects,r.annotations,r.scrollIntoView)}const Rz=[];function bu(n){return n==null?Rz:Array.isArray(n)?n:[n]}var Un=function(n){return n[n.Word=0]="Word",n[n.Space=1]="Space",n[n.Other=2]="Other",n}(Un||(Un={}));const Nz=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let I0;try{I0=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function Az(n){if(I0)return I0.test(n);for(let e=0;e<n.length;e++){let t=n[e];if(/\w/.test(t)||t>"€"&&(t.toUpperCase()!=t.toLowerCase()||Nz.test(t)))return!0}return!1}function _z(n){return e=>{if(!/\S/.test(e))return Un.Space;if(Az(e))return Un.Word;for(let t=0;t<n.length;t++)if(e.indexOf(n[t])>-1)return Un.Word;return Un.Other}}class At{constructor(e,t,r,i,s,o){this.config=e,this.doc=t,this.selection=r,this.values=i,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Eh(this,l<<1);this.computeSlot=null}field(e,t=!0){let r=this.config.address[e.id];if(r==null){if(t)throw new RangeError("Field is not present in this state");return}return Eh(this,r),Pp(this,r)}update(...e){return gQ(this,e,!0)}applyTransaction(e){let t=this.config,{base:r,compartments:i}=t;for(let l of e.effects)l.is(rm.reconfigure)?(t&&(i=new Map,t.compartments.forEach((c,h)=>i.set(h,c)),t=null),i.set(l.value.compartment,l.value.extension)):l.is(tn.reconfigure)?(t=null,r=l.value):l.is(tn.appendConfig)&&(t=null,r=bu(r).concat(l.value));let s;t?s=e.startState.values.slice():(t=bp.resolve(r,i,this),s=new At(t,this.doc,this.selection,t.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(D0)?e.newSelection:e.newSelection.asSingle();new At(t,e.newDoc,o,s,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:me.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,r=e(t.ranges[0]),i=this.changes(r.changes),s=[r.range],o=bu(r.effects);for(let l=1;l<t.ranges.length;l++){let c=e(t.ranges[l]),h=this.changes(c.changes),f=h.map(i);for(let m=0;m<l;m++)s[m]=s[m].map(f);let p=i.mapDesc(h,!0);s.push(c.range.map(p)),i=i.compose(f),o=tn.mapEffects(o,f).concat(tn.mapEffects(bu(c.effects),p))}return{changes:i,selection:me.create(s,t.mainIndex),effects:o}}changes(e=[]){return e instanceof Rn?e:Rn.of(e,this.doc.length,this.facet(At.lineSeparator))}toText(e){return Et.of(e.split(this.facet(At.lineSeparator)||R0))}sliceDoc(e=0,t=this.doc.length){return this.doc.sliceString(e,t,this.lineBreak)}facet(e){let t=this.config.address[e.id];return t==null?e.default:(Eh(this,t),Pp(this,t))}toJSON(e){let t={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let r in e){let i=e[r];i instanceof ks&&this.config.address[i.id]!=null&&(t[r]=i.spec.toJSON(this.field(e[r]),this))}return t}static fromJSON(e,t={},r){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let i=[];if(r){for(let s in r)if(Object.prototype.hasOwnProperty.call(e,s)){let o=r[s],l=e[s];i.push(o.init(c=>o.spec.fromJSON(l,c)))}}return At.create({doc:e.doc,selection:me.fromJSON(e.selection),extensions:t.extensions?i.concat([t.extensions]):i})}static create(e={}){let t=bp.resolve(e.extensions||[],new Map),r=e.doc instanceof Et?e.doc:Et.of((e.doc||"").split(t.staticFacet(At.lineSeparator)||R0)),i=e.selection?e.selection instanceof me?e.selection:me.single(e.selection.anchor,e.selection.head):me.single(0);return aQ(i,r.length),t.staticFacet(D0)||(i=i.asSingle()),new At(t,r,i,t.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(At.tabSize)}get lineBreak(){return this.facet(At.lineSeparator)||`
320
+ `}get readOnly(){return this.facet(pQ)}phrase(e,...t){for(let r of this.facet(At.phrases))if(Object.prototype.hasOwnProperty.call(r,e)){e=r[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(r,i)=>{if(i=="$")return"$";let s=+(i||1);return!s||s>t.length?r:t[s-1]})),e}languageDataAt(e,t,r=-1){let i=[];for(let s of this.facet(uQ))for(let o of s(this,t,r))Object.prototype.hasOwnProperty.call(o,e)&&i.push(o[e]);return i}charCategorizer(e){let t=this.languageDataAt("wordChars",e);return _z(t.length?t[0]:"")}wordAt(e){let{text:t,from:r,length:i}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-r,l=e-r;for(;o>0;){let c=Yn(t,o,!1);if(s(t.slice(c,o))!=Un.Word)break;o=c}for(;l<i;){let c=Yn(t,l);if(s(t.slice(l,c))!=Un.Word)break;l=c}return o==l?null:me.range(o+r,l+r)}}At.allowMultipleSelections=D0;At.tabSize=Ye.define({combine:n=>n.length?n[0]:4});At.lineSeparator=cQ;At.readOnly=pQ;At.phrases=Ye.define({compare(n,e){let t=Object.keys(n),r=Object.keys(e);return t.length==r.length&&t.every(i=>n[i]==e[i])}});At.languageData=uQ;At.changeFilter=hQ;At.transactionFilter=fQ;At.transactionExtender=dQ;rm.reconfigure=tn.define();function im(n,e,t={}){let r={};for(let i of n)for(let s of Object.keys(i)){let o=i[s],l=r[s];if(l===void 0)r[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(t,s))r[s]=t[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let i in e)r[i]===void 0&&(r[i]=e[i]);return r}class ca{eq(e){return this==e}range(e,t=e){return Z0.create(e,t,this)}}ca.prototype.startSide=ca.prototype.endSide=0;ca.prototype.point=!1;ca.prototype.mapMode=Bn.TrackDel;function fx(n,e){return n==e||n.constructor==e.constructor&&n.eq(e)}let Z0=class OQ{constructor(e,t,r){this.from=e,this.to=t,this.value=r}static create(e,t,r){return new OQ(e,t,r)}};function X0(n,e){return n.from-e.from||n.value.startSide-e.value.startSide}class dx{constructor(e,t,r,i){this.from=e,this.to=t,this.value=r,this.maxPoint=i}get length(){return this.to[this.to.length-1]}findIndex(e,t,r,i=0){let s=r?this.to:this.from;for(let o=i,l=s.length;;){if(o==l)return o;let c=o+l>>1,h=s[c]-e||(r?this.value[c].endSide:this.value[c].startSide)-t;if(c==o)return h>=0?o:l;h>=0?l=c:o=c+1}}between(e,t,r,i){for(let s=this.findIndex(t,-1e9,!0),o=this.findIndex(r,1e9,!1,s);s<o;s++)if(i(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,t){let r=[],i=[],s=[],o=-1,l=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],f=this.from[c]+e,p=this.to[c]+e,m,g;if(f==p){let k=t.mapPos(f,h.startSide,h.mapMode);if(k==null||(m=g=k,h.startSide!=h.endSide&&(g=t.mapPos(f,h.endSide),g<m)))continue}else if(m=t.mapPos(f,h.startSide),g=t.mapPos(p,h.endSide),m>g||m==g&&h.startSide>0&&h.endSide<=0)continue;(g-m||h.endSide-h.startSide)<0||(o<0&&(o=m),h.point&&(l=Math.max(l,g-m)),r.push(h),i.push(m-o),s.push(g-o))}return{mapped:r.length?new dx(i,s,r,l):null,pos:o}}}class Pt{constructor(e,t,r,i){this.chunkPos=e,this.chunk=t,this.nextLayer=r,this.maxPoint=i}static create(e,t,r,i){return new Pt(e,t,r,i)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:r=!1,filterFrom:i=0,filterTo:s=this.length}=e,o=e.filter;if(t.length==0&&!o)return this;if(r&&(t=t.slice().sort(X0)),this.isEmpty)return t.length?Pt.of(t):this;let l=new yQ(this,null,-1).goto(0),c=0,h=[],f=new Vu;for(;l.value||c<t.length;)if(c<t.length&&(l.from-t[c].from||l.startSide-t[c].value.startSide)>=0){let p=t[c++];f.addInner(p.from,p.to,p.value)||h.push(p)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==t.length||this.chunkEnd(l.chunkIndex)<t[c].from)&&(!o||i>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&f.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||i>l.to||s<l.from||o(l.from,l.to,l.value))&&(f.addInner(l.from,l.to,l.value)||h.push(Z0.create(l.from,l.to,l.value))),l.next());return f.finishInner(this.nextLayer.isEmpty&&!h.length?Pt.empty:this.nextLayer.update({add:h,filter:o,filterFrom:i,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let t=[],r=[],i=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(l,l+c.length);if(h===!1)i=Math.max(i,c.maxPoint),t.push(c),r.push(e.mapPos(l));else if(h===!0){let{mapped:f,pos:p}=c.map(l,e);f&&(i=Math.max(i,f.maxPoint),t.push(f),r.push(p))}}let s=this.nextLayer.map(e);return t.length==0?s:new Pt(r,t,s||Pt.empty,i)}between(e,t,r){if(!this.isEmpty){for(let i=0;i<this.chunk.length;i++){let s=this.chunkPos[i],o=this.chunk[i];if(t>=s&&e<=s+o.length&&o.between(s,e-s,t-s,r)===!1)return}this.nextLayer.between(e,t,r)}}iter(e=0){return Wh.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return Wh.from(e).goto(t)}static compare(e,t,r,i,s=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),l=t.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),c=Mk(o,l,r),h=new mh(o,c,s),f=new mh(l,c,s);r.iterGaps((p,m,g)=>jk(h,p,f,m,g,i)),r.empty&&r.length==0&&jk(h,0,f,0,0,i)}static eq(e,t,r=0,i){i==null&&(i=999999999);let s=e.filter(f=>!f.isEmpty&&t.indexOf(f)<0),o=t.filter(f=>!f.isEmpty&&e.indexOf(f)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=Mk(s,o),c=new mh(s,l,0).goto(r),h=new mh(o,l,0).goto(r);for(;;){if(c.to!=h.to||!V0(c.active,h.active)||c.point&&(!h.point||!fx(c.point,h.point)))return!1;if(c.to>i)return!0;c.next(),h.next()}}static spans(e,t,r,i,s=-1){let o=new mh(e,null,s).goto(t),l=t,c=o.openStart;for(;;){let h=Math.min(o.to,r);if(o.point){let f=o.activeForPoint(o.to),p=o.pointFrom<t?f.length+1:o.point.startSide<0?f.length:Math.min(f.length,c);i.point(l,h,o.point,f,p,o.pointRank),c=Math.min(o.openEnd(h),f.length)}else h>l&&(i.span(l,h,o.active,c),c=o.openEnd(h));if(o.to>r)return c+(o.point&&o.to>r?1:0);l=o.to,o.next()}}static of(e,t=!1){let r=new Vu;for(let i of e instanceof Z0?[e]:t?zz(e):e)r.add(i.from,i.to,i.value);return r.finish()}static join(e){if(!e.length)return Pt.empty;let t=e[e.length-1];for(let r=e.length-2;r>=0;r--)for(let i=e[r];i!=Pt.empty;i=i.nextLayer)t=new Pt(i.chunkPos,i.chunk,t,Math.max(i.maxPoint,t.maxPoint));return t}}Pt.empty=new Pt([],[],null,-1);function zz(n){if(n.length>1)for(let e=n[0],t=1;t<n.length;t++){let r=n[t];if(X0(e,r)>0)return n.slice().sort(X0);e=r}return n}Pt.empty.nextLayer=Pt.empty;class Vu{finishChunk(e){this.chunks.push(new dx(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,t,r){this.addInner(e,t,r)||(this.nextLayer||(this.nextLayer=new Vu)).add(e,t,r)}addInner(e,t,r){let i=e-this.lastTo||r.startSide-this.last.endSide;if(i<=0&&(e-this.lastFrom||r.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return i<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=r,this.lastFrom=e,this.lastTo=t,this.value.push(r),r.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let r=t.value.length-1;return this.last=t.value[r],this.lastFrom=t.from[r]+e,this.lastTo=t.to[r]+e,!0}finish(){return this.finishInner(Pt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let t=Pt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function Mk(n,e,t){let r=new Map;for(let s of n)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&r.set(s.chunk[o],s.chunkPos[o]);let i=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=r.get(s.chunk[o]);l!=null&&(t?t.mapPos(l):l)==s.chunkPos[o]&&!(t!=null&&t.touchesRange(l,l+s.chunk[o].length))&&i.add(s.chunk[o])}return i}class yQ{constructor(e,t,r,i=0){this.layer=e,this.skip=t,this.minPoint=r,this.rank=i}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,t=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,t,!1),this}gotoInner(e,t,r){for(;this.chunkIndex<this.layer.chunk.length;){let i=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(i)||this.layer.chunkEnd(this.chunkIndex)<e||i.maxPoint<this.minPoint))break;this.chunkIndex++,r=!1}if(this.chunkIndex<this.layer.chunk.length){let i=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],t,!0);(!r||this.rangeIndex<i)&&this.setRangeIndex(i)}this.next()}forward(e,t){(this.to-e||this.endSide-t)<0&&this.gotoInner(e,t,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],t=this.layer.chunk[this.chunkIndex],r=e+t.from[this.rangeIndex];if(this.from=r,this.to=e+t.to[this.rangeIndex],this.value=t.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class Wh{constructor(e){this.heap=e}static from(e,t=null,r=-1){let i=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=r&&i.push(new yQ(o,t,r,s));return i.length==1?i[0]:new Wh(i)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let r of this.heap)r.goto(e,t);for(let r=this.heap.length>>1;r>=0;r--)SO(this.heap,r);return this.next(),this}forward(e,t){for(let r of this.heap)r.forward(e,t);for(let r=this.heap.length>>1;r>=0;r--)SO(this.heap,r);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),SO(this.heap,0)}}}function SO(n,e){for(let t=n[e];;){let r=(e<<1)+1;if(r>=n.length)break;let i=n[r];if(r+1<n.length&&i.compare(n[r+1])>=0&&(i=n[r+1],r++),t.compare(i)<0)break;n[r]=t,n[e]=i,e=r}}class mh{constructor(e,t,r){this.minPoint=r,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Wh.from(e,t,r)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){Id(this.active,e),Id(this.activeTo,e),Id(this.activeRank,e),this.minActive=Rk(this.active,this.activeTo)}addActive(e){let t=0,{value:r,to:i,rank:s}=this.cursor;for(;t<this.activeRank.length&&(s-this.activeRank[t]||i-this.activeTo[t])>0;)t++;Zd(this.active,t,r),Zd(this.activeTo,t,i),Zd(this.activeRank,t,s),e&&Zd(e,t,this.cursor.from),this.minActive=Rk(this.active,this.activeTo)}next(){let e=this.to,t=this.point;this.point=null;let r=this.openStart<0?[]:null;for(;;){let i=this.minActive;if(i>-1&&(this.activeTo[i]-this.cursor.from||this.active[i].endSide-this.cursor.startSide)<0){if(this.activeTo[i]>e){this.to=this.activeTo[i],this.endSide=this.active[i].endSide;break}this.removeActive(i),r&&Id(r,i)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(r),this.cursor.next();else if(t&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(r){this.openStart=0;for(let i=r.length-1;i>=0&&r[i]<e;i--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let t=[];for(let r=this.active.length-1;r>=0&&!(this.activeRank[r]<this.pointRank);r--)(this.activeTo[r]>e||this.activeTo[r]==e&&this.active[r].endSide>=this.point.endSide)&&t.push(this.active[r]);return t.reverse()}openEnd(e){let t=0;for(let r=this.activeTo.length-1;r>=0&&this.activeTo[r]>e;r--)t++;return t}}function jk(n,e,t,r,i,s){n.goto(e),t.goto(r);let o=r+i,l=r,c=r-e,h=!!s.boundChange;for(let f=!1;;){let p=n.to+c-t.to,m=p||n.endSide-t.endSide,g=m<0?n.to+c:t.to,k=Math.min(g,o);if(n.point||t.point?(n.point&&t.point&&fx(n.point,t.point)&&V0(n.activeForPoint(n.to),t.activeForPoint(t.to))||s.comparePoint(l,k,n.point,t.point),f=!1):(f&&s.boundChange(l),k>l&&!V0(n.active,t.active)&&s.compareRange(l,k,n.active,t.active),h&&k<o&&(p||n.openEnd(g)!=t.openEnd(g))&&(f=!0)),g>o)break;l=g,m<=0&&n.next(),m>=0&&t.next()}}function V0(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t]&&!fx(n[t],e[t]))return!1;return!0}function Id(n,e){for(let t=e,r=n.length-1;t<r;t++)n[t]=n[t+1];n.pop()}function Zd(n,e,t){for(let r=n.length-1;r>=e;r--)n[r+1]=n[r];n[e]=t}function Rk(n,e){let t=-1,r=1e9;for(let i=0;i<e.length;i++)(e[i]-r||n[i].endSide-n[t].endSide)<0&&(t=i,r=e[i]);return t}function eo(n,e,t=n.length){let r=0;for(let i=0;i<t&&i<n.length;)n.charCodeAt(i)==9?(r+=e-r%e,i++):(r++,i=Yn(n,i));return r}function Dz(n,e,t,r){for(let i=0,s=0;;){if(s>=e)return i;if(i==n.length)break;s+=n.charCodeAt(i)==9?t-s%t:1,i=Yn(n,i)}return n.length}const W0="ͼ",Nk=typeof Symbol>"u"?"__"+W0:Symbol.for(W0),F0=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),Ak=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class ha{constructor(e,t){this.rules=[];let{finish:r}=t||{};function i(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,c,h){let f=[],p=/^@(\w+)\b/.exec(o[0]),m=p&&p[1]=="keyframes";if(p&&l==null)return c.push(o[0]+";");for(let g in l){let k=l[g];if(/&/.test(g))s(g.split(/,\s*/).map(w=>o.map(C=>w.replace(/&/,C))).reduce((w,C)=>w.concat(C)),k,c);else if(k&&typeof k=="object"){if(!p)throw new RangeError("The value of a property ("+g+") should be a primitive value.");s(i(g),k,f,m)}else k!=null&&f.push(g.replace(/_.*/,"").replace(/[A-Z]/g,w=>"-"+w.toLowerCase())+": "+k+";")}(f.length||m)&&c.push((r&&!p&&!h?o.map(r):o).join(", ")+" {"+f.join(" ")+"}")}for(let o in e)s(i(o),e[o],this.rules)}getRules(){return this.rules.join(`
321
+ `)}static newName(){let e=Ak[Nk]||1;return Ak[Nk]=e+1,W0+e.toString(36)}static mount(e,t,r){let i=e[F0],s=r&&r.nonce;i?s&&i.setNonce(s):i=new Lz(e,s),i.mount(Array.isArray(t)?t:[t],e)}}let _k=new Map;class Lz{constructor(e,t){let r=e.ownerDocument||e,i=r.defaultView;if(!e.head&&e.adoptedStyleSheets&&i.CSSStyleSheet){let s=_k.get(r);if(s)return e[F0]=s;this.sheet=new i.CSSStyleSheet,_k.set(r,this)}else this.styleTag=r.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);this.modules=[],e[F0]=this}mount(e,t){let r=this.sheet,i=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],c=this.modules.indexOf(l);if(c<s&&c>-1&&(this.modules.splice(c,1),s--,c=-1),c==-1){if(this.modules.splice(s++,0,l),r)for(let h=0;h<l.rules.length;h++)r.insertRule(l.rules[h],i++)}else{for(;s<c;)i+=this.modules[s++].rules.length;i+=l.rules.length,s++}}if(r)t.adoptedStyleSheets.indexOf(this.sheet)<0&&(t.adoptedStyleSheets=[this.sheet,...t.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
322
+ `;this.styleTag.textContent=o;let l=t.head||t;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var fa={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},Fh={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Iz=typeof navigator<"u"&&/Mac/.test(navigator.platform),Zz=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var Dn=0;Dn<10;Dn++)fa[48+Dn]=fa[96+Dn]=String(Dn);for(var Dn=1;Dn<=24;Dn++)fa[Dn+111]="F"+Dn;for(var Dn=65;Dn<=90;Dn++)fa[Dn]=String.fromCharCode(Dn+32),Fh[Dn]=String.fromCharCode(Dn);for(var bO in fa)Fh.hasOwnProperty(bO)||(Fh[bO]=fa[bO]);function Xz(n){var e=Iz&&n.metaKey&&n.shiftKey&&!n.ctrlKey&&!n.altKey||Zz&&n.shiftKey&&n.key&&n.key.length==1||n.key=="Unidentified",t=!e&&n.key||(n.shiftKey?Fh:fa)[n.keyCode]||n.key||"Unidentified";return t=="Esc"&&(t="Escape"),t=="Del"&&(t="Delete"),t=="Left"&&(t="ArrowLeft"),t=="Up"&&(t="ArrowUp"),t=="Right"&&(t="ArrowRight"),t=="Down"&&(t="ArrowDown"),t}let ar=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},B0=typeof document<"u"?document:{documentElement:{style:{}}};const Y0=/Edge\/(\d+)/.exec(ar.userAgent),xQ=/MSIE \d/.test(ar.userAgent),U0=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(ar.userAgent),sm=!!(xQ||U0||Y0),zk=!sm&&/gecko\/(\d+)/i.test(ar.userAgent),PO=!sm&&/Chrome\/(\d+)/.exec(ar.userAgent),Vz="webkitFontSmoothing"in B0.documentElement.style,q0=!sm&&/Apple Computer/.test(ar.vendor),Dk=q0&&(/Mobile\/\w+/.test(ar.userAgent)||ar.maxTouchPoints>2);var Le={mac:Dk||/Mac/.test(ar.platform),windows:/Win/.test(ar.platform),linux:/Linux|X11/.test(ar.platform),ie:sm,ie_version:xQ?B0.documentMode||6:U0?+U0[1]:Y0?+Y0[1]:0,gecko:zk,gecko_version:zk?+(/Firefox\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,chrome:!!PO,chrome_version:PO?+PO[1]:0,ios:Dk,android:/Android\b/.test(ar.userAgent),webkit_version:Vz?+(/\bAppleWebKit\/(\d+)/.exec(ar.userAgent)||[0,0])[1]:0,safari:q0,safari_version:q0?+(/\bVersion\/(\d+(\.\d+)?)/.exec(ar.userAgent)||[0,0])[1]:0,tabSize:B0.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function px(n,e){for(let t in n)t=="class"&&e.class?e.class+=" "+n.class:t=="style"&&e.style?e.style+=";"+n.style:e[t]=n[t];return e}const Qp=Object.create(null);function mx(n,e,t){if(n==e)return!0;n||(n=Qp),e||(e=Qp);let r=Object.keys(n),i=Object.keys(e);if(r.length-0!=i.length-0)return!1;for(let s of r)if(s!=t&&(i.indexOf(s)==-1||n[s]!==e[s]))return!1;return!0}function Wz(n,e){for(let t=n.attributes.length-1;t>=0;t--){let r=n.attributes[t].name;e[r]==null&&n.removeAttribute(r)}for(let t in e){let r=e[t];t=="style"?n.style.cssText=r:n.getAttribute(t)!=r&&n.setAttribute(t,r)}}function Lk(n,e,t){let r=!1;if(e)for(let i in e)t&&i in t||(r=!0,i=="style"?n.style.cssText="":n.removeAttribute(i));if(t)for(let i in t)e&&e[i]==t[i]||(r=!0,i=="style"?n.style.cssText=t[i]:n.setAttribute(i,t[i]));return r}function Fz(n){let e=Object.create(null);for(let t=0;t<n.attributes.length;t++){let r=n.attributes[t];e[r.name]=r.value}return e}class jl{eq(e){return!1}updateDOM(e,t,r){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,r){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var Pr=function(n){return n[n.Text=0]="Text",n[n.WidgetBefore=1]="WidgetBefore",n[n.WidgetAfter=2]="WidgetAfter",n[n.WidgetRange=3]="WidgetRange",n}(Pr||(Pr={}));class pt extends ca{constructor(e,t,r,i){super(),this.startSide=e,this.endSide=t,this.widget=r,this.spec=i}get heightRelevant(){return!1}static mark(e){return new mf(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),r=!!e.block;return t+=r&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new Sl(e,t,t,r,e.widget||null,!1)}static replace(e){let t=!!e.block,r,i;if(e.isBlockGap)r=-5e8,i=4e8;else{let{start:s,end:o}=vQ(e,t);r=(s?t?-3e8:-1:5e8)-1,i=(o?t?2e8:1:-6e8)+1}return new Sl(e,r,i,t,e.widget||null,!0)}static line(e){return new gf(e)}static set(e,t=!1){return Pt.of(e,t)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}pt.none=Pt.empty;class mf extends pt{constructor(e){let{start:t,end:r}=vQ(e);super(t?-1:5e8,r?1:-6e8,null,e),this.tagName=e.tagName||"span",this.attrs=e.class&&e.attributes?px(e.attributes,{class:e.class}):e.class?{class:e.class}:e.attributes||Qp}eq(e){return this==e||e instanceof mf&&this.tagName==e.tagName&&mx(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}mf.prototype.point=!1;class gf extends pt{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof gf&&this.spec.class==e.spec.class&&mx(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}gf.prototype.mapMode=Bn.TrackBefore;gf.prototype.point=!0;class Sl extends pt{constructor(e,t,r,i,s,o){super(t,r,s,e),this.block=i,this.isReplace=o,this.mapMode=i?t<=0?Bn.TrackBefore:Bn.TrackAfter:Bn.TrackDel}get type(){return this.startSide!=this.endSide?Pr.WidgetRange:this.startSide<=0?Pr.WidgetBefore:Pr.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof Sl&&Bz(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}Sl.prototype.point=!0;function vQ(n,e=!1){let{inclusiveStart:t,inclusiveEnd:r}=n;return t==null&&(t=n.inclusive),r==null&&(r=n.inclusive),{start:t??e,end:r??e}}function Bz(n,e){return n==e||!!(n&&e&&n.compare(e))}function Pu(n,e,t,r=0){let i=t.length-1;i>=0&&t[i]+r>=n?t[i]=Math.max(t[i],e):t.push(n,e)}class Bh extends ca{constructor(e,t){super(),this.tagName=e,this.attributes=t}eq(e){return e==this||e instanceof Bh&&this.tagName==e.tagName&&mx(this.attributes,e.attributes)}static create(e){return new Bh(e.tagName,e.attributes||Qp)}static set(e,t=!1){return Pt.of(e,t)}}Bh.prototype.startSide=Bh.prototype.endSide=-1;function Yh(n){let e;return n.nodeType==11?e=n.getSelection?n:n.ownerDocument:e=n,e.getSelection()}function H0(n,e){return e?n==e||n.contains(e.nodeType!=1?e.parentNode:e):!1}function Mh(n,e){if(!e.anchorNode)return!1;try{return H0(n,e.anchorNode)}catch{return!1}}function ap(n){return n.nodeType==3?Uh(n,0,n.nodeValue.length).getClientRects():n.nodeType==1?n.getClientRects():[]}function jh(n,e,t,r){return t?Ik(n,e,t,r,-1)||Ik(n,e,t,r,1):!1}function da(n){for(var e=0;;e++)if(n=n.previousSibling,!n)return e}function Cp(n){return n.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(n.nodeName)}function Ik(n,e,t,r,i){for(;;){if(n==t&&e==r)return!0;if(e==(i<0?0:to(n))){if(n.nodeName=="DIV")return!1;let s=n.parentNode;if(!s||s.nodeType!=1)return!1;e=da(n)+(i<0?0:1),n=s}else if(n.nodeType==1){if(n=n.childNodes[e+(i<0?-1:0)],n.nodeType==1&&n.contentEditable=="false")return!1;e=i<0?to(n):0}else return!1}}function to(n){return n.nodeType==3?n.nodeValue.length:n.childNodes.length}function Tp(n,e){let t=e?n.left:n.right;return{left:t,right:t,top:n.top,bottom:n.bottom}}function Yz(n){let e=n.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:n.innerWidth,top:0,bottom:n.innerHeight}}function wQ(n,e){let t=e.width/n.offsetWidth,r=e.height/n.offsetHeight;return(t>.995&&t<1.005||!isFinite(t)||Math.abs(e.width-n.offsetWidth)<1)&&(t=1),(r>.995&&r<1.005||!isFinite(r)||Math.abs(e.height-n.offsetHeight)<1)&&(r=1),{scaleX:t,scaleY:r}}function Uz(n,e,t,r,i,s,o,l){let c=n.ownerDocument,h=c.defaultView||window;for(let f=n,p=!1;f&&!p;)if(f.nodeType==1){let m,g=f==c.body,k=1,w=1;if(g)m=Yz(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(f).position)&&(p=!0),f.scrollHeight<=f.clientHeight&&f.scrollWidth<=f.clientWidth){f=f.assignedSlot||f.parentNode;continue}let $=f.getBoundingClientRect();({scaleX:k,scaleY:w}=wQ(f,$)),m={left:$.left,right:$.left+f.clientWidth*k,top:$.top,bottom:$.top+f.clientHeight*w}}let C=0,Q=0;if(i=="nearest")e.top<m.top?(Q=e.top-(m.top+o),t>0&&e.bottom>m.bottom+Q&&(Q=e.bottom-m.bottom+o)):e.bottom>m.bottom&&(Q=e.bottom-m.bottom+o,t<0&&e.top-Q<m.top&&(Q=e.top-(m.top+o)));else{let $=e.bottom-e.top,E=m.bottom-m.top;Q=(i=="center"&&$<=E?e.top+$/2-E/2:i=="start"||i=="center"&&t<0?e.top-o:e.bottom-E+o)-m.top}if(r=="nearest"?e.left<m.left?(C=e.left-(m.left+s),t>0&&e.right>m.right+C&&(C=e.right-m.right+s)):e.right>m.right&&(C=e.right-m.right+s,t<0&&e.left<m.left+C&&(C=e.left-(m.left+s))):C=(r=="center"?e.left+(e.right-e.left)/2-(m.right-m.left)/2:r=="start"==l?e.left-s:e.right-(m.right-m.left)+s)-m.left,C||Q)if(g)h.scrollBy(C,Q);else{let $=0,E=0;if(Q){let Z=f.scrollTop;f.scrollTop+=Q/w,E=(f.scrollTop-Z)*w}if(C){let Z=f.scrollLeft;f.scrollLeft+=C/k,$=(f.scrollLeft-Z)*k}e={left:e.left-$,top:e.top-E,right:e.right-$,bottom:e.bottom-E},$&&Math.abs($-C)<1&&(r="nearest"),E&&Math.abs(E-Q)<1&&(i="nearest")}if(g)break;(e.top<m.top||e.bottom>m.bottom||e.left<m.left||e.right>m.right)&&(e={left:Math.max(e.left,m.left),right:Math.min(e.right,m.right),top:Math.max(e.top,m.top),bottom:Math.min(e.bottom,m.bottom)}),f=f.assignedSlot||f.parentNode}else if(f.nodeType==11)f=f.host;else break}function kQ(n,e=!0){let t=n.ownerDocument,r=null,i=null;for(let s=n.parentNode;s&&!(s==t.body||(!e||r)&&i);)if(s.nodeType==1)!i&&s.scrollHeight>s.clientHeight&&(i=s),e&&!r&&s.scrollWidth>s.clientWidth&&(r=s),s=s.assignedSlot||s.parentNode;else if(s.nodeType==11)s=s.host;else break;return{x:r,y:i}}class qz{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:t,focusNode:r}=e;this.set(t,Math.min(e.anchorOffset,t?to(t):0),r,Math.min(e.focusOffset,r?to(r):0))}set(e,t,r,i){this.anchorNode=e,this.anchorOffset=t,this.focusNode=r,this.focusOffset=i}}let sl=null;Le.safari&&Le.safari_version>=26&&(sl=!1);function SQ(n){if(n.setActive)return n.setActive();if(sl)return n.focus(sl);let e=[];for(let t=n;t&&(e.push(t,t.scrollTop,t.scrollLeft),t!=t.ownerDocument);t=t.parentNode);if(n.focus(sl==null?{get preventScroll(){return sl={preventScroll:!0},!0}}:void 0),!sl){sl=!1;for(let t=0;t<e.length;){let r=e[t++],i=e[t++],s=e[t++];r.scrollTop!=i&&(r.scrollTop=i),r.scrollLeft!=s&&(r.scrollLeft=s)}}}let Zk;function Uh(n,e,t=e){let r=Zk||(Zk=document.createRange());return r.setEnd(n,t),r.setStart(n,e),r}function Qu(n,e,t,r){let i={key:e,code:e,keyCode:t,which:t,cancelable:!0};r&&({altKey:i.altKey,ctrlKey:i.ctrlKey,shiftKey:i.shiftKey,metaKey:i.metaKey}=r);let s=new KeyboardEvent("keydown",i);s.synthetic=!0,n.dispatchEvent(s);let o=new KeyboardEvent("keyup",i);return o.synthetic=!0,n.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function Hz(n){for(;n;){if(n&&(n.nodeType==9||n.nodeType==11&&n.host))return n;n=n.assignedSlot||n.parentNode}return null}function Gz(n,e){let t=e.focusNode,r=e.focusOffset;if(!t||e.anchorNode!=t||e.anchorOffset!=r)return!1;for(r=Math.min(r,to(t));;)if(r){if(t.nodeType!=1)return!1;let i=t.childNodes[r-1];i.contentEditable=="false"?r--:(t=i,r=to(t))}else{if(t==n)return!0;r=da(t),t=t.parentNode}}function bQ(n){return n instanceof Window?n.pageYOffset>Math.max(0,n.document.documentElement.scrollHeight-n.innerHeight-4):n.scrollTop>Math.max(1,n.scrollHeight-n.clientHeight-4)}function PQ(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r>0)return{node:t,offset:r};if(t.nodeType==1&&r>0){if(t.contentEditable=="false")return null;t=t.childNodes[r-1],r=to(t)}else if(t.parentNode&&!Cp(t))r=da(t),t=t.parentNode;else return null}}function QQ(n,e){for(let t=n,r=e;;){if(t.nodeType==3&&r<t.nodeValue.length)return{node:t,offset:r};if(t.nodeType==1&&r<t.childNodes.length){if(t.contentEditable=="false")return null;t=t.childNodes[r],r=0}else if(t.parentNode&&!Cp(t))r=da(t)+1,t=t.parentNode;else return null}}class zi{constructor(e,t,r=!0){this.node=e,this.offset=t,this.precise=r}static before(e,t){return new zi(e.parentNode,da(e),t)}static after(e,t){return new zi(e.parentNode,da(e)+1,t)}}var xn=function(n){return n[n.LTR=0]="LTR",n[n.RTL=1]="RTL",n}(xn||(xn={}));const bl=xn.LTR,gx=xn.RTL;function CQ(n){let e=[];for(let t=0;t<n.length;t++)e.push(1<<+n[t]);return e}const Kz=CQ("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),Jz=CQ("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),G0=Object.create(null),is=[];for(let n of["()","[]","{}"]){let e=n.charCodeAt(0),t=n.charCodeAt(1);G0[e]=t,G0[t]=-e}function TQ(n){return n<=247?Kz[n]:1424<=n&&n<=1524?2:1536<=n&&n<=1785?Jz[n-1536]:1774<=n&&n<=2220?4:8192<=n&&n<=8204?256:64336<=n&&n<=65023?4:1}const eD=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class ms{get dir(){return this.level%2?gx:bl}constructor(e,t,r){this.from=e,this.to=t,this.level=r}side(e,t){return this.dir==t==e?this.to:this.from}forward(e,t){return e==(this.dir==t)}static find(e,t,r,i){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=t&&l.to>=t){if(l.level==r)return o;(s<0||(i!=0?i<0?l.from<t:l.to>t:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function $Q(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++){let r=n[t],i=e[t];if(r.from!=i.from||r.to!=i.to||r.direction!=i.direction||!$Q(r.inner,i.inner))return!1}return!0}const Yt=[];function tD(n,e,t,r,i){for(let s=0;s<=r.length;s++){let o=s?r[s-1].to:e,l=s<r.length?r[s].from:t,c=s?256:i;for(let h=o,f=c,p=c;h<l;h++){let m=TQ(n.charCodeAt(h));m==512?m=f:m==8&&p==4&&(m=16),Yt[h]=m==4?2:m,m&7&&(p=m),f=m}for(let h=o,f=c,p=c;h<l;h++){let m=Yt[h];if(m==128)h<l-1&&f==Yt[h+1]&&f&24?m=Yt[h]=f:Yt[h]=256;else if(m==64){let g=h+1;for(;g<l&&Yt[g]==64;)g++;let k=h&&f==8||g<t&&Yt[g]==8?p==1?1:8:256;for(let w=h;w<g;w++)Yt[w]=k;h=g-1}else m==8&&p==1&&(Yt[h]=1);f=m,m&7&&(p=m)}}}function nD(n,e,t,r,i){let s=i==1?2:1;for(let o=0,l=0,c=0;o<=r.length;o++){let h=o?r[o-1].to:e,f=o<r.length?r[o].from:t;for(let p=h,m,g,k;p<f;p++)if(g=G0[m=n.charCodeAt(p)])if(g<0){for(let w=l-3;w>=0;w-=3)if(is[w+1]==-g){let C=is[w+2],Q=C&2?i:C&4?C&1?s:i:0;Q&&(Yt[p]=Yt[is[w]]=Q),l=w;break}}else{if(is.length==189)break;is[l++]=p,is[l++]=m,is[l++]=c}else if((k=Yt[p])==2||k==1){let w=k==i;c=w?0:1;for(let C=l-3;C>=0;C-=3){let Q=is[C+2];if(Q&2)break;if(w)is[C+2]|=2;else{if(Q&4)break;is[C+2]|=4}}}}}function rD(n,e,t,r){for(let i=0,s=r;i<=t.length;i++){let o=i?t[i-1].to:n,l=i<t.length?t[i].from:e;for(let c=o;c<l;){let h=Yt[c];if(h==256){let f=c+1;for(;;)if(f==l){if(i==t.length)break;f=t[i++].to,l=i<t.length?t[i].from:e}else if(Yt[f]==256)f++;else break;let p=s==1,m=(f<e?Yt[f]:r)==1,g=p==m?p?1:2:r;for(let k=f,w=i,C=w?t[w-1].to:n;k>c;)k==C&&(k=t[--w].from,C=w?t[w-1].to:n),Yt[--k]=g;c=f}else s=h,c++}}}function K0(n,e,t,r,i,s,o){let l=r%2?2:1;if(r%2==i%2)for(let c=e,h=0;c<t;){let f=!0,p=!1;if(h==s.length||c<s[h].from){let w=Yt[c];w!=l&&(f=!1,p=w==16)}let m=!f&&l==1?[]:null,g=f?r:r+1,k=c;e:for(;;)if(h<s.length&&k==s[h].from){if(p)break e;let w=s[h];if(!f)for(let C=w.to,Q=h+1;;){if(C==t)break e;if(Q<s.length&&s[Q].from==C)C=s[Q++].to;else{if(Yt[C]==l)break e;break}}if(h++,m)m.push(w);else{w.from>c&&o.push(new ms(c,w.from,g));let C=w.direction==bl!=!(g%2);J0(n,C?r+1:r,i,w.inner,w.from,w.to,o),c=w.to}k=w.to}else{if(k==t||(f?Yt[k]!=l:Yt[k]==l))break;k++}m?K0(n,c,k,r+1,i,m,o):c<k&&o.push(new ms(c,k,g)),c=k}else for(let c=t,h=s.length;c>e;){let f=!0,p=!1;if(!h||c>s[h-1].to){let w=Yt[c-1];w!=l&&(f=!1,p=w==16)}let m=!f&&l==1?[]:null,g=f?r:r+1,k=c;e:for(;;)if(h&&k==s[h-1].to){if(p)break e;let w=s[--h];if(!f)for(let C=w.from,Q=h;;){if(C==e)break e;if(Q&&s[Q-1].to==C)C=s[--Q].from;else{if(Yt[C-1]==l)break e;break}}if(m)m.push(w);else{w.to<c&&o.push(new ms(w.to,c,g));let C=w.direction==bl!=!(g%2);J0(n,C?r+1:r,i,w.inner,w.from,w.to,o),c=w.from}k=w.from}else{if(k==e||(f?Yt[k-1]!=l:Yt[k-1]==l))break;k--}m?K0(n,k,c,r+1,i,m,o):k<c&&o.push(new ms(k,c,g)),c=k}}function J0(n,e,t,r,i,s,o){let l=e%2?2:1;tD(n,i,s,r,l),nD(n,i,s,r,l),rD(i,s,r,l),K0(n,i,s,e,t,r,o)}function iD(n,e,t){if(!n)return[new ms(0,0,e==gx?1:0)];if(e==bl&&!t.length&&!eD.test(n))return EQ(n.length);if(t.length)for(;n.length>Yt.length;)Yt[Yt.length]=256;let r=[],i=e==bl?0:1;return J0(n,i,i,t,0,n.length,r),r}function EQ(n){return[new ms(0,n,0)]}let MQ="";function sD(n,e,t,r,i){var s;let o=r.head-n.from,l=ms.find(e,o,(s=r.bidiLevel)!==null&&s!==void 0?s:-1,r.assoc),c=e[l],h=c.side(i,t);if(o==h){let m=l+=i?1:-1;if(m<0||m>=e.length)return null;c=e[l=m],o=c.side(!i,t),h=c.side(i,t)}let f=Yn(n.text,o,c.forward(i,t));(f<c.from||f>c.to)&&(f=h),MQ=n.text.slice(Math.min(o,f),Math.max(o,f));let p=l==(i?e.length-1:0)?null:e[l+(i?1:-1)];return p&&f==h&&p.level+(i?0:1)<c.level?me.cursor(p.side(!i,t)+n.from,p.forward(i,t)?1:-1,p.level):me.cursor(f+n.from,c.forward(i,t)?-1:1,c.level)}function oD(n,e,t){for(let r=e;r<t;r++){let i=TQ(n.charCodeAt(r));if(i==1)return bl;if(i==2||i==4)return gx}return bl}const jQ=Ye.define(),RQ=Ye.define(),NQ=Ye.define(),AQ=Ye.define(),ey=Ye.define(),_Q=Ye.define(),zQ=Ye.define(),Ox=Ye.define(),yx=Ye.define(),DQ=Ye.define({combine:n=>n.some(e=>e)}),aD=Ye.define({combine:n=>n.some(e=>e)}),LQ=Ye.define();class Cu{constructor(e,t="nearest",r="nearest",i=5,s=5,o=!1){this.range=e,this.y=t,this.x=r,this.yMargin=i,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new Cu(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Cu(me.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Xd=tn.define({map:(n,e)=>n.map(e)}),IQ=tn.define();function gs(n,e,t){let r=n.facet(AQ);r.length?r[0](e):window.onerror&&window.onerror(String(e),t,void 0,void 0,e)||(t?console.error(t+":",e):console.error(e))}const Us=Ye.define({combine:n=>n.length?n[0]:!0});let lD=0;const xu=Ye.define({combine(n){return n.filter((e,t)=>{for(let r=0;r<t;r++)if(n[r].plugin==e.plugin)return!1;return!0})}});class pi{constructor(e,t,r,i,s){this.id=e,this.create=t,this.domEventHandlers=r,this.domEventObservers=i,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(xu.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(xu.of({plugin:this,arg:e}))}static define(e,t){const{eventHandlers:r,eventObservers:i,provide:s,decorations:o}=t||{};return new pi(lD++,e,r,i,l=>{let c=[];return o&&c.push(om.of(h=>{let f=h.plugin(l);return f?o(f):pt.none})),s&&c.push(s(l)),c})}static fromClass(e,t){return pi.define((r,i)=>new e(r,i),t)}}class QO{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(r){if(gs(t.state,r,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(t){gs(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(!((t=this.value)===null||t===void 0)&&t.destroy)try{this.value.destroy()}catch(r){gs(e.state,r,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const ZQ=Ye.define(),xx=Ye.define(),om=Ye.define(),XQ=Ye.define(),vx=Ye.define(),Of=Ye.define(),VQ=Ye.define();function Xk(n,e){let t=n.state.facet(VQ);if(!t.length)return t;let r=t.map(s=>s instanceof Function?s(n):s),i=[];return Pt.spans(r,e.from,e.to,{point(){},span(s,o,l,c){let h=s-e.from,f=o-e.from,p=i;for(let m=l.length-1;m>=0;m--,c--){let g=l[m].spec.bidiIsolate,k;if(g==null&&(g=oD(e.text,h,f)),c>0&&p.length&&(k=p[p.length-1]).to==h&&k.direction==g)k.to=f,p=k.inner;else{let w={from:h,to:f,direction:g,inner:[]};p.push(w),p=w.inner}}}}),i}const WQ=Ye.define();function FQ(n){let e=0,t=0,r=0,i=0;for(let s of n.state.facet(WQ)){let o=s(n);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(t=Math.max(t,o.right)),o.top!=null&&(r=Math.max(r,o.top)),o.bottom!=null&&(i=Math.max(i,o.bottom)))}return{left:e,right:t,top:r,bottom:i}}const Sh=Ye.define();class hi{constructor(e,t,r,i){this.fromA=e,this.toA=t,this.fromB=r,this.toB=i}join(e){return new hi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,r=this;for(;t>0;t--){let i=e[t-1];if(!(i.fromA>r.toA)){if(i.toA<r.fromA)break;r=r.join(i),e.splice(t-1,1)}}return e.splice(t,0,r),e}static extendWithRanges(e,t){if(t.length==0)return e;let r=[];for(let i=0,s=0,o=0;;){let l=i<e.length?e[i].fromB:1e9,c=s<t.length?t[s]:1e9,h=Math.min(l,c);if(h==1e9)break;let f=h+o,p=h,m=f;for(;;)if(s<t.length&&t[s]<=p){let g=t[s+1];s+=2,p=Math.max(p,g);for(let k=i;k<e.length&&e[k].fromB<=p;k++)o=e[k].toA-e[k].toB;m=Math.max(m,g+o)}else if(i<e.length&&e[i].fromB<=p){let g=e[i++];p=Math.max(p,g.toB),m=Math.max(m,g.toA),o=g.toA-g.toB}else break;r.push(new hi(f,m,h,p))}return r}}class $p{constructor(e,t,r){this.view=e,this.state=t,this.transactions=r,this.flags=0,this.startState=e.state,this.changes=Rn.empty(this.startState.doc.length);for(let s of r)this.changes=this.changes.compose(s.changes);let i=[];this.changes.iterChangedRanges((s,o,l,c)=>i.push(new hi(s,o,l,c))),this.changedRanges=i}static create(e,t,r){return new $p(e,t,r)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}const uD=[];class gn{constructor(e,t,r=0){this.dom=e,this.length=t,this.flags=r,this.parent=null,e.cmTile=this}get breakAfter(){return this.flags&1}get children(){return uD}isWidget(){return!1}get isHidden(){return!1}isComposite(){return!1}isLine(){return!1}isText(){return!1}isBlock(){return!1}get domAttrs(){return null}sync(e){if(this.flags|=2,this.flags&4){this.flags&=-5;let t=this.domAttrs;t&&Wz(this.dom,t)}}toString(){return this.constructor.name+(this.children.length?`(${this.children})`:"")+(this.breakAfter?"#":"")}destroy(){this.parent=null}setDOM(e){this.dom=e,e.cmTile=this}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e,t=this.posAtStart){let r=t;for(let i of this.children){if(i==e)return r;r+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}covers(e){return!0}coordsIn(e,t){return null}domPosFor(e,t){let r=da(this.dom),i=this.length?e>0:t>0;return new zi(this.parent.dom,r+(i?1:0),e==0||e==this.length)}markDirty(e){this.flags&=-3,e&&(this.flags|=4),this.parent&&this.parent.flags&2&&this.parent.markDirty(!1)}get overrideDOMText(){return null}get root(){for(let e=this;e;e=e.parent)if(e instanceof lm)return e;return null}static get(e){return e.cmTile}}class am extends gn{constructor(e){super(e,0),this._children=[]}isComposite(){return!0}get children(){return this._children}get lastChild(){return this.children.length?this.children[this.children.length-1]:null}append(e){this.children.push(e),e.parent=this}sync(e){if(this.flags&2)return;super.sync(e);let t=this.dom,r=null,i,s=(e==null?void 0:e.node)==t?e:null,o=0;for(let l of this.children){if(l.sync(e),o+=l.length+l.breakAfter,i=r?r.nextSibling:t.firstChild,s&&i!=l.dom&&(s.written=!0),l.dom.parentNode==t)for(;i&&i!=l.dom;)i=Vk(i);else t.insertBefore(l.dom,i);r=l.dom}for(i=r?r.nextSibling:t.firstChild,s&&i&&(s.written=!0);i;)i=Vk(i);this.length=o}}function Vk(n){let e=n.nextSibling;return n.parentNode.removeChild(n),e}class lm extends am{constructor(e,t){super(t),this.view=e}owns(e){for(;e;e=e.parent)if(e==this)return!0;return!1}isBlock(){return!0}nearest(e){for(;;){if(!e)return null;let t=gn.get(e);if(t&&this.owns(t))return t;e=e.parentNode}}blockTiles(e){for(let t=[],r=this,i=0,s=0;;)if(i==r.children.length){if(!t.length)return;r=r.parent,r.breakAfter&&s++,i=t.pop()}else{let o=r.children[i++];if(o instanceof Gs)t.push(i),r=o,i=0;else{let l=s+o.length,c=e(o,s);if(c!==void 0)return c;s=l+o.breakAfter}}}resolveBlock(e,t){let r,i=-1,s,o=-1;if(this.blockTiles((l,c)=>{let h=c+l.length;if(e>=c&&e<=h){if(l.isWidget()&&t>=-1&&t<=1){if(l.flags&32)return!0;l.flags&16&&(r=void 0)}(c<e||e==h&&(t<-1?l.length:l.covers(1)))&&(!r||!l.isWidget()&&r.isWidget())&&(r=l,i=e-c),(h>e||e==c&&(t>1?l.length:l.covers(-1)))&&(!s||!l.isWidget()&&s.isWidget())&&(s=l,o=e-c)}}),!r&&!s)throw new Error("No tile at position "+e);return r&&t<0||!s?{tile:r,offset:i}:{tile:s,offset:o}}}class Gs extends am{constructor(e,t){super(e),this.wrapper=t}isBlock(){return!0}covers(e){return this.children.length?e<0?this.children[0].covers(-1):this.lastChild.covers(1):!1}get domAttrs(){return this.wrapper.attributes}static of(e,t){let r=new Gs(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class Wu extends am{constructor(e,t){super(e),this.attrs=t}isLine(){return!0}static start(e,t,r){let i=new Wu(t||document.createElement("div"),e);return(!t||!r)&&(i.flags|=4),i}get domAttrs(){return this.attrs}resolveInline(e,t,r){let i=null,s=-1,o=null,l=-1;function c(f,p){for(let m=0,g=0;m<f.children.length&&g<=p;m++){let k=f.children[m],w=g+k.length;w>=p&&(k.isComposite()?c(k,p-g):(!o||o.isHidden&&(t>0||r&&hD(o,k)))&&(w>p||k.flags&32)?(o=k,l=p-g):(g<p||k.flags&16&&!k.isHidden)&&(i=k,s=p-g)),g=w}}c(this,e);let h=(t<0?i:o)||i||o;return h?{tile:h,offset:h==i?s:l}:null}coordsIn(e,t){let r=this.resolveInline(e,t,!0);return r?r.tile.coordsIn(Math.max(0,r.offset),t):cD(this)}domIn(e,t){let r=this.resolveInline(e,t);if(r){let{tile:i,offset:s}=r;if(this.dom.contains(i.dom))return i.isText()?new zi(i.dom,Math.min(i.dom.nodeValue.length,s)):i.domPosFor(s,i.flags&16?1:i.flags&32?-1:t);let o=r.tile.parent,l=!1;for(let c of o.children){if(l)return new zi(c.dom,0);c==r.tile&&(l=!0)}}return new zi(this.dom,0)}}function cD(n){let e=n.dom.lastChild;if(!e)return n.dom.getBoundingClientRect();let t=ap(e);return t[t.length-1]||null}function hD(n,e){let t=n.coordsIn(0,1),r=e.coordsIn(0,1);return t&&r&&r.top<t.bottom}class kr extends am{constructor(e,t){super(e),this.mark=t}get domAttrs(){return this.mark.attrs}static of(e,t){let r=new kr(t||document.createElement(e.tagName),e);return t||(r.flags|=4),r}}class fl extends gn{constructor(e,t){super(e,t.length),this.text=t}sync(e){this.flags&2||(super.sync(e),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text))}isText(){return!0}toString(){return JSON.stringify(this.text)}coordsIn(e,t){let r=this.dom.nodeValue.length;e>r&&(e=r);let i=e,s=e,o=0;e==0&&t<0||e==r&&t>=0?Le.chrome||Le.gecko||(e?(i--,o=1):s<r&&(s++,o=-1)):t<0?i--:s<r&&s++;let l=Uh(this.dom,i,s).getClientRects();if(!l.length)return null;let c=l[(o?o<0:t>=0)?0:l.length-1];return Le.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(l,h=>h.width)||c),o?Tp(c,o<0):c||null}static of(e,t){let r=new fl(t||document.createTextNode(e),e);return t||(r.flags|=2),r}}class Pl extends gn{constructor(e,t,r,i){super(e,t,i),this.widget=r}isWidget(){return!0}get isHidden(){return this.widget.isHidden}covers(e){return this.flags&48?!1:(this.flags&(e<0?64:128))>0}coordsIn(e,t){return this.coordsInWidget(e,t,!1)}coordsInWidget(e,t,r){let i=this.widget.coordsAt(this.dom,e,t);if(i)return i;if(r)return Tp(this.dom.getBoundingClientRect(),this.length?e==0:t<=0);{let s=this.dom.getClientRects(),o=null;if(!s.length)return null;let l=this.flags&16?!0:this.flags&32?!1:e>0;for(let c=l?s.length-1:0;o=s[c],!(e>0?c==0:c==s.length-1||o.top<o.bottom);c+=l?-1:1);return Tp(o,!l)}}get overrideDOMText(){if(!this.length)return Et.empty;let{root:e}=this;if(!e)return Et.empty;let t=this.posAtStart;return e.view.state.doc.slice(t,t+this.length)}destroy(){super.destroy(),this.widget.destroy(this.dom)}static of(e,t,r,i,s){return s||(s=e.toDOM(t),e.editable||(s.contentEditable="false")),new Pl(s,r,e,i)}}class Ep extends gn{constructor(e){let t=document.createElement("img");t.className="cm-widgetBuffer",t.setAttribute("aria-hidden","true"),super(t,0,e)}get isHidden(){return!0}get overrideDOMText(){return Et.empty}coordsIn(e){return this.dom.getBoundingClientRect()}}class fD{constructor(e){this.index=0,this.beforeBreak=!1,this.parents=[],this.tile=e}advance(e,t,r){let{tile:i,index:s,beforeBreak:o,parents:l}=this;for(;e||t>0;)if(i.isComposite())if(o){if(!e)break;r&&r.break(),e--,o=!1}else if(s==i.children.length){if(!e&&!l.length)break;r&&r.leave(i),o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++}else{let c=i.children[s],h=c.breakAfter;(t>0?c.length<=e:c.length<e)&&(!r||r.skip(c,0,c.length)!==!1||!c.isComposite)?(o=!!h,s++,e-=c.length):(l.push({tile:i,index:s}),i=c,s=0,r&&c.isComposite()&&r.enter(c))}else if(s==i.length)o=!!i.breakAfter,{tile:i,index:s}=l.pop(),s++;else if(e){let c=Math.min(e,i.length-s);r&&r.skip(i,s,s+c),e-=c,s+=c}else break;return this.tile=i,this.index=s,this.beforeBreak=o,this}get root(){return this.parents.length?this.parents[0].tile:this.tile}}class dD{constructor(e,t,r,i){this.from=e,this.to=t,this.wrapper=r,this.rank=i}}class pD{constructor(e,t,r){this.cache=e,this.root=t,this.blockWrappers=r,this.curLine=null,this.lastBlock=null,this.afterWidget=null,this.pos=0,this.wrappers=[],this.wrapperPos=0}addText(e,t,r,i){var s;this.flushBuffer();let o=this.ensureMarks(t,r),l=o.lastChild;if(l&&l.isText()&&!(l.flags&8)&&l.length+e.length<512){this.cache.reused.set(l,2);let c=o.children[o.children.length-1]=new fl(l.dom,l.text+e);c.parent=o}else o.append(i||fl.of(e,(s=this.cache.find(fl))===null||s===void 0?void 0:s.dom));this.pos+=e.length,this.afterWidget=null}addComposition(e,t){let r=this.curLine;r.dom!=t.line.dom&&(r.setDOM(this.cache.reused.has(t.line)?CO(t.line.dom):t.line.dom),this.cache.reused.set(t.line,2));let i=r;for(let l=t.marks.length-1;l>=0;l--){let c=t.marks[l],h=i.lastChild;if(h instanceof kr&&h.mark.eq(c.mark))h.dom!=c.dom&&h.setDOM(CO(c.dom)),i=h;else{if(this.cache.reused.get(c)){let p=gn.get(c.dom);p&&p.setDOM(CO(c.dom))}let f=kr.of(c.mark,c.dom);i.append(f),i=f}this.cache.reused.set(c,2)}let s=gn.get(e.text);s&&this.cache.reused.set(s,2);let o=new fl(e.text,e.text.nodeValue);o.flags|=8,i.append(o)}addInlineWidget(e,t,r){let i=this.afterWidget&&e.flags&48&&(this.afterWidget.flags&48)==(e.flags&48);i||this.flushBuffer();let s=this.ensureMarks(t,r);!i&&!(e.flags&16)&&s.append(this.getBuffer(1)),s.append(e),this.pos+=e.length,this.afterWidget=e}addMark(e,t,r){this.flushBuffer(),this.ensureMarks(t,r).append(e),this.pos+=e.length,this.afterWidget=null}addBlockWidget(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}continueWidget(e){let t=this.afterWidget||this.lastBlock;t.length+=e,this.pos+=e}addLineStart(e,t){var r;e||(e=BQ);let i=Wu.start(e,t||((r=this.cache.find(Wu))===null||r===void 0?void 0:r.dom),!!t);this.getBlockPos().append(this.lastBlock=this.curLine=i)}addLine(e){this.getBlockPos().append(e),this.pos+=e.length,this.lastBlock=e,this.endLine()}addBreak(){this.lastBlock.flags|=1,this.endLine(),this.pos++}addLineStartIfNotCovered(e){this.blockPosCovered()||this.addLineStart(e)}ensureLine(e){this.curLine||this.addLineStart(e)}ensureMarks(e,t){var r;let i=this.curLine;for(let s=e.length-1;s>=0;s--){let o=e[s],l;if(t>0&&(l=i.lastChild)&&l instanceof kr&&l.mark.eq(o))i=l,t--;else{let c=kr.of(o,(r=this.cache.find(kr,h=>h.mark.eq(o)))===null||r===void 0?void 0:r.dom);i.append(c),i=c,t=0}}return i}endLine(){if(this.curLine){this.flushBuffer();let e=this.curLine.lastChild;(!e||!Wk(this.curLine,!1)||e.dom.nodeName!="BR"&&e.isWidget()&&!(Le.ios&&Wk(this.curLine,!0)))&&this.curLine.append(this.cache.findWidget(TO,0,32)||new Pl(TO.toDOM(),0,TO,32)),this.curLine=this.afterWidget=null}}updateBlockWrappers(){this.wrapperPos>this.pos+1e4&&(this.blockWrappers.goto(this.pos),this.wrappers.length=0);for(let e=this.wrappers.length-1;e>=0;e--)this.wrappers[e].to<this.pos&&this.wrappers.splice(e,1);for(let e=this.blockWrappers;e.value&&e.from<=this.pos;e.next())if(e.to>=this.pos){let t=new dD(e.from,e.to,e.value,e.rank),r=this.wrappers.length;for(;r>0&&(this.wrappers[r-1].rank-t.rank||this.wrappers[r-1].to-t.to)<0;)r--;this.wrappers.splice(r,0,t)}this.wrapperPos=this.pos}getBlockPos(){var e;this.updateBlockWrappers();let t=this.root;for(let r of this.wrappers){let i=t.lastChild;if(r.from<this.pos&&i instanceof Gs&&i.wrapper.eq(r.wrapper))t=i;else{let s=Gs.of(r.wrapper,(e=this.cache.find(Gs,o=>o.wrapper.eq(r.wrapper)))===null||e===void 0?void 0:e.dom);t.append(s),t=s}}return t}blockPosCovered(){let e=this.lastBlock;return e!=null&&!e.breakAfter&&(!e.isWidget()||(e.flags&160)>0)}getBuffer(e){let t=2|(e<0?16:32),r=this.cache.find(Ep,void 0,1);return r&&(r.flags=t),r||new Ep(t)}flushBuffer(){this.afterWidget&&!(this.afterWidget.flags&32)&&(this.afterWidget.parent.append(this.getBuffer(-1)),this.afterWidget=null)}}class mD{constructor(e){this.skipCount=0,this.text="",this.textOff=0,this.cursor=e.iter()}skip(e){this.textOff+e<=this.text.length?this.textOff+=e:(this.skipCount+=e-(this.text.length-this.textOff),this.text="",this.textOff=0)}next(e){if(this.textOff==this.text.length){let{value:i,lineBreak:s,done:o}=this.cursor.next(this.skipCount);if(this.skipCount=0,o)throw new Error("Ran out of text content when drawing inline views");this.text=i;let l=this.textOff=Math.min(e,i.length);return s?null:i.slice(0,l)}let t=Math.min(this.text.length,this.textOff+e),r=this.text.slice(this.textOff,t);return this.textOff=t,r}}const Mp=[Pl,Wu,fl,kr,Ep,Gs,lm];for(let n=0;n<Mp.length;n++)Mp[n].bucket=n;class gD{constructor(e){this.view=e,this.buckets=Mp.map(()=>[]),this.index=Mp.map(()=>0),this.reused=new Map}add(e){let t=e.constructor.bucket,r=this.buckets[t];r.length<6?r.push(e):r[this.index[t]=(this.index[t]+1)%6]=e}find(e,t,r=2){let i=e.bucket,s=this.buckets[i],o=this.index[i];for(let l=s.length-1;l>=0;l--){let c=(l+o)%s.length,h=s[c];if((!t||t(h))&&!this.reused.has(h))return s.splice(c,1),c<o&&this.index[i]--,this.reused.set(h,r),h}return null}findWidget(e,t,r){let i=this.buckets[0];if(i.length)for(let s=0,o=0;;s++){if(s==i.length){if(o)return null;o=1,s=0}let l=i[s];if(!this.reused.has(l)&&(o==0?l.widget.compare(e):l.widget.constructor==e.constructor&&e.updateDOM(l.dom,this.view,l.widget)))return i.splice(s,1),s<this.index[0]&&this.index[0]--,l.widget==e&&l.length==t&&(l.flags&497)==r?(this.reused.set(l,1),l):(this.reused.set(l,2),new Pl(l.dom,t,e,l.flags&-498|r))}}reuse(e){return this.reused.set(e,1),e}maybeReuse(e,t=2){if(!this.reused.has(e))return this.reused.set(e,t),e.dom}clear(){for(let e=0;e<this.buckets.length;e++)this.buckets[e].length=this.index[e]=0}}class OD{constructor(e,t,r,i,s){this.view=e,this.decorations=i,this.disallowBlockEffectsFor=s,this.openWidget=!1,this.openMarks=0,this.cache=new gD(e),this.text=new mD(e.state.doc),this.builder=new pD(this.cache,new lm(e,e.contentDOM),Pt.iter(r)),this.cache.reused.set(t,2),this.old=new fD(t),this.reuseWalker={skip:(o,l,c)=>{if(this.cache.add(o),o.isComposite())return!1},enter:o=>this.cache.add(o),leave:()=>{},break:()=>{}}}run(e,t){let r=t&&this.getCompositionContext(t.text);for(let i=0,s=0,o=0;;){let l=o<e.length?e[o++]:null,c=l?l.fromA:this.old.root.length;if(c>i){let h=c-i;this.preserve(h,!o,!l),i=c,s+=h}if(!l)break;t&&l.fromA<=t.range.fromA&&l.toA>=t.range.toA?(this.forward(l.fromA,t.range.fromA,t.range.fromA<t.range.toA?1:-1),this.emit(s,t.range.fromB),this.cache.clear(),this.builder.addComposition(t,r),this.text.skip(t.range.toB-t.range.fromB),this.forward(t.range.fromA,l.toA),this.emit(t.range.toB,l.toB)):(this.forward(l.fromA,l.toA),this.emit(s,l.toB)),s=l.toB,i=l.toA}return this.builder.curLine&&this.builder.endLine(),this.builder.root}preserve(e,t,r){let i=vD(this.old),s=this.openMarks;this.old.advance(e,r?1:-1,{skip:(o,l,c)=>{if(o.isWidget())if(this.openWidget)this.builder.continueWidget(c-l);else{let h=c>0||l<o.length?Pl.of(o.widget,this.view,c-l,o.flags&496,this.cache.maybeReuse(o)):this.cache.reuse(o);h.flags&256?(h.flags&=-2,this.builder.addBlockWidget(h)):(this.builder.ensureLine(null),this.builder.addInlineWidget(h,i,s),s=i.length)}else if(o.isText())this.builder.ensureLine(null),!l&&c==o.length&&!this.cache.reused.has(o)?this.builder.addText(o.text,i,s,this.cache.reuse(o)):(this.cache.add(o),this.builder.addText(o.text.slice(l,c),i,s)),s=i.length;else if(o.isLine())o.flags&=-2,this.cache.reused.set(o,1),this.builder.addLine(o);else if(o instanceof Ep)this.cache.add(o);else if(o instanceof kr)this.builder.ensureLine(null),this.builder.addMark(o,i,s),this.cache.reused.set(o,1),s=i.length;else return!1;this.openWidget=!1},enter:o=>{o.isLine()?this.builder.addLineStart(o.attrs,this.cache.maybeReuse(o)):(this.cache.add(o),o instanceof kr&&i.unshift(o.mark)),this.openWidget=!1},leave:o=>{o.isLine()?i.length&&(i.length=s=0):o instanceof kr&&(i.shift(),s=Math.min(s,i.length))},break:()=>{this.builder.addBreak(),this.openWidget=!1}}),this.text.skip(e)}emit(e,t){let r=null,i=this.builder,s=0,o=Pt.spans(this.decorations,e,t,{point:(l,c,h,f,p,m)=>{if(h instanceof Sl){if(this.disallowBlockEffectsFor[m]){if(h.block)throw new RangeError("Block decorations may not be specified via plugins");if(c>this.view.state.doc.lineAt(l).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}if(s=f.length,p>f.length)i.continueWidget(c-l);else{let g=h.widget||(h.block?Fu.block:Fu.inline),k=yD(h),w=this.cache.findWidget(g,c-l,k)||Pl.of(g,this.view,c-l,k);h.block?(h.startSide>0&&i.addLineStartIfNotCovered(r),i.addBlockWidget(w)):(i.ensureLine(r),i.addInlineWidget(w,f,p))}r=null}else r=xD(r,h);c>l&&this.text.skip(c-l)},span:(l,c,h,f)=>{for(let p=l;p<c;){let m=this.text.next(Math.min(512,c-p));m==null?(i.addLineStartIfNotCovered(r),i.addBreak(),p++):(i.ensureLine(r),i.addText(m,h,p==l?f:h.length),p+=m.length),r=null}}});i.addLineStartIfNotCovered(r),this.openWidget=o>s,this.openMarks=o}forward(e,t,r=1){t-e<=10?this.old.advance(t-e,r,this.reuseWalker):(this.old.advance(5,-1,this.reuseWalker),this.old.advance(t-e-10,-1),this.old.advance(5,r,this.reuseWalker))}getCompositionContext(e){let t=[],r=null;for(let i=e.parentNode;;i=i.parentNode){let s=gn.get(i);if(i==this.view.contentDOM)break;s instanceof kr?t.push(s):s!=null&&s.isLine()?r=s:s instanceof Gs||(i.nodeName=="DIV"&&!r&&i!=this.view.contentDOM?r=new Wu(i,BQ):r||t.push(kr.of(new mf({tagName:i.nodeName.toLowerCase(),attributes:Fz(i)}),i)))}return{line:r,marks:t}}}function Wk(n,e){let t=r=>{for(let i of r.children)if((e?i.isText():i.length)||t(i))return!0;return!1};return t(n)}function yD(n){let e=n.isReplace?(n.startSide<0?64:0)|(n.endSide>0?128:0):n.startSide>0?32:16;return n.block&&(e|=256),e}const BQ={class:"cm-line"};function xD(n,e){let t=e.spec.attributes,r=e.spec.class;return!t&&!r||(n||(n={class:"cm-line"}),t&&px(t,n),r&&(n.class+=" "+r)),n}function vD(n){let e=[];for(let t=n.parents.length;t>1;t--){let r=t==n.parents.length?n.tile:n.parents[t].tile;r instanceof kr&&e.push(r.mark)}return e}function CO(n){let e=gn.get(n);return e&&e.setDOM(n.cloneNode()),n}class Fu extends jl{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Fu.inline=new Fu("span");Fu.block=new Fu("div");const TO=new class extends jl{toDOM(){return document.createElement("br")}get isHidden(){return!0}get editable(){return!0}};class Fk{constructor(e){this.view=e,this.decorations=[],this.blockWrappers=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.editContextFormatting=pt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.updateDeco(),this.tile=new lm(e,e.contentDOM),this.updateInner([new hi(0,0,0,e.state.doc.length)],null)}update(e){var t;let r=e.changedRanges;this.minWidth>0&&r.length&&(r.every(({fromA:f,toA:p})=>p<this.minWidthFrom||f>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let i=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((t=this.domChanged)===null||t===void 0)&&t.newSel?i=this.domChanged.newSel.head:!$D(e.changes,this.hasComposition)&&!e.selectionSet&&(i=e.state.selection.main.head));let s=i>-1?kD(this.view,e.changes,i):null;if(this.domChanged=null,this.hasComposition){let{from:f,to:p}=this.hasComposition;r=new hi(f,p,e.changes.mapPos(f,-1),e.changes.mapPos(p,1)).addToSet(r.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Le.ie||Le.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.blockWrappers;this.updateDeco();let c=PD(o,this.decorations,e.changes);c.length&&(r=hi.extendWithRanges(r,c));let h=CD(l,this.blockWrappers,e.changes);return h.length&&(r=hi.extendWithRanges(r,h)),s&&!r.some(f=>f.fromA<=s.range.fromA&&f.toA>=s.range.toA)&&(r=s.range.addToSet(r.slice())),this.tile.flags&2&&r.length==0?!1:(this.updateInner(r,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t){this.view.viewState.mustMeasureContent=!0;let{observer:r}=this.view;r.ignore(()=>{if(t||e.length){let o=this.tile,l=new OD(this.view,o,this.blockWrappers,this.decorations,this.dynamicDecorationMap);t&&gn.get(t.text)&&l.cache.reused.set(gn.get(t.text),2),this.tile=l.run(e,t),ty(o,l.cache.reused)}this.tile.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.tile.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let s=Le.chrome||Le.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.tile.sync(s),s&&(s.written||r.selectionRange.focusNode!=s.node||!this.tile.dom.contains(s.node))&&(this.forceSelection=!0),this.tile.dom.style.height=""});let i=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let s of this.tile.children)s.isWidget()&&s.widget instanceof $O&&i.push(s.dom);r.updateGaps(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let t of e.transactions)for(let r of t.effects)r.is(IQ)&&(this.editContextFormatting=r.value)}updateSelection(e=!1,t=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let{dom:r}=this.tile,i=this.view.root.activeElement,s=i==r,o=!s&&!(this.view.state.facet(Us)||r.tabIndex>-1)&&Mh(r,this.view.observer.selectionRange)&&!(i&&r.contains(i));if(!(s||t||o))return;let l=this.forceSelection;this.forceSelection=!1;let c=this.view.state.selection.main,h,f;if(c.empty?f=h=this.inlineDOMNearPos(c.anchor,c.assoc||1):(f=this.inlineDOMNearPos(c.head,c.head==c.from?1:-1),h=this.inlineDOMNearPos(c.anchor,c.anchor==c.from?1:-1)),Le.gecko&&c.empty&&!this.hasComposition&&wD(h)){let m=document.createTextNode("");this.view.observer.ignore(()=>h.node.insertBefore(m,h.node.childNodes[h.offset]||null)),h=f=new zi(m,0),l=!0}let p=this.view.observer.selectionRange;(l||!p.focusNode||(!jh(h.node,h.offset,p.anchorNode,p.anchorOffset)||!jh(f.node,f.offset,p.focusNode,p.focusOffset))&&!this.suppressWidgetCursorChange(p,c))&&(this.view.observer.ignore(()=>{Le.android&&Le.chrome&&r.contains(p.focusNode)&&TD(p.focusNode,r)&&(r.blur(),r.focus({preventScroll:!0}));let m=Yh(this.view.root);if(m)if(c.empty){if(Le.gecko){let g=SD(h.node,h.offset);if(g&&g!=3){let k=(g==1?PQ:QQ)(h.node,h.offset);k&&(h=new zi(k.node,k.offset))}}m.collapse(h.node,h.offset),c.bidiLevel!=null&&m.caretBidiLevel!==void 0&&(m.caretBidiLevel=c.bidiLevel)}else if(m.extend){m.collapse(h.node,h.offset);try{m.extend(f.node,f.offset)}catch{}}else{let g=document.createRange();c.anchor>c.head&&([h,f]=[f,h]),g.setEnd(f.node,f.offset),g.setStart(h.node,h.offset),m.removeAllRanges(),m.addRange(g)}o&&this.view.root.activeElement==r&&(r.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(h,f)),this.impreciseAnchor=h.precise?null:new zi(p.anchorNode,p.anchorOffset),this.impreciseHead=f.precise?null:new zi(p.focusNode,p.focusOffset)}suppressWidgetCursorChange(e,t){return this.hasComposition&&t.empty&&jh(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==t.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,r=Yh(e.root),{anchorNode:i,anchorOffset:s}=e.observer.selectionRange;if(!r||!t.empty||!t.assoc||!r.modify)return;let o=this.lineAt(t.head,t.assoc);if(!o)return;let l=o.posAtStart;if(t.head==l||t.head==l+o.length)return;let c=this.coordsAt(t.head,-1),h=this.coordsAt(t.head,1);if(!c||!h||c.bottom>h.top)return;let f=this.domAtPos(t.head+t.assoc,t.assoc);r.collapse(f.node,f.offset),r.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=t.from&&r.collapse(i,s)}posFromDOM(e,t){let r=this.tile.nearest(e);if(!r)return this.tile.dom.compareDocumentPosition(e)&2?0:this.view.state.doc.length;let i=r.posAtStart;if(r.isComposite()){let s;if(e==r.dom)s=r.dom.childNodes[t];else{let o=to(e)==0?0:t==0?-1:1;for(;;){let l=e.parentNode;if(l==r.dom)break;o==0&&l.firstChild!=l.lastChild&&(e==l.firstChild?o=-1:o=1),e=l}o<0?s=e:s=e.nextSibling}if(s==r.dom.firstChild)return i;for(;s&&!gn.get(s);)s=s.nextSibling;if(!s)return i+r.length;for(let o=0,l=i;;o++){let c=r.children[o];if(c.dom==s)return l;l+=c.length+c.breakAfter}}else return r.isText()?e==r.dom?i+t:i+(t?r.length:0):i}domAtPos(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.domPosFor(e,t):r.domIn(i,t)}inlineDOMNearPos(e,t){let r,i=-1,s=!1,o,l=-1,c=!1;return this.tile.blockTiles((h,f)=>{if(h.isWidget()){if(h.flags&32&&f>=e)return!0;h.flags&16&&(s=!0)}else{let p=f+h.length;if(f<=e&&(r=h,i=e-f,s=p<e),p>=e&&!o&&(o=h,l=e-f,c=f>e),f>e&&o)return!0}}),!r&&!o?this.domAtPos(e,t):(s&&o?r=null:c&&r&&(o=null),r&&t<0||!o?r.domIn(i,t):o.domIn(l,t))}coordsAt(e,t){let{tile:r,offset:i}=this.tile.resolveBlock(e,t);return r.isWidget()?r.widget instanceof $O?null:r.coordsInWidget(i,t,!0):r.coordsIn(i,t)}lineAt(e,t){let{tile:r}=this.tile.resolveBlock(e,t);return r.isLine()?r:null}coordsForChar(e){let{tile:t,offset:r}=this.tile.resolveBlock(e,1);if(!t.isLine())return null;function i(s,o){if(s.isComposite())for(let l of s.children){if(l.length>=o){let c=i(l,o);if(c)return c}if(o-=l.length,o<0)break}else if(s.isText()&&o<s.length){let l=Yn(s.text,o);if(l==o)return null;let c=Uh(s.dom,o,l).getClientRects();for(let h=0;h<c.length;h++){let f=c[h];if(h==c.length-1||f.top<f.bottom&&f.left<f.right)return f}}return null}return i(t,r)}measureVisibleLineHeights(e){let t=[],{from:r,to:i}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==xn.LTR,h=0,f=(p,m,g)=>{for(let k=0;k<p.children.length&&!(m>i);k++){let w=p.children[k],C=m+w.length,Q=w.dom.getBoundingClientRect(),{height:$}=Q;if(g&&!k&&(h+=Q.top-g.top),w instanceof Gs)C>r&&f(w,m,Q);else if(m>=r&&(h>0&&t.push(-h),t.push($+h),h=0,o)){let E=w.dom.lastChild,Z=E?ap(E):[];if(Z.length){let Y=Z[Z.length-1],_=c?Y.right-Q.left:Q.right-Y.left;_>l&&(l=_,this.minWidth=s,this.minWidthFrom=m,this.minWidthTo=C)}}g&&k==p.children.length-1&&(h+=g.bottom-Q.bottom),m=C+w.breakAfter}};return f(this.tile,0,null),t}textDirectionAt(e){let{tile:t}=this.tile.resolveBlock(e,1);return getComputedStyle(t.dom).direction=="rtl"?xn.RTL:xn.LTR}measureTextSize(){let e=this.tile.blockTiles(o=>{if(o.isLine()&&o.children.length&&o.length<=20){let l=0,c;for(let h of o.children){if(!h.isText()||/[^ -~]/.test(h.text))return;let f=ap(h.dom);if(f.length!=1)return;l+=f[0].width,c=f[0].height}if(l)return{lineHeight:o.dom.getBoundingClientRect().height,charWidth:l/o.length,textHeight:c}}});if(e)return e;let t=document.createElement("div"),r,i,s;return t.className="cm-line",t.style.width="99999px",t.style.position="absolute",t.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.tile.dom.appendChild(t);let o=ap(t.firstChild)[0];r=t.getBoundingClientRect().height,i=o&&o.width?o.width/27:7,s=o&&o.height?o.height:r,t.remove()}),{lineHeight:r,charWidth:i,textHeight:s}}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let r=0,i=0;;i++){let s=i==t.viewports.length?null:t.viewports[i],o=s?s.from-1:this.view.state.doc.length;if(o>r){let l=(t.lineBlockAt(o).bottom-t.lineBlockAt(r).top)/this.view.scaleY;e.push(pt.replace({widget:new $O(l),block:!0,inclusive:!0,isBlockGap:!0}).range(r,o))}if(!s)break;r=s.to+1}return pt.set(e)}updateDeco(){let e=1,t=this.view.state.facet(om).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),r=!1,i=this.view.state.facet(vx).map((s,o)=>{let l=typeof s=="function";return l&&(r=!0),l?s(this.view):s});for(i.length&&(this.dynamicDecorationMap[e++]=r,t.push(Pt.join(i))),this.decorations=[this.editContextFormatting,...t,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;this.blockWrappers=this.view.state.facet(XQ).map(s=>typeof s=="function"?s(this.view):s)}scrollIntoView(e){var t;if(e.isSnapshot){let f=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=f.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let f of this.view.state.facet(LQ))try{if(f(this.view,e.range,e))return!0}catch(p){gs(this.view.state,p,"scroll handler")}let{range:r}=e,i=this.coordsAt(r.head,(t=r.assoc)!==null&&t!==void 0?t:r.empty?0:r.head>r.anchor?-1:1),s;if(!i)return;!r.empty&&(s=this.coordsAt(r.anchor,r.anchor>r.head?-1:1))&&(i={left:Math.min(i.left,s.left),top:Math.min(i.top,s.top),right:Math.max(i.right,s.right),bottom:Math.max(i.bottom,s.bottom)});let o=FQ(this.view),l={left:i.left-o.left,top:i.top-o.top,right:i.right+o.right,bottom:i.bottom+o.bottom},{offsetWidth:c,offsetHeight:h}=this.view.scrollDOM;if(Uz(this.view.scrollDOM,l,r.head<r.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,c),-c),Math.max(Math.min(e.yMargin,h),-h),this.view.textDirection==xn.LTR),window.visualViewport&&window.innerHeight-window.visualViewport.height>1&&(i.top>window.pageYOffset+window.visualViewport.offsetTop+window.visualViewport.height||i.bottom<window.pageYOffset+window.visualViewport.offsetTop)){let f=this.view.docView.lineAt(r.head,1);f&&f.dom.scrollIntoView({block:"nearest"})}}lineHasWidget(e){let t=r=>r.isWidget()||r.children.some(t);return t(this.tile.resolveBlock(e,1).tile)}destroy(){ty(this.tile)}}function ty(n,e){let t=e==null?void 0:e.get(n);if(t!=1){t==null&&n.destroy();for(let r of n.children)ty(r,e)}}function wD(n){return n.node.nodeType==1&&n.node.firstChild&&(n.offset==0||n.node.childNodes[n.offset-1].contentEditable=="false")&&(n.offset==n.node.childNodes.length||n.node.childNodes[n.offset].contentEditable=="false")}function YQ(n,e){let t=n.observer.selectionRange;if(!t.focusNode)return null;let r=PQ(t.focusNode,t.focusOffset),i=QQ(t.focusNode,t.focusOffset),s=r||i;if(i&&r&&i.node!=r.node){let l=gn.get(i.node);if(!l||l.isText()&&l.text!=i.node.nodeValue)s=i;else if(n.docView.lastCompositionAfterCursor){let c=gn.get(r.node);!c||c.isText()&&c.text!=r.node.nodeValue||(s=i)}}if(n.docView.lastCompositionAfterCursor=s!=r,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function kD(n,e,t){let r=YQ(n,t);if(!r)return null;let{node:i,from:s,to:o}=r,l=i.nodeValue;if(/[\n\r]/.test(l)||n.state.doc.sliceString(r.from,r.to)!=l)return null;let c=e.invertedDesc;return{range:new hi(c.mapPos(s),c.mapPos(o),s,o),text:i}}function SD(n,e){return n.nodeType!=1?0:(e&&n.childNodes[e-1].contentEditable=="false"?1:0)|(e<n.childNodes.length&&n.childNodes[e].contentEditable=="false"?2:0)}let bD=class{constructor(){this.changes=[]}compareRange(e,t){Pu(e,t,this.changes)}comparePoint(e,t){Pu(e,t,this.changes)}boundChange(e){Pu(e,e,this.changes)}};function PD(n,e,t){let r=new bD;return Pt.compare(n,e,t,r),r.changes}class QD{constructor(){this.changes=[]}compareRange(e,t){Pu(e,t,this.changes)}comparePoint(){}boundChange(e){Pu(e,e,this.changes)}}function CD(n,e,t){let r=new QD;return Pt.compare(n,e,t,r),r.changes}function TD(n,e){for(let t=n;t&&t!=e;t=t.assignedSlot||t.parentNode)if(t.nodeType==1&&t.contentEditable=="false")return!0;return!1}function $D(n,e){let t=!1;return e&&n.iterChangedRanges((r,i)=>{r<e.to&&i>e.from&&(t=!0)}),t}class $O extends jl{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}function ED(n,e,t=1){let r=n.charCategorizer(e),i=n.doc.lineAt(e),s=e-i.from;if(i.length==0)return me.cursor(e);s==0?t=1:s==i.length&&(t=-1);let o=s,l=s;t<0?o=Yn(i.text,s,!1):l=Yn(i.text,s);let c=r(i.text.slice(o,l));for(;o>0;){let h=Yn(i.text,o,!1);if(r(i.text.slice(h,o))!=c)break;o=h}for(;l<i.length;){let h=Yn(i.text,l);if(r(i.text.slice(l,h))!=c)break;l=h}return me.range(o+i.from,l+i.from)}function MD(n,e,t,r,i){let s=Math.round((r-e.left)*n.defaultCharacterWidth);if(n.lineWrapping&&t.height>n.defaultLineHeight*1.5){let l=n.viewState.heightOracle.textHeight,c=Math.floor((i-t.top-(n.defaultLineHeight-l)*.5)/l);s+=c*n.viewState.heightOracle.lineLength}let o=n.state.sliceDoc(t.from,t.to);return t.from+Dz(o,s,n.state.tabSize)}function jD(n,e,t){let r=n.lineBlockAt(e);if(Array.isArray(r.type)){let i;for(let s of r.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!i||s.type==Pr.Text&&(i.type!=s.type||(t<0?s.from<e:s.to>e)))&&(i=s)}}return i||r}return r}function RD(n,e,t,r){let i=jD(n,e.head,e.assoc||-1),s=!r||i.type!=Pr.Text||!(n.lineWrapping||i.widgetLineBreaks)?null:n.coordsAtPos(e.assoc<0&&e.head>i.from?e.head-1:e.head);if(s){let o=n.dom.getBoundingClientRect(),l=n.textDirectionAt(i.from),c=n.posAtCoords({x:t==(l==xn.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(c!=null)return me.cursor(c,t?-1:1)}return me.cursor(t?i.to:i.from,t?-1:1)}function Bk(n,e,t,r){let i=n.state.doc.lineAt(e.head),s=n.bidiSpans(i),o=n.textDirectionAt(i.from);for(let l=e,c=null;;){let h=sD(i,s,o,l,t),f=MQ;if(!h){if(i.number==(t?n.state.doc.lines:1))return l;f=`
323
+ `,i=n.state.doc.line(i.number+(t?1:-1)),s=n.bidiSpans(i),h=n.visualLineSide(i,!t)}if(c){if(!c(f))return l}else{if(!r)return h;c=r(f)}l=h}}function ND(n,e,t){let r=n.state.charCategorizer(e),i=r(t);return s=>{let o=r(s);return i==Un.Space&&(i=o),i==o}}function AD(n,e,t,r){let i=e.head,s=t?1:-1;if(i==(t?n.state.doc.length:0))return me.cursor(i,e.assoc);let o=e.goalColumn,l,c=n.contentDOM.getBoundingClientRect(),h=n.coordsAtPos(i,e.assoc||((e.empty?t:e.head==e.from)?1:-1)),f=n.documentTop;if(h)o==null&&(o=h.left-c.left),l=s<0?h.top:h.bottom;else{let k=n.viewState.lineBlockAt(i);o==null&&(o=Math.min(c.right-c.left,n.defaultCharacterWidth*(i-k.from))),l=(s<0?k.top:k.bottom)+f}let p=c.left+o,m=n.viewState.heightOracle.textHeight>>1,g=r??m;for(let k=0;;k+=m){let w=l+(g+k)*s,C=ny(n,{x:p,y:w},!1,s);if(t?w>c.bottom:w<c.top)return me.cursor(C.pos,C.assoc);let Q=n.coordsAtPos(C.pos,C.assoc),$=Q?(Q.top+Q.bottom)/2:0;if(!Q||(t?$>l:$<l))return me.cursor(C.pos,C.assoc,void 0,o)}}function Rh(n,e,t){for(;;){let r=0;for(let i of n)i.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let c=r||t||(e-s<o-e?-1:1);e=c<0?s:o,r=c}});if(!r)return e}}function UQ(n,e){let t=null;for(let r=0;r<e.ranges.length;r++){let i=e.ranges[r],s=null;if(i.empty){let o=Rh(n,i.from,0);o!=i.from&&(s=me.cursor(o,-1))}else{let o=Rh(n,i.from,-1),l=Rh(n,i.to,1);(o!=i.from||l!=i.to)&&(s=me.range(i.from==i.anchor?o:l,i.from==i.head?o:l))}s&&(t||(t=e.ranges.slice()),t[r]=s)}return t?me.create(t,e.mainIndex):e}function EO(n,e,t){let r=Rh(n.state.facet(Of).map(i=>i(n)),t.from,e.head>t.from?-1:1);return r==t.from?t:me.cursor(r,r<t.from?1:-1)}class ps{constructor(e,t){this.pos=e,this.assoc=t}}function ny(n,e,t,r){let i=n.contentDOM.getBoundingClientRect(),s=i.top+n.viewState.paddingTop,{x:o,y:l}=e,c=l-s,h;for(;;){if(c<0)return new ps(0,1);if(c>n.viewState.docHeight)return new ps(n.state.doc.length,-1);if(h=n.elementAtHeight(c),r==null)break;if(h.type==Pr.Text){if(r<0?h.to<n.viewport.from:h.from>n.viewport.to)break;let m=n.docView.coordsAt(r<0?h.from:h.to,r>0?-1:1);if(m&&(r<0?m.top<=c+s:m.bottom>=c+s))break}let p=n.viewState.heightOracle.textHeight/2;c=r>0?h.bottom+p:h.top-p}if(n.viewport.from>=h.to||n.viewport.to<=h.from){if(t)return null;if(h.type==Pr.Text){let p=MD(n,i,h,o,l);return new ps(p,p==h.from?1:-1)}}if(h.type!=Pr.Text)return c<(h.top+h.bottom)/2?new ps(h.from,1):new ps(h.to,-1);let f=n.docView.lineAt(h.from,2);return(!f||f.length!=h.length)&&(f=n.docView.lineAt(h.from,-2)),new _D(n,o,l,n.textDirectionAt(h.from)).scanTile(f,h.from)}class _D{constructor(e,t,r,i){this.view=e,this.x=t,this.y=r,this.baseDir=i,this.line=null,this.spans=null}bidiSpansAt(e){return(!this.line||this.line.from>e||this.line.to<e)&&(this.line=this.view.state.doc.lineAt(e),this.spans=this.view.bidiSpans(this.line)),this}baseDirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ms.find(i,e-r.from,-1,t)].level==this.baseDir}dirAt(e,t){let{line:r,spans:i}=this.bidiSpansAt(e);return i[ms.find(i,e-r.from,-1,t)].dir}bidiIn(e,t){let{spans:r,line:i}=this.bidiSpansAt(e);return r.length>1||r.length&&(r[0].level!=this.baseDir||r[0].to+i.from<t)}scan(e,t){let r=0,i=e.length-1,s=new Set,o=this.bidiIn(e[0],e[i]),l,c,h=-1,f=1e9,p;e:for(;r<i;){let g=i-r,k=r+i>>1;t:if(s.has(k)){let C=r+Math.floor(Math.random()*g);for(let Q=0;Q<g;Q++){if(!s.has(C)){k=C;break t}C++,C==i&&(C=r)}break e}s.add(k);let w=t(k);if(w)for(let C=0;C<w.length;C++){let Q=w[C],$=0;if(!(Q.width==0&&w.length>1)){if(Q.bottom<this.y)(!l||l.bottom<Q.bottom)&&(l=Q),$=1;else if(Q.top>this.y)(!c||c.top>Q.top)&&(c=Q),$=-1;else{let E=Q.left>this.x?this.x-Q.left:Q.right<this.x?this.x-Q.right:0,Z=Math.abs(E);Z<f&&(h=k,f=Z,p=Q),E&&($=E<0==(this.baseDir==xn.LTR)?-1:1)}$==-1&&(!o||this.baseDirAt(e[k],1))?i=k:$==1&&(!o||this.baseDirAt(e[k+1],-1))&&(r=k+1)}}}if(!p){let g=l&&(!c||this.y-l.bottom<c.top-this.y)?l:c;return this.y=(g.top+g.bottom)/2,this.scan(e,t)}let m=(o?this.dirAt(e[h],1):this.baseDir)==xn.LTR;return{i:h,after:this.x>(p.left+p.right)/2==m}}scanText(e,t){let r=[];for(let s=0;s<e.length;s=Yn(e.text,s))r.push(t+s);r.push(t+e.length);let i=this.scan(r,s=>{let o=r[s]-t,l=r[s+1]-t;return Uh(e.dom,o,l).getClientRects()});return i.after?new ps(r[i.i+1],-1):new ps(r[i.i],1)}scanTile(e,t){if(!e.length)return new ps(t,1);if(e.children.length==1){let l=e.children[0];if(l.isText())return this.scanText(l,t);if(l.isComposite())return this.scanTile(l,t)}let r=[t];for(let l=0,c=t;l<e.children.length;l++)r.push(c+=e.children[l].length);let i=this.scan(r,l=>{let c=e.children[l];return c.flags&48?null:(c.dom.nodeType==1?c.dom:Uh(c.dom,0,c.length)).getClientRects()}),s=e.children[i.i],o=r[i.i];return s.isText()?this.scanText(s,o):s.isComposite()?this.scanTile(s,o):i.after?new ps(r[i.i+1],-1):new ps(o,1)}}const yu="￿";class zD{constructor(e,t){this.points=e,this.view=t,this.text="",this.lineSeparator=t.state.facet(At.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=yu}readRange(e,t){if(!e)return this;let r=e.parentNode;for(let i=e;;){this.findPointBefore(r,i);let s=this.text.length;this.readNode(i);let o=gn.get(i),l=i.nextSibling;if(l==t){o!=null&&o.breakAfter&&!l&&r!=this.view.contentDOM&&this.lineBreak();break}let c=gn.get(l);(o&&c?o.breakAfter:(o?o.breakAfter:Cp(i))||Cp(l)&&(i.nodeName!="BR"||o!=null&&o.isWidget())&&this.text.length>s)&&!LD(l,t)&&this.lineBreak(),i=l}return this.findPointBefore(r,t),this}readTextNode(e){let t=e.nodeValue;for(let r of this.points)r.node==e&&(r.pos=this.text.length+Math.min(r.offset,t.length));for(let r=0,i=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=t.indexOf(this.lineSeparator,r),o=this.lineSeparator.length):(l=i.exec(t))&&(s=l.index,o=l[0].length),this.append(t.slice(r,s<0?t.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);r=s+o}}readNode(e){let t=gn.get(e),r=t&&t.overrideDOMText;if(r!=null){this.findPointInside(e,r.length);for(let i=r.iter();!i.next().done;)i.lineBreak?this.lineBreak():this.append(i.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let r of this.points)r.node==e&&e.childNodes[r.offset]==t&&(r.pos=this.text.length)}findPointInside(e,t){for(let r of this.points)(e.nodeType==3?r.node==e:e.contains(r.node))&&(r.pos=this.text.length+(DD(e,r.node,r.offset)?t:0))}}function DD(n,e,t){for(;;){if(!e||t<to(e))return!1;if(e==n)return!0;t=da(e)+1,e=e.parentNode}}function LD(n,e){let t;for(;!(n==e||!n);n=n.nextSibling){let r=gn.get(n);if(!(r!=null&&r.isWidget()))return!1;r&&(t||(t=[])).push(r)}if(t)for(let r of t){let i=r.overrideDOMText;if(i!=null&&i.length)return!1}return!0}class Yk{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class ID{constructor(e,t,r,i){this.typeOver=i,this.bounds=null,this.text="",this.domChanged=t>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView,l=e.state.selection;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=qQ(e.docView.tile,t,r,0))){let c=s||o?[]:XD(e),h=new zD(c,e);h.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=h.text,this.newSel=VD(c,this.bounds.from)}else{let c=e.observer.selectionRange,h=s&&s.node==c.focusNode&&s.offset==c.focusOffset||!H0(e.contentDOM,c.focusNode)?l.main.head:e.docView.posFromDOM(c.focusNode,c.focusOffset),f=o&&o.node==c.anchorNode&&o.offset==c.anchorOffset||!H0(e.contentDOM,c.anchorNode)?l.main.anchor:e.docView.posFromDOM(c.anchorNode,c.anchorOffset),p=e.viewport;if((Le.ios||Le.chrome)&&l.main.empty&&h!=f&&(p.from>0||p.to<e.state.doc.length)){let m=Math.min(h,f),g=Math.max(h,f),k=p.from-m,w=p.to-g;(k==0||k==1||m==0)&&(w==0||w==-1||g==e.state.doc.length)&&(h=0,f=e.state.doc.length)}if(e.inputState.composing>-1&&l.ranges.length>1)this.newSel=l.replaceRange(me.range(f,h));else if(e.lineWrapping&&f==h&&!(l.main.empty&&l.main.head==h)&&e.inputState.lastTouchTime>Date.now()-100){let m=e.coordsAtPos(h,-1),g=0;m&&(g=e.inputState.lastTouchY<=m.bottom?-1:1),this.newSel=me.create([me.cursor(h,g)])}else this.newSel=me.single(f,h)}}}function qQ(n,e,t,r){if(n.isComposite()){let i=-1,s=-1,o=-1,l=-1;for(let c=0,h=r,f=r;c<n.children.length;c++){let p=n.children[c],m=h+p.length;if(h<e&&m>t)return qQ(p,e,t,h);if(m>=e&&i==-1&&(i=c,s=h),h>t&&p.dom.parentNode==n.dom){o=c,l=f;break}f=m,h=m+p.breakAfter}return{from:s,to:l<0?r+n.length:l,startDOM:(i?n.children[i-1].dom.nextSibling:null)||n.dom.firstChild,endDOM:o<n.children.length&&o>=0?n.children[o].dom:null}}else return n.isText()?{from:r,to:r+n.length,startDOM:n.dom,endDOM:n.dom.nextSibling}:null}function HQ(n,e){let t,{newSel:r}=e,{state:i}=n,s=i.selection.main,o=n.inputState.lastKeyTime>Date.now()-100?n.inputState.lastKeyCode:-1;if(e.bounds){let{from:l,to:c}=e.bounds,h=s.from,f=null;(o===8||Le.android&&e.text.length<c-l)&&(h=s.to,f="end");let p=i.doc.sliceString(l,c,yu),m,g;!s.empty&&s.from>=l&&s.to<=c&&(e.typeOver||p!=e.text)&&p.slice(0,s.from-l)==e.text.slice(0,s.from-l)&&p.slice(s.to-l)==e.text.slice(m=e.text.length-(p.length-(s.to-l)))?t={from:s.from,to:s.to,insert:Et.of(e.text.slice(s.from-l,m).split(yu))}:(g=GQ(p,e.text,h-l,f))&&(Le.chrome&&o==13&&g.toB==g.from+2&&e.text.slice(g.from,g.toB)==yu+yu&&g.toB--,t={from:l+g.from,to:l+g.toA,insert:Et.of(e.text.slice(g.from,g.toB).split(yu))})}else r&&(!n.hasFocus&&i.facet(Us)||jp(r,s))&&(r=null);if(!t&&!r)return!1;if((Le.mac||Le.android)&&t&&t.from==t.to&&t.from==s.head-1&&/^\. ?$/.test(t.insert.toString())&&n.contentDOM.getAttribute("autocorrect")=="off"?(r&&t.insert.length==2&&(r=me.single(r.main.anchor-1,r.main.head-1)),t={from:t.from,to:t.to,insert:Et.of([t.insert.toString().replace("."," ")])}):i.doc.lineAt(s.from).to<s.to&&n.docView.lineHasWidget(s.to)&&n.inputState.insertingTextAt>Date.now()-50?t={from:s.from,to:s.to,insert:i.toText(n.inputState.insertingText)}:Le.chrome&&t&&t.from==t.to&&t.from==s.head&&t.insert.toString()==`
324
+ `&&n.lineWrapping&&(r&&(r=me.single(r.main.anchor-1,r.main.head-1)),t={from:s.from,to:s.to,insert:Et.of([" "])}),t)return wx(n,t,r,o);if(r&&!jp(r,s)){let l=!1,c="select";return n.inputState.lastSelectionTime>Date.now()-50&&(n.inputState.lastSelectionOrigin=="select"&&(l=!0),c=n.inputState.lastSelectionOrigin,c=="select.pointer"&&(r=UQ(i.facet(Of).map(h=>h(n)),r))),n.dispatch({selection:r,scrollIntoView:l,userEvent:c}),!0}else return!1}function wx(n,e,t,r=-1){if(Le.ios&&n.inputState.flushIOSKey(e))return!0;let i=n.state.selection.main;if(Le.android&&(e.to==i.to&&(e.from==i.from||e.from==i.from-1&&n.state.sliceDoc(e.from,i.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&Qu(n.contentDOM,"Enter",13)||(e.from==i.from-1&&e.to==i.to&&e.insert.length==0||r==8&&e.insert.length<e.to-e.from&&e.to>i.head)&&Qu(n.contentDOM,"Backspace",8)||e.from==i.from&&e.to==i.to+1&&e.insert.length==0&&Qu(n.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();n.inputState.composing>=0&&n.inputState.composing++;let o,l=()=>o||(o=ZD(n,e,t));return n.state.facet(_Q).some(c=>c(n,e.from,e.to,s,l))||n.dispatch(l()),!0}function ZD(n,e,t){let r,i=n.state,s=i.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let c=e.from<s.from?-1:1,h=c<0?s.from:s.to,f=Rh(i.facet(Of).map(p=>p(n)),h,c);e.from==f&&(o=f)}if(o>-1)r={changes:e,selection:me.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!t||t.main.empty&&t.main.from==e.from+e.insert.length)&&n.inputState.composing<0){let c=s.from<e.from?i.sliceDoc(s.from,e.from):"",h=s.to>e.to?i.sliceDoc(e.to,s.to):"";r=i.replaceSelection(n.state.toText(c+e.insert.sliceString(0,void 0,n.state.lineBreak)+h))}else{let c=i.changes(e),h=t&&t.main.to<=c.newLength?t.main:void 0;if(i.selection.ranges.length>1&&(n.inputState.composing>=0||n.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let f=n.state.sliceDoc(e.from,e.to),p,m=t&&YQ(n,t.main.head);if(m){let k=e.insert.length-(e.to-e.from);p={from:m.from,to:m.to-k}}else p=n.state.doc.lineAt(s.head);let g=s.to-e.to;r=i.changeByRange(k=>{if(k.from==s.from&&k.to==s.to)return{changes:c,range:h||k.map(c)};let w=k.to-g,C=w-f.length;if(n.state.sliceDoc(C,w)!=f||w>=p.from&&C<=p.to)return{range:k};let Q=i.changes({from:C,to:w,insert:e.insert}),$=k.to-s.to;return{changes:Q,range:h?me.range(Math.max(0,h.anchor+$),Math.max(0,h.head+$)):k.map(Q)}})}else r={changes:c,selection:h&&i.selection.replaceRange(h)}}let l="input.type";return(n.composing||n.inputState.compositionPendingChange&&n.inputState.compositionEndedAt>Date.now()-50)&&(n.inputState.compositionPendingChange=!1,l+=".compose",n.inputState.compositionFirstChange&&(l+=".start",n.inputState.compositionFirstChange=!1)),i.update(r,{userEvent:l,scrollIntoView:!0})}function GQ(n,e,t,r){let i=Math.min(n.length,e.length),s=0;for(;s<i&&n.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==i&&n.length==e.length)return null;let o=n.length,l=e.length;for(;o>0&&l>0&&n.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(r=="end"){let c=Math.max(0,s-Math.min(o,l));t-=o+c-s}if(o<s&&n.length<e.length){let c=t<=s&&t>=o?s-t:0;s-=c,l=s+(l-o),o=s}else if(l<s){let c=t<=s&&t>=l?s-t:0;s-=c,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function XD(n){let e=[];if(n.root.activeElement!=n.contentDOM)return e;let{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}=n.observer.selectionRange;return t&&(e.push(new Yk(t,r)),(i!=t||s!=r)&&e.push(new Yk(i,s))),e}function VD(n,e){if(n.length==0)return null;let t=n[0].pos,r=n.length==2?n[1].pos:t;return t>-1&&r>-1?me.single(t+e,r+e):null}function jp(n,e){return e.head==n.main.head&&e.anchor==n.main.anchor}class WD{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastTouchX=0,this.lastTouchY=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.lastWheelEvent=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Le.safari&&e.contentDOM.addEventListener("input",()=>null),Le.gecko&&sL(e.contentDOM.ownerDocument)}handleEvent(e){!KD(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,t){let r=this.handlers[e];if(r){for(let i of r.observers)i(this.view,t);for(let i of r.handlers){if(t.defaultPrevented)break;if(i(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=FD(e),r=this.handlers,i=this.view.contentDOM;for(let s in t)if(s!="scroll"){let o=!t[s].handlers.length,l=r[s];l&&o!=!l.handlers.length&&(i.removeEventListener(s,this.handleEvent),l=null),l||i.addEventListener(s,this.handleEvent,{passive:o})}for(let s in r)s!="scroll"&&!t[s]&&i.removeEventListener(s,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&JQ.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Le.android&&Le.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let t;return Le.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&!e.shiftKey&&((t=KQ.find(r=>r.keyCode==e.keyCode))&&!e.ctrlKey||BD.indexOf(e.key)>-1&&e.ctrlKey)?(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let t=this.pendingIOSKey;return!t||t.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,Qu(this.view.contentDOM,t.key,t.keyCode,t instanceof KeyboardEvent?t:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Le.safari&&!Le.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function Uk(n,e){return(t,r)=>{try{return e.call(n,r,t)}catch(i){gs(t.state,i)}}}function FD(n){let e=Object.create(null);function t(r){return e[r]||(e[r]={observers:[],handlers:[]})}for(let r of n){let i=r.spec,s=i&&i.plugin.domEventHandlers,o=i&&i.plugin.domEventObservers;if(s)for(let l in s){let c=s[l];c&&t(l).handlers.push(Uk(r.value,c))}if(o)for(let l in o){let c=o[l];c&&t(l).observers.push(Uk(r.value,c))}}for(let r in Di)t(r).handlers.push(Di[r]);for(let r in Qr)t(r).observers.push(Qr[r]);return e}const KQ=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],BD="dthko",JQ=[16,17,18,20,91,92,224,225],Vd=6;function Wd(n){return Math.max(0,n)*.7+8}function YD(n,e){return Math.max(Math.abs(n.clientX-e.clientX),Math.abs(n.clientY-e.clientY))}class UD{constructor(e,t,r,i){this.view=e,this.startEvent=t,this.style=r,this.mustSelect=i,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParents=kQ(e.contentDOM),this.atoms=e.state.facet(Of).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(At.allowMultipleSelections)&&qD(e,t),this.dragging=GD(e,t)&&nC(t)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&YD(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let t=0,r=0,i=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:i,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=FQ(this.view);e.clientX-c.left<=i+Vd?t=-Wd(i-e.clientX):e.clientX+c.right>=o-Vd&&(t=Wd(e.clientX-o)),e.clientY-c.top<=s+Vd?r=-Wd(s-e.clientY):e.clientY+c.bottom>=l-Vd&&(r=Wd(e.clientY-l)),this.setScrollSpeed(t,r)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:t}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),t&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=t,t=0),(e||t)&&this.view.win.scrollBy(e,t),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:t}=this,r=UQ(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!r.eq(t.state.selection,this.dragging===!1))&&this.view.dispatch({selection:r,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(t=>t.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function qD(n,e){let t=n.state.facet(jQ);return t.length?t[0](e):Le.mac?e.metaKey:e.ctrlKey}function HD(n,e){let t=n.state.facet(RQ);return t.length?t[0](e):Le.mac?!e.altKey:!e.ctrlKey}function GD(n,e){let{main:t}=n.state.selection;if(t.empty)return!1;let r=Yh(n.root);if(!r||r.rangeCount==0)return!0;let i=r.getRangeAt(0).getClientRects();for(let s=0;s<i.length;s++){let o=i[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function KD(n,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let t=e.target,r;t!=n.contentDOM;t=t.parentNode)if(!t||t.nodeType==11||(r=gn.get(t))&&r.isWidget()&&!r.isHidden&&r.widget.ignoreEvent(e))return!1;return!0}const Di=Object.create(null),Qr=Object.create(null),eC=Le.ie&&Le.ie_version<15||Le.ios&&Le.webkit_version<604;function JD(n){let e=n.dom.parentNode;if(!e)return;let t=e.appendChild(document.createElement("textarea"));t.style.cssText="position: fixed; left: -10000px; top: 10px",t.focus(),setTimeout(()=>{n.focus(),t.remove(),tC(n,t.value)},50)}function um(n,e,t){for(let r of n.facet(e))t=r(t,n);return t}function tC(n,e){e=um(n.state,Ox,e);let{state:t}=n,r,i=1,s=t.toText(e),o=s.lines==t.selection.ranges.length;if(ry!=null&&t.selection.ranges.every(c=>c.empty)&&ry==s.toString()){let c=-1;r=t.changeByRange(h=>{let f=t.doc.lineAt(h.from);if(f.from==c)return{range:h};c=f.from;let p=t.toText((o?s.line(i++).text:e)+t.lineBreak);return{changes:{from:f.from,insert:p},range:me.cursor(h.from+p.length)}})}else o?r=t.changeByRange(c=>{let h=s.line(i++);return{changes:{from:c.from,to:c.to,insert:h.text},range:me.cursor(c.from+h.length)}}):r=t.replaceSelection(s);n.dispatch(r,{userEvent:"input.paste",scrollIntoView:!0})}Qr.scroll=n=>{n.inputState.lastScrollTop=n.scrollDOM.scrollTop,n.inputState.lastScrollLeft=n.scrollDOM.scrollLeft};Qr.wheel=Qr.mousewheel=n=>{n.inputState.lastWheelEvent=Date.now()};Di.keydown=(n,e)=>(n.inputState.setSelectionOrigin("select"),e.keyCode==27&&n.inputState.tabFocusMode!=0&&(n.inputState.tabFocusMode=Date.now()+2e3),!1);Qr.touchstart=(n,e)=>{let t=n.inputState,r=e.targetTouches[0];t.lastTouchTime=Date.now(),r&&(t.lastTouchX=r.clientX,t.lastTouchY=r.clientY),t.setSelectionOrigin("select.pointer")};Qr.touchmove=n=>{n.inputState.setSelectionOrigin("select.pointer")};Di.mousedown=(n,e)=>{if(n.observer.flush(),n.inputState.lastTouchTime>Date.now()-2e3)return!1;let t=null;for(let r of n.state.facet(NQ))if(t=r(n,e),t)break;if(!t&&e.button==0&&(t=tL(n,e)),t){let r=!n.hasFocus;n.inputState.startMouseSelection(new UD(n,e,t,r)),r&&n.observer.ignore(()=>{SQ(n.contentDOM);let s=n.root.activeElement;s&&!s.contains(n.contentDOM)&&s.blur()});let i=n.inputState.mouseSelection;if(i)return i.start(e),i.dragging===!1}else n.inputState.setSelectionOrigin("select.pointer");return!1};function qk(n,e,t,r){if(r==1)return me.cursor(e,t);if(r==2)return ED(n.state,e,t);{let i=n.docView.lineAt(e,t),s=n.state.doc.lineAt(i?i.posAtEnd:e),o=i?i.posAtStart:s.from,l=i?i.posAtEnd:s.to;return l<n.state.doc.length&&l==s.to&&l++,me.range(o,l)}}const eL=Le.ie&&Le.ie_version<=11;let Hk=null,Gk=0,Kk=0;function nC(n){if(!eL)return n.detail;let e=Hk,t=Kk;return Hk=n,Kk=Date.now(),Gk=!e||t>Date.now()-400&&Math.abs(e.clientX-n.clientX)<2&&Math.abs(e.clientY-n.clientY)<2?(Gk+1)%3:1}function tL(n,e){let t=n.posAndSideAtCoords({x:e.clientX,y:e.clientY},!1),r=nC(e),i=n.state.selection;return{update(s){s.docChanged&&(t.pos=s.changes.mapPos(t.pos),i=i.map(s.changes))},get(s,o,l){let c=n.posAndSideAtCoords({x:s.clientX,y:s.clientY},!1),h,f=qk(n,c.pos,c.assoc,r);if(t.pos!=c.pos&&!o){let p=qk(n,t.pos,t.assoc,r),m=Math.min(p.from,f.from),g=Math.max(p.to,f.to);f=m<f.from?me.range(m,g,f.assoc):me.range(g,m,f.assoc)}return o?i.replaceRange(i.main.extend(f.from,f.to,f.assoc)):l&&r==1&&i.ranges.length>1&&(h=nL(i,c.pos))?h:l?i.addRange(f):me.create([f])}}}function nL(n,e){for(let t=0;t<n.ranges.length;t++){let{from:r,to:i}=n.ranges[t];if(r<=e&&i>=e)return me.create(n.ranges.slice(0,t).concat(n.ranges.slice(t+1)),n.mainIndex==t?0:n.mainIndex-(n.mainIndex>t?1:0))}return null}Di.dragstart=(n,e)=>{let{selection:{main:t}}=n.state;if(e.target.draggable){let i=n.docView.tile.nearest(e.target);if(i&&i.isWidget()){let s=i.posAtStart,o=s+i.length;(s>=t.to||o<=t.from)&&(t=me.range(s,o))}}let{inputState:r}=n;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=t,e.dataTransfer&&(e.dataTransfer.setData("Text",um(n.state,yx,n.state.sliceDoc(t.from,t.to))),e.dataTransfer.effectAllowed="copyMove"),!1};Di.dragend=n=>(n.inputState.draggedContent=null,!1);function Jk(n,e,t,r){if(t=um(n.state,Ox,t),!t)return;let i=n.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=n.inputState,o=r&&s&&HD(n,e)?{from:s.from,to:s.to}:null,l={from:i,insert:t},c=n.state.changes(o?[o,l]:l);n.focus(),n.dispatch({changes:c,selection:{anchor:c.mapPos(i,-1),head:c.mapPos(i,1)},userEvent:o?"move.drop":"input.drop"}),n.inputState.draggedContent=null}Di.drop=(n,e)=>{if(!e.dataTransfer)return!1;if(n.state.readOnly)return!0;let t=e.dataTransfer.files;if(t&&t.length){let r=Array(t.length),i=0,s=()=>{++i==t.length&&Jk(n,e,r.filter(o=>o!=null).join(n.state.lineBreak),!1)};for(let o=0;o<t.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(r[o]=l.result),s()},l.readAsText(t[o])}return!0}else{let r=e.dataTransfer.getData("Text");if(r)return Jk(n,e,r,!0),!0}return!1};Di.paste=(n,e)=>{if(n.state.readOnly)return!0;n.observer.flush();let t=eC?null:e.clipboardData;return t?(tC(n,t.getData("text/plain")||t.getData("text/uri-list")),!0):(JD(n),!1)};function rL(n,e){let t=n.dom.parentNode;if(!t)return;let r=t.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=e,r.focus(),r.selectionEnd=e.length,r.selectionStart=0,setTimeout(()=>{r.remove(),n.focus()},50)}function iL(n){let e=[],t=[],r=!1;for(let i of n.selection.ranges)i.empty||(e.push(n.sliceDoc(i.from,i.to)),t.push(i));if(!e.length){let i=-1;for(let{from:s}of n.selection.ranges){let o=n.doc.lineAt(s);o.number>i&&(e.push(o.text),t.push({from:o.from,to:Math.min(n.doc.length,o.to+1)})),i=o.number}r=!0}return{text:um(n,yx,e.join(n.lineBreak)),ranges:t,linewise:r}}let ry=null;Di.copy=Di.cut=(n,e)=>{if(!Mh(n.contentDOM,n.observer.selectionRange))return!1;let{text:t,ranges:r,linewise:i}=iL(n.state);if(!t&&!i)return!1;ry=i?t:null,e.type=="cut"&&!n.state.readOnly&&n.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let s=eC?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",t),!0):(rL(n,t),!1)};const rC=Ml.define();function iC(n,e){let t=[];for(let r of n.facet(zQ)){let i=r(n,e);i&&t.push(i)}return t.length?n.update({effects:t,annotations:rC.of(!0)}):null}function sC(n){setTimeout(()=>{let e=n.hasFocus;if(e!=n.inputState.notifiedFocused){let t=iC(n.state,e);t?n.dispatch(t):n.update([])}},10)}Qr.focus=n=>{n.inputState.lastFocusTime=Date.now(),!n.scrollDOM.scrollTop&&(n.inputState.lastScrollTop||n.inputState.lastScrollLeft)&&(n.scrollDOM.scrollTop=n.inputState.lastScrollTop,n.scrollDOM.scrollLeft=n.inputState.lastScrollLeft),sC(n)};Qr.blur=n=>{n.observer.clearSelectionRange(),sC(n)};Qr.compositionstart=Qr.compositionupdate=n=>{n.observer.editContext||(n.inputState.compositionFirstChange==null&&(n.inputState.compositionFirstChange=!0),n.inputState.composing<0&&(n.inputState.composing=0))};Qr.compositionend=n=>{n.observer.editContext||(n.inputState.composing=-1,n.inputState.compositionEndedAt=Date.now(),n.inputState.compositionPendingKey=!0,n.inputState.compositionPendingChange=n.observer.pendingRecords().length>0,n.inputState.compositionFirstChange=null,Le.chrome&&Le.android?n.observer.flushSoon():n.inputState.compositionPendingChange?Promise.resolve().then(()=>n.observer.flush()):setTimeout(()=>{n.inputState.composing<0&&n.docView.hasComposition&&n.update([])},50))};Qr.contextmenu=n=>{n.inputState.lastContextMenu=Date.now()};Di.beforeinput=(n,e)=>{var t,r;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(n.inputState.insertingText=e.data,n.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&n.observer.editContext){let s=(t=e.dataTransfer)===null||t===void 0?void 0:t.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],c=n.posAtDOM(l.startContainer,l.startOffset),h=n.posAtDOM(l.endContainer,l.endOffset);return wx(n,{from:c,to:h,insert:n.state.toText(s)},null),!0}}let i;if(Le.chrome&&Le.android&&(i=KQ.find(s=>s.inputType==e.inputType))&&(n.observer.delayAndroidKey(i.key,i.keyCode),i.key=="Backspace"||i.key=="Delete")){let s=((r=window.visualViewport)===null||r===void 0?void 0:r.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&n.hasFocus&&(n.contentDOM.blur(),n.focus())},100)}return Le.ios&&e.inputType=="deleteContentForward"&&n.observer.flushSoon(),Le.safari&&e.inputType=="insertText"&&n.inputState.composing>=0&&setTimeout(()=>Qr.compositionend(n,e),20),!1};const eS=new Set;function sL(n){eS.has(n)||(eS.add(n),n.addEventListener("copy",()=>{}),n.addEventListener("cut",()=>{}))}const tS=["pre-wrap","normal","pre-line","break-spaces"];let Bu=!1;function nS(){Bu=!1}class oL{constructor(e){this.lineWrapping=e,this.doc=Et.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,t){let r=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(r+=Math.max(0,Math.ceil((t-e-r*this.lineLength*.5)/this.lineLength))),this.lineHeight*r}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return tS.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let r=0;r<e.length;r++){let i=e[r];i<0?r++:this.heightSamples[Math.floor(i*10)]||(t=!0,this.heightSamples[Math.floor(i*10)]=!0)}return t}refresh(e,t,r,i,s,o){let l=tS.indexOf(e)>-1,c=Math.abs(t-this.lineHeight)>.3||this.lineWrapping!=l||Math.abs(r-this.charWidth)>.1;if(this.lineWrapping=l,this.lineHeight=t,this.charWidth=r,this.textHeight=i,this.lineLength=s,c){this.heightSamples={};for(let h=0;h<o.length;h++){let f=o[h];f<0?h++:this.heightSamples[Math.floor(f*10)]=!0}}return c}}class aL{constructor(e,t){this.from=e,this.heights=t,this.index=0}get more(){return this.index<this.heights.length}}class _i{constructor(e,t,r,i,s){this.from=e,this.length=t,this.top=r,this.height=i,this._content=s}get type(){return typeof this._content=="number"?Pr.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof Sl?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let t=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new _i(this.from,this.length+e.length,this.top,this.height+e.height,t)}}var Ht=function(n){return n[n.ByPos=0]="ByPos",n[n.ByHeight=1]="ByHeight",n[n.ByPosNoHeight=2]="ByPosNoHeight",n}(Ht||(Ht={}));const lp=.001;class ur{constructor(e,t,r=2){this.length=e,this.height=t,this.flags=r}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>lp&&(Bu=!0),this.height=e)}replace(e,t,r){return ur.of(r)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,r,i){let s=this,o=r.doc;for(let l=i.length-1;l>=0;l--){let{fromA:c,toA:h,fromB:f,toB:p}=i[l],m=s.lineAt(c,Ht.ByPosNoHeight,r.setDoc(t),0,0),g=m.to>=h?m:s.lineAt(h,Ht.ByPosNoHeight,r,0,0);for(p+=g.to-h,h=g.to;l>0&&m.from<=i[l-1].toA;)c=i[l-1].fromA,f=i[l-1].fromB,l--,c<m.from&&(m=s.lineAt(c,Ht.ByPosNoHeight,r,0,0));f+=m.from-c,c=m.from;let k=kx.build(r.setDoc(o),e,f,p);s=Rp(s,s.replace(c,h,k))}return s.updateHeight(r,0)}static empty(){return new Ir(0,0,0)}static of(e){if(e.length==1)return e[0];let t=0,r=e.length,i=0,s=0;for(;;)if(t==r)if(i>s*2){let l=e[t-1];l.break?e.splice(--t,1,l.left,null,l.right):e.splice(--t,1,l.left,l.right),r+=1+l.break,i-=l.size}else if(s>i*2){let l=e[r];l.break?e.splice(r,1,l.left,null,l.right):e.splice(r,1,l.left,l.right),r+=2+l.break,s-=l.size}else break;else if(i<s){let l=e[t++];l&&(i+=l.size)}else{let l=e[--r];l&&(s+=l.size)}let o=0;return e[t-1]==null?(o=1,t--):e[t]==null&&(o=1,r++),new uL(ur.of(e.slice(0,t)),o,ur.of(e.slice(r)))}}function Rp(n,e){return n==e?n:(n.constructor!=e.constructor&&(Bu=!0),e)}ur.prototype.size=1;const lL=pt.replace({});class oC extends ur{constructor(e,t,r){super(e,t),this.deco=r,this.spaceAbove=0}mainBlock(e,t){return new _i(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.deco||0)}blockAt(e,t,r,i){return this.spaceAbove&&e<r+this.spaceAbove?new _i(i,0,r,this.spaceAbove,lL):this.mainBlock(r,i)}lineAt(e,t,r,i,s){let o=this.mainBlock(i,s);return this.spaceAbove?this.blockAt(0,r,i,s).join(o):o}forEachLine(e,t,r,i,s,o){e<=s+this.length&&t>=s&&o(this.lineAt(0,Ht.ByPos,r,i,s))}setMeasuredHeight(e){let t=e.heights[e.index++];t<0?(this.spaceAbove=-t,t=e.heights[e.index++]):this.spaceAbove=0,this.setHeight(t)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more&&this.setMeasuredHeight(i),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Ir extends oC{constructor(e,t,r){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0,this.spaceAbove=r}mainBlock(e,t){return new _i(t,this.length,e+this.spaceAbove,this.height-this.spaceAbove,this.breaks)}replace(e,t,r){let i=r[0];return r.length==1&&(i instanceof Ir||i instanceof zn&&i.flags&4)&&Math.abs(this.length-i.length)<10?(i instanceof zn?i=new Ir(i.length,this.height,this.spaceAbove):i.height=this.height,this.outdated||(i.outdated=!1),i):ur.of(r)}updateHeight(e,t=0,r=!1,i){return i&&i.from<=t&&i.more?this.setMeasuredHeight(i):(r||this.outdated)&&(this.spaceAbove=0,this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight)),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class zn extends ur{constructor(e){super(e,0)}heightMetrics(e,t){let r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,s=i-r+1,o,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);o=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else o=this.height/s;return{firstLine:r,lastLine:i,perLine:o,perChar:l}}blockAt(e,t,r,i){let{firstLine:s,lastLine:o,perLine:l,perChar:c}=this.heightMetrics(t,i);if(t.lineWrapping){let h=i+(e<t.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-r)/this.height))*this.length)),f=t.doc.lineAt(h),p=l+f.length*c,m=Math.max(r,e-p/2);return new _i(f.from,f.length,m,p,0)}else{let h=Math.max(0,Math.min(o-s,Math.floor((e-r)/l))),{from:f,length:p}=t.doc.line(s+h);return new _i(f,p,r+l*h,l,0)}}lineAt(e,t,r,i,s){if(t==Ht.ByHeight)return this.blockAt(e,r,i,s);if(t==Ht.ByPosNoHeight){let{from:g,to:k}=r.doc.lineAt(e);return new _i(g,k-g,0,0,0)}let{firstLine:o,perLine:l,perChar:c}=this.heightMetrics(r,s),h=r.doc.lineAt(e),f=l+h.length*c,p=h.number-o,m=i+l*p+c*(h.from-s-p);return new _i(h.from,h.length,Math.max(i,Math.min(m,i+this.height-f)),f,0)}forEachLine(e,t,r,i,s,o){e=Math.max(e,s),t=Math.min(t,s+this.length);let{firstLine:l,perLine:c,perChar:h}=this.heightMetrics(r,s);for(let f=e,p=i;f<=t;){let m=r.doc.lineAt(f);if(f==e){let k=m.number-l;p+=c*k+h*(e-s-k)}let g=c+h*m.length;o(new _i(m.from,m.length,p,g,0)),p+=g,f=m.to+1}}replace(e,t,r){let i=this.length-t;if(i>0){let s=r[r.length-1];s instanceof zn?r[r.length-1]=new zn(s.length+i):r.push(null,new zn(i-1))}if(e>0){let s=r[0];s instanceof zn?r[0]=new zn(e+s.length):r.unshift(new zn(e-1),null)}return ur.of(r)}decomposeLeft(e,t){t.push(new zn(e-1),null)}decomposeRight(e,t){t.push(null,new zn(this.length-e-1))}updateHeight(e,t=0,r=!1,i){let s=t+this.length;if(i&&i.from<=t+this.length&&i.more){let o=[],l=Math.max(t,i.from),c=-1;for(i.from>t&&o.push(new zn(i.from-t-1).updateHeight(e,t));l<=s&&i.more;){let f=e.doc.lineAt(l).length;o.length&&o.push(null);let p=i.heights[i.index++],m=0;p<0&&(m=-p,p=i.heights[i.index++]),c==-1?c=p:Math.abs(p-c)>=lp&&(c=-2);let g=new Ir(f,p,m);g.outdated=!1,o.push(g),l+=f+1}l<=s&&o.push(null,new zn(s-l).updateHeight(e,l));let h=ur.of(o);return(c<0||Math.abs(h.height-this.height)>=lp||Math.abs(c-this.heightMetrics(e,t).perLine)>=lp)&&(Bu=!0),Rp(this,h)}else(r||this.outdated)&&(this.setHeight(e.heightForGap(t,t+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class uL extends ur{constructor(e,t,r){super(e.length+t+r.length,e.height+r.height,t|(e.outdated||r.outdated?2:0)),this.left=e,this.right=r,this.size=e.size+r.size}get break(){return this.flags&1}blockAt(e,t,r,i){let s=r+this.left.height;return e<s?this.left.blockAt(e,t,r,i):this.right.blockAt(e,t,s,i+this.left.length+this.break)}lineAt(e,t,r,i,s){let o=i+this.left.height,l=s+this.left.length+this.break,c=t==Ht.ByHeight?e<o:e<l,h=c?this.left.lineAt(e,t,r,i,s):this.right.lineAt(e,t,r,o,l);if(this.break||(c?h.to<l:h.from>l))return h;let f=t==Ht.ByPosNoHeight?Ht.ByPosNoHeight:Ht.ByPos;return c?h.join(this.right.lineAt(l,f,r,o,l)):this.left.lineAt(l,f,r,i,s).join(h)}forEachLine(e,t,r,i,s,o){let l=i+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,t,r,i,s,o),t>=c&&this.right.forEachLine(e,t,r,l,c,o);else{let h=this.lineAt(c,Ht.ByPos,r,i,s);e<h.from&&this.left.forEachLine(e,h.from-1,r,i,s,o),h.to>=e&&h.from<=t&&o(h),t>h.to&&this.right.forEachLine(h.to+1,t,r,l,c,o)}}replace(e,t,r){let i=this.left.length+this.break;if(t<i)return this.balanced(this.left.replace(e,t,r),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-i,t-i,r));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of r)s.push(l);if(e>0&&rS(s,o-1),t<this.length){let l=s.length;this.decomposeRight(t,s),rS(s,l)}return ur.of(s)}decomposeLeft(e,t){let r=this.left.length;if(e<=r)return this.left.decomposeLeft(e,t);t.push(this.left),this.break&&(r++,e>=r&&t.push(null)),e>r&&this.right.decomposeLeft(e-r,t)}decomposeRight(e,t){let r=this.left.length,i=r+this.break;if(e>=i)return this.right.decomposeRight(e-i,t);e<r&&this.left.decomposeRight(e,t),this.break&&e<i&&t.push(null),t.push(this.right)}balanced(e,t){return e.size>2*t.size||t.size>2*e.size?ur.of(this.break?[e,null,t]:[e,t]):(this.left=Rp(this.left,e),this.right=Rp(this.right,t),this.setHeight(e.height+t.height),this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,r=!1,i){let{left:s,right:o}=this,l=t+s.length+this.break,c=null;return i&&i.from<=t+s.length&&i.more?c=s=s.updateHeight(e,t,r,i):s.updateHeight(e,t,r),i&&i.from<=l+o.length&&i.more?c=o=o.updateHeight(e,l,r,i):o.updateHeight(e,l,r),c?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function rS(n,e){let t,r;n[e]==null&&(t=n[e-1])instanceof zn&&(r=n[e+1])instanceof zn&&n.splice(e-1,3,new zn(t.length+1+r.length))}const cL=5;class kx{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let r=Math.min(t,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Ir?i.length+=r-this.pos:(r>this.pos||!this.isCovered)&&this.nodes.push(new Ir(r-this.pos,-1,0)),this.writtenTo=r,t>r&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,r){if(e<t||r.heightRelevant){let i=r.widget?r.widget.estimatedHeight:0,s=r.widget?r.widget.lineBreaks:0;i<0&&(i=this.oracle.lineHeight);let o=t-e;r.block?this.addBlock(new oC(o,i,r)):(o||s||i>=cL)&&this.addLineDeco(i,s,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new Ir(this.pos-e,-1,0)),this.writtenTo=this.pos}blankContent(e,t){let r=new zn(t-e);return this.oracle.doc.lineAt(e).to==t&&(r.flags|=4),r}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Ir)return e;let t=new Ir(0,-1,0);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,r){let i=this.ensureLine();i.length+=r,i.collapsed+=r,i.widgetHeight=Math.max(i.widgetHeight,e),i.breaks+=t,this.writtenTo=this.pos=this.pos+r}finish(e){let t=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(t instanceof Ir)&&!this.isCovered?this.nodes.push(new Ir(0,-1,0)):(this.writtenTo<this.pos||t==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let r=e;for(let i of this.nodes)i instanceof Ir&&i.updateHeight(this.oracle,r),r+=i?i.length:1;return this.nodes}static build(e,t,r,i){let s=new kx(r,e);return Pt.spans(t,r,i,s,0),s.finish(r)}}function hL(n,e,t){let r=new fL;return Pt.compare(n,e,t,r,0),r.changes}class fL{constructor(){this.changes=[]}compareRange(){}comparePoint(e,t,r,i){(e<t||r&&r.heightRelevant||i&&i.heightRelevant)&&Pu(e,t,this.changes,5)}}function dL(n,e){let t=n.getBoundingClientRect(),r=n.ownerDocument,i=r.defaultView||window,s=Math.max(0,t.left),o=Math.min(i.innerWidth,t.right),l=Math.max(0,t.top),c=Math.min(i.innerHeight,t.bottom);for(let h=n.parentNode;h&&h!=r.body;)if(h.nodeType==1){let f=h,p=window.getComputedStyle(f);if((f.scrollHeight>f.clientHeight||f.scrollWidth>f.clientWidth)&&p.overflow!="visible"){let m=f.getBoundingClientRect();s=Math.max(s,m.left),o=Math.min(o,m.right),l=Math.max(l,m.top),c=Math.min(h==n.parentNode?i.innerHeight:c,m.bottom)}h=p.position=="absolute"||p.position=="fixed"?f.offsetParent:f.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-t.left,right:Math.max(s,o)-t.left,top:l-(t.top+e),bottom:Math.max(l,c)-(t.top+e)}}function pL(n){let e=n.getBoundingClientRect(),t=n.ownerDocument.defaultView||window;return e.left<t.innerWidth&&e.right>0&&e.top<t.innerHeight&&e.bottom>0}function mL(n,e){let t=n.getBoundingClientRect();return{left:0,right:t.right-t.left,top:e,bottom:t.bottom-(t.top+e)}}class MO{constructor(e,t,r,i){this.from=e,this.to=t,this.size=r,this.displaySize=i}static same(e,t){if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++){let i=e[r],s=t[r];if(i.from!=s.from||i.to!=s.to||i.size!=s.size)return!1}return!0}draw(e,t){return pt.replace({widget:new gL(this.displaySize*(t?e.scaleY:e.scaleX),t)}).range(this.from,this.to)}}class gL extends jl{constructor(e,t){super(),this.size=e,this.vertical=t}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class iS{constructor(e,t){this.view=e,this.state=t,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scaleX=1,this.scaleY=1,this.scrollOffset=0,this.scrolledToBottom=!1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=sS,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=xn.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let r=t.facet(xx).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new oL(r),this.stateDeco=oS(t),this.heightMap=ur.empty().applyChanges(this.stateDeco,Et.empty,this.heightOracle.setDoc(t.doc),[new hi(0,0,0,t.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=pt.set(this.lineGaps.map(i=>i.draw(this,!1))),this.scrollParent=e.scrollDOM,this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let r=0;r<=1;r++){let i=r?t.head:t.anchor;if(!e.some(({from:s,to:o})=>i>=s&&i<=o)){let{from:s,to:o}=this.lineBlockAt(i);e.push(new Fd(s,o))}}return this.viewports=e.sort((r,i)=>r.from-i.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?sS:new Sx(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(bh(e,this.scaler))})}update(e,t=null){this.state=e.state;let r=this.stateDeco;this.stateDeco=oS(this.state);let i=e.changedRanges,s=hi.extendWithRanges(i,hL(r,this.stateDeco,e?e.changes:Rn.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollOffset);nS(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Bu)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.head<c.from||t.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,t));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&(e.selectionSet||e.focusChanged)&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(aD)&&(this.mustEnforceCursorAssoc=!0)}measure(){let{view:e}=this,t=e.contentDOM,r=window.getComputedStyle(t),i=this.heightOracle,s=r.whiteSpace;this.defaultTextDirection=r.direction=="rtl"?xn.RTL:xn.LTR;let o=this.heightOracle.mustRefreshForWrapping(s)||this.mustMeasureContent==="refresh",l=t.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,f=0;if(l.width&&l.height){let{scaleX:Y,scaleY:_}=wQ(t,l);(Y>.005&&Math.abs(this.scaleX-Y)>.005||_>.005&&Math.abs(this.scaleY-_)>.005)&&(this.scaleX=Y,this.scaleY=_,h|=16,o=c=!0)}let p=(parseInt(r.paddingTop)||0)*this.scaleY,m=(parseInt(r.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=m)&&(this.paddingTop=p,this.paddingBottom=m,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(i.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let g=kQ(this.view.contentDOM,!1).y;g!=this.scrollParent&&(this.scrollParent=g,this.scrollAnchorHeight=-1,this.scrollOffset=0);let k=this.getScrollOffset();this.scrollOffset!=k&&(this.scrollAnchorHeight=-1,this.scrollOffset=k),this.scrolledToBottom=bQ(this.scrollParent||e.win);let w=(this.printing?mL:dL)(t,this.paddingTop),C=w.top-this.pixelViewport.top,Q=w.bottom-this.pixelViewport.bottom;this.pixelViewport=w;let $=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if($!=this.inView&&(this.inView=$,$&&(c=!0)),!this.inView&&!this.scrollTarget&&!pL(e.dom))return 0;let E=l.width;if((this.contentDOMWidth!=E||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let Y=e.docView.measureVisibleLineHeights(this.viewport);if(i.mustRefreshForHeights(Y)&&(o=!0),o||i.lineWrapping&&Math.abs(E-this.contentDOMWidth)>i.charWidth){let{lineHeight:_,charWidth:R,textHeight:q}=e.docView.measureTextSize();o=_>0&&i.refresh(s,_,R,q,Math.max(5,E/R),Y),o&&(e.docView.minWidth=0,h|=16)}C>0&&Q>0?f=Math.max(C,Q):C<0&&Q<0&&(f=Math.min(C,Q)),nS();for(let _ of this.viewports){let R=_.from==this.viewport.from?Y:e.docView.measureVisibleLineHeights(_);this.heightMap=(o?ur.empty().applyChanges(this.stateDeco,Et.empty,this.heightOracle,[new hi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(i,0,o,new aL(_.from,R))}Bu&&(h|=2)}let Z=!this.viewportIsAppropriate(this.viewport,f)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return Z&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(f,this.scrollTarget),h|=this.updateForViewport()),(h&2||Z)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let r=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),i=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,c=new Fd(i.lineAt(o-r*1e3,Ht.ByHeight,s,0,0).from,i.lineAt(l+(1-r)*1e3,Ht.ByHeight,s,0,0).to);if(t){let{head:h}=t.range;if(h<c.from||h>c.to){let f=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=i.lineAt(h,Ht.ByPos,s,0,0),m;t.y=="center"?m=(p.top+p.bottom)/2-f/2:t.y=="start"||t.y=="nearest"&&h<c.from?m=p.top:m=p.bottom-f,c=new Fd(i.lineAt(m-1e3/2,Ht.ByHeight,s,0,0).from,i.lineAt(m+f+1e3/2,Ht.ByHeight,s,0,0).to)}}return c}mapViewport(e,t){let r=t.mapPos(e.from,-1),i=t.mapPos(e.to,1);return new Fd(this.heightMap.lineAt(r,Ht.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(i,Ht.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:t},r=0){if(!this.inView)return!0;let{top:i}=this.heightMap.lineAt(e,Ht.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(t,Ht.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||i<=o-Math.max(10,Math.min(-r,250)))&&(t==this.state.doc.length||s>=l+Math.max(10,Math.min(r,250)))&&i>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,t){if(!e.length||t.empty)return e;let r=[];for(let i of e)t.touchesRange(i.from,i.to)||r.push(new MO(t.mapPos(i.from),t.mapPos(i.to),i.size,i.displaySize));return r}ensureLineGaps(e,t){let r=this.heightOracle.lineWrapping,i=r?1e4:2e3,s=i>>1,o=i<<1;if(this.defaultTextDirection!=xn.LTR&&!r)return[];let l=[],c=(f,p,m,g)=>{if(p-f<s)return;let k=this.state.selection.main,w=[k.from];k.empty||w.push(k.to);for(let Q of w)if(Q>f&&Q<p){c(f,Q-10,m,g),c(Q+10,p,m,g);return}let C=yL(e,Q=>Q.from>=m.from&&Q.to<=m.to&&Math.abs(Q.from-f)<s&&Math.abs(Q.to-p)<s&&!w.some($=>Q.from<$&&Q.to>$));if(!C){if(p<m.to&&t&&r&&t.visibleRanges.some(E=>E.from<=p&&E.to>=p)){let E=t.moveToLineBoundary(me.cursor(p),!1,!0).head;E>f&&(p=E)}let Q=this.gapSize(m,f,p,g),$=r||Q<2e6?Q:2e6;C=new MO(f,p,Q,$)}l.push(C)},h=f=>{if(f.length<o||f.type!=Pr.Text)return;let p=OL(f.from,f.to,this.stateDeco);if(p.total<o)return;let m=this.scrollTarget?this.scrollTarget.range.head:null,g,k;if(r){let w=i/this.heightOracle.lineLength*this.heightOracle.lineHeight,C,Q;if(m!=null){let $=Yd(p,m),E=((this.visibleBottom-this.visibleTop)/2+w)/f.height;C=$-E,Q=$+E}else C=(this.visibleTop-f.top-w)/f.height,Q=(this.visibleBottom-f.top+w)/f.height;g=Bd(p,C),k=Bd(p,Q)}else{let w=p.total*this.heightOracle.charWidth,C=i*this.heightOracle.charWidth,Q=0;if(w>2e6)for(let _ of e)_.from>=f.from&&_.from<f.to&&_.size!=_.displaySize&&_.from*this.heightOracle.charWidth+Q<this.pixelViewport.left&&(Q=_.size-_.displaySize);let $=this.pixelViewport.left+Q,E=this.pixelViewport.right+Q,Z,Y;if(m!=null){let _=Yd(p,m),R=((E-$)/2+C)/w;Z=_-R,Y=_+R}else Z=($-C)/w,Y=(E+C)/w;g=Bd(p,Z),k=Bd(p,Y)}g>f.from&&c(f.from,g,f,p),k<f.to&&c(k,f.to,f,p)};for(let f of this.viewportLines)Array.isArray(f.type)?f.type.forEach(h):h(f);return l}gapSize(e,t,r,i){let s=Yd(i,r)-Yd(i,t);return this.heightOracle.lineWrapping?e.height*s:i.total*this.heightOracle.charWidth*s}updateLineGaps(e){MO.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=pt.set(e.map(t=>t.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let r=[];Pt.spans(t,this.viewport.from,this.viewport.to,{span(s,o){r.push({from:s,to:o})},point(){}},20);let i=0;if(r.length!=this.visibleRanges.length)i=12;else for(let s=0;s<r.length&&!(i&8);s++){let o=this.visibleRanges[s],l=r[s];(o.from!=l.from||o.to!=l.to)&&(i|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(i|=8))}return this.visibleRanges=r,i}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||bh(this.heightMap.lineAt(e,Ht.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(t=>t.top<=e&&t.bottom>=e)||bh(this.heightMap.lineAt(this.scaler.fromDOM(e),Ht.ByHeight,this.heightOracle,0,0),this.scaler)}getScrollOffset(){return(this.scrollParent==this.view.scrollDOM?this.scrollParent.scrollTop:(this.scrollParent?this.scrollParent.getBoundingClientRect().top:0)-this.view.contentDOM.getBoundingClientRect().top)*this.scaleY}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return bh(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fd{constructor(e,t){this.from=e,this.to=t}}function OL(n,e,t){let r=[],i=n,s=0;return Pt.spans(t,n,e,{span(){},point(o,l){o>i&&(r.push({from:i,to:o}),s+=o-i),i=l}},20),i<e&&(r.push({from:i,to:e}),s+=e-i),{total:s,ranges:r}}function Bd({total:n,ranges:e},t){if(t<=0)return e[0].from;if(t>=1)return e[e.length-1].to;let r=Math.floor(n*t);for(let i=0;;i++){let{from:s,to:o}=e[i],l=o-s;if(r<=l)return s+r;r-=l}}function Yd(n,e){let t=0;for(let{from:r,to:i}of n.ranges){if(e<=i){t+=e-r;break}t+=i-r}return t/n.total}function yL(n,e){for(let t of n)if(e(t))return t}const sS={toDOM(n){return n},fromDOM(n){return n},scale:1,eq(n){return n==this}};function oS(n){let e=n.facet(om).filter(r=>typeof r!="function"),t=n.facet(vx).filter(r=>typeof r!="function");return t.length&&e.push(Pt.join(t)),e}class Sx{constructor(e,t,r){let i=0,s=0,o=0;this.viewports=r.map(({from:l,to:c})=>{let h=t.lineAt(l,Ht.ByPos,e,0,0).top,f=t.lineAt(c,Ht.ByPos,e,0,0).bottom;return i+=f-h,{from:l,to:c,top:h,bottom:f,domTop:0,domBottom:0}}),this.scale=(7e6-i)/(t.height-i);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.top)return i+(e-r)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);r=s.bottom,i=s.domBottom}}fromDOM(e){for(let t=0,r=0,i=0;;t++){let s=t<this.viewports.length?this.viewports[t]:null;if(!s||e<s.domTop)return r+(e-i)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);r=s.bottom,i=s.domBottom}}eq(e){return e instanceof Sx?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((t,r)=>t.from==e.viewports[r].from&&t.to==e.viewports[r].to):!1}}function bh(n,e){if(e.scale==1)return n;let t=e.toDOM(n.top),r=e.toDOM(n.bottom);return new _i(n.from,n.length,t,r-t,Array.isArray(n._content)?n._content.map(i=>bh(i,e)):n._content)}const Ud=Ye.define({combine:n=>n.join(" ")}),iy=Ye.define({combine:n=>n.indexOf(!0)>-1}),sy=ha.newName(),aC=ha.newName(),lC=ha.newName(),uC={"&light":"."+aC,"&dark":"."+lC};function oy(n,e,t){return new ha(e,{finish(r){return/&/.test(r)?r.replace(/&\w*/,i=>{if(i=="&")return n;if(!t||!t[i])throw new RangeError(`Unsupported selector: ${i}`);return t[i]}):n+" "+r}})}const xL=oy("."+sy,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-selectionHandle":{backgroundColor:"currentColor",width:"1.5px"},".cm-selectionHandle-start::before, .cm-selectionHandle-end::before":{content:'""',backgroundColor:"inherit",borderRadius:"50%",width:"8px",height:"8px",position:"absolute",left:"-3.25px"},".cm-selectionHandle-start::before":{top:"-8px"},".cm-selectionHandle-end::before":{bottom:"-8px"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},uC),vL={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},jO=Le.ie&&Le.ie_version<=11;class wL{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new qz,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let r of t)this.queue.push(r);(Le.ie&&Le.ie_version<=11||Le.ios&&e.composing)&&t.some(r=>r.type=="childList"&&r.removedNodes.length||r.type=="characterData"&&r.oldValue.length>r.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Le.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Le.chrome&&Le.chrome_version<126)&&(this.editContext=new SL(e),e.state.facet(Us)&&(e.contentDOM.editContext=this.editContext.editContext)),jO&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var t;((t=this.view.docView)===null||t===void 0?void 0:t.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(t=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,r)=>t!=e[r]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:r}=this,i=this.selectionRange;if(r.state.facet(Us)?r.root.activeElement!=this.dom:!Mh(this.dom,i))return;let s=i.anchorNode&&r.docView.tile.nearest(i.anchorNode);if(s&&s.isWidget()&&s.widget.ignoreEvent(e)){t||(this.selectionChanged=!1);return}(Le.ie&&Le.ie_version<=11||Le.android&&Le.chrome)&&!r.state.selection.main.empty&&i.focusNode&&jh(i.focusNode,i.focusOffset,i.anchorNode,i.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=Yh(e.root);if(!t)return!1;let r=Le.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&kL(this.view,t)||t;if(!r||this.selectionRange.eq(r))return!1;let i=Mh(this.dom,r);return i&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&Gz(this.dom,r)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(r),i&&(this.selectionChanged=!0),!0)}setSelectionRange(e,t){this.selectionRange.set(e.node,e.offset,t.node,t.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,t=null;for(let r=this.dom;r;)if(r.nodeType==1)!t&&e<this.scrollTargets.length&&this.scrollTargets[e]==r?e++:t||(t=this.scrollTargets.slice(0,e)),t&&t.push(r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;if(e<this.scrollTargets.length&&!t&&(t=this.scrollTargets.slice(0,e)),t){for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);for(let r of this.scrollTargets=t)r.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,vL),jO&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),jO&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,t){var r;if(!this.delayedAndroidKey){let i=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&Qu(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(i)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange<Date.now()-50||!!(!((r=this.delayedAndroidKey)===null||r===void 0)&&r.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,r=-1,i=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(i=!0),t==-1?{from:t,to:r}=o:(t=Math.min(o.from,t),r=Math.max(o.to,r)))}return{from:t,to:r,typeOver:i}}readChange(){let{from:e,to:t,typeOver:r}=this.processRecords(),i=this.selectionChanged&&Mh(this.dom,this.selectionRange);if(e<0&&!i)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new ID(this.view,e,t,r);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let r=this.view.state,i=HQ(this.view,t);return this.view.state==r&&(t.domChanged||t.newSel&&!jp(this.view.state.selection,t.newSel.main))&&this.view.update([]),i}readMutation(e){let t=this.view.docView.tile.nearest(e.target);if(!t||t.isWidget())return null;if(t.markDirty(e.type=="attributes"),e.type=="childList"){let r=aS(t,e.previousSibling||e.target.previousSibling,-1),i=aS(t,e.nextSibling||e.target.nextSibling,1);return{from:r?t.posAfter(r):t.posAtStart,to:i?t.posBefore(i):t.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(Us)!=e.state.facet(Us)&&(e.view.contentDOM.editContext=e.state.facet(Us)?this.editContext.editContext:null))}destroy(){var e,t,r;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(t=this.gapIntersection)===null||t===void 0||t.disconnect(),(r=this.resizeScroll)===null||r===void 0||r.disconnect();for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function aS(n,e,t){for(;e;){let r=gn.get(e);if(r&&r.parent==n)return r;let i=e.parentNode;e=i!=n.dom?i:t>0?e.nextSibling:e.previousSibling}return null}function lS(n,e){let t=e.startContainer,r=e.startOffset,i=e.endContainer,s=e.endOffset,o=n.docView.domAtPos(n.state.selection.main.anchor,1);return jh(o.node,o.offset,i,s)&&([t,r,i,s]=[i,s,t,r]),{anchorNode:t,anchorOffset:r,focusNode:i,focusOffset:s}}function kL(n,e){if(e.getComposedRanges){let i=e.getComposedRanges(n.root)[0];if(i)return lS(n,i)}let t=null;function r(i){i.preventDefault(),i.stopImmediatePropagation(),t=i.getTargetRanges()[0]}return n.contentDOM.addEventListener("beforeinput",r,!0),n.dom.ownerDocument.execCommand("indent"),n.contentDOM.removeEventListener("beforeinput",r,!0),t?lS(n,t):null}class SL{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let t=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=r=>{let i=e.state.selection.main,{anchor:s,head:o}=i,l=this.toEditorPos(r.updateRangeStart),c=this.toEditorPos(r.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:r.updateRangeStart,editorBase:l,drifted:!1});let h=c-l>r.text.length;l==this.from&&s<this.from?l=s:c==this.to&&s>this.to&&(c=s);let f=GQ(e.state.sliceDoc(l,c),r.text,(h?i.from:i.to)-l,h?"end":null);if(!f){let m=me.single(this.toEditorPos(r.selectionStart),this.toEditorPos(r.selectionEnd));jp(m,i)||e.dispatch({selection:m,userEvent:"select"});return}let p={from:f.from+l,to:f.toA+l,insert:Et.of(r.text.slice(f.from,f.toB).split(`
325
+ `))};if((Le.mac||Le.android)&&p.from==o-1&&/^\. ?$/.test(r.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:l,to:c,insert:Et.of([r.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let m=this.to-this.from+(p.to-p.from+p.insert.length);wx(e,p,me.single(this.toEditorPos(r.selectionStart,m),this.toEditorPos(r.selectionEnd,m)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(t.text.slice(Math.max(0,r.updateRangeStart-1),Math.min(t.text.length,r.updateRangeStart+1)))&&this.handlers.compositionend(r)},this.handlers.characterboundsupdate=r=>{let i=[],s=null;for(let o=this.toEditorPos(r.rangeStart),l=this.toEditorPos(r.rangeEnd);o<l;o++){let c=e.coordsForChar(o);s=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||s||new DOMRect,i.push(s)}t.updateCharacterBounds(r.rangeStart,i)},this.handlers.textformatupdate=r=>{let i=[];for(let s of r.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let c=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(c<h){let f=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;i.push(pt.mark({attributes:{style:f}}).range(c,h))}}}e.dispatch({effects:IQ.of(pt.set(i))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:r}=this.composing;this.composing=null,r&&this.reset(e.state)}};for(let r in this.handlers)t.addEventListener(r,this.handlers[r]);this.measureReq={read:r=>{this.editContext.updateControlBounds(r.contentDOM.getBoundingClientRect());let i=Yh(r.root);i&&i.rangeCount&&this.editContext.updateSelectionBounds(i.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let t=0,r=!1,i=this.pendingContextChange;return e.changes.iterChanges((s,o,l,c,h)=>{if(r)return;let f=h.length-(o-s);if(i&&o>=i.to)if(i.from==s&&i.to==o&&i.insert.eq(h)){i=this.pendingContextChange=null,t+=f,this.to+=f;return}else i=null,this.revertPending(e.state);if(s+=t,o+=t,o<=this.from)this.from+=f,this.to+=f;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+h.length>3e4){r=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),h.toString()),this.to+=f}t+=f}),i&&!r&&this.revertPending(e.state),!r}update(e){let t=this.pendingContextChange,r=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(r.from,r.to)&&e.transactions.some(i=>!i.isUserEvent("input.type")&&i.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||t)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:t}=e.selection.main;this.from=Math.max(0,t-1e4),this.to=Math.min(e.doc.length,t+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let t=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(t.from),this.toContextPos(t.from+t.insert.length),e.doc.sliceString(t.from,t.to))}setSelection(e){let{main:t}=e.selection,r=this.toContextPos(Math.max(this.from,Math.min(this.to,t.anchor))),i=this.toContextPos(t.head);(this.editContext.selectionStart!=r||this.editContext.selectionEnd!=i)&&this.editContext.updateSelection(r,i)}rangeIsValid(e){let{head:t}=e.selection.main;return!(this.from>0&&t-this.from<500||this.to<e.doc.length&&this.to-t<500||this.to-this.from>1e4*3)}toEditorPos(e,t=this.to-this.from){e=Math.min(e,t);let r=this.composing;return r&&r.drifted?r.editorBase+(e-r.contextBase):e+this.from}toContextPos(e){let t=this.composing;return t&&t.drifted?t.contextBase+(e-t.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class Ue{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var t;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:r}=e;this.dispatchTransactions=e.dispatchTransactions||r&&(i=>i.forEach(s=>r(s,this)))||(i=>this.update(i)),this.dispatch=this.dispatch.bind(this),this._root=e.root||Hz(e.parent)||document,this.viewState=new iS(this,e.state||At.create(e)),e.scrollTo&&e.scrollTo.is(Xd)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(xu).map(i=>new QO(i));for(let i of this.plugins)i.update(this);this.observer=new wL(this),this.inputState=new WD(this),this.inputState.ensureHandlers(this.plugins),this.docView=new Fk(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((t=document.fonts)===null||t===void 0)&&t.ready&&document.fonts.ready.then(()=>{this.viewState.mustMeasureContent="refresh",this.requestMeasure()})}dispatch(...e){let t=e.length==1&&e[0]instanceof Ln?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t=!1,r=!1,i,s=this.state;for(let m of e){if(m.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=m.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,c=null;e.some(m=>m.annotation(rC))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=iC(s,o),c||(l=1));let h=this.observer.delayedAndroidKey,f=null;if(h?(this.observer.clearDelayedAndroidKey(),f=this.observer.readChange(),(f&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(f=null)):this.observer.clear(),s.facet(At.phrases)!=this.state.facet(At.phrases))return this.setState(s);i=$p.create(this,s,e),i.flags|=l;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let m of e){if(p&&(p=p.map(m.changes)),m.scrollIntoView){let{main:g}=m.state.selection;p=new Cu(g.empty?g:me.cursor(g.head,g.head>g.anchor?-1:1))}for(let g of m.effects)g.is(Xd)&&(p=g.value.clip(this.state))}this.viewState.update(i,p),this.bidiCache=Np.update(this.bidiCache,i.changes),i.empty||(this.updatePlugins(i),this.inputState.update(i)),t=this.docView.update(i),this.state.facet(Sh)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(t,e.some(m=>m.isUserEvent("select.pointer")))}finally{this.updateState=0}if(i.startState.facet(Ud)!=i.state.facet(Ud)&&(this.viewState.mustMeasureContent=!0),(t||r||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),t&&this.docViewUpdate(),!i.empty)for(let m of this.state.facet(ey))try{m(i)}catch(g){gs(this.state,g,"update listener")}(c||f)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),f&&!HQ(this,f)&&h.force&&Qu(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let t=this.hasFocus;try{for(let r of this.plugins)r.destroy(this);this.viewState=new iS(this,e),this.plugins=e.facet(xu).map(r=>new QO(r)),this.pluginMap.clear();for(let r of this.plugins)r.update(this);this.docView.destroy(),this.docView=new Fk(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(xu),r=e.state.facet(xu);if(t!=r){let i=[];for(let s of r){let o=t.indexOf(s);if(o<0)i.push(new QO(s));else{let l=this.plugins[o];l.mustUpdate=e,i.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=i,this.pluginMap.clear()}else for(let i of this.plugins)i.mustUpdate=e;for(let i=0;i<this.plugins.length;i++)this.plugins[i].update(this);t!=r&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let t=e.value;if(t&&t.docViewUpdate)try{t.docViewUpdate(this)}catch(r){gs(this.state,r,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,r=this.viewState.scrollParent,i=this.viewState.getScrollOffset(),{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(i-this.viewState.scrollOffset)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(bQ(r||this.win))s=-1,o=this.viewState.heightMap.height;else{let g=this.viewState.scrollAnchorAt(i);s=g.from,o=g.top}this.updateState=1;let c=this.viewState.measure();if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let f=h.map(g=>{try{return g.read(this)}catch(k){return gs(this.state,k),uS}}),p=$p.create(this,this.state,[]),m=!1;p.flags|=c,t?t.flags|=c:t=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),m=this.docView.update(p),m&&this.docViewUpdate());for(let g=0;g<h.length;g++)if(f[g]!=uS)try{let k=h[g];k.write&&k.write(f[g],this)}catch(k){gs(this.state,k)}if(m&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let k=((s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o)/this.scaleY;if((k>1||k<-1)&&(r==this.scrollDOM||this.hasFocus||Math.max(this.inputState.lastWheelEvent,this.inputState.lastTouchTime)>Date.now()-100)){i=i+k,r?r.scrollTop+=k:this.win.scrollBy(0,k),o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let l of this.state.facet(ey))l(t)}get themeClasses(){return sy+" "+(this.state.facet(iy)?lC:aC)+" "+this.state.facet(Ud)}updateAttrs(){let e=cS(this,ZQ,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(Us)?"true":"false",class:"cm-content",style:`${Le.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),cS(this,xx,t);let r=this.observer.ignore(()=>{let i=Lk(this.contentDOM,this.contentAttrs,t),s=Lk(this.dom,this.editorAttrs,e);return i||s});return this.editorAttrs=e,this.contentAttrs=t,r}showAnnouncements(e){let t=!0;for(let r of e)for(let i of r.effects)if(i.is(Ue.announce)){t&&(this.announceDOM.textContent=""),t=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=i.value}}mountStyles(){this.styleModules=this.state.facet(Sh);let e=this.state.facet(Ue.cspNonce);ha.mount(this.root,this.styleModules.concat(xL).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let t=0;t<this.measureRequests.length;t++)if(this.measureRequests[t].key===e.key){this.measureRequests[t]=e;return}}this.measureRequests.push(e)}}plugin(e){let t=this.pluginMap.get(e);return(t===void 0||t&&t.plugin!=e)&&this.pluginMap.set(e,t=this.plugins.find(r=>r.plugin==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,r){return EO(this,e,Bk(this,e,t,r))}moveByGroup(e,t){return EO(this,e,Bk(this,e,t,r=>ND(this,e.head,r)))}visualLineSide(e,t){let r=this.bidiSpans(e),i=this.textDirectionAt(e.from),s=r[t?r.length-1:0];return me.cursor(s.side(t,i)+e.from,s.forward(!t,i)?1:-1)}moveToLineBoundary(e,t,r=!0){return RD(this,e,t,r)}moveVertically(e,t,r){return EO(this,e,AD(this,e,t,r))}domAtPos(e,t=1){return this.docView.domAtPos(e,t)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){this.readMeasured();let r=ny(this,e,t);return r&&r.pos}posAndSideAtCoords(e,t=!0){return this.readMeasured(),ny(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let r=this.docView.coordsAt(e,t);if(!r||r.left==r.right)return r;let i=this.state.doc.lineAt(e),s=this.bidiSpans(i),o=s[ms.find(s,e-i.from,-1,t)];return Tp(r,o.dir==xn.LTR==t>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(DQ)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>bL)return EQ(e.length);let t=this.textDirectionAt(e.from),r;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==t&&(s.fresh||$Q(s.isolates,r=Xk(this,e))))return s.order;r||(r=Xk(this,e));let i=iD(e.text,t,r);return this.bidiCache.push(new Np(e.from,e.to,t,r,!0,i)),i}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Le.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{SQ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Xd.of(new Cu(typeof e=="number"?me.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,r=this.viewState.scrollAnchorAt(e);return Xd.of(new Cu(me.cursor(r.from),"start","start",r.top-e,t,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return pi.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return pi.define(()=>({}),{eventObservers:e})}static theme(e,t){let r=ha.newName(),i=[Ud.of(r),Sh.of(oy(`.${r}`,e))];return t&&t.dark&&i.push(iy.of(!0)),i}static baseTheme(e){return pf.lowest(Sh.of(oy("."+sy,e,uC)))}static findFromDOM(e){var t;let r=e.querySelector(".cm-content"),i=r&&gn.get(r)||gn.get(e);return((t=i==null?void 0:i.root)===null||t===void 0?void 0:t.view)||null}}Ue.styleModule=Sh;Ue.inputHandler=_Q;Ue.clipboardInputFilter=Ox;Ue.clipboardOutputFilter=yx;Ue.scrollHandler=LQ;Ue.focusChangeEffect=zQ;Ue.perLineTextDirection=DQ;Ue.exceptionSink=AQ;Ue.updateListener=ey;Ue.editable=Us;Ue.mouseSelectionStyle=NQ;Ue.dragMovesSelection=RQ;Ue.clickAddsSelectionRange=jQ;Ue.decorations=om;Ue.blockWrappers=XQ;Ue.outerDecorations=vx;Ue.atomicRanges=Of;Ue.bidiIsolatedRanges=VQ;Ue.scrollMargins=WQ;Ue.darkTheme=iy;Ue.cspNonce=Ye.define({combine:n=>n.length?n[0]:""});Ue.contentAttributes=xx;Ue.editorAttributes=ZQ;Ue.lineWrapping=Ue.contentAttributes.of({class:"cm-lineWrapping"});Ue.announce=tn.define();const bL=4096,uS={};class Np{constructor(e,t,r,i,s,o){this.from=e,this.to=t,this.dir=r,this.isolates=i,this.fresh=s,this.order=o}static update(e,t){if(t.empty&&!e.some(s=>s.fresh))return e;let r=[],i=e.length?e[e.length-1].dir:xn.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==i&&!t.touchesRange(o.from,o.to)&&r.push(new Np(t.mapPos(o.from,1),t.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return r}}function cS(n,e,t){for(let r=n.state.facet(e),i=r.length-1;i>=0;i--){let s=r[i],o=typeof s=="function"?s(n):s;o&&px(o,t)}return t}const PL=Le.mac?"mac":Le.windows?"win":Le.linux?"linux":"key";function QL(n,e){const t=n.split(/-(?!$)/);let r=t[t.length-1];r=="Space"&&(r=" ");let i,s,o,l;for(let c=0;c<t.length-1;++c){const h=t[c];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))i=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return i&&(r="Alt-"+r),s&&(r="Ctrl-"+r),l&&(r="Meta-"+r),o&&(r="Shift-"+r),r}function qd(n,e,t){return e.altKey&&(n="Alt-"+n),e.ctrlKey&&(n="Ctrl-"+n),e.metaKey&&(n="Meta-"+n),t!==!1&&e.shiftKey&&(n="Shift-"+n),n}const CL=pf.default(Ue.domEventHandlers({keydown(n,e){return ML(TL(e.state),n,e,"editor")}})),cm=Ye.define({enables:CL}),hS=new WeakMap;function TL(n){let e=n.facet(cm),t=hS.get(e);return t||hS.set(e,t=EL(e.reduce((r,i)=>r.concat(i),[]))),t}let ea=null;const $L=4e3;function EL(n,e=PL){let t=Object.create(null),r=Object.create(null),i=(o,l)=>{let c=r[o];if(c==null)r[o]=l;else if(c!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,c,h,f)=>{var p,m;let g=t[o]||(t[o]=Object.create(null)),k=l.split(/ (?!$)/).map(Q=>QL(Q,e));for(let Q=1;Q<k.length;Q++){let $=k.slice(0,Q).join(" ");i($,!0),g[$]||(g[$]={preventDefault:!0,stopPropagation:!1,run:[E=>{let Z=ea={view:E,prefix:$,scope:o};return setTimeout(()=>{ea==Z&&(ea=null)},$L),!0}]})}let w=k.join(" ");i(w,!1);let C=g[w]||(g[w]={preventDefault:!1,stopPropagation:!1,run:((m=(p=g._any)===null||p===void 0?void 0:p.run)===null||m===void 0?void 0:m.slice())||[]});c&&C.run.push(c),h&&(C.preventDefault=!0),f&&(C.stopPropagation=!0)};for(let o of n){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let f=t[h]||(t[h]=Object.create(null));f._any||(f._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let m in f)f[m].run.push(g=>p(g,ay))}let c=o[e]||o.key;if(c)for(let h of l)s(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return t}let ay=null;function ML(n,e,t,r){ay=e;let i=Xz(e),s=df(i,0),o=nm(s)==i.length&&i!=" ",l="",c=!1,h=!1,f=!1;ea&&ea.view==t&&ea.scope==r&&(l=ea.prefix+" ",JQ.indexOf(e.keyCode)<0&&(h=!0,ea=null));let p=new Set,m=C=>{if(C){for(let Q of C.run)if(!p.has(Q)&&(p.add(Q),Q(t)))return C.stopPropagation&&(f=!0),!0;C.preventDefault&&(C.stopPropagation&&(f=!0),h=!0)}return!1},g=n[r],k,w;return g&&(m(g[l+qd(i,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Le.windows&&e.ctrlKey&&e.altKey)&&!(Le.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(k=fa[e.keyCode])&&k!=i?(m(g[l+qd(k,e,!0)])||e.shiftKey&&(w=Fh[e.keyCode])!=i&&w!=k&&m(g[l+qd(w,e,!1)]))&&(c=!0):o&&e.shiftKey&&m(g[l+qd(i,e,!0)])&&(c=!0),!c&&m(g._any)&&(c=!0)),h&&(c=!0),c&&f&&e.stopPropagation(),ay=null,c}function jL(){return NL}const RL=pt.line({class:"cm-activeLine"}),NL=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.docChanged||n.selectionSet)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=-1,t=[];for(let r of n.state.selection.ranges){let i=n.lineBlockAt(r.head);i.from>e&&(t.push(RL.range(i.from)),e=i.from)}return pt.set(t)}},{decorations:n=>n.decorations});class no extends ca{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}no.prototype.elementClass="";no.prototype.toDOM=void 0;no.prototype.mapMode=Bn.TrackBefore;no.prototype.startSide=no.prototype.endSide=-1;no.prototype.point=!0;const up=Ye.define(),AL=Ye.define(),_L={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>Pt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Nh=Ye.define();function zL(n){return[cC(),Nh.of({..._L,...n})]}const fS=Ye.define({combine:n=>n.some(e=>e)});function cC(n){return[DL]}const DL=pi.fromClass(class{constructor(n){this.view=n,this.domAfter=null,this.prevViewport=n.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=n.state.facet(Nh).map(e=>new pS(n,e)),this.fixed=!n.state.facet(fS);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),n.scrollDOM.insertBefore(this.dom,n.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(n){if(this.updateGutters(n)){let e=this.prevViewport,t=n.view.viewport,r=Math.min(e.to,t.to)-Math.max(e.from,t.from);this.syncGutters(r<(t.to-t.from)*.8)}if(n.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet(fS)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=n.view.viewport}syncGutters(n){let e=this.dom.nextSibling;n&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let t=Pt.iter(this.view.state.facet(up),this.view.viewport.from),r=[],i=this.gutters.map(s=>new LL(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==Pr.Text&&o){ly(t,r,l.from);for(let c of i)c.line(this.view,l,r);o=!1}else if(l.widget)for(let c of i)c.widget(this.view,l)}else if(s.type==Pr.Text){ly(t,r,s.from);for(let o of i)o.line(this.view,s,r)}else if(s.widget)for(let o of i)o.widget(this.view,s);for(let s of i)s.finish();n&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(n){let e=n.startState.facet(Nh),t=n.state.facet(Nh),r=n.docChanged||n.heightChanged||n.viewportChanged||!Pt.eq(n.startState.facet(up),n.state.facet(up),n.view.viewport.from,n.view.viewport.to);if(e==t)for(let i of this.gutters)i.update(n)&&(r=!0);else{r=!0;let i=[];for(let s of t){let o=e.indexOf(s);o<0?i.push(new pS(this.view,s)):(this.gutters[o].update(n),i.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),i.indexOf(s)<0&&s.destroy();for(let s of i)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=i}return r}destroy(){for(let n of this.gutters)n.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:n=>Ue.scrollMargins.of(e=>{let t=e.plugin(n);if(!t||t.gutters.length==0||!t.fixed)return null;let r=t.dom.offsetWidth*e.scaleX,i=t.domAfter?t.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==xn.LTR?{left:r,right:i}:{right:r,left:i}})});function dS(n){return Array.isArray(n)?n:[n]}function ly(n,e,t){for(;n.value&&n.from<=t;)n.from==t&&e.push(n.value),n.next()}class LL{constructor(e,t,r){this.gutter=e,this.height=r,this.i=0,this.cursor=Pt.iter(e.markers,t.from)}addElement(e,t,r){let{gutter:i}=this,s=(t.top-this.height)/e.scaleY,o=t.height/e.scaleY;if(this.i==i.elements.length){let l=new hC(e,o,s,r);i.elements.push(l),i.dom.appendChild(l.dom)}else i.elements[this.i].update(e,o,s,r);this.height=t.bottom,this.i++}line(e,t,r){let i=[];ly(this.cursor,i,t.from),r.length&&(i=i.concat(r));let s=this.gutter.config.lineMarker(e,t,i);s&&i.unshift(s);let o=this.gutter;i.length==0&&!o.config.renderEmptyElements||this.addElement(e,t,i)}widget(e,t){let r=this.gutter.config.widgetMarker(e,t.widget,t),i=r?[r]:null;for(let s of e.state.facet(AL)){let o=s(e,t.widget,t);o&&(i||(i=[])).push(o)}i&&this.addElement(e,t,i)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class pS{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let r in t.domEventHandlers)this.dom.addEventListener(r,i=>{let s=i.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=i.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);t.domEventHandlers[r](e,l,i)&&i.preventDefault()});this.markers=dS(t.markers(e)),t.initialSpacer&&(this.spacer=new hC(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=dS(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let i=this.config.updateSpacer(this.spacer.markers[0],e);i!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[i])}let r=e.view.viewport;return!Pt.eq(this.markers,t,r.from,r.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class hC{constructor(e,t,r,i){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,r,i)}update(e,t,r,i){this.height!=t&&(this.height=t,this.dom.style.height=t+"px"),this.above!=r&&(this.dom.style.marginTop=(this.above=r)?r+"px":""),IL(this.markers,i)||this.setMarkers(e,i)}setMarkers(e,t){let r="cm-gutterElement",i=this.dom.firstChild;for(let s=0,o=0;;){let l=o,c=s<t.length?t[s++]:null,h=!1;if(c){let f=c.elementClass;f&&(r+=" "+f);for(let p=o;p<this.markers.length;p++)if(this.markers[p].compare(c)){l=p,h=!0;break}}else l=this.markers.length;for(;o<l;){let f=this.markers[o++];if(f.toDOM){f.destroy(i);let p=i.nextSibling;i.remove(),i=p}}if(!c)break;c.toDOM&&(h?i=i.nextSibling:this.dom.insertBefore(c.toDOM(e),i)),h&&o++}this.dom.className=r,this.markers=t}destroy(){this.setMarkers(null,[])}}function IL(n,e){if(n.length!=e.length)return!1;for(let t=0;t<n.length;t++)if(!n[t].compare(e[t]))return!1;return!0}const ZL=Ye.define(),XL=Ye.define(),vu=Ye.define({combine(n){return im(n,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let r=Object.assign({},e);for(let i in t){let s=r[i],o=t[i];r[i]=s?(l,c,h)=>s(l,c,h)||o(l,c,h):o}return r}})}});class RO extends no{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function NO(n,e){return n.state.facet(vu).formatNumber(e,n.state)}const VL=Nh.compute([vu],n=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(ZL)},lineMarker(e,t,r){return r.some(i=>i.toDOM)?null:new RO(NO(e,e.state.doc.lineAt(t.from).number))},widgetMarker:(e,t,r)=>{for(let i of e.state.facet(XL)){let s=i(e,t,r);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(vu)!=e.state.facet(vu),initialSpacer(e){return new RO(NO(e,mS(e.state.doc.lines)))},updateSpacer(e,t){let r=NO(t.view,mS(t.view.state.doc.lines));return r==e.number?e:new RO(r)},domEventHandlers:n.facet(vu).domEventHandlers,side:"before"}));function WL(n={}){return[vu.of(n),cC(),VL]}function mS(n){let e=9;for(;e<n;)e=e*10+9;return e}const FL=new class extends no{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},BL=up.compute(["selection"],n=>{let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.head).from;i>t&&(t=i,e.push(FL.range(i)))}return Pt.of(e)});function YL(){return BL}const fC=1024;let UL=0;class fi{constructor(e,t){this.from=e,this.to=t}}class ct{constructor(e={}){this.id=UL++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Cn.match(e)),t=>{let r=e(t);return r===void 0?null:[this,r]}}}ct.closedBy=new ct({deserialize:n=>n.split(" ")});ct.openedBy=new ct({deserialize:n=>n.split(" ")});ct.group=new ct({deserialize:n=>n.split(" ")});ct.isolate=new ct({deserialize:n=>{if(n&&n!="rtl"&&n!="ltr"&&n!="auto")throw new RangeError("Invalid value for isolate: "+n);return n||"auto"}});ct.contextHash=new ct({perNode:!0});ct.lookAhead=new ct({perNode:!0});ct.mounted=new ct({perNode:!0});class Tu{constructor(e,t,r,i=!1){this.tree=e,this.overlay=t,this.parser=r,this.bracketed=i}static get(e){return e&&e.props&&e.props[ct.mounted.id]}}const qL=Object.create(null);class Cn{constructor(e,t,r,i=0){this.name=e,this.props=t,this.id=r,this.flags=i}static define(e){let t=e.props&&e.props.length?Object.create(null):qL,r=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),i=new Cn(e.name||"",t,e.id,r);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(i)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[s[0].id]=s[1]}}return i}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let t=this.prop(ct.group);return t?t.indexOf(e)>-1:!1}return this.id==e}static match(e){let t=Object.create(null);for(let r in e)for(let i of r.split(" "))t[i]=e[r];return r=>{for(let i=r.prop(ct.group),s=-1;s<(i?i.length:0);s++){let o=t[s<0?r.name:i[s]];if(o)return o}}}}Cn.none=new Cn("",Object.create(null),0,8);class yf{constructor(e){this.types=e;for(let t=0;t<e.length;t++)if(e[t].id!=t)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let t=[];for(let r of this.types){let i=null;for(let s of e){let o=s(r);if(o){i||(i=Object.assign({},r.props));let l=o[1],c=o[0];c.combine&&c.id in i&&(l=c.combine(i[c.id],l)),i[c.id]=l}}t.push(i?new Cn(r.name,i,r.id,r.flags):r)}return new yf(t)}}const Hd=new WeakMap,gS=new WeakMap;var Zt;(function(n){n[n.ExcludeBuffers=1]="ExcludeBuffers",n[n.IncludeAnonymous=2]="IncludeAnonymous",n[n.IgnoreMounts=4]="IgnoreMounts",n[n.IgnoreOverlays=8]="IgnoreOverlays",n[n.EnterBracketed=16]="EnterBracketed"})(Zt||(Zt={}));class Lt{constructor(e,t,r,i,s){if(this.type=e,this.children=t,this.positions=r,this.length=i,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=Tu.get(this);if(e&&!e.overlay)return e.tree.toString();let t="";for(let r of this.children){let i=r.toString();i&&(t&&(t+=","),t+=i)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(t.length?"("+t+")":""):t}cursor(e=0){return new Ap(this.topNode,e)}cursorAt(e,t=0,r=0){let i=Hd.get(this)||this.topNode,s=new Ap(i);return s.moveTo(e,t),Hd.set(this,s._tree),s}get topNode(){return new mi(this,0,0,null)}resolve(e,t=0){let r=qh(Hd.get(this)||this.topNode,e,t,!1);return Hd.set(this,r),r}resolveInner(e,t=0){let r=qh(gS.get(this)||this.topNode,e,t,!0);return gS.set(this,r),r}resolveStack(e,t=0){return KL(this,e,t)}iterate(e){let{enter:t,leave:r,from:i=0,to:s=this.length}=e,o=e.mode||0,l=(o&Zt.IncludeAnonymous)>0;for(let c=this.cursor(o|Zt.IncludeAnonymous);;){let h=!1;if(c.from<=s&&c.to>=i&&(!l&&c.type.isAnonymous||t(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&r&&(l||!c.type.isAnonymous)&&r(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:Qx(Cn.none,this.children,this.positions,0,this.children.length,0,this.length,(t,r,i)=>new Lt(this.type,t,r,i,this.propValues),e.makeTree||((t,r,i)=>new Lt(Cn.none,t,r,i)))}static build(e){return JL(e)}}Lt.empty=new Lt(Cn.none,[],[],0);class bx{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new bx(this.buffer,this.index)}}class pa{constructor(e,t,r){this.buffer=e,this.length=t,this.set=r}get type(){return Cn.none}toString(){let e=[];for(let t=0;t<this.buffer.length;)e.push(this.childString(t)),t=this.buffer[t+3];return e.join(",")}childString(e){let t=this.buffer[e],r=this.buffer[e+3],i=this.set.types[t],s=i.name;if(/\W/.test(s)&&!i.isError&&(s=JSON.stringify(s)),e+=4,r==e)return s;let o=[];for(;e<r;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,t,r,i,s){let{buffer:o}=this,l=-1;for(let c=e;c!=t&&!(dC(s,i,o[c+1],o[c+2])&&(l=c,r>0));c=o[c+3]);return l}slice(e,t,r){let i=this.buffer,s=new Uint16Array(t-e),o=0;for(let l=e,c=0;l<t;){s[c++]=i[l++],s[c++]=i[l++]-r;let h=s[c++]=i[l++]-r;s[c++]=i[l++]-e,o=Math.max(o,h)}return new pa(s,o,this.set)}}function dC(n,e,t,r){switch(n){case-2:return t<e;case-1:return r>=e&&t<e;case 0:return t<e&&r>e;case 1:return t<=e&&r>e;case 2:return r>e;case 4:return!0}}function qh(n,e,t,r){for(var i;n.from==n.to||(t<1?n.from>=e:n.from>e)||(t>-1?n.to<=e:n.to<e);){let o=!r&&n instanceof mi&&n.index<0?null:n.parent;if(!o)return n;n=o}let s=r?0:Zt.IgnoreOverlays;if(r)for(let o=n,l=o.parent;l;o=l,l=o.parent)o instanceof mi&&o.index<0&&((i=l.enter(e,t,s))===null||i===void 0?void 0:i.from)!=o.from&&(n=l);for(;;){let o=n.enter(e,t,s);if(!o)return n;n=o}}class pC{cursor(e=0){return new Ap(this,e)}getChild(e,t=null,r=null){let i=OS(this,e,t,r);return i.length?i[0]:null}getChildren(e,t=null,r=null){return OS(this,e,t,r)}resolve(e,t=0){return qh(this,e,t,!1)}resolveInner(e,t=0){return qh(this,e,t,!0)}matchContext(e){return uy(this.parent,e)}enterUnfinishedNodesBefore(e){let t=this.childBefore(e),r=this;for(;t;){let i=t.lastChild;if(!i||i.to!=t.to)break;i.type.isError&&i.from==i.to?(r=t,t=i.prevSibling):t=i}return r}get node(){return this}get next(){return this.parent}}let mi=class cp extends pC{constructor(e,t,r,i){super(),this._tree=e,this.from=t,this.index=r,this._parent=i}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,t,r,i,s=0){for(let o=this;;){for(let{children:l,positions:c}=o._tree,h=t>0?l.length:-1;e!=h;e+=t){let f=l[e],p=c[e]+o.from,m;if(!(!(s&Zt.EnterBracketed&&f instanceof Lt&&(m=Tu.get(f))&&!m.overlay&&m.bracketed&&r>=p&&r<=p+f.length)&&!dC(i,r,p,p+f.length))){if(f instanceof pa){if(s&Zt.ExcludeBuffers)continue;let g=f.findChild(0,f.buffer.length,t,r-p,i);if(g>-1)return new Os(new HL(o,f,e,p),null,g)}else if(s&Zt.IncludeAnonymous||!f.type.isAnonymous||Px(f)){let g;if(!(s&Zt.IgnoreMounts)&&(g=Tu.get(f))&&!g.overlay)return new cp(g.tree,p,e,o);let k=new cp(f,p,e,o);return s&Zt.IncludeAnonymous||!k.type.isAnonymous?k:k.nextChild(t<0?f.children.length-1:0,t,r,i,s)}}}if(s&Zt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+t:e=t<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,t,r=0){let i;if(!(r&Zt.IgnoreOverlays)&&(i=Tu.get(this._tree))&&i.overlay){let s=e-this.from,o=r&Zt.EnterBracketed&&i.bracketed;for(let{from:l,to:c}of i.overlay)if((t>0||o?l<=s:l<s)&&(t<0||o?c>=s:c>s))return new cp(i.tree,i.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,r)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}};function OS(n,e,t,r){let i=n.cursor(),s=[];if(!i.firstChild())return s;if(t!=null){for(let o=!1;!o;)if(o=i.type.is(t),!i.nextSibling())return s}for(;;){if(r!=null&&i.type.is(r))return s;if(i.type.is(e)&&s.push(i.node),!i.nextSibling())return r==null?s:[]}}function uy(n,e,t=e.length-1){for(let r=n;t>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(e[t]&&e[t]!=r.name)return!1;t--}}return!0}class HL{constructor(e,t,r,i){this.parent=e,this.buffer=t,this.index=r,this.start=i}}class Os extends pC{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,r){super(),this.context=e,this._parent=t,this.index=r,this.type=e.buffer.set.types[e.buffer.buffer[r]]}child(e,t,r){let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.context.start,r);return s<0?null:new Os(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,t,r=0){if(r&Zt.ExcludeBuffers)return null;let{buffer:i}=this.context,s=i.findChild(this.index+4,i.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return s<0?null:new Os(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Os(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new Os(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],t=[],{buffer:r}=this.context,i=this.index+4,s=r.buffer[this.index+3];if(s>i){let o=r.buffer[this.index+1];e.push(r.slice(i,s,o)),t.push(0)}return new Lt(this.type,e,t,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function mC(n){if(!n.length)return null;let e=0,t=n[0];for(let s=1;s<n.length;s++){let o=n[s];(o.from>t.from||o.to<t.to)&&(t=o,e=s)}let r=t instanceof mi&&t.index<0?null:t.parent,i=n.slice();return r?i[e]=r:i.splice(e,1),new GL(i,t)}class GL{constructor(e,t){this.heads=e,this.node=t}get next(){return mC(this.heads)}}function KL(n,e,t){let r=n.resolveInner(e,t),i=null;for(let s=r instanceof mi?r:r.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(i||(i=[r])).push(o.resolve(e,t)),s=o}else{let o=Tu.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new mi(o.tree,o.overlay[0].from+s.from,-1,s);(i||(i=[r])).push(qh(l,e,t,!1))}}return i?mC(i):r}class Ap{get name(){return this.type.name}constructor(e,t=0){if(this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,this.mode=t&~Zt.EnterBracketed,e instanceof mi)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let r=e._parent;r;r=r._parent)this.stack.unshift(r.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,t){this.index=e;let{start:r,buffer:i}=this.buffer;return this.type=t||i.set.types[i.buffer[e]],this.from=r+i.buffer[e+1],this.to=r+i.buffer[e+2],!0}yield(e){return e?e instanceof mi?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,r){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,r,this.mode));let{buffer:i}=this.buffer,s=i.findChild(this.index+4,i.buffer[this.index+3],e,t-this.buffer.start,r);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,r=this.mode){return this.buffer?r&Zt.ExcludeBuffers?!1:this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,r))}parent(){if(!this.buffer)return this.yieldNode(this.mode&Zt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&Zt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:t}=this.buffer,r=this.stack.length-1;if(e<0){let i=r<0?0:this.stack[r]+4;if(this.index!=i)return this.yieldBuf(t.findChild(i,this.index,-1,0,4))}else{let i=t.buffer[this.index+3];if(i<(r<0?t.buffer.length:t.buffer[this.stack[r]+3]))return this.yieldBuf(i)}return r<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,r,{buffer:i}=this;if(i){if(e>0){if(this.index<i.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(i.buffer.buffer[s+3]<this.index)return!1;({index:t,parent:r}=i)}else({index:t,_parent:r}=this._tree);for(;r;{index:t,_parent:r}=r)if(t>-1)for(let s=t+e,o=e<0?-1:r._tree.children.length;s!=o;s+=e){let l=r._tree.children[s];if(this.mode&Zt.IncludeAnonymous||l instanceof pa||!l.type.isAnonymous||Px(l))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,t););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,t=null,r=0;if(e&&e.context==this.buffer)e:for(let i=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==i){if(i==this.index)return o;t=o,r=s+1;break e}i=this.stack[--s]}for(let i=r;i<this.stack.length;i++)t=new Os(this.buffer,t,this.stack[i]);return this.bufferNode=new Os(this.buffer,t,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,t){for(let r=0;;){let i=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){r++;continue}this.type.isAnonymous||(i=!0)}for(;;){if(i&&t&&t(this),i=this.type.isAnonymous,!r)return;if(this.nextSibling())break;this.parent(),r--,i=!0}}}matchContext(e){if(!this.buffer)return uy(this.node.parent,e);let{buffer:t}=this.buffer,{types:r}=t.set;for(let i=e.length-1,s=this.stack.length-1;i>=0;s--){if(s<0)return uy(this._tree,e,i);let o=r[t.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[i]&&e[i]!=o.name)return!1;i--}}return!0}}function Px(n){return n.children.some(e=>e instanceof pa||!e.type.isAnonymous||Px(e))}function JL(n){var e;let{buffer:t,nodeSet:r,maxBufferLength:i=fC,reused:s=[],minRepeatType:o=r.types.length}=n,l=Array.isArray(t)?new bx(t,t.length):t,c=r.types,h=0,f=0;function p(Y,_,R,q,G,W){let{id:z,start:D,end:se,size:oe}=l,ne=f,de=h;if(oe<0)if(l.next(),oe==-1){let U=s[z];R.push(U),q.push(D-Y);return}else if(oe==-3){h=z;return}else if(oe==-4){f=z;return}else throw new RangeError(`Unrecognized record size: ${oe}`);let ke=c[z],he,ye,N=D-Y;if(se-D<=i&&(ye=C(l.pos-_,G))){let U=new Uint16Array(ye.size-ye.skip),ue=l.pos-ye.size,L=U.length;for(;l.pos>ue;)L=Q(ye.start,U,L);he=new pa(U,se-ye.start,r),N=ye.start-Y}else{let U=l.pos-oe;l.next();let ue=[],L=[],Re=z>=o?z:-1,_e=0,$e=se;for(;l.pos>U;)Re>=0&&l.id==Re&&l.size>=0?(l.end<=$e-i&&(k(ue,L,D,_e,l.end,$e,Re,ne,de),_e=ue.length,$e=l.end),l.next()):W>2500?m(D,U,ue,L):p(D,U,ue,L,Re,W+1);if(Re>=0&&_e>0&&_e<ue.length&&k(ue,L,D,_e,D,$e,Re,ne,de),ue.reverse(),L.reverse(),Re>-1&&_e>0){let rt=g(ke,de);he=Qx(ke,ue,L,0,ue.length,0,se-D,rt,rt)}else he=w(ke,ue,L,se-D,ne-se,de)}R.push(he),q.push(N)}function m(Y,_,R,q){let G=[],W=0,z=-1;for(;l.pos>_;){let{id:D,start:se,end:oe,size:ne}=l;if(ne>4)l.next();else{if(z>-1&&se<z)break;z<0&&(z=oe-i),G.push(D,se,oe),W++,l.next()}}if(W){let D=new Uint16Array(W*4),se=G[G.length-2];for(let oe=G.length-3,ne=0;oe>=0;oe-=3)D[ne++]=G[oe],D[ne++]=G[oe+1]-se,D[ne++]=G[oe+2]-se,D[ne++]=ne;R.push(new pa(D,G[2]-se,r)),q.push(se-Y)}}function g(Y,_){return(R,q,G)=>{let W=0,z=R.length-1,D,se;if(z>=0&&(D=R[z])instanceof Lt){if(!z&&D.type==Y&&D.length==G)return D;(se=D.prop(ct.lookAhead))&&(W=q[z]+D.length+se)}return w(Y,R,q,G,W,_)}}function k(Y,_,R,q,G,W,z,D,se){let oe=[],ne=[];for(;Y.length>q;)oe.push(Y.pop()),ne.push(_.pop()+R-G);Y.push(w(r.types[z],oe,ne,W-G,D-W,se)),_.push(G-R)}function w(Y,_,R,q,G,W,z){if(W){let D=[ct.contextHash,W];z=z?[D].concat(z):[D]}if(G>25){let D=[ct.lookAhead,G];z=z?[D].concat(z):[D]}return new Lt(Y,_,R,q,z)}function C(Y,_){let R=l.fork(),q=0,G=0,W=0,z=R.end-i,D={size:0,start:0,skip:0};e:for(let se=R.pos-Y;R.pos>se;){let oe=R.size;if(R.id==_&&oe>=0){D.size=q,D.start=G,D.skip=W,W+=4,q+=4,R.next();continue}let ne=R.pos-oe;if(oe<0||ne<se||R.start<z)break;let de=R.id>=o?4:0,ke=R.start;for(R.next();R.pos>ne;){if(R.size<0)if(R.size==-3||R.size==-4)de+=4;else break e;else R.id>=o&&(de+=4);R.next()}G=ke,q+=oe,W+=de}return(_<0||q==Y)&&(D.size=q,D.start=G,D.skip=W),D.size>4?D:void 0}function Q(Y,_,R){let{id:q,start:G,end:W,size:z}=l;if(l.next(),z>=0&&q<o){let D=R;if(z>4){let se=l.pos-(z-4);for(;l.pos>se;)R=Q(Y,_,R)}_[--R]=D,_[--R]=W-Y,_[--R]=G-Y,_[--R]=q}else z==-3?h=q:z==-4&&(f=q);return R}let $=[],E=[];for(;l.pos>0;)p(n.start||0,n.bufferStart||0,$,E,-1,0);let Z=(e=n.length)!==null&&e!==void 0?e:$.length?E[0]+$[0].length:0;return new Lt(c[n.topID],$.reverse(),E.reverse(),Z)}const yS=new WeakMap;function hp(n,e){if(!n.isAnonymous||e instanceof pa||e.type!=n)return 1;let t=yS.get(e);if(t==null){t=1;for(let r of e.children){if(r.type!=n||!(r instanceof Lt)){t=1;break}t+=hp(n,r)}yS.set(e,t)}return t}function Qx(n,e,t,r,i,s,o,l,c){let h=0;for(let k=r;k<i;k++)h+=hp(n,e[k]);let f=Math.ceil(h*1.5/8),p=[],m=[];function g(k,w,C,Q,$){for(let E=C;E<Q;){let Z=E,Y=w[E],_=hp(n,k[E]);for(E++;E<Q;E++){let R=hp(n,k[E]);if(_+R>=f)break;_+=R}if(E==Z+1){if(_>f){let R=k[Z];g(R.children,R.positions,0,R.children.length,w[Z]+$);continue}p.push(k[Z])}else{let R=w[E-1]+k[E-1].length-Y;p.push(Qx(n,k,w,Z,E,Y,R,null,c))}m.push(Y+$-s)}}return g(e,t,r,i,0),(l||c)(p,m,o)}class gC{constructor(){this.map=new WeakMap}setBuffer(e,t,r){let i=this.map.get(e);i||this.map.set(e,i=new Map),i.set(t,r)}getBuffer(e,t){let r=this.map.get(e);return r&&r.get(t)}set(e,t){e instanceof Os?this.setBuffer(e.context.buffer,e.index,t):e instanceof mi&&this.map.set(e.tree,t)}get(e){return e instanceof Os?this.getBuffer(e.context.buffer,e.index):e instanceof mi?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Ks{constructor(e,t,r,i,s=!1,o=!1){this.from=e,this.to=t,this.tree=r,this.offset=i,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,t=[],r=!1){let i=[new Ks(0,e.length,e,0,!1,r)];for(let s of t)s.to>e.length&&i.push(s);return i}static applyChanges(e,t,r=128){if(!t.length)return e;let i=[],s=1,o=e.length?e[0]:null;for(let l=0,c=0,h=0;;l++){let f=l<t.length?t[l]:null,p=f?f.fromA:1e9;if(p-c>=r)for(;o&&o.from<p;){let m=o;if(c>=m.from||p<=m.to||h){let g=Math.max(m.from,c)-h,k=Math.min(m.to,p)-h;m=g>=k?null:new Ks(g,k,m.tree,m.offset+h,l>0,!!f)}if(m&&i.push(m),o.to>p)break;o=s<e.length?e[s++]:null}if(!f)break;c=f.toA,h=f.toA-f.toB}return i}}class Cx{startParse(e,t,r){return typeof e=="string"&&(e=new e3(e)),r=r?r.length?r.map(i=>new fi(i.from,i.to)):[new fi(0,0)]:[new fi(0,e.length)],this.createParse(e,t||[],r)}parse(e,t,r){let i=this.startParse(e,t,r);for(;;){let s=i.advance();if(s)return s}}}class e3{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function OC(n){return(e,t,r,i)=>new n3(e,n,t,r,i)}class xS{constructor(e,t,r,i,s,o){this.parser=e,this.parse=t,this.overlay=r,this.bracketed=i,this.target=s,this.from=o}}function vS(n){if(!n.length||n.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(n))}class t3{constructor(e,t,r,i,s,o,l,c){this.parser=e,this.predicate=t,this.mounts=r,this.index=i,this.start=s,this.bracketed=o,this.target=l,this.prev=c,this.depth=0,this.ranges=[]}}const cy=new ct({perNode:!0});class n3{constructor(e,t,r,i,s){this.nest=t,this.input=r,this.fragments=i,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let r=this.baseParse.advance();if(!r)return null;if(this.baseParse=null,this.baseTree=r,this.startInner(),this.stoppedAt!=null)for(let i of this.inner)i.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let r=this.baseTree;return this.stoppedAt!=null&&(r=new Lt(r.type,r.children,r.positions,r.length,r.propValues.concat([[cy,this.stoppedAt]]))),r}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let r=Object.assign(Object.create(null),e.target.props);r[ct.mounted.id]=new Tu(t,e.overlay,e.parser,e.bracketed),e.target.props=r}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].from<e&&(e=Math.min(e,this.inner[t].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let t=this.innerDone;t<this.inner.length;t++)this.inner[t].parse.stopAt(e)}startInner(){let e=new s3(this.fragments),t=null,r=null,i=new Ap(new mi(this.baseTree,this.ranges[0].from,0,null),Zt.IncludeAnonymous|Zt.IgnoreMounts);e:for(let s,o;;){let l=!0,c;if(this.stoppedAt!=null&&i.from>=this.stoppedAt)l=!1;else if(e.hasNode(i)){if(t){let h=t.mounts.find(f=>f.frag.from<=i.from&&f.frag.to>=i.to&&f.mount.overlay);if(h)for(let f of h.mount.overlay){let p=f.from+h.pos,m=f.to+h.pos;p>=i.from&&m<=i.to&&!t.ranges.some(g=>g.from<m&&g.to>p)&&t.ranges.push({from:p,to:m})}}l=!1}else if(r&&(o=r3(r.ranges,i.from,i.to)))l=o!=2;else if(!i.type.isAnonymous&&(s=this.nest(i,this.input))&&(i.from<i.to||!s.overlay)){i.tree||(i3(i),t&&t.depth++,r&&r.depth++);let h=e.findMounts(i.from,s.parser);if(typeof s.overlay=="function")t=new t3(s.parser,s.overlay,h,this.inner.length,i.from,!!s.bracketed,i.tree,t);else{let f=SS(this.ranges,s.overlay||(i.from<i.to?[new fi(i.from,i.to)]:[]));f.length&&vS(f),(f.length||!s.overlay)&&this.inner.push(new xS(s.parser,f.length?s.parser.startParse(this.input,bS(h,f),f):s.parser.startParse(""),s.overlay?s.overlay.map(p=>new fi(p.from-i.from,p.to-i.from)):null,!!s.bracketed,i.tree,f.length?f[0].from:i.from)),s.overlay?f.length&&(r={ranges:f,depth:0,prev:r}):l=!1}}else if(t&&(c=t.predicate(i))&&(c===!0&&(c=new fi(i.from,i.to)),c.from<c.to)){let h=t.ranges.length-1;h>=0&&t.ranges[h].to==c.from?t.ranges[h]={from:t.ranges[h].from,to:c.to}:t.ranges.push(c)}if(l&&i.firstChild())t&&t.depth++,r&&r.depth++;else for(;!i.nextSibling();){if(!i.parent())break e;if(t&&!--t.depth){let h=SS(this.ranges,t.ranges);h.length&&(vS(h),this.inner.splice(t.index,0,new xS(t.parser,t.parser.startParse(this.input,bS(t.mounts,h),h),t.ranges.map(f=>new fi(f.from-t.start,f.to-t.start)),t.bracketed,t.target,h[0].from))),t=t.prev}r&&!--r.depth&&(r=r.prev)}}}}function r3(n,e,t){for(let r of n){if(r.from>=t)break;if(r.to>e)return r.from<=e&&r.to>=t?2:1}return 0}function wS(n,e,t,r,i,s){if(e<t){let o=n.buffer[e+1];r.push(n.slice(e,t,o)),i.push(o-s)}}function i3(n){let{node:e}=n,t=[],r=e.context.buffer;do t.push(n.index),n.parent();while(!n.tree);let i=n.tree,s=i.children.indexOf(r),o=i.children[s],l=o.buffer,c=[s];function h(f,p,m,g,k,w){let C=t[w],Q=[],$=[];wS(o,f,C,Q,$,g);let E=l[C+1],Z=l[C+2];c.push(Q.length);let Y=w?h(C+4,l[C+3],o.set.types[l[C]],E,Z-E,w-1):e.toTree();return Q.push(Y),$.push(E-g),wS(o,l[C+3],p,Q,$,g),new Lt(m,Q,$,k)}i.children[s]=h(0,l.length,Cn.none,0,o.length,t.length-1);for(let f of c){let p=n.tree.children[f],m=n.tree.positions[f];n.yield(new mi(p,m+n.from,f,n._tree))}}class kS{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(Zt.IncludeAnonymous|Zt.IgnoreMounts)}moveTo(e){let{cursor:t}=this,r=e-this.offset;for(;!this.done&&t.from<r;)t.to>=e&&t.enter(r,1,Zt.IgnoreOverlays|Zt.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(t.children.length&&t.positions[0]==0&&t.children[0]instanceof Lt)t=t.children[0];else break}return!1}}let s3=class{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let r=this.curFrag=e[0];this.curTo=(t=r.tree.prop(cy))!==null&&t!==void 0?t:r.to,this.inner=new kS(r.tree,-r.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=(e=t.tree.prop(cy))!==null&&e!==void 0?e:t.to,this.inner=new kS(t.tree,-t.offset)}}findMounts(e,t){var r;let i=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(r=s.tree)===null||r===void 0?void 0:r.prop(ct.mounted);if(o&&o.parser==t)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&i.push({frag:c,pos:s.from-c.offset,mount:o})}}}return i}};function SS(n,e){let t=null,r=e;for(let i=1,s=0;i<n.length;i++){let o=n[i-1].to,l=n[i].from;for(;s<r.length;s++){let c=r[s];if(c.from>=l)break;c.to<=o||(t||(r=t=e.slice()),c.from<o?(t[s]=new fi(c.from,o),c.to>l&&t.splice(s+1,0,new fi(l,c.to))):c.to>l?t[s--]=new fi(l,c.to):t.splice(s--,1))}}return r}function o3(n,e,t,r){let i=0,s=0,o=!1,l=!1,c=-1e9,h=[];for(;;){let f=i==n.length?1e9:o?n[i].to:n[i].from,p=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let m=Math.max(c,t),g=Math.min(f,p,r);m<g&&h.push(new fi(m,g))}if(c=Math.min(f,p),c==1e9)break;f==c&&(o?(o=!1,i++):o=!0),p==c&&(l?(l=!1,s++):l=!0)}return h}function bS(n,e){let t=[];for(let{pos:r,mount:i,frag:s}of n){let o=r+(i.overlay?i.overlay[0].from:0),l=o+i.tree.length,c=Math.max(s.from,o),h=Math.min(s.to,l);if(i.overlay){let f=i.overlay.map(m=>new fi(m.from+r,m.to+r)),p=o3(e,f,c,h);for(let m=0,g=c;;m++){let k=m==p.length,w=k?h:p[m].from;if(w>g&&t.push(new Ks(g,w,i.tree,-o,s.from>=g||s.openStart,s.to<=w||s.openEnd)),k)break;g=p[m].to}}else t.push(new Ks(c,h,i.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return t}let a3=0;class Wr{constructor(e,t,r,i){this.name=e,this.set=t,this.base=r,this.modified=i,this.id=a3++}toString(){let{name:e}=this;for(let t of this.modified)t.name&&(e=`${t.name}(${e})`);return e}static define(e,t){let r=typeof e=="string"?e:"?";if(e instanceof Wr&&(t=e),t!=null&&t.base)throw new Error("Can not derive from a modified tag");let i=new Wr(r,[],null,[]);if(i.set.push(i),t)for(let s of t.set)i.set.push(s);return i}static defineModifier(e){let t=new _p(e);return r=>r.modified.indexOf(t)>-1?r:_p.get(r.base||r,r.modified.concat(t).sort((i,s)=>i.id-s.id))}}let l3=0;class _p{constructor(e){this.name=e,this.instances=[],this.id=l3++}static get(e,t){if(!t.length)return e;let r=t[0].instances.find(l=>l.base==e&&u3(t,l.modified));if(r)return r;let i=[],s=new Wr(e.name,i,e,t);for(let l of t)l.instances.push(s);let o=c3(t);for(let l of e.set)if(!l.modified.length)for(let c of o)i.push(_p.get(l,c));return s}}function u3(n,e){return n.length==e.length&&n.every((t,r)=>t==e[r])}function c3(n){let e=[[]];for(let t=0;t<n.length;t++)for(let r=0,i=e.length;r<i;r++)e.push(e[r].concat(n[t]));return e.sort((t,r)=>r.length-t.length)}function Rl(n){let e=Object.create(null);for(let t in n){let r=n[t];Array.isArray(r)||(r=[r]);for(let i of t.split(" "))if(i){let s=[],o=2,l=i;for(let p=0;;){if(l=="..."&&p>0&&p+3==i.length){o=1;break}let m=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!m)throw new RangeError("Invalid path: "+i);if(s.push(m[0]=="*"?"":m[0][0]=='"'?JSON.parse(m[0]):m[0]),p+=m[0].length,p==i.length)break;let g=i[p++];if(p==i.length&&g=="!"){o=0;break}if(g!="/")throw new RangeError("Invalid path: "+i);l=i.slice(p)}let c=s.length-1,h=s[c];if(!h)throw new RangeError("Invalid path: "+i);let f=new Hh(r,o,c>0?s.slice(0,c):null);e[h]=f.sort(e[h])}}return yC.add(e)}const yC=new ct({combine(n,e){let t,r,i;for(;n||e;){if(!n||e&&n.depth>=e.depth?(i=e,e=e.next):(i=n,n=n.next),t&&t.mode==i.mode&&!i.context&&!t.context)continue;let s=new Hh(i.tags,i.mode,i.context);t?t.next=s:r=s,t=s}return r}});class Hh{constructor(e,t,r,i){this.tags=e,this.mode=t,this.context=r,this.next=i}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}Hh.empty=new Hh([],2,null);function xC(n,e){let t=Object.create(null);for(let s of n)if(!Array.isArray(s.tag))t[s.tag.id]=s.class;else for(let o of s.tag)t[o.id]=s.class;let{scope:r,all:i=null}=e||{};return{style:s=>{let o=i;for(let l of s)for(let c of l.set){let h=t[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:r}}function h3(n,e){let t=null;for(let r of n){let i=r.style(e);i&&(t=t?t+" "+i:i)}return t}function f3(n,e,t,r=0,i=n.length){let s=new d3(r,Array.isArray(e)?e:[e],t);s.highlightRange(n.cursor(),r,i,"",s.highlighters),s.flush(i)}class d3{constructor(e,t,r){this.at=e,this.highlighters=t,this.span=r,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,r,i,s){let{type:o,from:l,to:c}=e;if(l>=r||c<=t)return;o.isTop&&(s=this.highlighters.filter(g=>!g.scope||g.scope(o)));let h=i,f=p3(e)||Hh.empty,p=h3(s,f.tags);if(p&&(h&&(h+=" "),h+=p,f.mode==1&&(i+=(i?" ":"")+p)),this.startSpan(Math.max(t,l),h),f.opaque)return;let m=e.tree&&e.tree.prop(ct.mounted);if(m&&m.overlay){let g=e.node.enter(m.overlay[0].from+l,1),k=this.highlighters.filter(C=>!C.scope||C.scope(m.tree.type)),w=e.firstChild();for(let C=0,Q=l;;C++){let $=C<m.overlay.length?m.overlay[C]:null,E=$?$.from+l:c,Z=Math.max(t,Q),Y=Math.min(r,E);if(Z<Y&&w)for(;e.from<Y&&(this.highlightRange(e,Z,Y,i,s),this.startSpan(Math.min(Y,e.to),h),!(e.to>=E||!e.nextSibling())););if(!$||E>r)break;Q=$.to+l,Q>t&&(this.highlightRange(g.cursor(),Math.max(t,$.from+l),Math.min(r,Q),"",k),this.startSpan(Math.min(r,Q),h))}w&&e.parent()}else if(e.firstChild()){m&&(i="");do if(!(e.to<=t)){if(e.from>=r)break;this.highlightRange(e,t,r,i,s),this.startSpan(Math.min(r,e.to),h)}while(e.nextSibling());e.parent()}}}function p3(n){let e=n.type.prop(yC);for(;e&&e.context&&!n.matchContext(e.context);)e=e.next;return e||null}const Te=Wr.define,Gd=Te(),Ko=Te(),PS=Te(Ko),QS=Te(Ko),Jo=Te(),Kd=Te(Jo),AO=Te(Jo),as=Te(),nl=Te(as),ss=Te(),os=Te(),hy=Te(),gh=Te(hy),Jd=Te(),A={comment:Gd,lineComment:Te(Gd),blockComment:Te(Gd),docComment:Te(Gd),name:Ko,variableName:Te(Ko),typeName:PS,tagName:Te(PS),propertyName:QS,attributeName:Te(QS),className:Te(Ko),labelName:Te(Ko),namespace:Te(Ko),macroName:Te(Ko),literal:Jo,string:Kd,docString:Te(Kd),character:Te(Kd),attributeValue:Te(Kd),number:AO,integer:Te(AO),float:Te(AO),bool:Te(Jo),regexp:Te(Jo),escape:Te(Jo),color:Te(Jo),url:Te(Jo),keyword:ss,self:Te(ss),null:Te(ss),atom:Te(ss),unit:Te(ss),modifier:Te(ss),operatorKeyword:Te(ss),controlKeyword:Te(ss),definitionKeyword:Te(ss),moduleKeyword:Te(ss),operator:os,derefOperator:Te(os),arithmeticOperator:Te(os),logicOperator:Te(os),bitwiseOperator:Te(os),compareOperator:Te(os),updateOperator:Te(os),definitionOperator:Te(os),typeOperator:Te(os),controlOperator:Te(os),punctuation:hy,separator:Te(hy),bracket:gh,angleBracket:Te(gh),squareBracket:Te(gh),paren:Te(gh),brace:Te(gh),content:as,heading:nl,heading1:Te(nl),heading2:Te(nl),heading3:Te(nl),heading4:Te(nl),heading5:Te(nl),heading6:Te(nl),contentSeparator:Te(as),list:Te(as),quote:Te(as),emphasis:Te(as),strong:Te(as),link:Te(as),monospace:Te(as),strikethrough:Te(as),inserted:Te(),deleted:Te(),changed:Te(),invalid:Te(),meta:Jd,documentMeta:Te(Jd),annotation:Te(Jd),processingInstruction:Te(Jd),definition:Wr.defineModifier("definition"),constant:Wr.defineModifier("constant"),function:Wr.defineModifier("function"),standard:Wr.defineModifier("standard"),local:Wr.defineModifier("local"),special:Wr.defineModifier("special")};for(let n in A){let e=A[n];e instanceof Wr&&(e.name=n)}xC([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}]);var _O;const dl=new ct;function Tx(n){return Ye.define({combine:n?e=>e.concat(n):void 0})}const $x=new ct;class di{constructor(e,t,r=[],i=""){this.data=e,this.name=i,At.prototype.hasOwnProperty("tree")||Object.defineProperty(At.prototype,"tree",{get(){return Ut(this)}}),this.parser=t,this.extension=[ma.of(this),At.languageData.of((s,o,l)=>{let c=CS(s,o,l),h=c.type.prop(dl);if(!h)return[];let f=s.facet(h),p=c.type.prop($x);if(p){let m=c.resolve(o-c.from,l);for(let g of p)if(g.test(m,s)){let k=s.facet(g.facet);return g.type=="replace"?k:k.concat(f)}}return f})].concat(r)}isActiveAt(e,t,r=-1){return CS(e,t,r).type.prop(dl)==this.data}findRegions(e){let t=e.facet(ma);if((t==null?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let r=[],i=(s,o)=>{if(s.prop(dl)==this.data){r.push({from:o,to:o+s.length});return}let l=s.prop(ct.mounted);if(l){if(l.tree.prop(dl)==this.data){if(l.overlay)for(let c of l.overlay)r.push({from:c.from+o,to:c.to+o});else r.push({from:o,to:o+s.length});return}else if(l.overlay){let c=r.length;if(i(l.tree,l.overlay[0].from+o),r.length>c)return}}for(let c=0;c<s.children.length;c++){let h=s.children[c];h instanceof Lt&&i(h,s.positions[c]+o)}};return i(Ut(e),0),r}get allowsNesting(){return!0}}di.setState=tn.define();function CS(n,e,t){let r=n.facet(ma),i=Ut(n).topNode;if(!r||r.allowsNesting)for(let s=i;s;s=s.enter(e,t,Zt.ExcludeBuffers|Zt.EnterBracketed))s.type.isTop&&(i=s);return i}class Ql extends di{constructor(e,t,r){super(e,t,[],r),this.parser=t}static define(e){let t=Tx(e.languageData);return new Ql(t,e.parser.configure({props:[dl.add(r=>r.isTop?t:void 0)]}),e.name)}configure(e,t){return new Ql(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function Ut(n){let e=n.field(di.state,!1);return e?e.tree:Lt.empty}class m3{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let r=this.cursorPos-this.string.length;return e<r||t>=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-r,t-r)}}let Oh=null;class Gh{constructor(e,t,r=[],i,s,o,l,c){this.parser=e,this.state=t,this.fragments=r,this.tree=i,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,t,r){return new Gh(e,t,[],Lt.empty,0,r,[],null)}startParse(){return this.parser.startParse(new m3(this.state.doc),this.fragments)}work(e,t){return t!=null&&t>=this.state.doc.length&&(t=void 0),this.tree!=Lt.empty&&this.isDone(t??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var r;if(typeof e=="number"){let i=Date.now()+e;e=()=>Date.now()>i}for(this.parse||(this.parse=this.startParse()),t!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>t)&&t<this.state.doc.length&&this.parse.stopAt(t);;){let i=this.parse.advance();if(i)if(this.fragments=this.withoutTempSkipped(Ks.addTree(i,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(r=this.parse.stoppedAt)!==null&&r!==void 0?r:this.state.doc.length,this.tree=i,this.parse=null,this.treeLen<(t??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,t;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(Ks.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=Oh;Oh=this;try{return e()}finally{Oh=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=TS(e,t.from,t.to);return e}changes(e,t){let{fragments:r,tree:i,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,f,p,m)=>c.push({fromA:h,toA:f,fromB:p,toB:m})),r=Ks.applyChanges(r,c),i=Lt.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let f=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);f<p&&l.push({from:f,to:p})}}}return new Gh(this.parser,t,r,i,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let t=this.skipped.length;for(let r=0;r<this.skipped.length;r++){let{from:i,to:s}=this.skipped[r];i<e.to&&s>e.from&&(this.fragments=TS(this.fragments,i,s),this.skipped.splice(r--,1))}return this.skipped.length>=t?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends Cx{createParse(t,r,i){let s=i[0].from,o=i[i.length-1].to;return{parsedPos:s,advance(){let c=Oh;if(c){for(let h of i)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new Lt(Cn.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&t[0].from==0&&t[0].to>=e}static get(){return Oh}}function TS(n,e,t){return Ks.applyChanges(n,[{fromA:e,toA:t,fromB:e,toB:t}])}class Yu{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),r=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,r)||t.takeTree(),new Yu(t)}static init(e){let t=Math.min(3e3,e.doc.length),r=Gh.create(e.facet(ma).parser,e,{from:0,to:t});return r.work(20,t)||r.takeTree(),new Yu(r)}}di.state=ks.define({create:Yu.init,update(n,e){for(let t of e.effects)if(t.is(di.setState))return t.value;return e.startState.facet(ma)!=e.state.facet(ma)?Yu.init(e.state):n.apply(e)}});let vC=n=>{let e=setTimeout(()=>n(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(vC=n=>{let e=-1,t=setTimeout(()=>{e=requestIdleCallback(n,{timeout:400})},100);return()=>e<0?clearTimeout(t):cancelIdleCallback(e)});const zO=typeof navigator<"u"&&(!((_O=navigator.scheduling)===null||_O===void 0)&&_O.isInputPending)?()=>navigator.scheduling.isInputPending():null,g3=pi.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(di.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(di.state);(t.tree!=t.context.tree||!t.context.isDone(e.doc.length))&&(this.working=vC(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEnd<t&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=t+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:r,viewport:{to:i}}=this.view,s=r.field(di.state);if(s.tree==s.context.tree&&s.context.isDone(i+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!zO?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<i&&r.doc.length>i+1e3,c=s.context.work(()=>zO&&zO()||Date.now()>o,i+(l?0:1e5));this.chunkBudget-=Date.now()-t,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:di.setState.of(new Yu(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(t=>gs(this.view.state,t)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),ma=Ye.define({combine(n){return n.length?n[0]:null},enables:n=>[di.state,g3,Ue.contentAttributes.compute([n],e=>{let t=e.facet(n);return t&&t.name?{"data-language":t.name}:{}})]});class Uu{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}class zp{constructor(e,t,r,i,s,o=void 0){this.name=e,this.alias=t,this.extensions=r,this.filename=i,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:t,support:r}=e;if(!t){if(!r)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");t=()=>Promise.resolve(r)}return new zp(e.name,(e.alias||[]).concat(e.name).map(i=>i.toLowerCase()),e.extensions||[],e.filename,t,r)}static matchFilename(e,t){for(let i of e)if(i.filename&&i.filename.test(t))return i;let r=/\.([^.]+)$/.exec(t);if(r){for(let i of e)if(i.extensions.indexOf(r[1])>-1)return i}return null}static matchLanguageName(e,t,r=!0){t=t.toLowerCase();for(let i of e)if(i.alias.some(s=>s==t))return i;if(r)for(let i of e)for(let s of i.alias){let o=t.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(t[o-1])&&!/\w/.test(t[o+s.length])))return i}return null}}const O3=Ye.define(),xf=Ye.define({combine:n=>{if(!n.length)return" ";let e=n[0];if(!e||/\S/.test(e)||Array.from(e).some(t=>t!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(n[0]));return e}});function Dp(n){let e=n.facet(xf);return e.charCodeAt(0)==9?n.tabSize*e.length:e.length}function Lp(n,e){let t="",r=n.tabSize,i=n.facet(xf)[0];if(i==" "){for(;e>=r;)t+=" ",e-=r;i=" "}for(let s=0;s<e;s++)t+=i;return t}function wC(n,e){n instanceof At&&(n=new hm(n));for(let r of n.state.facet(O3)){let i=r(n,e);if(i!==void 0)return i}let t=Ut(n.state);return t.length>=e?y3(n,t,e):null}class hm{constructor(e,t={}){this.state=e,this.options=t,this.unit=Dp(e)}lineAt(e,t=1){let r=this.state.doc.lineAt(e),{simulateBreak:i,simulateDoubleBreak:s}=this.options;return i!=null&&i>=r.from&&i<=r.to?s&&i==e?{text:"",from:e}:(t<0?i<e:i<=e)?{text:r.text.slice(i-r.from),from:i}:{text:r.text.slice(0,i-r.from),from:r.from}:r}textAfterPos(e,t=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:r,from:i}=this.lineAt(e,t);return r.slice(e-i,Math.min(r.length,e+100-i))}column(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.countColumn(r,e-i),o=this.options.overrideIndentation?this.options.overrideIndentation(i):-1;return o>-1&&(s+=o-this.countColumn(r,r.search(/\S|$/))),s}countColumn(e,t=e.length){return eo(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:r,from:i}=this.lineAt(e,t),s=this.options.overrideIndentation;if(s){let o=s(i);if(o>-1)return o}return this.countColumn(r,r.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ic=new ct;function y3(n,e,t){let r=e.resolveStack(t),i=e.resolveInner(t,-1).resolve(t,0).enterUnfinishedNodesBefore(t);if(i!=r.node){let s=[];for(let o=i;o&&!(o.from<r.node.from||o.to>r.node.to||o.from==r.node.from&&o.type==r.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)r={node:s[o],next:r}}return kC(r,n,t)}function kC(n,e,t){for(let r=n;r;r=r.next){let i=v3(r.node);if(i)return i(Ex.create(e,t,r))}return 0}function x3(n){return n.pos==n.options.simulateBreak&&n.options.simulateDoubleBreak}function v3(n){let e=n.type.prop(ic);if(e)return e;let t=n.firstChild,r;if(t&&(r=t.type.prop(ct.closedBy))){let i=n.lastChild,s=i&&r.indexOf(i.name)>-1;return o=>SC(o,!0,1,void 0,s&&!x3(o)?i.from:void 0)}return n.parent==null?w3:null}function w3(){return 0}class Ex extends hm{constructor(e,t,r){super(e.state,e.options),this.base=e,this.pos=t,this.context=r}get node(){return this.context.node}static create(e,t,r){return new Ex(e,t,r)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let t=this.state.doc.lineAt(e.from);for(;;){let r=e.resolve(t.from);for(;r.parent&&r.parent.from==r.from;)r=r.parent;if(k3(r,e))break;t=this.state.doc.lineAt(r.from)}return this.lineIndent(t.from)}continue(){return kC(this.context.next,this.base,this.pos)}}function k3(n,e){for(let t=e;t;t=t.parent)if(n==t)return!0;return!1}function S3(n){let e=n.node,t=e.childAfter(e.from),r=e.lastChild;if(!t)return null;let i=n.options.simulateBreak,s=n.state.doc.lineAt(t.from),o=i==null||i<=s.from?s.to:Math.min(s.to,i);for(let l=t.to;;){let c=e.childAfter(l);if(!c||c==r)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(s.text.slice(t.to-s.from))[0].length;return{from:t.from,to:t.to+h}}l=c.to}}function b3({closing:n,align:e=!0,units:t=1}){return r=>SC(r,e,t,n)}function SC(n,e,t,r,i){let s=n.textAfter,o=s.match(/^\s*/)[0].length,l=r&&s.slice(o,o+r.length)==r||i==n.pos+o,c=e?S3(n):null;return c?l?n.column(c.from):n.column(c.to):n.baseIndent+(l?0:n.unit*t)}const P3=n=>n.baseIndent;function $u({except:n,units:e=1}={}){return t=>{let r=n&&n.test(t.textAfter);return t.baseIndent+(r?0:e*t.unit)}}const bC=Ye.define(),Nl=new ct;function Mx(n){let e=n.firstChild,t=n.lastChild;return e&&e.to<t.from?{from:e.to,to:t.type.isError?n.to:t.from}:null}function Q3(n,e,t){let r=Ut(n);if(r.length<t)return null;let i=r.resolveStack(t,1),s=null;for(let o=i;o;o=o.next){let l=o.node;if(l.to<=t||l.from>t)continue;if(s&&l.from<e)break;let c=l.type.prop(Nl);if(c&&(l.to<r.length-50||r.length==n.doc.length||!C3(l))){let h=c(l,n);h&&h.from<=t&&h.from>=e&&h.to>t&&(s=h)}}return s}function C3(n){let e=n.lastChild;return e&&e.to==n.to&&e.type.isError}function $S(n,e,t){for(let r of n.facet(bC)){let i=r(n,e,t);if(i)return i}return Q3(n,e,t)}function PC(n,e){let t=e.mapPos(n.from,1),r=e.mapPos(n.to,-1);return t>=r?void 0:{from:t,to:r}}const QC=tn.define({map:PC}),jx=tn.define({map:PC}),Ip=ks.define({create(){return pt.none},update(n,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((t,r)=>n=ES(n,t,r)),n=n.map(e.changes);for(let t of e.effects)if(t.is(QC)&&!T3(n,t.value.from,t.value.to)){let{preparePlaceholder:r}=e.state.facet(CC),i=r?pt.replace({widget:new M3(r(e.state,t.value))}):MS;n=n.update({add:[i.range(t.value.from,t.value.to)]})}else t.is(jx)&&(n=n.update({filter:(r,i)=>t.value.from!=r||t.value.to!=i,filterFrom:t.value.from,filterTo:t.value.to}));return e.selection&&(n=ES(n,e.selection.main.head)),n},provide:n=>Ue.decorations.from(n),toJSON(n,e){let t=[];return n.between(0,e.doc.length,(r,i)=>{t.push(r,i)}),t},fromJSON(n){if(!Array.isArray(n)||n.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let t=0;t<n.length;){let r=n[t++],i=n[t++];if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid JSON for fold state");e.push(MS.range(r,i))}return pt.set(e,!0)}});function ES(n,e,t=e){let r=!1;return n.between(e,t,(i,s)=>{i<t&&s>e&&(r=!0)}),r?n.update({filterFrom:e,filterTo:t,filter:(i,s)=>i>=t||s<=e}):n}function fy(n,e,t){var r;let i=null;return(r=n.field(Ip,!1))===null||r===void 0||r.between(e,t,(s,o)=>{(!i||i.from>s)&&(i={from:s,to:o})}),i}function T3(n,e,t){let r=!1;return n.between(e,e,(i,s)=>{i==e&&s==t&&(r=!0)}),r}const $3={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},CC=Ye.define({combine(n){return im(n,$3)}});function E3(n){return[Ip,N3]}function TC(n,e){let{state:t}=n,r=t.facet(CC),i=o=>{let l=n.lineBlockAt(n.posAtDOM(o.target)),c=fy(n.state,l.from,l.to);c&&n.dispatch({effects:jx.of(c)}),o.preventDefault()};if(r.placeholderDOM)return r.placeholderDOM(n,i,e);let s=document.createElement("span");return s.textContent=r.placeholderText,s.setAttribute("aria-label",t.phrase("folded code")),s.title=t.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=i,s}const MS=pt.replace({widget:new class extends jl{toDOM(n){return TC(n,null)}}});class M3 extends jl{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return TC(e,this.value)}}const j3={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class DO extends no{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function R3(n={}){let e={...j3,...n},t=new DO(e,!0),r=new DO(e,!1),i=pi.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(ma)!=o.state.facet(ma)||o.startState.field(Ip,!1)!=o.state.field(Ip,!1)||Ut(o.startState)!=Ut(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new Vu;for(let c of o.viewportLineBlocks){let h=fy(o.state,c.from,c.to)?r:$S(o.state,c.from,c.to)?t:null;h&&l.add(c.from,c.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[i,zL({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(i))===null||l===void 0?void 0:l.markers)||Pt.empty},initialSpacer(){return new DO(e,!1)},domEventHandlers:{...s,click:(o,l,c)=>{if(s.click&&s.click(o,l,c))return!0;let h=fy(o.state,l.from,l.to);if(h)return o.dispatch({effects:jx.of(h)}),!0;let f=$S(o.state,l.from,l.to);return f?(o.dispatch({effects:QC.of(f)}),!0):!1}}}),E3()]}const N3=Ue.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class vf{constructor(e,t){this.specs=e;let r;function i(l){let c=ha.newName();return(r||(r=Object.create(null)))["."+c]=l,c}const s=typeof t.all=="string"?t.all:t.all?i(t.all):void 0,o=t.scope;this.scope=o instanceof di?l=>l.prop(dl)==o.data:o?l=>l==o:void 0,this.style=xC(e.map(l=>({tag:l.tag,class:l.class||i(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=r?new ha(r):null,this.themeType=t.themeType}static define(e,t){return new vf(e,t||{})}}const dy=Ye.define(),$C=Ye.define({combine(n){return n.length?[n[0]]:null}});function LO(n){let e=n.facet(dy);return e.length?e:n.facet($C)}function EC(n,e){let t=[_3],r;return n instanceof vf&&(n.module&&t.push(Ue.styleModule.of(n.module)),r=n.themeType),e!=null&&e.fallback?t.push($C.of(n)):r?t.push(dy.computeN([Ue.darkTheme],i=>i.facet(Ue.darkTheme)==(r=="dark")?[n]:[])):t.push(dy.of(n)),t}class A3{constructor(e){this.markCache=Object.create(null),this.tree=Ut(e.state),this.decorations=this.buildDeco(e,LO(e.state)),this.decoratedTo=e.viewport.to}update(e){let t=Ut(e.state),r=LO(e.state),i=r!=LO(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);t.length<s.to&&!i&&t.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(t!=this.tree||e.viewportChanged||i)&&(this.tree=t,this.decorations=this.buildDeco(e.view,r),this.decoratedTo=s.to)}buildDeco(e,t){if(!t||!this.tree.length)return pt.none;let r=new Vu;for(let{from:i,to:s}of e.visibleRanges)f3(this.tree,t,(o,l,c)=>{r.add(o,l,this.markCache[c]||(this.markCache[c]=pt.mark({class:c})))},i,s);return r.finish()}}const _3=pf.high(pi.fromClass(A3,{decorations:n=>n.decorations})),z3=vf.define([{tag:A.meta,color:"#404740"},{tag:A.link,textDecoration:"underline"},{tag:A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strong,fontWeight:"bold"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.keyword,color:"#708"},{tag:[A.atom,A.bool,A.url,A.contentSeparator,A.labelName],color:"#219"},{tag:[A.literal,A.inserted],color:"#164"},{tag:[A.string,A.deleted],color:"#a11"},{tag:[A.regexp,A.escape,A.special(A.string)],color:"#e40"},{tag:A.definition(A.variableName),color:"#00f"},{tag:A.local(A.variableName),color:"#30a"},{tag:[A.typeName,A.namespace],color:"#085"},{tag:A.className,color:"#167"},{tag:[A.special(A.variableName),A.macroName],color:"#256"},{tag:A.definition(A.propertyName),color:"#00c"},{tag:A.comment,color:"#940"},{tag:A.invalid,color:"#f00"}]),D3=Ue.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),MC=1e4,jC="()[]{}",RC=Ye.define({combine(n){return im(n,{afterCursor:!0,brackets:jC,maxScanDistance:MC,renderMatch:Z3})}}),L3=pt.mark({class:"cm-matchingBracket"}),I3=pt.mark({class:"cm-nonmatchingBracket"});function Z3(n){let e=[],t=n.matched?L3:I3;return e.push(t.range(n.start.from,n.start.to)),n.end&&e.push(t.range(n.end.from,n.end.to)),e}function jS(n){let e=[],t=n.facet(RC);for(let r of n.selection.ranges){if(!r.empty)continue;let i=ys(n,r.head,-1,t)||r.head>0&&ys(n,r.head-1,1,t)||t.afterCursor&&(ys(n,r.head,1,t)||r.head<n.doc.length&&ys(n,r.head+1,-1,t));i&&(e=e.concat(t.renderMatch(i,n)))}return pt.set(e,!0)}const X3=pi.fromClass(class{constructor(n){this.paused=!1,this.decorations=jS(n.state)}update(n){(n.docChanged||n.selectionSet||this.paused)&&(n.view.composing?(this.decorations=this.decorations.map(n.changes),this.paused=!0):(this.decorations=jS(n.state),this.paused=!1))}},{decorations:n=>n.decorations}),V3=[X3,D3];function W3(n={}){return[RC.of(n),V3]}const NC=new ct;function py(n,e,t){let r=n.prop(e<0?ct.openedBy:ct.closedBy);if(r)return r;if(n.name.length==1){let i=t.indexOf(n.name);if(i>-1&&i%2==(e<0?1:0))return[t[i+e]]}return null}function my(n){let e=n.type.prop(NC);return e?e(n.node):n}function ys(n,e,t,r={}){let i=r.maxScanDistance||MC,s=r.brackets||jC,o=Ut(n),l=o.resolveInner(e,t);for(let c=l;c;c=c.parent){let h=py(c.type,t,s);if(h&&c.from<c.to){let f=my(c);if(f&&(t>0?e>=f.from&&e<f.to:e>f.from&&e<=f.to))return F3(n,e,t,c,f,h,s)}}return B3(n,e,t,o,l.type,i,s)}function F3(n,e,t,r,i,s,o){let l=r.parent,c={from:i.from,to:i.to},h=0,f=l==null?void 0:l.cursor();if(f&&(t<0?f.childBefore(r.from):f.childAfter(r.to)))do if(t<0?f.to<=r.from:f.from>=r.to){if(h==0&&s.indexOf(f.type.name)>-1&&f.from<f.to){let p=my(f);return{start:c,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(py(f.type,t,o))h++;else if(py(f.type,-t,o)){if(h==0){let p=my(f);return{start:c,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(t<0?f.prevSibling():f.nextSibling());return{start:c,matched:!1}}function B3(n,e,t,r,i,s,o){if(t<0?!e:e==n.doc.length)return null;let l=t<0?n.sliceDoc(e-1,e):n.sliceDoc(e,e+1),c=o.indexOf(l);if(c<0||c%2==0!=t>0)return null;let h={from:t<0?e-1:e,to:t>0?e+1:e},f=n.doc.iterRange(e,t>0?n.doc.length:0),p=0;for(let m=0;!f.next().done&&m<=s;){let g=f.value;t<0&&(m+=g.length);let k=e+m*t;for(let w=t>0?0:g.length-1,C=t>0?g.length:-1;w!=C;w+=t){let Q=o.indexOf(g[w]);if(!(Q<0||r.resolveInner(k+w,1).type!=i))if(Q%2==0==t>0)p++;else{if(p==1)return{start:h,end:{from:k+w,to:k+w+1},matched:Q>>1==c>>1};p--}}t>0&&(m+=g.length)}return f.done?{start:h,matched:!1}:null}const Y3=Object.create(null),RS=[Cn.none],NS=[],AS=Object.create(null),U3=Object.create(null);for(let[n,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])U3[n]=q3(Y3,e);function IO(n,e){NS.indexOf(n)>-1||(NS.push(n),console.warn(e))}function q3(n,e){let t=[];for(let l of e.split(" ")){let c=[];for(let h of l.split(".")){let f=n[h]||A[h];f?typeof f=="function"?c.length?c=c.map(f):IO(h,`Modifier ${h} used at start of tag`):c.length?IO(h,`Tag ${h} used as modifier`):c=Array.isArray(f)?f:[f]:IO(h,`Unknown highlighting tag ${h}`)}for(let h of c)t.push(h)}if(!t.length)return 0;let r=e.replace(/ /g,"_"),i=r+" "+t.map(l=>l.id),s=AS[i];if(s)return s.id;let o=AS[i]=Cn.define({id:RS.length,name:r,props:[Rl({[r]:t})]});return RS.push(o),o.id}xn.RTL,xn.LTR;const H3=n=>{let{state:e}=n,t=e.doc.lineAt(e.selection.main.from),r=Nx(n.state,t.from);return r.line?G3(n):r.block?J3(n):!1};function Rx(n,e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let i=n(e,t);return i?(r(t.update(i)),!0):!1}}const G3=Rx(nI,0),K3=Rx(AC,0),J3=Rx((n,e)=>AC(n,e,tI(e)),0);function Nx(n,e){let t=n.languageDataAt("commentTokens",e,1);return t.length?t[0]:{}}const yh=50;function eI(n,{open:e,close:t},r,i){let s=n.sliceDoc(r-yh,r),o=n.sliceDoc(i,i+yh),l=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(c,c+t.length)==t)return{open:{pos:r-l,margin:l&&1},close:{pos:i+c,margin:c&&1}};let f,p;i-r<=2*yh?f=p=n.sliceDoc(r,i):(f=n.sliceDoc(r,r+yh),p=n.sliceDoc(i-yh,i));let m=/^\s*/.exec(f)[0].length,g=/\s*$/.exec(p)[0].length,k=p.length-g-t.length;return f.slice(m,m+e.length)==e&&p.slice(k,k+t.length)==t?{open:{pos:r+m+e.length,margin:/\s/.test(f.charAt(m+e.length))?1:0},close:{pos:i-g-t.length,margin:/\s/.test(p.charAt(k-1))?1:0}}:null}function tI(n){let e=[];for(let t of n.selection.ranges){let r=n.doc.lineAt(t.from),i=t.to<=r.to?r:n.doc.lineAt(t.to);i.from>r.from&&i.from==t.to&&(i=t.to==r.to+1?r:n.doc.lineAt(t.to-1));let s=e.length-1;s>=0&&e[s].to>r.from?e[s].to=i.to:e.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return e}function AC(n,e,t=e.selection.ranges){let r=t.map(s=>Nx(e,s.from).block);if(!r.every(s=>s))return null;let i=t.map((s,o)=>eI(e,r[o],s.from,s.to));if(n!=2&&!i.every(s=>s))return{changes:e.changes(t.map((s,o)=>i[o]?[]:[{from:s.from,insert:r[o].open+" "},{from:s.to,insert:" "+r[o].close}]))};if(n!=1&&i.some(s=>s)){let s=[];for(let o=0,l;o<i.length;o++)if(l=i[o]){let c=r[o],{open:h,close:f}=l;s.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:f.pos-f.margin,to:f.pos+c.close.length})}return{changes:s}}return null}function nI(n,e,t=e.selection.ranges){let r=[],i=-1;e:for(let{from:s,to:o}of t){let l=r.length,c=1e9,h;for(let f=s;f<=o;){let p=e.doc.lineAt(f);if(h==null&&(h=Nx(e,p.from).line,!h))continue e;if(p.from>i&&(s==o||o>p.from)){i=p.from;let m=/^\s*/.exec(p.text)[0].length,g=m==p.length,k=p.text.slice(m,m+h.length)==h?m:-1;m<p.text.length&&m<c&&(c=m),r.push({line:p,comment:k,token:h,indent:m,empty:g,single:!1})}f=p.to+1}if(c<1e9)for(let f=l;f<r.length;f++)r[f].indent<r[f].line.text.length&&(r[f].indent=c);r.length==l+1&&(r[l].single=!0)}if(n!=2&&r.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:c,indent:h,empty:f,single:p}of r)(p||!f)&&s.push({from:l.from+h,insert:c+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(n!=1&&r.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:c}of r)if(l>=0){let h=o.from+l,f=h+c.length;o.text[f-o.from]==" "&&f++,s.push({from:h,to:f})}return{changes:s}}return null}function sc(n,e){return me.create(n.ranges.map(e),n.mainIndex)}function Li(n,e){return n.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function Ii({state:n,dispatch:e},t){let r=sc(n.selection,t);return r.eq(n.selection,!0)?!1:(e(Li(n,r)),!0)}function fm(n,e){return me.cursor(e?n.to:n.from)}function _C(n,e){return Ii(n,t=>t.empty?n.moveByChar(t,e):fm(t,e))}function Hn(n){return n.textDirectionAt(n.state.selection.main.head)==xn.LTR}const zC=n=>_C(n,!Hn(n)),DC=n=>_C(n,Hn(n));function LC(n,e){return Ii(n,t=>t.empty?n.moveByGroup(t,e):fm(t,e))}const rI=n=>LC(n,!Hn(n)),iI=n=>LC(n,Hn(n));function sI(n,e,t){if(e.type.prop(t))return!0;let r=e.to-e.from;return r&&(r>2||/[^\s,.;:]/.test(n.sliceDoc(e.from,e.to)))||e.firstChild}function dm(n,e,t){let r=Ut(n).resolveInner(e.head),i=t?ct.closedBy:ct.openedBy;for(let c=e.head;;){let h=t?r.childAfter(c):r.childBefore(c);if(!h)break;sI(n,h,i)?r=h:c=t?h.to:h.from}let s=r.type.prop(i),o,l;return s&&(o=t?ys(n,r.from,1):ys(n,r.to,-1))&&o.matched?l=t?o.end.to:o.end.from:l=t?r.to:r.from,me.cursor(l,t?-1:1)}const oI=n=>Ii(n,e=>dm(n.state,e,!Hn(n))),aI=n=>Ii(n,e=>dm(n.state,e,Hn(n)));function IC(n,e){return Ii(n,t=>{if(!t.empty)return fm(t,e);let r=n.moveVertically(t,e);return r.head!=t.head?r:n.moveToLineBoundary(t,e)})}const ZC=n=>IC(n,!1),XC=n=>IC(n,!0);function VC(n){let e=n.scrollDOM.clientHeight<n.scrollDOM.scrollHeight-2,t=0,r=0,i;if(e){for(let s of n.state.facet(Ue.scrollMargins)){let o=s(n);o!=null&&o.top&&(t=Math.max(o==null?void 0:o.top,t)),o!=null&&o.bottom&&(r=Math.max(o==null?void 0:o.bottom,r))}i=n.scrollDOM.clientHeight-t-r}else i=(n.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:t,marginBottom:r,selfScroll:e,height:Math.max(n.defaultLineHeight,i-5)}}function WC(n,e){let t=VC(n),{state:r}=n,i=sc(r.selection,o=>o.empty?n.moveVertically(o,e,t.height):fm(o,e));if(i.eq(r.selection))return!1;let s;if(t.selfScroll){let o=n.coordsAtPos(r.selection.main.head),l=n.scrollDOM.getBoundingClientRect(),c=l.top+t.marginTop,h=l.bottom-t.marginBottom;o&&o.top>c&&o.bottom<h&&(s=Ue.scrollIntoView(i.main.head,{y:"start",yMargin:o.top-c}))}return n.dispatch(Li(r,i),{effects:s}),!0}const _S=n=>WC(n,!1),gy=n=>WC(n,!0);function xa(n,e,t){let r=n.lineBlockAt(e.head),i=n.moveToLineBoundary(e,t);if(i.head==e.head&&i.head!=(t?r.to:r.from)&&(i=n.moveToLineBoundary(e,t,!1)),!t&&i.head==r.from&&r.length){let s=/^\s*/.exec(n.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;s&&e.head!=r.from+s&&(i=me.cursor(r.from+s))}return i}const lI=n=>Ii(n,e=>xa(n,e,!0)),uI=n=>Ii(n,e=>xa(n,e,!1)),cI=n=>Ii(n,e=>xa(n,e,!Hn(n))),hI=n=>Ii(n,e=>xa(n,e,Hn(n))),fI=n=>Ii(n,e=>me.cursor(n.lineBlockAt(e.head).from,1)),dI=n=>Ii(n,e=>me.cursor(n.lineBlockAt(e.head).to,-1));function pI(n,e,t){let r=!1,i=sc(n.selection,s=>{let o=ys(n,s.head,-1)||ys(n,s.head,1)||s.head>0&&ys(n,s.head-1,1)||s.head<n.doc.length&&ys(n,s.head+1,-1);if(!o||!o.end)return s;r=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return me.cursor(l)});return r?(e(Li(n,i)),!0):!1}const mI=({state:n,dispatch:e})=>pI(n,e);function gi(n,e){let t=sc(n.state.selection,r=>{let i=e(r);return me.range(r.anchor,i.head,i.goalColumn,i.bidiLevel||void 0,i.assoc)});return t.eq(n.state.selection)?!1:(n.dispatch(Li(n.state,t)),!0)}function FC(n,e){return gi(n,t=>n.moveByChar(t,e))}const BC=n=>FC(n,!Hn(n)),YC=n=>FC(n,Hn(n));function UC(n,e){return gi(n,t=>n.moveByGroup(t,e))}const gI=n=>UC(n,!Hn(n)),OI=n=>UC(n,Hn(n)),yI=n=>gi(n,e=>dm(n.state,e,!Hn(n))),xI=n=>gi(n,e=>dm(n.state,e,Hn(n)));function qC(n,e){return gi(n,t=>n.moveVertically(t,e))}const HC=n=>qC(n,!1),GC=n=>qC(n,!0);function KC(n,e){return gi(n,t=>n.moveVertically(t,e,VC(n).height))}const zS=n=>KC(n,!1),DS=n=>KC(n,!0),vI=n=>gi(n,e=>xa(n,e,!0)),wI=n=>gi(n,e=>xa(n,e,!1)),kI=n=>gi(n,e=>xa(n,e,!Hn(n))),SI=n=>gi(n,e=>xa(n,e,Hn(n))),bI=n=>gi(n,e=>me.cursor(n.lineBlockAt(e.head).from)),PI=n=>gi(n,e=>me.cursor(n.lineBlockAt(e.head).to)),LS=({state:n,dispatch:e})=>(e(Li(n,{anchor:0})),!0),IS=({state:n,dispatch:e})=>(e(Li(n,{anchor:n.doc.length})),!0),ZS=({state:n,dispatch:e})=>(e(Li(n,{anchor:n.selection.main.anchor,head:0})),!0),XS=({state:n,dispatch:e})=>(e(Li(n,{anchor:n.selection.main.anchor,head:n.doc.length})),!0),QI=({state:n,dispatch:e})=>(e(n.update({selection:{anchor:0,head:n.doc.length},userEvent:"select"})),!0),CI=({state:n,dispatch:e})=>{let t=pm(n).map(({from:r,to:i})=>me.range(r,Math.min(i+1,n.doc.length)));return e(n.update({selection:me.create(t),userEvent:"select"})),!0},TI=({state:n,dispatch:e})=>{let t=sc(n.selection,r=>{let i=Ut(n),s=i.resolveStack(r.from,1);if(r.empty){let o=i.resolveStack(r.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<r.from&&l.to>=r.to||l.to>r.to&&l.from<=r.from)&&o.next)return me.range(l.to,l.from)}return r});return t.eq(n.selection)?!1:(e(Li(n,t)),!0)};function JC(n,e){let{state:t}=n,r=t.selection,i=t.selection.ranges.slice();for(let s of t.selection.ranges){let o=t.doc.lineAt(s.head);if(e?o.to<n.state.doc.length:o.from>0)for(let l=s;;){let c=n.moveVertically(l,e);if(c.head<o.from||c.head>o.to){i.some(h=>h.head==c.head)||i.push(c);break}else{if(c.head==l.head)break;l=c}}}return i.length==r.ranges.length?!1:(n.dispatch(Li(t,me.create(i,i.length-1))),!0)}const $I=n=>JC(n,!1),EI=n=>JC(n,!0),MI=({state:n,dispatch:e})=>{let t=n.selection,r=null;return t.ranges.length>1?r=me.create([t.main]):t.main.empty||(r=me.create([me.cursor(t.main.head)])),r?(e(Li(n,r)),!0):!1};function wf(n,e){if(n.state.readOnly)return!1;let t="delete.selection",{state:r}=n,i=r.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let c=e(s);c<o?(t="delete.backward",c=ep(n,c,!1)):c>o&&(t="delete.forward",c=ep(n,c,!0)),o=Math.min(o,c),l=Math.max(l,c)}else o=ep(n,o,!1),l=ep(n,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:me.cursor(o,o<s.head?-1:1)}});return i.changes.empty?!1:(n.dispatch(r.update(i,{scrollIntoView:!0,userEvent:t,effects:t=="delete.selection"?Ue.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function ep(n,e,t){if(n instanceof Ue)for(let r of n.state.facet(Ue.atomicRanges).map(i=>i(n)))r.between(e,e,(i,s)=>{i<e&&s>e&&(e=t?s:i)});return e}const eT=(n,e,t)=>wf(n,r=>{let i=r.from,{state:s}=n,o=s.doc.lineAt(i),l,c;if(t&&!e&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,i-o.from))){if(l[l.length-1]==" ")return i-1;let h=eo(l,s.tabSize),f=h%Dp(s)||Dp(s);for(let p=0;p<f&&l[l.length-1-p]==" ";p++)i--;c=i}else c=Yn(o.text,i-o.from,e,e)+o.from,c==i&&o.number!=(e?s.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=Yn(o.text,c-o.from,!1,!1)+o.from);return c}),Oy=n=>eT(n,!1,!0),tT=n=>eT(n,!0,!1),nT=(n,e)=>wf(n,t=>{let r=t.head,{state:i}=n,s=i.doc.lineAt(r),o=i.charCategorizer(r);for(let l=null;;){if(r==(e?s.to:s.from)){r==t.head&&s.number!=(e?i.doc.lines:1)&&(r+=e?1:-1);break}let c=Yn(s.text,r-s.from,e)+s.from,h=s.text.slice(Math.min(r,c)-s.from,Math.max(r,c)-s.from),f=o(h);if(l!=null&&f!=l)break;(h!=" "||r!=t.head)&&(l=f),r=c}return r}),rT=n=>nT(n,!1),jI=n=>nT(n,!0),RI=n=>wf(n,e=>{let t=n.lineBlockAt(e.head).to;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),NI=n=>wf(n,e=>{let t=n.moveToLineBoundary(e,!1).head;return e.head>t?t:Math.max(0,e.head-1)}),AI=n=>wf(n,e=>{let t=n.moveToLineBoundary(e,!0).head;return e.head<t?t:Math.min(n.state.doc.length,e.head+1)}),_I=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>({changes:{from:r.from,to:r.to,insert:Et.of(["",""])},range:me.cursor(r.from)}));return e(n.update(t,{scrollIntoView:!0,userEvent:"input"})),!0},zI=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=n.changeByRange(r=>{if(!r.empty||r.from==0||r.from==n.doc.length)return{range:r};let i=r.from,s=n.doc.lineAt(i),o=i==s.from?i-1:Yn(s.text,i-s.from,!1)+s.from,l=i==s.to?i+1:Yn(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:n.doc.slice(i,l).append(n.doc.slice(o,i))},range:me.cursor(l)}});return t.changes.empty?!1:(e(n.update(t,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function pm(n){let e=[],t=-1;for(let r of n.selection.ranges){let i=n.doc.lineAt(r.from),s=n.doc.lineAt(r.to);if(!r.empty&&r.to==s.from&&(s=n.doc.lineAt(r.to-1)),t>=i.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(r)}else e.push({from:i.from,to:s.to,ranges:[r]});t=s.number+1}return e}function iT(n,e,t){if(n.readOnly)return!1;let r=[],i=[];for(let s of pm(n)){if(t?s.to==n.doc.length:s.from==0)continue;let o=n.doc.lineAt(t?s.to+1:s.from-1),l=o.length+1;if(t){r.push({from:s.to,to:o.to},{from:s.from,insert:o.text+n.lineBreak});for(let c of s.ranges)i.push(me.range(Math.min(n.doc.length,c.anchor+l),Math.min(n.doc.length,c.head+l)))}else{r.push({from:o.from,to:s.from},{from:s.to,insert:n.lineBreak+o.text});for(let c of s.ranges)i.push(me.range(c.anchor-l,c.head-l))}}return r.length?(e(n.update({changes:r,scrollIntoView:!0,selection:me.create(i,n.selection.mainIndex),userEvent:"move.line"})),!0):!1}const DI=({state:n,dispatch:e})=>iT(n,e,!1),LI=({state:n,dispatch:e})=>iT(n,e,!0);function sT(n,e,t){if(n.readOnly)return!1;let r=[];for(let s of pm(n))t?r.push({from:s.from,insert:n.doc.slice(s.from,s.to)+n.lineBreak}):r.push({from:s.to,insert:n.lineBreak+n.doc.slice(s.from,s.to)});let i=n.changes(r);return e(n.update({changes:i,selection:n.selection.map(i,t?1:-1),scrollIntoView:!0,userEvent:"input.copyline"})),!0}const II=({state:n,dispatch:e})=>sT(n,e,!1),ZI=({state:n,dispatch:e})=>sT(n,e,!0),XI=n=>{if(n.state.readOnly)return!1;let{state:e}=n,t=e.changes(pm(e).map(({from:i,to:s})=>(i>0?i--:s<e.doc.length&&s++,{from:i,to:s}))),r=sc(e.selection,i=>{let s;if(n.lineWrapping){let o=n.lineBlockAt(i.head),l=n.coordsAtPos(i.head,i.assoc||1);l&&(s=o.bottom+n.documentTop-l.bottom+n.defaultLineHeight/2)}return n.moveVertically(i,!0,s)}).map(t);return n.dispatch({changes:t,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0};function VI(n,e){if(/\(\)|\[\]|\{\}/.test(n.sliceDoc(e-1,e+1)))return{from:e,to:e};let t=Ut(n).resolveInner(e),r=t.childBefore(e),i=t.childAfter(e),s;return r&&i&&r.to<=e&&i.from>=e&&(s=r.type.prop(ct.closedBy))&&s.indexOf(i.name)>-1&&n.doc.lineAt(r.to).from==n.doc.lineAt(i.from).from&&!/\S/.test(n.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}const VS=oT(!1),WI=oT(!0);function oT(n){return({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(i=>{let{from:s,to:o}=i,l=e.doc.lineAt(s),c=!n&&s==o&&VI(e,s);n&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new hm(e,{simulateBreak:s,simulateDoubleBreak:!!c}),f=wC(h,s);for(f==null&&(f=eo(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;c?{from:s,to:o}=c:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let p=["",Lp(e,f)];return c&&p.push(Lp(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:Et.of(p)},range:me.cursor(s+1+p[1].length)}});return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0}}function Ax(n,e){let t=-1;return n.changeByRange(r=>{let i=[];for(let o=r.from;o<=r.to;){let l=n.doc.lineAt(o);l.number>t&&(r.empty||r.to>l.from)&&(e(l,i,r),t=l.number),o=l.to+1}let s=n.changes(i);return{changes:i,range:me.range(s.mapPos(r.anchor,1),s.mapPos(r.head,1))}})}const FI=({state:n,dispatch:e})=>{if(n.readOnly)return!1;let t=Object.create(null),r=new hm(n,{overrideIndentation:s=>{let o=t[s];return o??-1}}),i=Ax(n,(s,o,l)=>{let c=wC(r,s.from);if(c==null)return;/\S/.test(s.text)||(c=0);let h=/^\s*/.exec(s.text)[0],f=Lp(n,c);(h!=f||l.from<s.from+h.length)&&(t[s.from]=c,o.push({from:s.from,to:s.from+h.length,insert:f}))});return i.changes.empty||e(n.update(i,{userEvent:"indent"})),!0},aT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Ax(n,(t,r)=>{r.push({from:t.from,insert:n.facet(xf)})}),{userEvent:"input.indent"})),!0),lT=({state:n,dispatch:e})=>n.readOnly?!1:(e(n.update(Ax(n,(t,r)=>{let i=/^\s*/.exec(t.text)[0];if(!i)return;let s=eo(i,n.tabSize),o=0,l=Lp(n,Math.max(0,s-Dp(n)));for(;o<i.length&&o<l.length&&i.charCodeAt(o)==l.charCodeAt(o);)o++;r.push({from:t.from+o,to:t.from+i.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),BI=n=>(n.setTabFocusMode(),!0),YI=[{key:"Ctrl-b",run:zC,shift:BC,preventDefault:!0},{key:"Ctrl-f",run:DC,shift:YC},{key:"Ctrl-p",run:ZC,shift:HC},{key:"Ctrl-n",run:XC,shift:GC},{key:"Ctrl-a",run:fI,shift:bI},{key:"Ctrl-e",run:dI,shift:PI},{key:"Ctrl-d",run:tT},{key:"Ctrl-h",run:Oy},{key:"Ctrl-k",run:RI},{key:"Ctrl-Alt-h",run:rT},{key:"Ctrl-o",run:_I},{key:"Ctrl-t",run:zI},{key:"Ctrl-v",run:gy}],UI=[{key:"ArrowLeft",run:zC,shift:BC,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:rI,shift:gI,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:cI,shift:kI,preventDefault:!0},{key:"ArrowRight",run:DC,shift:YC,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:iI,shift:OI,preventDefault:!0},{mac:"Cmd-ArrowRight",run:hI,shift:SI,preventDefault:!0},{key:"ArrowUp",run:ZC,shift:HC,preventDefault:!0},{mac:"Cmd-ArrowUp",run:LS,shift:ZS},{mac:"Ctrl-ArrowUp",run:_S,shift:zS},{key:"ArrowDown",run:XC,shift:GC,preventDefault:!0},{mac:"Cmd-ArrowDown",run:IS,shift:XS},{mac:"Ctrl-ArrowDown",run:gy,shift:DS},{key:"PageUp",run:_S,shift:zS},{key:"PageDown",run:gy,shift:DS},{key:"Home",run:uI,shift:wI,preventDefault:!0},{key:"Mod-Home",run:LS,shift:ZS},{key:"End",run:lI,shift:vI,preventDefault:!0},{key:"Mod-End",run:IS,shift:XS},{key:"Enter",run:VS,shift:VS},{key:"Mod-a",run:QI},{key:"Backspace",run:Oy,shift:Oy,preventDefault:!0},{key:"Delete",run:tT,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:rT,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:jI,preventDefault:!0},{mac:"Mod-Backspace",run:NI,preventDefault:!0},{mac:"Mod-Delete",run:AI,preventDefault:!0}].concat(YI.map(n=>({mac:n.key,run:n.run,shift:n.shift}))),qI=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:oI,shift:yI},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:aI,shift:xI},{key:"Alt-ArrowUp",run:DI},{key:"Shift-Alt-ArrowUp",run:II},{key:"Alt-ArrowDown",run:LI},{key:"Shift-Alt-ArrowDown",run:ZI},{key:"Mod-Alt-ArrowUp",run:$I},{key:"Mod-Alt-ArrowDown",run:EI},{key:"Escape",run:MI},{key:"Mod-Enter",run:WI},{key:"Alt-l",mac:"Ctrl-l",run:CI},{key:"Mod-i",run:TI,preventDefault:!0},{key:"Mod-[",run:lT},{key:"Mod-]",run:aT},{key:"Mod-Alt-\\",run:FI},{key:"Shift-Mod-k",run:XI},{key:"Shift-Mod-\\",run:mI},{key:"Mod-/",run:H3},{key:"Alt-A",run:K3},{key:"Ctrl-m",mac:"Shift-Alt-m",run:BI}].concat(UI),HI={key:"Tab",run:aT,shift:lT};var WS={};class Zp{constructor(e,t,r,i,s,o,l,c,h,f=0,p){this.p=e,this.stack=t,this.state=r,this.reducePos=i,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=c,this.curContext=h,this.lookAhead=f,this.parent=p}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,r=0){let i=e.parser.context;return new Zp(e,[],t,r,r,0,[],0,i?new FS(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let r=e>>19,i=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(i);if(l&&(this.score+=l),r==0){this.pushState(s.getGoto(this.state,i,!0),this.reducePos),i<s.minRepeatTerm&&this.storeNode(i,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(i,this.reducePos);return}let c=this.stack.length-(r-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,f=this.reducePos-h;f>=2e3&&!(!((t=this.p.parser.nodeSet.types[i])===null||t===void 0)&&t.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=f):this.p.lastBigReductionSize<f&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=f));let p=c?this.stack[c-1]:0,m=this.bufferBase+this.buffer.length-p;if(i<s.minRepeatTerm||e&131072){let g=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(i,h,g,m+4,!0)}if(e&262144)this.state=this.stack[c];else{let g=this.stack[c-3];this.state=s.getGoto(g,i,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(i,h)}storeNode(e,t,r,i=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(t==r)return;if(o.buffer[l-2]>=t){o.buffer[l-2]=r;return}}}if(!s||this.pos==r)this.buffer.push(e,t,r,i);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let c=o;c>0&&this.buffer[c-2]>r;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>r;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,i>4&&(i-=4)}this.buffer[o]=e,this.buffer[o+1]=t,this.buffer[o+2]=r,this.buffer[o+3]=i}}shift(e,t,r,i){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;this.pos=i;let l=o.stateFlag(s,1);!l&&(i>r||t<=o.maxNode)&&(this.reducePos=i),this.pushState(s,l?r:Math.min(r,this.reducePos)),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,i,4)}else this.pos=i,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,i,4)}apply(e,t,r,i){e&65536?this.reduce(e):this.shift(e,t,r,i)}useNode(e,t){let r=this.p.reused.length-1;(r<0||this.p.reused[r]!=e)&&(this.p.reused.push(e),r++);let i=this.pos;this.reducePos=this.pos=i+e.length,this.pushState(t,i),this.buffer.push(r,i,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let r=e.buffer.slice(t),i=e.bufferBase+t;for(;e&&i==e.bufferBase;)e=e.parent;return new Zp(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let r=e<=this.p.parser.maxNode;r&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,r?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new GI(this);;){let r=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(r==0)return!1;if((r&65536)==0)return!0;t.reduce(r)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let i=[];for(let s=0,o;s<t.length;s+=2)(o=t[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&i.push(t[s],o);if(this.stack.length<120)for(let s=0;i.length<8&&s<t.length;s+=2){let o=t[s+1];i.some((l,c)=>c&1&&l==o)||i.push(t[s],o)}t=i}let r=[];for(let i=0;i<t.length&&r.length<4;i+=2){let s=t[i+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(t[i],this.pos),o.reducePos=this.pos,o.score-=200,r.push(o)}return r}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if((t&65536)==0)return!1;if(!e.validAction(this.state,t)){let r=t>>19,i=t&65535,s=this.stack.length-r*3;if(s<0||e.getGoto(this.stack[s],i,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;t=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],r=(i,s)=>{if(!t.includes(i))return t.push(i),e.allActions(i,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let c=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return l<<19|65536|c}}else{let l=r(o,s+1);if(l!=null)return l}})};return r(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new FS(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class FS{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}class GI{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,r=e>>19;r==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(r-1)*3;let i=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=i}}class Xp{constructor(e,t,r){this.stack=e,this.pos=t,this.index=r,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new Xp(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new Xp(this.stack,this.pos,this.index)}}function Ph(n,e=Uint16Array){if(typeof n!="string")return n;let t=null;for(let r=0,i=0;r<n.length;){let s=0;for(;;){let o=n.charCodeAt(r++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,l=!0),s+=c,l)break;s*=46}t?t[i++]=s:t=new e(s)}return t}class fp{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const BS=new fp;class KI{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=BS,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let r=this.range,i=this.rangeIndex,s=this.pos+e;for(;s<r.from;){if(!i)return null;let o=this.ranges[--i];s-=r.from-o.to,r=o}for(;t<0?s>r.to:s>=r.to;){if(i==this.ranges.length-1)return null;let o=this.ranges[++i];s+=o.from-r.to,r=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,r,i;if(t>=0&&t<this.chunk.length)r=this.pos+e,i=this.chunk.charCodeAt(t);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(r=s,r>=this.chunk2Pos&&r<this.chunk2Pos+this.chunk2.length)i=this.chunk2.charCodeAt(r-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=r;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=r),r+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-r)),i=this.chunk2.charCodeAt(0)}}return r>=this.token.lookAhead&&(this.token.lookAhead=r+1),i}acceptToken(e,t=0){let r=t?this.resolveOffset(t,-1):this.pos;if(r==null||r<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=r}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=BS,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let r="";for(let i of this.ranges){if(i.from>=t)break;i.to>e&&(r+=this.input.read(Math.max(i.from,e),Math.min(i.to,t)))}return r}}class Eu{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:r}=t.p;uT(this.data,e,t,this.id,r.data,r.tokenPrecTable)}}Eu.prototype.contextual=Eu.prototype.fallback=Eu.prototype.extend=!1;class Vp{constructor(e,t,r){this.precTable=t,this.elseToken=r,this.data=typeof e=="string"?Ph(e):e}token(e,t){let r=e.pos,i=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(uT(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||i++,o==null)break;e.reset(o,e.token)}i&&(e.reset(r,e.token),e.acceptToken(this.elseToken,i))}}Vp.prototype.contextual=Eu.prototype.fallback=Eu.prototype.extend=!1;class Br{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function uT(n,e,t,r,i,s){let o=0,l=1<<r,{dialect:c}=t.p.parser;e:for(;(l&n[o])!=0;){let h=n[o+1];for(let g=o+3;g<h;g+=2)if((n[g+1]&l)>0){let k=n[g];if(c.allows(k)&&(e.token.value==-1||e.token.value==k||JI(k,e.token.value,i,s))){e.acceptToken(k);break}}let f=e.next,p=0,m=n[o+2];if(e.next<0&&m>p&&n[h+m*3-3]==65535){o=n[h+m*3-1];continue e}for(;p<m;){let g=p+m>>1,k=h+g+(g<<1),w=n[k],C=n[k+1]||65536;if(f<w)m=g;else if(f>=C)p=g+1;else{o=n[k+2],e.advance();continue e}}break}}function YS(n,e,t){for(let r=e,i;(i=n[r])!=65535;r++)if(i==t)return r-e;return-1}function JI(n,e,t,r){let i=YS(t,r,e);return i<0||YS(t,r,n)<i}const zr=typeof process<"u"&&WS&&/\bparse\b/.test(WS.LOG);let ZO=null;function US(n,e,t){let r=n.cursor(Zt.IncludeAnonymous);for(r.moveTo(e);;)if(!(t<0?r.childBefore(e):r.childAfter(e)))for(;;){if((t<0?r.to<e:r.from>e)&&!r.type.isError)return t<0?Math.max(0,Math.min(r.to-1,e-25)):Math.min(n.length,Math.max(r.from+1,e+25));if(t<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return t<0?0:n.length}}let eZ=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?US(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?US(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let r=this.trees[t],i=this.index[t];if(i==r.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=r.children[i],o=this.start[t]+r.positions[i];if(o>e)return this.nextStart=o,null;if(s instanceof Lt){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let c=s.prop(ct.lookAhead);if(!c||l+c<this.fragment.to)return s}}this.index[t]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[t]++,this.nextStart=o+s.length}}};class tZ{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(r=>new fp)}getActions(e){let t=0,r=null,{parser:i}=e.p,{tokenizers:s}=i,o=i.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let f=s[h],p=this.tokens[h];if(!(r&&!f.fallback)&&((f.contextual||p.start!=e.pos||p.mask!=o||p.context!=l)&&(this.updateCachedToken(p,f,e),p.mask=o,p.context=l),p.lookAhead>p.end+25&&(c=Math.max(p.lookAhead,c)),p.value!=0)){let m=t;if(p.extended>-1&&(t=this.addActions(e,p.extended,p.end,t)),t=this.addActions(e,p.value,p.end,t),!f.extend&&(r=p,t>m))break}}for(;this.actions.length>t;)this.actions.pop();return c&&e.setLookAhead(c),!r&&e.pos==this.stream.end&&(r=new fp,r.value=e.p.parser.eofTerm,r.start=r.end=e.pos,t=this.addActions(e,r.value,r.end,t)),this.mainToken=r,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new fp,{pos:r,p:i}=e;return t.start=r,t.end=Math.min(r+1,i.stream.end),t.value=r==i.stream.end?i.parser.eofTerm:0,t}updateCachedToken(e,t,r){let i=this.stream.clipPos(r.pos);if(t.token(this.stream.reset(i,e),r),e.value>-1){let{parser:s}=r.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),r);if(l>=0&&r.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(i+1)}putAction(e,t,r,i){for(let s=0;s<i;s+=3)if(this.actions[s]==e)return i;return this.actions[i++]=e,this.actions[i++]=t,this.actions[i++]=r,i}addActions(e,t,r,i){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(s,c?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=Bs(l,h+2);else{i==0&&l[h+1]==2&&(i=this.putAction(Bs(l,h+2),t,r,i));break}l[h]==t&&(i=this.putAction(Bs(l,h+1),t,r,i))}return i}}class nZ{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new KI(t,i),this.tokens=new tZ(e,this.stream),this.topTerm=e.top[1];let{from:s}=i[0];this.stacks=[Zp.start(this,e.top[0],s)],this.fragments=r.length&&this.stream.end-s>e.bufferLength*4?new eZ(r,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,r=this.stacks=[],i,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>t)r.push(l);else{if(this.advanceStack(l,r,e))continue;{i||(i=[],s=[]),i.push(l);let c=this.tokens.getMainToken(l);s.push(c.value,c.end)}}break}}if(!r.length){let o=i&&iZ(i);if(o)return zr&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw zr&&i&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+t);this.recovering||(this.recovering=5)}if(this.recovering&&i){let o=this.stoppedAt!=null&&i[0].pos>this.stoppedAt?i[0]:this.runRecovery(i,s,r);if(o)return zr&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(r.length>o)for(r.sort((l,c)=>c.score-l.score);r.length>o;)r.pop();r.some(l=>l.reducePos>t)&&this.recovering--}else if(r.length>1){e:for(let o=0;o<r.length-1;o++){let l=r[o];for(let c=o+1;c<r.length;c++){let h=r[c];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)r.splice(c--,1);else{r.splice(o--,1);continue e}}}r.length>12&&(r.sort((o,l)=>l.score-o.score),r.splice(12,r.length-12))}this.minStackPos=r[0].pos;for(let o=1;o<r.length;o++)r[o].pos<this.minStackPos&&(this.minStackPos=r[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,t,r){let i=e.pos,{parser:s}=this,o=zr?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&i>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,f=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(i);p;){let m=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(m>-1&&p.length&&(!h||(p.prop(ct.contextHash)||0)==f))return e.useNode(p,m),zr&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof Lt)||p.children.length==0||p.positions[0]>0)break;let g=p.children[0];if(g instanceof Lt&&p.positions[0]==0)p=g;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),zr&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let f=c[h++],p=c[h++],m=c[h++],g=h==c.length||!r,k=g?e:e.split(),w=this.tokens.mainToken;if(k.apply(f,p,w?w.start:k.pos,m),zr&&console.log(o+this.stackID(k)+` (via ${(f&65536)==0?"shift":`reduce of ${s.getName(f&65535)}`} for ${s.getName(p)} @ ${i}${k==e?"":", split"})`),g)return!0;k.pos>i?t.push(k):r.push(k)}return!1}advanceFully(e,t){let r=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>r)return qS(e,t),!0}}runRecovery(e,t,r){let i=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],c=t[o<<1],h=t[(o<<1)+1],f=zr?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),zr&&console.log(f+this.stackID(l)+" (restarted)"),this.advanceFully(l,r))))continue;let p=l.split(),m=f;for(let g=0;g<10&&p.forceReduce()&&(zr&&console.log(m+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,r));g++)zr&&(m=this.stackID(p)+" -> ");for(let g of l.recoverByInsert(c))zr&&console.log(f+this.stackID(g)+" (via recover-insert)"),this.advanceFully(g,r);this.stream.end>l.pos?(h==l.pos&&(h++,c=0),l.recoverByDelete(c,h),zr&&console.log(f+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),qS(l,r)):(!i||i.score<p.score)&&(i=p)}return i}stackToTree(e){return e.close(),Lt.build({buffer:Xp.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(ZO||(ZO=new WeakMap)).get(e);return t||ZO.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}}function qS(n,e){for(let t=0;t<e.length;t++){let r=e[t];if(r.pos==n.pos&&r.sameState(n)){e[t].score<n.score&&(e[t]=n);return}}e.push(n)}class rZ{constructor(e,t,r){this.source=e,this.flags=t,this.disabled=r}allows(e){return!this.disabled||this.disabled[e]==0}}const XO=n=>n;class cT{constructor(e){this.start=e.start,this.shift=e.shift||XO,this.reduce=e.reduce||XO,this.reuse=e.reuse||XO,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class Cl extends Cx{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let l=0;l<e.repeatNodeCount;l++)t.push("");let r=Object.keys(e.topRules).map(l=>e.topRules[l][1]),i=[];for(let l=0;l<t.length;l++)i.push([]);function s(l,c,h){i[l].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let c=l[0];typeof c=="string"&&(c=ct[c]);for(let h=1;h<l.length;){let f=l[h++];if(f>=0)s(f,c,l[h++]);else{let p=l[h+-f];for(let m=-f;m>0;m--)s(l[h++],c,p);h++}}}this.nodeSet=new yf(t.map((l,c)=>Cn.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:i[c],top:r.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=fC;let o=Ph(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(HS),this.states=Ph(e.states,Uint32Array),this.data=Ph(e.stateData),this.goto=Ph(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new Eu(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,r){let i=new nZ(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}getGoto(e,t,r=!1){let i=this.goto;if(t>=i[0])return-1;for(let s=i[t+1];;){let o=i[s++],l=o&1,c=i[s++];if(l&&r)return c;for(let h=s+(o>>1);s<h;s++)if(i[s]==e)return c;if(l)return-1}}hasAction(e,t){let r=this.data;for(let i=0;i<2;i++)for(let s=this.stateSlot(e,i?2:1),o;;s+=3){if((o=r[s])==65535)if(r[s+1]==1)o=r[s=Bs(r,s+2)];else{if(r[s+1]==2)return Bs(r,s+2);break}if(o==t||o==0)return Bs(r,s+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,r=>r==t?!0:null)}allActions(e,t){let r=this.stateSlot(e,4),i=r?t(r):void 0;for(let s=this.stateSlot(e,1);i==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=Bs(this.data,s+2);else break;i=t(Bs(this.data,s+1))}return i}nextStates(e){let t=[];for(let r=this.stateSlot(e,1);;r+=3){if(this.data[r]==65535)if(this.data[r+1]==1)r=Bs(this.data,r+2);else break;if((this.data[r+2]&1)==0){let i=this.data[r+1];t.some((s,o)=>o&1&&s==i)||t.push(this.data[r],i)}}return t}configure(e){let t=Object.assign(Object.create(Cl.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let r=this.topRules[e.top];if(!r)throw new RangeError(`Invalid top rule name ${e.top}`);t.top=r}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(r=>{let i=e.tokenizers.find(s=>s.from==r);return i?i.to:r})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((r,i)=>{let s=e.specializers.find(l=>l.from==r.external);if(!s)return r;let o=Object.assign(Object.assign({},r),{external:s.to});return t.specializers[i]=HS(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),e.bufferLength!=null&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),r=t.map(()=>!1);if(e)for(let s of e.split(" ")){let o=t.indexOf(s);o>=0&&(r[o]=!0)}let i=null;for(let s=0;s<t.length;s++)if(!r[s])for(let o=this.dialects[t[s]],l;(l=this.data[o++])!=65535;)(i||(i=new Uint8Array(this.maxTerm+1)))[l]=1;return new rZ(e,r,i)}static deserialize(e){return new Cl(e)}}function Bs(n,e){return n[e]|n[e+1]<<16}function iZ(n){let e=null;for(let t of n){let r=t.p.stoppedAt;(t.pos==t.p.stream.end||r!=null&&t.pos>r)&&t.p.parser.stateFlag(t.state,2)&&(!e||e.score<t.score)&&(e=t)}return e}function HS(n){if(n.external){let e=n.extend?1:0;return(t,r)=>n.external(t,r)<<1|e}return n.get}const sZ=Rl({String:A.string,Number:A.number,"True False":A.bool,PropertyName:A.propertyName,Null:A.null,", :":A.separator,"[ ]":A.squareBracket,"{ }":A.brace}),oZ=Cl.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[sZ],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),aZ=Ql.define({name:"json",parser:oZ.configure({props:[ic.add({Object:$u({except:/^\s*\}/}),Array:$u({except:/^\s*\]/})}),Nl.add({"Object Array":Mx})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function lZ(){return new Uu(aZ)}class uZ{constructor(e,t,r,i){this.state=e,this.pos=t,this.explicit=r,this.view=i,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Ut(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),r=Math.max(t.from,this.pos-250),i=t.text.slice(r-t.from,this.pos-t.from),s=i.search(dZ(e));return s<0?null:{from:r+s,to:this.pos,text:i.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,r){e=="abort"&&this.abortListeners&&(this.abortListeners.push(t),r&&r.onDocChange&&(this.abortOnDocChange=!0))}}function GS(n){let e=Object.keys(n).join(""),t=/\w/.test(e);return t&&(e=e.replace(/\w/g,"")),`[${t?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function cZ(n){let e=Object.create(null),t=Object.create(null);for(let{label:i}of n){e[i[0]]=!0;for(let s=1;s<i.length;s++)t[i[s]]=!0}let r=GS(e)+GS(t)+"*$";return[new RegExp("^"+r),new RegExp(r)]}function hZ(n){let e=n.map(i=>typeof i=="string"?{label:i}:i),[t,r]=e.every(i=>/^\w+$/.test(i.label))?[/\w*$/,/\w+$/]:cZ(e);return i=>{let s=i.matchBefore(r);return s||i.explicit?{from:s?s.from:i.pos,options:e,validFor:t}:null}}function fZ(n,e){return t=>{for(let r=Ut(t.state).resolveInner(t.pos,-1);r;r=r.parent){if(n.indexOf(r.name)>-1)return null;if(r.type.isTop)break}return e(t)}}function dZ(n,e){var t;let{source:r}=n,i=r[r.length-1]!="$";return i?new RegExp(`(?:${r})${i?"$":""}`,(t=n.flags)!==null&&t!==void 0?t:n.ignoreCase?"i":""):n}const pZ=Ml.define(),mZ=Ue.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class gZ{constructor(e,t,r,i){this.field=e,this.line=t,this.from=r,this.to=i}}class _x{constructor(e,t,r){this.field=e,this.from=t,this.to=r}map(e){let t=e.mapPos(this.from,-1,Bn.TrackDel),r=e.mapPos(this.to,1,Bn.TrackDel);return t==null||r==null?null:new _x(this.field,t,r)}}class zx{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let r=[],i=[t],s=e.doc.lineAt(t),o=/^\s*/.exec(s.text)[0];for(let c of this.lines){if(r.length){let h=o,f=/^\t*/.exec(c)[0].length;for(let p=0;p<f;p++)h+=e.facet(xf);i.push(t+h.length-f),c=h+c.slice(f)}r.push(c),t+=c.length+1}let l=this.fieldPositions.map(c=>new _x(c.field,i[c.line]+c.from,i[c.line]+c.to));return{text:r,ranges:l}}static parse(e){let t=[],r=[],i=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,c=s[2]||s[3]||"",h=-1,f=c.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<t.length;p++)(l!=null?t[p].seq==l:f&&t[p].name==f)&&(h=p);if(h<0){let p=0;for(;p<t.length&&(l==null||t[p].seq!=null&&t[p].seq<l);)p++;t.splice(p,0,{seq:l,name:f}),h=p;for(let m of i)m.field>=h&&m.field++}for(let p of i)if(p.line==r.length&&p.from>s.index){let m=s[2]?3+(s[1]||"").length:2;p.from-=m,p.to-=m}i.push(new gZ(h,r.length,s.index,s.index+f.length)),o=o.slice(0,s.index)+c+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,c,h)=>{for(let f of i)f.line==r.length&&f.from>h&&(f.from--,f.to--);return c}),r.push(o)}return new zx(r,i)}}let OZ=pt.widget({widget:new class extends jl{toDOM(){let n=document.createElement("span");return n.className="cm-snippetFieldPosition",n}ignoreEvent(){return!1}}}),yZ=pt.mark({class:"cm-snippetField"});class oc{constructor(e,t){this.ranges=e,this.active=t,this.deco=pt.set(e.map(r=>(r.from==r.to?OZ:yZ).range(r.from,r.to)),!0)}map(e){let t=[];for(let r of this.ranges){let i=r.map(e);if(!i)return null;t.push(i)}return new oc(t,this.active)}selectionInsideField(e){return e.ranges.every(t=>this.ranges.some(r=>r.field==this.active&&r.from<=t.from&&r.to>=t.to))}}const kf=tn.define({map(n,e){return n&&n.map(e)}}),xZ=tn.define(),Kh=ks.define({create(){return null},update(n,e){for(let t of e.effects){if(t.is(kf))return t.value;if(t.is(xZ)&&n)return new oc(n.ranges,t.value)}return n&&e.docChanged&&(n=n.map(e.changes)),n&&e.selection&&!n.selectionInsideField(e.selection)&&(n=null),n},provide:n=>Ue.decorations.from(n,e=>e?e.deco:pt.none)});function Dx(n,e){return me.create(n.filter(t=>t.field==e).map(t=>me.range(t.from,t.to)))}function vZ(n){let e=zx.parse(n);return(t,r,i,s)=>{let{text:o,ranges:l}=e.instantiate(t.state,i),{main:c}=t.state.selection,h={changes:{from:i,to:s==c.from?c.to:s,insert:Et.of(o)},scrollIntoView:!0,annotations:r?[pZ.of(r),Ln.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=Dx(l,0)),l.some(f=>f.field>0)){let f=new oc(l,0),p=h.effects=[kf.of(f)];t.state.field(Kh,!1)===void 0&&p.push(tn.appendConfig.of([Kh,PZ,QZ,mZ]))}t.dispatch(t.state.update(h))}}function hT(n){return({state:e,dispatch:t})=>{let r=e.field(Kh,!1);if(!r||n<0&&r.active==0)return!1;let i=r.active+n,s=n>0&&!r.ranges.some(o=>o.field==i+n);return t(e.update({selection:Dx(r.ranges,i),effects:kf.of(s?null:new oc(r.ranges,i)),scrollIntoView:!0})),!0}}const wZ=({state:n,dispatch:e})=>n.field(Kh,!1)?(e(n.update({effects:kf.of(null)})),!0):!1,kZ=hT(1),SZ=hT(-1),bZ=[{key:"Tab",run:kZ,shift:SZ},{key:"Escape",run:wZ}],KS=Ye.define({combine(n){return n.length?n[0]:bZ}}),PZ=pf.highest(cm.compute([KS],n=>n.facet(KS)));function vr(n,e){return{...e,apply:vZ(n)}}const QZ=Ue.domEventHandlers({mousedown(n,e){let t=e.state.field(Kh,!1),r;if(!t||(r=e.posAtCoords({x:n.clientX,y:n.clientY}))==null)return!1;let i=t.ranges.find(s=>s.from<=r&&s.to>=r);return!i||i.field==t.active?!1:(e.dispatch({selection:Dx(t.ranges,i.field),effects:kf.of(t.ranges.some(s=>s.field>i.field)?new oc(t.ranges,i.field):null),scrollIntoView:!0}),!0)}}),Wp={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},pl=tn.define({map(n,e){let t=e.mapPos(n,-1,Bn.TrackAfter);return t??void 0}}),Lx=new class extends ca{};Lx.startSide=1;Lx.endSide=-1;const fT=ks.define({create(){return Pt.empty},update(n,e){if(n=n.map(e.changes),e.selection){let t=e.state.doc.lineAt(e.selection.main.head);n=n.update({filter:r=>r>=t.from&&r<=t.to})}for(let t of e.effects)t.is(pl)&&(n=n.update({add:[Lx.range(t.value,t.value+1)]}));return n}});function CZ(){return[MZ,fT]}const VO="()[]{}<>«»»«[]{}";function TZ(n){for(let e=0;e<VO.length;e+=2)if(VO.charCodeAt(e)==n)return VO.charAt(e+1);return sQ(n<128?n:n+1)}function $Z(n,e){return n.languageDataAt("closeBrackets",e)[0]||Wp}const EZ=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),MZ=Ue.inputHandler.of((n,e,t,r)=>{if((EZ?n.composing:n.compositionStarted)||n.state.readOnly)return!1;let i=n.state.selection.main;if(r.length>2||r.length==2&&nm(df(r,0))==1||e!=i.from||t!=i.to)return!1;let s=jZ(n.state,r);return s?(n.dispatch(s),!0):!1});function jZ(n,e){let t=$Z(n,n.selection.main.head),r=t.brackets||Wp.brackets;for(let i of r){let s=TZ(df(i,0));if(e==i)return s==i?AZ(n,i,r.indexOf(i+i+i)>-1,t):RZ(n,i,s,t.before||Wp.before);if(e==s&&dT(n,n.selection.main.from))return NZ(n,i,s)}return null}function dT(n,e){let t=!1;return n.field(fT).between(0,n.doc.length,r=>{r==e&&(t=!0)}),t}function Ix(n,e){let t=n.sliceString(e,e+2);return t.slice(0,nm(df(t,0)))}function RZ(n,e,t,r){let i=null,s=n.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:t,from:o.to}],effects:pl.of(o.to+e.length),range:me.range(o.anchor+e.length,o.head+e.length)};let l=Ix(n.doc,o.head);return!l||/\s/.test(l)||r.indexOf(l)>-1?{changes:{insert:e+t,from:o.head},effects:pl.of(o.head+e.length),range:me.cursor(o.head+e.length)}:{range:i=o}});return i?null:n.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function NZ(n,e,t){let r=null,i=n.changeByRange(s=>s.empty&&Ix(n.doc,s.head)==t?{changes:{from:s.head,to:s.head+t.length,insert:t},range:me.cursor(s.head+t.length)}:r={range:s});return r?null:n.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function AZ(n,e,t,r){let i=r.stringPrefixes||Wp.stringPrefixes,s=null,o=n.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:pl.of(l.to+e.length),range:me.range(l.anchor+e.length,l.head+e.length)};let c=l.head,h=Ix(n.doc,c),f;if(h==e){if(JS(n,c))return{changes:{insert:e+e,from:c},effects:pl.of(c+e.length),range:me.cursor(c+e.length)};if(dT(n,c)){let m=t&&n.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+m.length,insert:m},range:me.cursor(c+m.length)}}}else{if(t&&n.sliceDoc(c-2*e.length,c)==e+e&&(f=eb(n,c-2*e.length,i))>-1&&JS(n,f))return{changes:{insert:e+e+e+e,from:c},effects:pl.of(c+e.length),range:me.cursor(c+e.length)};if(n.charCategorizer(c)(h)!=Un.Word&&eb(n,c,i)>-1&&!_Z(n,c,e,i))return{changes:{insert:e+e,from:c},effects:pl.of(c+e.length),range:me.cursor(c+e.length)}}return{range:s=l}});return s?null:n.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function JS(n,e){let t=Ut(n).resolveInner(e+1);return t.parent&&t.from==e}function _Z(n,e,t,r){let i=Ut(n).resolveInner(e,-1),s=r.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=n.sliceDoc(i.from,Math.min(i.to,i.from+t.length+s)),c=l.indexOf(t);if(!c||c>-1&&r.indexOf(l.slice(0,c))>-1){let f=i.firstChild;for(;f&&f.from==i.from&&f.to-f.from>t.length+c;){if(n.sliceDoc(f.to-t.length,f.to)==t)return!1;f=f.firstChild}return!0}let h=i.to==e&&i.parent;if(!h)break;i=h}return!1}function eb(n,e,t){let r=n.charCategorizer(e);if(r(n.sliceDoc(e-1,e))!=Un.Word)return e;for(let i of t){let s=e-i.length;if(n.sliceDoc(s,e)==i&&r(n.sliceDoc(s-1,s))!=Un.Word)return s}return-1}class Fp{static create(e,t,r,i,s){let o=i+(i<<8)+e+(t<<4)|0;return new Fp(e,t,r,o,s,[],[])}constructor(e,t,r,i,s,o,l){this.type=e,this.value=t,this.from=r,this.hash=i,this.end=s,this.children=o,this.positions=l,this.hashProp=[[ct.contextHash,i]]}addChild(e,t){e.prop(ct.contextHash)!=this.hash&&(e=new Lt(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(t)}toTree(e,t=this.end){let r=this.children.length-1;return r>=0&&(t=Math.max(t,this.positions[r]+this.children[r].length+this.from)),new Lt(e.types[this.type],this.children,this.positions,t-this.from).balance({makeTree:(i,s,o)=>new Lt(Cn.none,i,s,o,this.hashProp)})}}var Ce;(function(n){n[n.Document=1]="Document",n[n.CodeBlock=2]="CodeBlock",n[n.FencedCode=3]="FencedCode",n[n.Blockquote=4]="Blockquote",n[n.HorizontalRule=5]="HorizontalRule",n[n.BulletList=6]="BulletList",n[n.OrderedList=7]="OrderedList",n[n.ListItem=8]="ListItem",n[n.ATXHeading1=9]="ATXHeading1",n[n.ATXHeading2=10]="ATXHeading2",n[n.ATXHeading3=11]="ATXHeading3",n[n.ATXHeading4=12]="ATXHeading4",n[n.ATXHeading5=13]="ATXHeading5",n[n.ATXHeading6=14]="ATXHeading6",n[n.SetextHeading1=15]="SetextHeading1",n[n.SetextHeading2=16]="SetextHeading2",n[n.HTMLBlock=17]="HTMLBlock",n[n.LinkReference=18]="LinkReference",n[n.Paragraph=19]="Paragraph",n[n.CommentBlock=20]="CommentBlock",n[n.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",n[n.Escape=22]="Escape",n[n.Entity=23]="Entity",n[n.HardBreak=24]="HardBreak",n[n.Emphasis=25]="Emphasis",n[n.StrongEmphasis=26]="StrongEmphasis",n[n.Link=27]="Link",n[n.Image=28]="Image",n[n.InlineCode=29]="InlineCode",n[n.HTMLTag=30]="HTMLTag",n[n.Comment=31]="Comment",n[n.ProcessingInstruction=32]="ProcessingInstruction",n[n.Autolink=33]="Autolink",n[n.HeaderMark=34]="HeaderMark",n[n.QuoteMark=35]="QuoteMark",n[n.ListMark=36]="ListMark",n[n.LinkMark=37]="LinkMark",n[n.EmphasisMark=38]="EmphasisMark",n[n.CodeMark=39]="CodeMark",n[n.CodeText=40]="CodeText",n[n.CodeInfo=41]="CodeInfo",n[n.LinkTitle=42]="LinkTitle",n[n.LinkLabel=43]="LinkLabel",n[n.URL=44]="URL"})(Ce||(Ce={}));class zZ{constructor(e,t){this.start=e,this.content=t,this.marks=[],this.parsers=[]}}class DZ{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Ah(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,t=0,r=0){for(let i=t;i<e;i++)r+=this.text.charCodeAt(i)==9?4-r%4:1;return r}findColumn(e){let t=0;for(let r=0;t<this.text.length&&r<e;t++)r+=this.text.charCodeAt(t)==9?4-r%4:1;return t}scrub(){if(!this.baseIndent)return this.text;let e="";for(let t=0;t<this.basePos;t++)e+=" ";return e+this.text.slice(this.basePos)}}function tb(n,e,t){if(t.pos==t.text.length||n!=e.block&&t.indent>=e.stack[t.depth+1].value+t.baseIndent)return!0;if(t.indent>=t.baseIndent+4)return!1;let r=(n.type==Ce.OrderedList?Vx:Xx)(t,e,!1);return r>0&&(n.type!=Ce.BulletList||Zx(t,e,!1)<0)&&t.text.charCodeAt(t.pos+r-1)==n.value}const pT={[Ce.Blockquote](n,e,t){return t.next!=62?!1:(t.markers.push($t(Ce.QuoteMark,e.lineStart+t.pos,e.lineStart+t.pos+1)),t.moveBase(t.pos+(Oi(t.text.charCodeAt(t.pos+1))?2:1)),n.end=e.lineStart+t.text.length,!0)},[Ce.ListItem](n,e,t){return t.indent<t.baseIndent+n.value&&t.next>-1?!1:(t.moveBaseColumn(t.baseIndent+n.value),!0)},[Ce.OrderedList]:tb,[Ce.BulletList]:tb,[Ce.Document](){return!0}};function Oi(n){return n==32||n==9||n==10||n==13}function Ah(n,e=0){for(;e<n.length&&Oi(n.charCodeAt(e));)e++;return e}function nb(n,e,t){for(;e>t&&Oi(n.charCodeAt(e-1));)e--;return e}function mT(n){if(n.next!=96&&n.next!=126)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;if(e<n.pos+3)return-1;if(n.next==96){for(let t=e;t<n.text.length;t++)if(n.text.charCodeAt(t)==96)return-1}return e}function gT(n){return n.next!=62?-1:n.text.charCodeAt(n.pos+1)==32?2:1}function Zx(n,e,t){if(n.next!=42&&n.next!=45&&n.next!=95)return-1;let r=1;for(let i=n.pos+1;i<n.text.length;i++){let s=n.text.charCodeAt(i);if(s==n.next)r++;else if(!Oi(s))return-1}return t&&n.next==45&&xT(n)>-1&&n.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(ST.SetextHeading)>-1||r<3?-1:1}function OT(n,e){for(let t=n.stack.length-1;t>=0;t--)if(n.stack[t].type==e)return!0;return!1}function Xx(n,e,t){return(n.next==45||n.next==43||n.next==42)&&(n.pos==n.text.length-1||Oi(n.text.charCodeAt(n.pos+1)))&&(!t||OT(e,Ce.BulletList)||n.skipSpace(n.pos+2)<n.text.length)?1:-1}function Vx(n,e,t){let r=n.pos,i=n.next;for(;i>=48&&i<=57;){r++;if(r==n.text.length)return-1;i=n.text.charCodeAt(r)}return r==n.pos||r>n.pos+9||i!=46&&i!=41||r<n.text.length-1&&!Oi(n.text.charCodeAt(r+1))||t&&!OT(e,Ce.OrderedList)&&(n.skipSpace(r+1)==n.text.length||r>n.pos+1||n.next!=49)?-1:r+1-n.pos}function yT(n){if(n.next!=35)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==35;)e++;if(e<n.text.length&&n.text.charCodeAt(e)!=32)return-1;let t=e-n.pos;return t>6?-1:t}function xT(n){if(n.next!=45&&n.next!=61||n.indent>=n.baseIndent+4)return-1;let e=n.pos+1;for(;e<n.text.length&&n.text.charCodeAt(e)==n.next;)e++;let t=e;for(;e<n.text.length&&Oi(n.text.charCodeAt(e));)e++;return e==n.text.length?t:-1}const yy=/^[ \t]*$/,vT=/-->/,wT=/\?>/,xy=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,vT],[/^\s*<\?/,wT],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?: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|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,yy],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,yy]];function kT(n,e,t){if(n.next!=60)return-1;let r=n.text.slice(n.pos);for(let i=0,s=xy.length-(t?1:0);i<s;i++)if(xy[i][0].test(r))return i;return-1}function rb(n,e){let t=n.countIndent(e,n.pos,n.indent),r=n.countIndent(n.skipSpace(e),e,t);return r>=t+5?t+1:r}function Yo(n,e,t){let r=n.length-1;r>=0&&n[r].to==e&&n[r].type==Ce.CodeText?n[r].to=t:n.push($t(Ce.CodeText,e,t))}const tp={LinkReference:void 0,IndentedCode(n,e){let t=e.baseIndent+4;if(e.indent<t)return!1;let r=e.findColumn(t),i=n.lineStart+r,s=n.lineStart+e.text.length,o=[],l=[];for(Yo(o,i,s);n.nextLine()&&e.depth>=n.stack.length;)if(e.pos==e.text.length){Yo(l,n.lineStart-1,n.lineStart);for(let c of e.markers)l.push(c)}else{if(e.indent<t)break;{if(l.length){for(let h of l)h.type==Ce.CodeText?Yo(o,h.from,h.to):o.push(h);l=[]}Yo(o,n.lineStart-1,n.lineStart);for(let h of e.markers)o.push(h);s=n.lineStart+e.text.length;let c=n.lineStart+e.findColumn(e.baseIndent+4);c<s&&Yo(o,c,s)}}return l.length&&(l=l.filter(c=>c.type!=Ce.CodeText),l.length&&(e.markers=l.concat(e.markers))),n.addNode(n.buffer.writeElements(o,-i).finish(Ce.CodeBlock,s-i),i),!0},FencedCode(n,e){let t=mT(e);if(t<0)return!1;let r=n.lineStart+e.pos,i=e.next,s=t-e.pos,o=e.skipSpace(t),l=nb(e.text,e.text.length,o),c=[$t(Ce.CodeMark,r,r+s)];o<l&&c.push($t(Ce.CodeInfo,n.lineStart+o,n.lineStart+l));for(let h=!0,f=!0,p=!1;n.nextLine()&&e.depth>=n.stack.length;h=!1){let m=e.pos;if(e.indent-e.baseIndent<4)for(;m<e.text.length&&e.text.charCodeAt(m)==i;)m++;if(m-e.pos>=s&&e.skipSpace(m)==e.text.length){for(let g of e.markers)c.push(g);f&&p&&Yo(c,n.lineStart-1,n.lineStart),c.push($t(Ce.CodeMark,n.lineStart+e.pos,n.lineStart+m)),n.nextLine();break}else{p=!0,h||(Yo(c,n.lineStart-1,n.lineStart),f=!1);for(let w of e.markers)c.push(w);let g=n.lineStart+e.basePos,k=n.lineStart+e.text.length;g<k&&(Yo(c,g,k),f=!1)}}return n.addNode(n.buffer.writeElements(c,-r).finish(Ce.FencedCode,n.prevLineEnd()-r),r),!0},Blockquote(n,e){let t=gT(e);return t<0?!1:(n.startContext(Ce.Blockquote,e.pos),n.addNode(Ce.QuoteMark,n.lineStart+e.pos,n.lineStart+e.pos+1),e.moveBase(e.pos+t),null)},HorizontalRule(n,e){if(Zx(e,n,!1)<0)return!1;let t=n.lineStart+e.pos;return n.nextLine(),n.addNode(Ce.HorizontalRule,t),!0},BulletList(n,e){let t=Xx(e,n,!1);if(t<0)return!1;n.block.type!=Ce.BulletList&&n.startContext(Ce.BulletList,e.basePos,e.next);let r=rb(e,e.pos+1);return n.startContext(Ce.ListItem,e.basePos,r-e.baseIndent),n.addNode(Ce.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},OrderedList(n,e){let t=Vx(e,n,!1);if(t<0)return!1;n.block.type!=Ce.OrderedList&&n.startContext(Ce.OrderedList,e.basePos,e.text.charCodeAt(e.pos+t-1));let r=rb(e,e.pos+t);return n.startContext(Ce.ListItem,e.basePos,r-e.baseIndent),n.addNode(Ce.ListMark,n.lineStart+e.pos,n.lineStart+e.pos+t),e.moveBaseColumn(r),null},ATXHeading(n,e){let t=yT(e);if(t<0)return!1;let r=e.pos,i=n.lineStart+r,s=nb(e.text,e.text.length,r),o=s;for(;o>r&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==r||!Oi(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=n.buffer.write(Ce.HeaderMark,0,t).writeElements(n.parser.parseInline(e.text.slice(r+t+1,o),i+t+1),-i);o<e.text.length&&l.write(Ce.HeaderMark,o-r,s-r);let c=l.finish(Ce.ATXHeading1-1+t,e.text.length-r);return n.nextLine(),n.addNode(c,i),!0},HTMLBlock(n,e){let t=kT(e,n,!1);if(t<0)return!1;let r=n.lineStart+e.pos,i=xy[t][1],s=[],o=i!=yy;for(;!i.test(e.text)&&n.nextLine();){if(e.depth<n.stack.length){o=!1;break}for(let h of e.markers)s.push(h)}o&&n.nextLine();let l=i==vT?Ce.CommentBlock:i==wT?Ce.ProcessingInstructionBlock:Ce.HTMLBlock,c=n.prevLineEnd();return n.addNode(n.buffer.writeElements(s,-r).finish(l,c-r),r),!0},SetextHeading:void 0};class LZ{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,t,r){if(this.stage==-1)return!1;let i=r.content+`
326
+ `+t.scrub(),s=this.advance(i);return s>-1&&s<i.length?this.complete(e,r,s):!1}finish(e,t){return(this.stage==2||this.stage==3)&&Ah(t.content,this.pos)==t.content.length?this.complete(e,t,t.content.length):!1}complete(e,t,r){return e.addLeafElement(t,$t(Ce.LinkReference,this.start,this.start+r,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(jT(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push($t(Ce.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(ET(e,Ah(e,this.pos),this.start)))return-1}else if(this.stage==2){let t=Ah(e,this.pos),r=0;if(t>this.pos){let i=MT(e,t,this.start);if(i){let s=WO(e,i.to-this.start);s>0&&(this.nextStage(i),r=s)}}return r||(r=WO(e,this.pos)),r>0&&r<e.length?r:-1}else return WO(e,this.pos)}}}function WO(n,e){for(;e<n.length;e++){let t=n.charCodeAt(e);if(t==10)break;if(!Oi(t))return-1}return e}class IZ{nextLine(e,t,r){let i=t.depth<e.stack.length?-1:xT(t),s=t.next;if(i<0)return!1;let o=$t(Ce.HeaderMark,e.lineStart+t.pos,e.lineStart+i);return e.nextLine(),e.addLeafElement(r,$t(s==61?Ce.SetextHeading1:Ce.SetextHeading2,r.start,e.prevLineEnd(),[...e.parser.parseInline(r.content,r.start),o])),!0}finish(){return!1}}const ST={LinkReference(n,e){return e.content.charCodeAt(0)==91?new LZ(e):null},SetextHeading(){return new IZ}},ZZ=[(n,e)=>yT(e)>=0,(n,e)=>mT(e)>=0,(n,e)=>gT(e)>=0,(n,e)=>Xx(e,n,!0)>=0,(n,e)=>Vx(e,n,!0)>=0,(n,e)=>Zx(e,n,!0)>=0,(n,e)=>kT(e,n,!0)>=0],XZ={text:"",end:0};class VZ{constructor(e,t,r,i){this.parser=e,this.input=t,this.ranges=i,this.line=new DZ,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=i[i.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=i[0].from,this.block=Fp.create(Ce.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=r.length?new BZ(r,t):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let r=0;;){let i=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;r<e.markers.length&&(!i||e.markers[r].from<i.end);){let s=e.markers[r++];this.addNode(s.type,s.from,s.to)}if(!i)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let r of this.parser.blockParsers)if(r){let i=r(this,e);if(i!=!1){if(i==!0)return null;e.forward();continue e}}break}let t=new zZ(this.lineStart+e.pos,e.text.slice(e.pos));for(let r of this.parser.leafBlockParsers)if(r){let i=r(this,t);i&&t.parsers.push(i)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let r of this.parser.endLeafBlock)if(r(this,e,t))break e}for(let r of t.parsers)if(r.nextLine(this,e,t))return null;t.content+=`
327
+ `+e.scrub();for(let r of e.markers)t.marks.push(r)}return this.finishLeaf(t),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let t=this.fragments.takeNodes(this);return t?(this.absoluteLineStart+=t,this.lineStart=RT(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let t=XZ;if(t.end=e,e>=this.to)t.text="";else if(t.text=this.lineChunkAt(e),t.end+=t.text.length,this.ranges.length>1){let r=this.absoluteLineStart,i=this.rangeI;for(;this.ranges[i].to<t.end;){i++;let s=this.ranges[i].from,o=this.lineChunkAt(s);t.end=s+o.length,t.text=t.text.slice(0,this.ranges[i-1].to-r)+o,r=t.end-t.text.length}}return t}readLine(){let{line:e}=this,{text:t,end:r}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=r,e.reset(t);e.depth<this.stack.length;e.depth++){let i=this.stack[e.depth],s=this.parser.skipContextMarkup[i.type];if(!s)throw new Error("Unhandled block context "+Ce[i.type]);let o=this.line.markers.length;if(!s(i,this,e)){this.line.markers.length>o&&(i.end=this.line.markers[this.line.markers.length-1].to),e.forward();break}e.forward()}}lineChunkAt(e){let t=this.input.chunk(e),r;if(this.input.lineChunks)r=t==`
328
+ `?"":t;else{let i=t.indexOf(`
329
+ `);r=i<0?t:t.slice(0,i)}return e+r.length>this.to?r.slice(0,this.to-e):r}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,t,r=0){this.block=Fp.create(e,r,this.lineStart+t,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,t,r=0){this.startContext(this.parser.getNodeType(e),t,r)}addNode(e,t,r){typeof e=="number"&&(e=new Lt(this.parser.nodeSet.types[e],qu,qu,(r??this.prevLineEnd())-t)),this.block.addChild(e,t-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,t){this.addNode(this.buffer.writeElements(wy(t.children,e.marks),-t.from).finish(t.type,t.to-t.from),t.from)}finishContext(){let e=this.stack.pop(),t=this.stack[this.stack.length-1];t.addChild(e.toTree(this.parser.nodeSet),e.from-t.from),this.block=t}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?bT(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let r of e.parsers)if(r.finish(this,e))return;let t=wy(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(t,-e.start).finish(Ce.Paragraph,e.content.length),e.start)}elt(e,t,r,i){return typeof e=="string"?$t(this.parser.getNodeType(e),t,r,i):new CT(e,t)}get buffer(){return new QT(this.parser.nodeSet)}}function bT(n,e,t,r,i){let s=n[e].to,o=[],l=[],c=t.from+r;function h(f,p){for(;p?f>=s:f>s;){let m=n[e+1].from-s;r+=m,f+=m,e++,s=n[e].to}}for(let f=t.firstChild;f;f=f.nextSibling){h(f.from+r,!0);let p=f.from+r,m,g=i.get(f.tree);g?m=g:f.to+r>s?(m=bT(n,e,f,r,i),h(f.to+r,!1)):m=f.toTree(),o.push(m),l.push(p-c)}return h(t.to+r,!1),new Lt(t.type,o,l,t.to+r-c,t.tree?t.tree.propValues:void 0)}class mm extends Cx{constructor(e,t,r,i,s,o,l,c,h){super(),this.nodeSet=e,this.blockParsers=t,this.leafBlockParsers=r,this.blockNames=i,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=c,this.wrappers=h,this.nodeTypes=Object.create(null);for(let f of e.types)this.nodeTypes[f.name]=f.id}createParse(e,t,r){let i=new VZ(this,e,t,r);for(let s of this.wrappers)i=s(i,e,t,r);return i}configure(e){let t=vy(e);if(!t)return this;let{nodeSet:r,skipContextMarkup:i}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),h=this.inlineNames.slice(),f=this.endLeafBlock.slice(),p=this.wrappers;if(xh(t.defineNodes)){i=Object.assign({},i);let m=r.types.slice(),g;for(let k of t.defineNodes){let{name:w,block:C,composite:Q,style:$}=typeof k=="string"?{name:k}:k;if(m.some(Y=>Y.name==w))continue;Q&&(i[m.length]=(Y,_,R)=>Q(_,R,Y.value));let E=m.length,Z=Q?["Block","BlockContext"]:C?E>=Ce.ATXHeading1&&E<=Ce.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;m.push(Cn.define({id:E,name:w,props:Z&&[[ct.group,Z]]})),$&&(g||(g={}),Array.isArray($)||$ instanceof Wr?g[w]=$:Object.assign(g,$))}r=new yf(m),g&&(r=r.extend(Rl(g)))}if(xh(t.props)&&(r=r.extend(...t.props)),xh(t.remove))for(let m of t.remove){let g=this.blockNames.indexOf(m),k=this.inlineNames.indexOf(m);g>-1&&(s[g]=o[g]=void 0),k>-1&&(c[k]=void 0)}if(xh(t.parseBlock))for(let m of t.parseBlock){let g=l.indexOf(m.name);if(g>-1)s[g]=m.parse,o[g]=m.leaf;else{let k=m.before?np(l,m.before):m.after?np(l,m.after)+1:l.length-1;s.splice(k,0,m.parse),o.splice(k,0,m.leaf),l.splice(k,0,m.name)}m.endLeaf&&f.push(m.endLeaf)}if(xh(t.parseInline))for(let m of t.parseInline){let g=h.indexOf(m.name);if(g>-1)c[g]=m.parse;else{let k=m.before?np(h,m.before):m.after?np(h,m.after)+1:h.length-1;c.splice(k,0,m.parse),h.splice(k,0,m.name)}}return t.wrap&&(p=p.concat(t.wrap)),new mm(r,s,o,l,f,i,c,h,p)}getNodeType(e){let t=this.nodeTypes[e];if(t==null)throw new RangeError(`Unknown node type '${e}'`);return t}parseInline(e,t){let r=new Wx(this,e,t);e:for(let i=t;i<r.end;){let s=r.char(i);for(let o of this.inlineParsers)if(o){let l=o(r,s,i);if(l>=0){i=l;continue e}}i++}return r.resolveMarkers(0)}}function xh(n){return n!=null&&n.length>0}function vy(n){if(!Array.isArray(n))return n;if(n.length==0)return null;let e=vy(n[0]);if(n.length==1)return e;let t=vy(n.slice(1));if(!t||!e)return e||t;let r=(o,l)=>(o||qu).concat(l||qu),i=e.wrap,s=t.wrap;return{props:r(e.props,t.props),defineNodes:r(e.defineNodes,t.defineNodes),parseBlock:r(e.parseBlock,t.parseBlock),parseInline:r(e.parseInline,t.parseInline),remove:r(e.remove,t.remove),wrap:i?s?(o,l,c,h)=>i(s(o,l,c,h),l,c,h):i:s}}function np(n,e){let t=n.indexOf(e);if(t<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return t}let PT=[Cn.none];for(let n=1,e;e=Ce[n];n++)PT[n]=Cn.define({id:n,name:e,props:n>=Ce.Escape?[]:[[ct.group,n in pT?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const qu=[];class QT{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,t,r,i=0){return this.content.push(e,t,r,4+i*4),this}writeElements(e,t=0){for(let r of e)r.writeTo(this,t);return this}finish(e,t){return Lt.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:t})}}let Jh=class{constructor(e,t,r,i=qu){this.type=e,this.from=t,this.to=r,this.children=i}writeTo(e,t){let r=e.content.length;e.writeElements(this.children,t),e.content.push(this.type,this.from+t,this.to+t,e.content.length+4-r)}toTree(e){return new QT(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class CT{constructor(e,t){this.tree=e,this.from=t}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return qu}writeTo(e,t){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+t,this.to+t,-1)}toTree(){return this.tree}}function $t(n,e,t,r){return new Jh(n,e,t,r)}const TT={resolve:"Emphasis",mark:"EmphasisMark"},$T={resolve:"Emphasis",mark:"EmphasisMark"},ul={},Bp={};class Zr{constructor(e,t,r,i){this.type=e,this.from=t,this.to=r,this.side=i}}const ib="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let ef=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{ef=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const FO={Escape(n,e,t){if(e!=92||t==n.end-1)return-1;let r=n.char(t+1);for(let i=0;i<ib.length;i++)if(ib.charCodeAt(i)==r)return n.append($t(Ce.Escape,t,t+2));return-1},Entity(n,e,t){if(e!=38)return-1;let r=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(n.slice(t+1,t+31));return r?n.append($t(Ce.Entity,t,t+1+r[0].length)):-1},InlineCode(n,e,t){if(e!=96||t&&n.char(t-1)==96)return-1;let r=t+1;for(;r<n.end&&n.char(r)==96;)r++;let i=r-t,s=0;for(;r<n.end;r++)if(n.char(r)==96){if(s++,s==i&&n.char(r+1)!=96)return n.append($t(Ce.InlineCode,t,r+1,[$t(Ce.CodeMark,t,t+i),$t(Ce.CodeMark,r+1-i,r+1)]))}else s=0;return-1},HTMLTag(n,e,t){if(e!=60||t==n.end-1)return-1;let r=n.slice(t+1,n.end),i=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(r);if(i)return n.append($t(Ce.Autolink,t,t+1+i[0].length,[$t(Ce.LinkMark,t,t+1),$t(Ce.URL,t+1,t+i[0].length),$t(Ce.LinkMark,t+i[0].length,t+1+i[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(r);if(s)return n.append($t(Ce.Comment,t,t+1+s[0].length));let o=/^\?[^]*?\?>/.exec(r);if(o)return n.append($t(Ce.ProcessingInstruction,t,t+1+o[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(r);return l?n.append($t(Ce.HTMLTag,t,t+1+l[0].length)):-1},Emphasis(n,e,t){if(e!=95&&e!=42)return-1;let r=t+1;for(;n.char(r)==e;)r++;let i=n.slice(t-1,t),s=n.slice(r,r+1),o=ef.test(i),l=ef.test(s),c=/\s|^$/.test(i),h=/\s|^$/.test(s),f=!h&&(!l||c||o),p=!c&&(!o||h||l),m=f&&(e==42||!p||o),g=p&&(e==42||!f||l);return n.append(new Zr(e==95?TT:$T,t,r,(m?1:0)|(g?2:0)))},HardBreak(n,e,t){if(e==92&&n.char(t+1)==10)return n.append($t(Ce.HardBreak,t,t+2));if(e==32){let r=t+1;for(;n.char(r)==32;)r++;if(n.char(r)==10&&r>=t+2)return n.append($t(Ce.HardBreak,t,r+1))}return-1},Link(n,e,t){return e==91?n.append(new Zr(ul,t,t+1,1)):-1},Image(n,e,t){return e==33&&n.char(t+1)==91?n.append(new Zr(Bp,t,t+2,1)):-1},LinkEnd(n,e,t){if(e!=93)return-1;for(let r=n.parts.length-1;r>=0;r--){let i=n.parts[r];if(i instanceof Zr&&(i.type==ul||i.type==Bp)){if(!i.side||n.skipSpace(i.to)==t&&!/[(\[]/.test(n.slice(t+1,t+2)))return n.parts[r]=null,-1;let s=n.takeContent(r),o=n.parts[r]=WZ(n,s,i.type==ul?Ce.Link:Ce.Image,i.from,t+1);if(i.type==ul)for(let l=0;l<r;l++){let c=n.parts[l];c instanceof Zr&&c.type==ul&&(c.side=0)}return o.to}}return-1}};function WZ(n,e,t,r,i){let{text:s}=n,o=n.char(i),l=i;if(e.unshift($t(Ce.LinkMark,r,r+(t==Ce.Image?2:1))),e.push($t(Ce.LinkMark,i-1,i)),o==40){let c=n.skipSpace(i+1),h=ET(s,c-n.offset,n.offset),f;h&&(c=n.skipSpace(h.to),c!=h.to&&(f=MT(s,c-n.offset,n.offset),f&&(c=n.skipSpace(f.to)))),n.char(c)==41&&(e.push($t(Ce.LinkMark,i,i+1)),l=c+1,h&&e.push(h),f&&e.push(f),e.push($t(Ce.LinkMark,c,l)))}else if(o==91){let c=jT(s,i-n.offset,n.offset,!1);c&&(e.push(c),l=c.to)}return $t(t,r,l,e)}function ET(n,e,t){if(n.charCodeAt(e)==60){for(let i=e+1;i<n.length;i++){let s=n.charCodeAt(i);if(s==62)return $t(Ce.URL,e+t,i+1+t);if(s==60||s==10)return!1}return null}else{let i=0,s=e;for(let o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(Oi(l))break;if(o)o=!1;else if(l==40)i++;else if(l==41){if(!i)break;i--}else l==92&&(o=!0)}return s>e?$t(Ce.URL,e+t,s+t):s==n.length?null:!1}}function MT(n,e,t){let r=n.charCodeAt(e);if(r!=39&&r!=34&&r!=40)return!1;let i=r==40?41:r;for(let s=e+1,o=!1;s<n.length;s++){let l=n.charCodeAt(s);if(o)o=!1;else{if(l==i)return $t(Ce.LinkTitle,e+t,s+1+t);l==92&&(o=!0)}}return null}function jT(n,e,t,r){for(let i=!1,s=e+1,o=Math.min(n.length,s+999);s<o;s++){let l=n.charCodeAt(s);if(i)i=!1;else{if(l==93)return r?!1:$t(Ce.LinkLabel,e+t,s+1+t);if(r&&!Oi(l)&&(r=!1),l==91)return!1;l==92&&(i=!0)}}return null}class Wx{constructor(e,t,r){this.parser=e,this.text=t,this.offset=r,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,t){return this.text.slice(e-this.offset,t-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,t,r,i,s){return this.append(new Zr(e,t,r,(i?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let t=this.parts[e];if(t instanceof Zr&&(t.type==ul||t.type==Bp))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let r=e;r<this.parts.length;r++){let i=this.parts[r];if(!(i instanceof Zr&&i.type.resolve&&i.side&2))continue;let s=i.type==TT||i.type==$T,o=i.to-i.from,l,c=r-1;for(;c>=e;c--){let w=this.parts[c];if(w instanceof Zr&&w.side&1&&w.type==i.type&&!(s&&(i.side&1||w.side&2)&&(w.to-w.from+o)%3==0&&((w.to-w.from)%3||o%3))){l=w;break}}if(!l)continue;let h=i.type.resolve,f=[],p=l.from,m=i.to;if(s){let w=Math.min(2,l.to-l.from,o);p=l.to-w,m=i.from+w,h=w==1?"Emphasis":"StrongEmphasis"}l.type.mark&&f.push(this.elt(l.type.mark,p,l.to));for(let w=c+1;w<r;w++)this.parts[w]instanceof Jh&&f.push(this.parts[w]),this.parts[w]=null;i.type.mark&&f.push(this.elt(i.type.mark,i.from,m));let g=this.elt(h,p,m,f);this.parts[c]=s&&l.from!=p?new Zr(l.type,l.from,p,l.side):null,(this.parts[r]=s&&i.to!=m?new Zr(i.type,m,i.to,i.side):null)?this.parts.splice(r,0,g):this.parts[r]=g}let t=[];for(let r=e;r<this.parts.length;r++){let i=this.parts[r];i instanceof Jh&&t.push(i)}return t}findOpeningDelimiter(e){for(let t=this.parts.length-1;t>=0;t--){let r=this.parts[t];if(r instanceof Zr&&r.type==e&&r.side&1)return t}return null}takeContent(e){let t=this.resolveMarkers(e);return this.parts.length=e,t}getDelimiterAt(e){let t=this.parts[e];return t instanceof Zr?t:null}skipSpace(e){return Ah(this.text,e-this.offset)+this.offset}elt(e,t,r,i){return typeof e=="string"?$t(this.parser.getNodeType(e),t,r,i):new CT(e,t)}}Wx.linkStart=ul;Wx.imageStart=Bp;function wy(n,e){if(!e.length)return n;if(!n.length)return e;let t=n.slice(),r=0;for(let i of e){for(;r<t.length&&t[r].to<i.to;)r++;if(r<t.length&&t[r].from<i.from){let s=t[r];s instanceof Jh&&(t[r]=new Jh(s.type,s.from,s.to,wy(s.children,[i])))}else t.splice(r++,0,i)}return t}const FZ=[Ce.CodeBlock,Ce.ListItem,Ce.OrderedList,Ce.BulletList];class BZ{constructor(e,t){this.fragments=e,this.input=t,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,t){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
330
+ `;)s--;this.fragmentEnd=s?s-1:0}let r=this.cursor;r||(r=this.cursor=this.fragment.tree.cursor(),r.firstChild());let i=e+this.fragment.offset;for(;r.to<=i;)if(!r.parent())return!1;for(;;){if(r.from>=i)return this.fragment.from<=t;if(!r.childAfter(i))return!1}}matches(e){let t=this.cursor.tree;return t&&t.prop(ct.contextHash)==e}takeNodes(e){let t=this.cursor,r=this.fragment.offset,i=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,c=o,h=l;for(;;){if(t.to-r>i){if(t.type.isAnonymous&&t.firstChild())continue;break}let f=RT(t.from-r,e.ranges);if(t.to-r<=e.ranges[e.rangeI].to)e.addNode(t.tree,f);else{let p=new Lt(e.parser.nodeSet.types[Ce.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,t.tree),e.addNode(p,f)}if(t.type.is("Block")&&(FZ.indexOf(t.type.id)<0?(o=t.to-r,l=e.block.children.length):(o=c,l=h),c=t.to-r,h=e.block.children.length),!t.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function RT(n,e){let t=n;for(let r=1;r<e.length;r++){let i=e[r-1].to,s=e[r].from;i<n&&(t-=s-i)}return t}const YZ=Rl({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),UZ=new mm(new yf(PT).extend(YZ),Object.keys(tp).map(n=>tp[n]),Object.keys(tp).map(n=>ST[n]),Object.keys(tp),ZZ,pT,Object.keys(FO).map(n=>FO[n]),Object.keys(FO),[]);function qZ(n,e,t){let r=[];for(let i=n.firstChild,s=e;;i=i.nextSibling){let o=i?i.from:t;if(o>s&&r.push({from:s,to:o}),!i)break;s=i.to}return r}function HZ(n){let{codeParser:e,htmlParser:t}=n;return{wrap:OC((i,s)=>{let o=i.type.id;if(e&&(o==Ce.CodeBlock||o==Ce.FencedCode)){let l="";if(o==Ce.FencedCode){let h=i.node.getChild(Ce.CodeInfo);h&&(l=s.read(h.from,h.to))}let c=e(l);if(c)return{parser:c,overlay:h=>h.type.id==Ce.CodeText,bracketed:o==Ce.FencedCode}}else if(t&&(o==Ce.HTMLBlock||o==Ce.HTMLTag||o==Ce.CommentBlock))return{parser:t,overlay:qZ(i.node,i.from,i.to)};return null})}}const GZ={resolve:"Strikethrough",mark:"StrikethroughMark"},KZ={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":A.strikethrough}},{name:"StrikethroughMark",style:A.processingInstruction}],parseInline:[{name:"Strikethrough",parse(n,e,t){if(e!=126||n.char(t+1)!=126||n.char(t+2)==126)return-1;let r=n.slice(t-1,t),i=n.slice(t+2,t+3),s=/\s|^$/.test(r),o=/\s|^$/.test(i),l=ef.test(r),c=ef.test(i);return n.addDelimiter(GZ,t,t+2,!o&&(!c||s||l),!s&&(!l||o||c))},after:"Emphasis"}]};function _h(n,e,t=0,r,i=0){let s=0,o=!0,l=-1,c=-1,h=!1,f=()=>{r.push(n.elt("TableCell",i+l,i+c,n.parser.parseInline(e.slice(l,c),i+l)))};for(let p=t;p<e.length;p++){let m=e.charCodeAt(p);m==124&&!h?((!o||l>-1)&&s++,o=!1,r&&(l>-1&&f(),r.push(n.elt("TableDelimiter",p+i,p+i+1))),l=c=-1):(h||m!=32&&m!=9)&&(l<0&&(l=p),c=p+1),h=!h&&m==92}return l>-1&&(s++,r&&f()),s}function sb(n,e){for(let t=e;t<n.length;t++){let r=n.charCodeAt(t);if(r==124)return!0;r==92&&t++}return!1}const NT=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class ob{constructor(){this.rows=null}nextLine(e,t,r){if(this.rows==null){this.rows=!1;let i;if((t.next==45||t.next==58||t.next==124)&&NT.test(i=t.text.slice(t.pos))){let s=[];_h(e,r.content,0,s,r.start)==_h(e,i,t.pos)&&(this.rows=[e.elt("TableHeader",r.start,r.start+r.content.length,s),e.elt("TableDelimiter",e.lineStart+t.pos,e.lineStart+t.text.length)])}}else if(this.rows){let i=[];_h(e,t.text,t.pos,i,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+t.pos,e.lineStart+t.text.length,i))}return!1}finish(e,t){return this.rows?(e.addLeafElement(t,e.elt("Table",t.start,t.start+t.content.length,this.rows)),!0):!1}}const JZ={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":A.heading}},"TableRow",{name:"TableCell",style:A.content},{name:"TableDelimiter",style:A.processingInstruction}],parseBlock:[{name:"Table",leaf(n,e){return sb(e.content,0)?new ob:null},endLeaf(n,e,t){if(t.parsers.some(i=>i instanceof ob)||!sb(e.text,e.basePos))return!1;let r=n.peekLine();return NT.test(r)&&_h(n,e.text,e.basePos)==_h(n,r,e.basePos)},before:"SetextHeading"}]};class eX{nextLine(){return!1}finish(e,t){return e.addLeafElement(t,e.elt("Task",t.start,t.start+t.content.length,[e.elt("TaskMarker",t.start,t.start+3),...e.parser.parseInline(t.content.slice(3),t.start+3)])),!0}}const tX={defineNodes:[{name:"Task",block:!0,style:A.list},{name:"TaskMarker",style:A.atom}],parseBlock:[{name:"TaskList",leaf(n,e){return/^\[[ xX]\][ \t]/.test(e.content)&&n.parentType().name=="ListItem"?new eX:null},after:"SetextHeading"}]},ab=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,lb=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,nX=/[\w-]+\.[\w-]+($|\/)/,ub=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,cb=/\/[a-zA-Z\d@.]+/gy;function hb(n,e,t,r){let i=0;for(let s=e;s<t;s++)n[s]==r&&i++;return i}function rX(n,e){lb.lastIndex=e;let t=lb.exec(n);if(!t||nX.exec(t[0])[0].indexOf("_")>-1)return-1;let r=e+t[0].length;for(;;){let i=n[r-1],s;if(/[?!.,:*_~]/.test(i)||i==")"&&hb(n,e,r,")")>hb(n,e,r,"("))r--;else if(i==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(n.slice(e,r))))r=e+s.index;else break}return r}function fb(n,e){ub.lastIndex=e;let t=ub.exec(n);if(!t)return-1;let r=t[0][t[0].length-1];return r=="_"||r=="-"?-1:e+t[0].length-(r=="."?1:0)}const iX={parseInline:[{name:"Autolink",parse(n,e,t){let r=t-n.offset;if(r&&/\w/.test(n.text[r-1]))return-1;ab.lastIndex=r;let i=ab.exec(n.text),s=-1;if(!i)return-1;if(i[1]||i[2]){if(s=rX(n.text,r+i[0].length),s>-1&&n.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(n.text.slice(r,s));s=r+o[0].length}}else i[3]?s=fb(n.text,r):(s=fb(n.text,r+i[0].length),s>-1&&i[0]=="xmpp:"&&(cb.lastIndex=s,i=cb.exec(n.text),i&&(s=i.index+i[0].length)));return s<0?-1:(n.addElement(n.elt("URL",t,s+n.offset)),s+n.offset)}}]},sX=[JZ,tX,KZ,iX];function AT(n,e,t){return(r,i,s)=>{if(i!=n||r.char(s+1)==n)return-1;let o=[r.elt(t,s,s+1)];for(let l=s+1;l<r.end;l++){let c=r.char(l);if(c==n)return r.addElement(r.elt(e,s,l+1,o.concat(r.elt(t,l,l+1))));if(c==92&&o.push(r.elt("Escape",l,l+++2)),Oi(c))break}return-1}}const oX={defineNodes:[{name:"Superscript",style:A.special(A.content)},{name:"SuperscriptMark",style:A.processingInstruction}],parseInline:[{name:"Superscript",parse:AT(94,"Superscript","SuperscriptMark")}]},aX={defineNodes:[{name:"Subscript",style:A.special(A.content)},{name:"SubscriptMark",style:A.processingInstruction}],parseInline:[{name:"Subscript",parse:AT(126,"Subscript","SubscriptMark")}]},lX={defineNodes:[{name:"Emoji",style:A.character}],parseInline:[{name:"Emoji",parse(n,e,t){let r;return e!=58||!(r=/^[a-zA-Z_0-9]+:/.exec(n.slice(t+1,n.end)))?-1:n.addElement(n.elt("Emoji",t,t+1+r[0].length))}}]},uX=55,cX=1,hX=56,fX=2,dX=57,pX=3,db=4,mX=5,Fx=6,_T=7,zT=8,DT=9,LT=10,gX=11,OX=12,yX=13,BO=58,xX=14,vX=15,pb=59,IT=21,wX=23,ZT=24,kX=25,ky=27,XT=28,SX=29,bX=32,PX=35,QX=37,CX=38,TX=0,$X=1,EX={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},MX={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},mb={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function jX(n){return n==45||n==46||n==58||n>=65&&n<=90||n==95||n>=97&&n<=122||n>=161}let gb=null,Ob=null,yb=0;function Sy(n,e){let t=n.pos+e;if(yb==t&&Ob==n)return gb;let r=n.peek(e),i="";for(;jX(r);)i+=String.fromCharCode(r),r=n.peek(++e);return Ob=n,yb=t,gb=i?i.toLowerCase():r==RX||r==NX?void 0:null}const VT=60,Yp=62,Bx=47,RX=63,NX=33,AX=45;function xb(n,e){this.name=n,this.parent=e}const _X=[Fx,LT,_T,zT,DT],zX=new cT({start:null,shift(n,e,t,r){return _X.indexOf(e)>-1?new xb(Sy(r,1)||"",n):n},reduce(n,e){return e==IT&&n?n.parent:n},reuse(n,e,t,r){let i=e.type.id;return i==Fx||i==QX?new xb(Sy(r,1)||"",n):n},strict:!1}),DX=new Br((n,e)=>{if(n.next!=VT){n.next<0&&e.context&&n.acceptToken(BO);return}n.advance();let t=n.next==Bx;t&&n.advance();let r=Sy(n,0);if(r===void 0)return;if(!r)return n.acceptToken(t?vX:xX);let i=e.context?e.context.name:null;if(t){if(r==i)return n.acceptToken(gX);if(i&&MX[i])return n.acceptToken(BO,-2);if(e.dialectEnabled(TX))return n.acceptToken(OX);for(let s=e.context;s;s=s.parent)if(s.name==r)return;n.acceptToken(yX)}else{if(r=="script")return n.acceptToken(_T);if(r=="style")return n.acceptToken(zT);if(r=="textarea")return n.acceptToken(DT);if(EX.hasOwnProperty(r))return n.acceptToken(LT);i&&mb[i]&&mb[i][r]?n.acceptToken(BO,-1):n.acceptToken(Fx)}},{contextual:!0}),LX=new Br(n=>{for(let e=0,t=0;;t++){if(n.next<0){t&&n.acceptToken(pb);break}if(n.next==AX)e++;else if(n.next==Yp&&e>=2){t>=3&&n.acceptToken(pb,-2);break}else e=0;n.advance()}});function IX(n){for(;n;n=n.parent)if(n.name=="svg"||n.name=="math")return!0;return!1}const ZX=new Br((n,e)=>{if(n.next==Bx&&n.peek(1)==Yp){let t=e.dialectEnabled($X)||IX(e.context);n.acceptToken(t?mX:db,2)}else n.next==Yp&&n.acceptToken(db,1)});function Yx(n,e,t){let r=2+n.length;return new Br(i=>{for(let s=0,o=0,l=0;;l++){if(i.next<0){l&&i.acceptToken(e);break}if(s==0&&i.next==VT||s==1&&i.next==Bx||s>=2&&s<r&&i.next==n.charCodeAt(s-2))s++,o++;else if(s==r&&i.next==Yp){l>o?i.acceptToken(e,-o):i.acceptToken(t,-(o-2));break}else if((i.next==10||i.next==13)&&l){i.acceptToken(e,1);break}else s=o=0;i.advance()}})}const XX=Yx("script",uX,cX),VX=Yx("style",hX,fX),WX=Yx("textarea",dX,pX),FX=Rl({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),BX=Cl.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}OOOd-E7_-E7_O){Q#tO'#DQOOO`-E7`-E7`O*QQ#|O,59nOOOp-E7a-E7aOOO`1G/[1G/[OOO`1G/^1G/^OOO`1G/_1G/_O*VQ,UO,59`OOQW-E7Y-E7YOOOa7+$d7+$dOOO`7+$u7+$uOOOb7+$m7+$mOOOd7+$p7+$pOOO`7+$s7+$sO*bQ#|O,59fO*gQ#|O,59iO*lQ#|O,59lOOO`1G/Y1G/YO*qO7[O'#CwO+S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gUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:zX,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[FX],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#S#T1k#T#oMz#o#s-_#s$f$q$f%W-_%W%oMz%o%p-_%p&aMz&a&b-_&b1pMz1p4U-_4U4dMz4d4e-_4e$ISMz$IS$I`-_$I`$IbMz$Ib$Kh-_$Kh%#tMz%#t&/x-_&/x&EtMz&Et&FV-_&FV;'SMz;'S;:j!#|;:j;=`3X<%l?&r-_?&r?AhMz?Ah?BY$q?BY?MnMz?MnO$q!Z$|caPlW!b`!dpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#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let r of n.getChildren(ZT)){let i=r.getChild(kX),s=r.getChild(ky)||r.getChild(XT);i&&(t[e.read(i.from,i.to)]=s?s.type.id==ky?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return t}function vb(n,e){let t=n.getChild(wX);return t?e.read(t.from,t.to):" "}function YO(n,e,t){let r;for(let i of t)if(!i.attrs||i.attrs(r||(r=WT(n.node.parent.firstChild,e))))return{parser:i.parser,bracketed:!0};return null}function FT(n=[],e=[]){let t=[],r=[],i=[],s=[];for(let l of n)(l.tag=="script"?t:l.tag=="style"?r:l.tag=="textarea"?i:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return OC((l,c)=>{let h=l.type.id;if(h==SX)return YO(l,c,t);if(h==bX)return YO(l,c,r);if(h==PX)return YO(l,c,i);if(h==IT&&s.length){let f=l.node,p=f.firstChild,m=p&&vb(p,c),g;if(m){for(let k of s)if(k.tag==m&&(!k.attrs||k.attrs(g||(g=WT(p,c))))){let w=f.lastChild,C=w.type.id==CX?w.from:f.to;if(C>p.to)return{parser:k.parser,overlay:[{from:p.to,to:C}]}}}}if(o&&h==ZT){let f=l.node,p;if(p=f.firstChild){let m=o[c.read(p.from,p.to)];if(m)for(let g of m){if(g.tagName&&g.tagName!=vb(f.parent,c))continue;let k=f.lastChild;if(k.type.id==ky){let w=k.from+1,C=k.lastChild,Q=k.to-(C&&C.isError?0:1);if(Q>w)return{parser:g.parser,overlay:[{from:w,to:Q}],bracketed:!0}}else if(k.type.id==XT)return{parser:g.parser,overlay:[{from:k.from,to:k.to}]}}}}return null})}const YX=135,wb=1,UX=136,qX=137,BT=2,HX=138,GX=3,KX=4,YT=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],JX=58,e6=40,UT=95,t6=91,dp=45,n6=46,r6=35,i6=37,s6=38,o6=92,a6=10,l6=42;function tf(n){return n>=65&&n<=90||n>=97&&n<=122||n>=161}function Ux(n){return n>=48&&n<=57}function kb(n){return Ux(n)||n>=97&&n<=102||n>=65&&n<=70}const qT=(n,e,t)=>(r,i)=>{for(let s=!1,o=0,l=0;;l++){let{next:c}=r;if(tf(c)||c==dp||c==UT||s&&Ux(c))!s&&(c!=dp||l>0)&&(s=!0),o===l&&c==dp&&o++,r.advance();else if(c==o6&&r.peek(1)!=a6){if(r.advance(),kb(r.next)){do r.advance();while(kb(r.next));r.next==32&&r.advance()}else r.next>-1&&r.advance();s=!0}else{s&&r.acceptToken(o==2&&i.canShift(BT)?e:c==e6?t:n);break}}},u6=new Br(qT(UX,BT,qX),{contextual:!0}),c6=new Br(qT(HX,GX,KX),{contextual:!0}),h6=new Br(n=>{if(YT.includes(n.peek(-1))){let{next:e}=n;(tf(e)||e==UT||e==r6||e==n6||e==l6||e==t6||e==JX&&tf(n.peek(1))||e==dp||e==s6)&&n.acceptToken(YX)}}),f6=new Br(n=>{if(!YT.includes(n.peek(-1))){let{next:e}=n;if(e==i6&&(n.advance(),n.acceptToken(wb)),tf(e)){do n.advance();while(tf(n.next)||Ux(n.next));n.acceptToken(wb)}}}),d6=Rl({"AtKeyword import charset namespace keyframes media supports font-feature-values":A.definitionKeyword,"from to selector scope MatchFlag":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName FontName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; , |":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),p6={__proto__:null,lang:44,"nth-child":44,"nth-last-child":44,"nth-of-type":44,"nth-last-of-type":44,dir:44,"host-context":44,if:90,url:132,"url-prefix":132,domain:132,regexp:132},m6={__proto__:null,or:104,and:104,not:112,only:112,layer:186},g6={__proto__:null,selector:118,layer:182},O6={__proto__:null,"@import":178,"@media":190,"@charset":194,"@namespace":198,"@keyframes":204,"@supports":216,"@scope":220,"@font-feature-values":226},y6={__proto__:null,to:223},x6=Cl.deserialize({version:14,states:"IpQYQdOOO#}QdOOP$UO`OOO%OQaO'#CfOOQP'#Ce'#CeO%VQdO'#CgO%[Q`O'#CgO%aQaO'#FdO&XQdO'#CkO&xQaO'#CcO'SQdO'#CnO'_QdO'#DtO'dQdO'#DvO'oQdO'#D}O'oQdO'#EQOOQP'#Fd'#FdO)OQhO'#EsOOQS'#Fc'#FcOOQS'#Ev'#EvQYQdOOO)VQdO'#EWO*cQhO'#E^O)VQdO'#E`O*jQdO'#EbO*uQdO'#EeO)zQhO'#EkO*}QdO'#EmO+YQdO'#EpO+_QaO'#CfO+fQ`O'#ETO+kQ`O'#FnO+vQdO'#FnQOQ`OOP,QO&jO'#CaPOOO)CAR)CAROOQP'#Ci'#CiOOQP,59R,59RO%VQdO,59ROOQP'#Cm'#CmOOQP,59V,59VO&XQdO,59VO,]QdO,59YO'_QdO,5:`O'dQdO,5:bO'oQdO,5:iO'oQdO,5:kO'oQdO,5:lO'oQdO'#E}O,hQ`O,58}O,pQdO'#ESOOQS,58},58}OOQP'#Cq'#CqOOQO'#Dr'#DrOOQP,59Y,59YO,wQ`O,59YO,|Q`O,59YOOQP'#Du'#DuOOQP,5:`,5:`O-RQpO'#DwO-^QdO'#DxO-cQ`O'#DxO-hQpO,5:bO.RQaO,5:iO.iQaO,5:lOOQW'#D^'#D^O/eQhO'#DgO/xQhO,5;_O)zQhO'#DeO0VQ`O'#DkO0[QhO'#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h|Q#i}Q#j!OQ#k!PQ$s#RQ%W#oR'S&]R%[#pQ!qdQ!zf[$V!m!n!o$Y$[$^Q$y#Yd%Y#p%Z%_&a&f&k'U'^'k'sQ%^#uQ%n$aS&U$y&WQ&[%UQ&}&VR'b&p]$X!m!n!o$Y$[$^Q!d`U!xe!q$eQ#QiQ#x!cS#{!d$OQ$Q!eQ%b#|Q%c#}Q%g$RS%r$g%tQ%w$jR'Z&iQ#z!cQ&h%`R'j'YR%i$RR%X#oQpPR#n!RQ!yeQ$d!qR%q$e",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NamespacedTagSelector NamespaceName TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , PseudoQuery CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName NamespacedAttribute NamespaceName AttributeName MatchOp MatchFlag ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName KeyframesStatement keyframes KeyframeName KeyframeList KeyframeSelector KeyframeRangeName SupportsStatement supports ScopeStatement scope to FontFeatureStatement font-feature-values FontName AtRule Styles",maxTerm:159,nodeProps:[["isolate",-2,5,39,""],["openedBy",23,"(",31,"[",34,"{"],["closedBy",24,")",32,"]",35,"}"]],propSources:[d6],skippedNodes:[0,5,117],repeatNodeCount:17,tokenData:"K`~R!bOX%ZX^&R^p%Zpq&Rqr)ers)vst+jtu2Xuv%Zv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hDRS!pWOy%jz;'S%j;'S;=`%{<%lO%jjDdSpYOy%jz;'S%j;'S;=`%{<%lO%jnDuSo^Oy%jz;'S%j;'S;=`%{<%lO%jjEWU!pWOy%jz#a%j#a#bEj#b;'S%j;'S;=`%{<%lO%jbEoU!e`Oy%jz#d%j#d#eFR#e;'S%j;'S;=`%{<%lO%jbFWU!e`Oy%jz#c%j#c#dFj#d;'S%j;'S;=`%{<%lO%jbFoU!e`Oy%jz#f%j#f#gGR#g;'S%j;'S;=`%{<%lO%jbGWU!e`Oy%jz#h%j#h#iGj#i;'S%j;'S;=`%{<%lO%jbGoU!e`Oy%jz#T%j#T#UHR#U;'S%j;'S;=`%{<%lO%jbHWU!e`Oy%jz#b%j#b#cHj#c;'S%j;'S;=`%{<%lO%jbHoU!e`Oy%jz#h%j#h#iIR#i;'S%j;'S;=`%{<%lO%jbIYS$cQ!e`Oy%jz;'S%j;'S;=`%{<%lO%jjIkSsYOy%jz;'S%j;'S;=`%{<%lO%jfI|U$XUOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%jjJeSrYOy%jz;'S%j;'S;=`%{<%lO%jfJvU!uQOy%jz!_%j!_!`2n!`;'S%j;'S;=`%{<%lO%j`K]P;=`<%l%Z",tokenizers:[h6,f6,u6,c6,1,2,3,4,new Vp("m~RRYZ[z{a~~g~aO$T~~dP!P!Qg~lO$U~~",28,142)],topRules:{StyleSheet:[0,6],Styles:[1,116]},dynamicPrecedences:{84:1},specialized:[{term:137,get:n=>p6[n]||-1},{term:138,get:n=>m6[n]||-1},{term:4,get:n=>g6[n]||-1},{term:28,get:n=>O6[n]||-1},{term:136,get:n=>y6[n]||-1}],tokenPrec:2256});let UO=null;function qO(){if(!UO&&typeof document=="object"&&document.body){let{style:n}=document.body,e=[],t=new Set;for(let r in n)r!="cssText"&&r!="cssFloat"&&typeof n[r]=="string"&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,i=>"-"+i.toLowerCase())),t.has(r)||(e.push(r),t.add(r)));UO=e.sort().map(r=>({type:"property",label:r,apply:r+": "}))}return UO||[]}const Sb=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(n=>({type:"class",label:n})),bb=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(n=>({type:"keyword",label:n})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(n=>({type:"constant",label:n}))),v6=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(n=>({type:"type",label:n})),w6=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(n=>({type:"keyword",label:n})),Ws=/^(\w[\w-]*|-\w[\w-]*|)$/,k6=/^-(-[\w-]*)?$/;function S6(n,e){var t;if((n.name=="("||n.type.isError)&&(n=n.parent||n),n.name!="ArgList")return!1;let r=(t=n.parent)===null||t===void 0?void 0:t.firstChild;return(r==null?void 0:r.name)!="Callee"?!1:e.sliceString(r.from,r.to)=="var"}const Pb=new gC,b6=["Declaration"];function P6(n){for(let e=n;;){if(e.type.isTop)return e;if(!(e=e.parent))return n}}function HT(n,e,t){if(e.to-e.from>4096){let r=Pb.get(e);if(r)return r;let i=[],s=new Set,o=e.cursor(Zt.IncludeAnonymous);if(o.firstChild())do for(let l of HT(n,o.node,t))s.has(l.label)||(s.add(l.label),i.push(l));while(o.nextSibling());return Pb.set(e,i),i}else{let r=[],i=new Set;return e.cursor().iterate(s=>{var o;if(t(s)&&s.matchContext(b6)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=n.sliceString(s.from,s.to);i.has(l)||(i.add(l),r.push({label:l,type:"variable"}))}}),r}}const Q6=n=>e=>{let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),s=i.type.isError&&i.from==i.to-1&&t.doc.sliceString(i.from,i.to)=="-";if(i.name=="PropertyName"||(s||i.name=="TagName")&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:qO(),validFor:Ws};if(i.name=="ValueName")return{from:i.from,options:bb,validFor:Ws};if(i.name=="PseudoClassName")return{from:i.from,options:Sb,validFor:Ws};if(n(i)||(e.explicit||s)&&S6(i,t.doc))return{from:n(i)||s?i.from:r,options:HT(t.doc,P6(i),n),validFor:k6};if(i.name=="TagName"){for(let{parent:c}=i;c;c=c.parent)if(c.name=="Block")return{from:i.from,options:qO(),validFor:Ws};return{from:i.from,options:v6,validFor:Ws}}if(i.name=="AtKeyword")return{from:i.from,options:w6,validFor:Ws};if(!e.explicit)return null;let o=i.resolve(r),l=o.childBefore(r);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:r,options:Sb,validFor:Ws}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:r,options:bb,validFor:Ws}:o.name=="Block"||o.name=="Styles"?{from:r,options:qO(),validFor:Ws}:null},C6=Q6(n=>n.name=="VariableName"),Up=Ql.define({name:"css",parser:x6.configure({props:[ic.add({Declaration:$u()}),Nl.add({"Block KeyframeList":Mx})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function T6(){return new Uu(Up,Up.data.of({autocomplete:C6}))}const $6=316,E6=317,Qb=1,M6=2,j6=3,R6=4,N6=318,A6=320,_6=321,z6=5,D6=6,L6=0,by=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],GT=125,I6=59,Py=47,Z6=42,X6=43,V6=45,W6=60,F6=44,B6=63,Y6=46,U6=91,q6=new cT({start:!1,shift(n,e){return e==z6||e==D6||e==A6?n:e==_6},strict:!1}),H6=new Br((n,e)=>{let{next:t}=n;(t==GT||t==-1||e.context)&&n.acceptToken(N6)},{contextual:!0,fallback:!0}),G6=new Br((n,e)=>{let{next:t}=n,r;by.indexOf(t)>-1||t==Py&&((r=n.peek(1))==Py||r==Z6)||t!=GT&&t!=I6&&t!=-1&&!e.context&&n.acceptToken($6)},{contextual:!0}),K6=new Br((n,e)=>{n.next==U6&&!e.context&&n.acceptToken(E6)},{contextual:!0}),J6=new Br((n,e)=>{let{next:t}=n;if(t==X6||t==V6){if(n.advance(),t==n.next){n.advance();let r=!e.context&&e.canShift(Qb);n.acceptToken(r?Qb:M6)}}else t==B6&&n.peek(1)==Y6&&(n.advance(),n.advance(),(n.next<48||n.next>57)&&n.acceptToken(j6))},{contextual:!0});function HO(n,e){return n>=65&&n<=90||n>=97&&n<=122||n==95||n>=192||!e&&n>=48&&n<=57}const eV=new Br((n,e)=>{if(n.next!=W6||!e.dialectEnabled(L6)||(n.advance(),n.next==Py))return;let t=0;for(;by.indexOf(n.next)>-1;)n.advance(),t++;if(HO(n.next,!0)){for(n.advance(),t++;HO(n.next,!1);)n.advance(),t++;for(;by.indexOf(n.next)>-1;)n.advance(),t++;if(n.next==F6)return;for(let r=0;;r++){if(r==7){if(!HO(n.next,!0))return;break}if(n.next!="extends".charCodeAt(r))break;n.advance(),t++}}n.acceptToken(R6,-t)}),tV=Rl({"get set async static":A.modifier,"for while do if else switch try catch finally return throw break continue default case defer":A.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":A.operatorKeyword,"let var const using function class extends":A.definitionKeyword,"import export from":A.moduleKeyword,"with debugger new":A.keyword,TemplateString:A.special(A.string),super:A.atom,BooleanLiteral:A.bool,this:A.self,null:A.null,Star:A.modifier,VariableName:A.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":A.function(A.variableName),VariableDefinition:A.definition(A.variableName),Label:A.labelName,PropertyName:A.propertyName,PrivatePropertyName:A.special(A.propertyName),"CallExpression/MemberExpression/PropertyName":A.function(A.propertyName),"FunctionDeclaration/VariableDefinition":A.function(A.definition(A.variableName)),"ClassDeclaration/VariableDefinition":A.definition(A.className),"NewExpression/VariableName":A.className,PropertyDefinition:A.definition(A.propertyName),PrivatePropertyDefinition:A.definition(A.special(A.propertyName)),UpdateOp:A.updateOperator,"LineComment Hashbang":A.lineComment,BlockComment:A.blockComment,Number:A.number,String:A.string,Escape:A.escape,ArithOp:A.arithmeticOperator,LogicOp:A.logicOperator,BitOp:A.bitwiseOperator,CompareOp:A.compareOperator,RegExp:A.regexp,Equals:A.definitionOperator,Arrow:A.function(A.punctuation),": Spread":A.punctuation,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace,"InterpolationStart InterpolationEnd":A.special(A.brace),".":A.derefOperator,", ;":A.separator,"@":A.meta,TypeName:A.typeName,TypeDefinition:A.definition(A.typeName),"type enum interface implements namespace module declare":A.definitionKeyword,"abstract global Privacy readonly override":A.modifier,"is keyof unique infer asserts":A.operatorKeyword,JSXAttributeValue:A.attributeValue,JSXText:A.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":A.angleBracket,"JSXIdentifier JSXNameSpacedName":A.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":A.attributeName,"JSXBuiltin/JSXIdentifier":A.standard(A.tagName)}),nV={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},rV={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},iV={__proto__:null,"<":193},sV=Cl.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#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YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:q6,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[tV],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!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=>rV[n]||-1},{term:95,get:n=>iV[n]||-1}],tokenPrec:15201}),KT=[vr("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),vr("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),vr("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),vr("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),vr("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),vr(`try {
331
+ \${}
332
+ } catch (\${error}) {
333
+ \${}
334
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),vr("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),vr(`if (\${}) {
335
+ \${}
336
+ } else {
337
+ \${}
338
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),vr(`class \${name} {
339
+ constructor(\${params}) {
340
+ \${}
341
+ }
342
+ }`,{label:"class",detail:"definition",type:"keyword"}),vr('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),vr('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],oV=KT.concat([vr("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),vr("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),vr("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Cb=new gC,JT=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function vh(n){return(e,t)=>{let r=e.node.getChild("VariableDefinition");return r&&t(r,n),!0}}const aV=["FunctionDeclaration"],lV={FunctionDeclaration:vh("function"),ClassDeclaration:vh("class"),ClassExpression:()=>!0,EnumDeclaration:vh("constant"),TypeAliasDeclaration:vh("type"),NamespaceDeclaration:vh("namespace"),VariableDefinition(n,e){n.matchContext(aV)||e(n,"variable")},TypeDefinition(n,e){e(n,"type")},__proto__:null};function e$(n,e){let t=Cb.get(e);if(t)return t;let r=[],i=!0;function s(o,l){let c=n.sliceString(o.from,o.to);r.push({label:c,type:l})}return e.cursor(Zt.IncludeAnonymous).iterate(o=>{if(i)i=!1;else if(o.name){let l=lV[o.name];if(l&&l(o,s)||JT.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of e$(n,o.node))r.push(l);return!1}}),Cb.set(e,r),r}const Tb=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,t$=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function uV(n){let e=Ut(n.state).resolveInner(n.pos,-1);if(t$.indexOf(e.name)>-1)return null;let t=e.name=="VariableName"||e.to-e.from<20&&Tb.test(n.state.sliceDoc(e.from,e.to));if(!t&&!n.explicit)return null;let r=[];for(let i=e;i;i=i.parent)JT.has(i.name)&&(r=r.concat(e$(n.state.doc,i)));return{options:r,from:t?e.from:n.pos,validFor:Tb}}const xs=Ql.define({name:"javascript",parser:sV.configure({props:[ic.add({IfStatement:$u({except:/^\s*({|else\b)/}),TryStatement:$u({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:P3,SwitchBody:n=>{let e=n.textAfter,t=/^\s*\}/.test(e),r=/^\s*(case|default)\b/.test(e);return n.baseIndent+(t?0:r?1:2)*n.unit},Block:b3({closing:"}"}),ArrowFunction:n=>n.baseIndent+n.unit,"TemplateString BlockComment":()=>null,"Statement Property":$u({except:/^\s*{/}),JSXElement(n){let e=/^\s*<\//.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},JSXEscape(n){let e=/\s*\}/.test(n.textAfter);return n.lineIndent(n.node.from)+(e?0:n.unit)},"JSXOpenTag JSXSelfClosingTag"(n){return n.column(n.node.from)+n.unit}}),Nl.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Mx,BlockComment(n){return{from:n.from+2,to:n.to-2}},JSXElement(n){let e=n.firstChild;if(!e||e.name=="JSXSelfClosingTag")return null;let t=n.lastChild;return{from:e.to,to:t.type.isError?n.to:t.from}},"JSXSelfClosingTag JSXOpenTag"(n){var e;let t=(e=n.firstChild)===null||e===void 0?void 0:e.nextSibling,r=n.lastChild;return!t||t.type.isError?null:{from:t.to,to:r.type.isError?n.to:r.from}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),n$={test:n=>/^JSX/.test(n.name),facet:Tx({commentTokens:{block:{open:"{/*",close:"*/}"}}})},r$=xs.configure({dialect:"ts"},"typescript"),i$=xs.configure({dialect:"jsx",props:[$x.add(n=>n.isTop?[n$]:void 0)]}),s$=xs.configure({dialect:"jsx ts",props:[$x.add(n=>n.isTop?[n$]:void 0)]},"typescript");let o$=n=>({label:n,type:"keyword"});const a$="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(o$),cV=a$.concat(["declare","implements","private","protected","public"].map(o$));function hV(n={}){let e=n.jsx?n.typescript?s$:i$:n.typescript?r$:xs,t=n.typescript?oV.concat(cV):KT.concat(a$);return new Uu(e,[xs.data.of({autocomplete:fZ(t$,hZ(t))}),xs.data.of({autocomplete:uV}),n.jsx?pV:[]])}function fV(n){for(;;){if(n.name=="JSXOpenTag"||n.name=="JSXSelfClosingTag"||n.name=="JSXFragmentTag")return n;if(n.name=="JSXEscape"||!n.parent)return null;n=n.parent}}function $b(n,e,t=n.length){for(let r=e==null?void 0:e.firstChild;r;r=r.nextSibling)if(r.name=="JSXIdentifier"||r.name=="JSXBuiltin"||r.name=="JSXNamespacedName"||r.name=="JSXMemberExpression")return n.sliceString(r.from,Math.min(r.to,t));return""}const dV=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),pV=Ue.inputHandler.of((n,e,t,r,i)=>{if((dV?n.composing:n.compositionStarted)||n.state.readOnly||e!=t||r!=">"&&r!="/"||!xs.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(c=>{var h;let{head:f}=c,p=Ut(o).resolveInner(f-1,-1),m;if(p.name=="JSXStartTag"&&(p=p.parent),!(o.doc.sliceString(f-1,f)!=r||p.name=="JSXAttributeValue"&&p.to>f)){if(r==">"&&p.name=="JSXFragmentTag")return{range:c,changes:{from:f,insert:"</>"}};if(r=="/"&&p.name=="JSXStartCloseTag"){let g=p.parent,k=g.parent;if(k&&g.from==f-2&&((m=$b(o.doc,k.firstChild,f))||((h=k.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let w=`${m}>`;return{range:me.cursor(f+w.length,-1),changes:{from:f,insert:w}}}}else if(r==">"){let g=fV(p);if(g&&g.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(f,f+2))&&(m=$b(o.doc,g,f)))return{range:c,changes:{from:f,insert:`</${m}>`}}}}return{range:c}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),wh=["_blank","_self","_top","_parent"],GO=["ascii","utf-8","utf-16","latin1","latin1"],KO=["get","post","put","delete"],JO=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Dr=["true","false"],Be={},mV={a:{attrs:{href:null,ping:null,type:null,media:null,target:wh,hreflang:null}},abbr:Be,address:Be,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Be,aside:Be,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Be,base:{attrs:{href:null,target:wh}},bdi:Be,bdo:Be,blockquote:{attrs:{cite:null}},body:Be,br:Be,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:JO,formmethod:KO,formnovalidate:["novalidate"],formtarget:wh,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Be,center:Be,cite:Be,code:Be,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Be,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Be,div:Be,dl:Be,dt:Be,em:Be,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Be,figure:Be,footer:Be,form:{attrs:{action:null,name:null,"accept-charset":GO,autocomplete:["on","off"],enctype:JO,method:KO,novalidate:["novalidate"],target:wh}},h1:Be,h2:Be,h3:Be,h4:Be,h5:Be,h6:Be,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Be,hgroup:Be,hr:Be,html:{attrs:{manifest:null}},i:Be,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:JO,formmethod:KO,formnovalidate:["novalidate"],formtarget:wh,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Be,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Be,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Be,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:GO,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Be,noscript:Be,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Be,param:{attrs:{name:null,value:null}},pre:Be,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Be,rt:Be,ruby:Be,samp:Be,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:GO}},section:Be,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Be,source:{attrs:{src:null,type:null,media:null}},span:Be,strong:Be,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Be,summary:Be,sup:Be,table:Be,tbody:Be,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Be,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Be,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Be,time:{attrs:{datetime:null}},title:Be,tr:Be,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Be,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Be},l$={accesskey:null,class:null,contenteditable:Dr,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Dr,autocorrect:Dr,autocapitalize:Dr,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Dr,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Dr,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Dr,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Dr,"aria-hidden":Dr,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Dr,"aria-multiselectable":Dr,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Dr,"aria-relevant":null,"aria-required":Dr,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},u$="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(n=>"on"+n);for(let n of u$)l$[n]=null;class nf{constructor(e,t){this.tags={...mV,...e},this.globalAttrs={...l$,...t},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}nf.default=new nf;function Hu(n,e,t=n.length){if(!e)return"";let r=e.firstChild,i=r&&r.getChild("TagName");return i?n.sliceString(i.from,Math.min(i.to,t)):""}function Gu(n,e=!1){for(;n;n=n.parent)if(n.name=="Element")if(e)e=!1;else return n;return null}function c$(n,e,t){let r=t.tags[Hu(n,Gu(e))];return(r==null?void 0:r.children)||t.allTags}function qx(n,e){let t=[];for(let r=Gu(e);r&&!r.type.isTop;r=Gu(r.parent)){let i=Hu(n,r);if(i&&r.lastChild.name=="CloseTag")break;i&&t.indexOf(i)<0&&(e.name=="EndTag"||e.from>=r.firstChild.to)&&t.push(i)}return t}const h$=/^[:\-\.\w\u00b7-\uffff]*$/;function Eb(n,e,t,r,i){let s=/\s*>/.test(n.sliceDoc(i,i+5))?"":">",o=Gu(t,t.name=="StartTag"||t.name=="TagName");return{from:r,to:i,options:c$(n.doc,o,e).map(l=>({label:l,type:"type"})).concat(qx(n.doc,t).map((l,c)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function Mb(n,e,t,r){let i=/\s*>/.test(n.sliceDoc(r,r+5))?"":">";return{from:t,to:r,options:qx(n.doc,e).map((s,o)=>({label:s,apply:s+i,type:"type",boost:99-o})),validFor:h$}}function gV(n,e,t,r){let i=[],s=0;for(let o of c$(n.doc,t,e))i.push({label:"<"+o,type:"type"});for(let o of qx(n.doc,t))i.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function OV(n,e,t,r,i){let s=Gu(t),o=s?e.tags[Hu(n.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],c=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:r,to:i,options:c.map(h=>({label:h,type:"property"})),validFor:h$}}function yV(n,e,t,r,i){var s;let o=(s=t.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],c;if(o){let h=n.sliceDoc(o.from,o.to),f=e.globalAttrs[h];if(!f){let p=Gu(t),m=p?e.tags[Hu(n.doc,p)]:null;f=(m==null?void 0:m.attrs)&&m.attrs[h]}if(f){let p=n.sliceDoc(r,i).toLowerCase(),m='"',g='"';/^['"]/.test(p)?(c=p[0]=='"'?/^[^"]*$/:/^[^']*$/,m="",g=n.sliceDoc(i,i+1)==p[0]?"":p[0],p=p.slice(1),r++):c=/^[^\s<>='"]*$/;for(let k of f)l.push({label:k,apply:m+k+g,type:"constant"})}}return{from:r,to:i,options:l,validFor:c}}function f$(n,e){let{state:t,pos:r}=e,i=Ut(t).resolveInner(r,-1),s=i.resolve(r);for(let o=r,l;s==i&&(l=i.childBefore(o));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;s=i=l,o=c.from}return i.name=="TagName"?i.parent&&/CloseTag$/.test(i.parent.name)?Mb(t,i,i.from,r):Eb(t,n,i,i.from,r):i.name=="StartTag"||i.name=="IncompleteTag"?Eb(t,n,i,r,r):i.name=="StartCloseTag"||i.name=="IncompleteCloseTag"?Mb(t,i,r,r):i.name=="OpenTag"||i.name=="SelfClosingTag"||i.name=="AttributeName"?OV(t,n,i,i.name=="AttributeName"?i.from:r,r):i.name=="Is"||i.name=="AttributeValue"||i.name=="UnquotedAttributeValue"?yV(t,n,i,i.name=="Is"?r:i.from,r):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?gV(t,n,i,r):null}function xV(n){return f$(nf.default,n)}function vV(n){let{extraTags:e,extraGlobalAttributes:t}=n,r=t||e?new nf(e,t):nf.default;return i=>f$(r,i)}const wV=xs.parser.configure({top:"SingleExpression"}),d$=[{tag:"script",attrs:n=>n.type=="text/typescript"||n.lang=="ts",parser:r$.parser},{tag:"script",attrs:n=>n.type=="text/babel"||n.type=="text/jsx",parser:i$.parser},{tag:"script",attrs:n=>n.type=="text/typescript-jsx",parser:s$.parser},{tag:"script",attrs(n){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(n.type)},parser:wV},{tag:"script",attrs(n){return!n.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(n.type)},parser:xs.parser},{tag:"style",attrs(n){return(!n.lang||n.lang=="css")&&(!n.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(n.type))},parser:Up.parser}],p$=[{name:"style",parser:Up.parser.configure({top:"Styles"})}].concat(u$.map(n=>({name:n,parser:xs.parser}))),m$=Ql.define({name:"html",parser:BX.configure({props:[ic.add({Element(n){let e=/^(\s*)(<\/)?/.exec(n.textAfter);return n.node.to<=n.pos+e[0].length?n.continue():n.lineIndent(n.node.from)+(e[2]?0:n.unit)},"OpenTag CloseTag SelfClosingTag"(n){return n.column(n.node.from)+n.unit},Document(n){if(n.pos+/\s*/.exec(n.textAfter)[0].length<n.node.to)return n.continue();let e=null,t;for(let r=n.node;;){let i=r.lastChild;if(!i||i.name!="Element"||i.to!=r.to)break;e=r=i}return e&&!((t=e.lastChild)&&(t.name=="CloseTag"||t.name=="SelfClosingTag"))?n.lineIndent(e.from)+n.unit:null}}),Nl.add({Element(n){let e=n.firstChild,t=n.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:t.name=="CloseTag"?t.from:n.to}}}),NC.add({"OpenTag CloseTag":n=>n.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),pp=m$.configure({wrap:FT(d$,p$)});function kV(n={}){let e="",t;n.matchClosingTags===!1&&(e="noMatch"),n.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(n.nestedLanguages&&n.nestedLanguages.length||n.nestedAttributes&&n.nestedAttributes.length)&&(t=FT((n.nestedLanguages||[]).concat(d$),(n.nestedAttributes||[]).concat(p$)));let r=t?m$.configure({wrap:t,dialect:e}):e?pp.configure({dialect:e}):pp;return new Uu(r,[pp.data.of({autocomplete:vV(n)}),n.autoCloseTags!==!1?SV:[],hV().support,T6().support])}const jb=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),SV=Ue.inputHandler.of((n,e,t,r,i)=>{if(n.composing||n.state.readOnly||e!=t||r!=">"&&r!="/"||!pp.isActiveAt(n.state,e,-1))return!1;let s=i(),{state:o}=s,l=o.changeByRange(c=>{var h,f,p;let m=o.doc.sliceString(c.from-1,c.to)==r,{head:g}=c,k=Ut(o).resolveInner(g,-1),w;if(m&&r==">"&&k.name=="EndTag"){let C=k.parent;if(((f=(h=C.parent)===null||h===void 0?void 0:h.lastChild)===null||f===void 0?void 0:f.name)!="CloseTag"&&(w=Hu(o.doc,C.parent,g))&&!jb.has(w)){let Q=g+(o.doc.sliceString(g,g+1)===">"?1:0),$=`</${w}>`;return{range:c,changes:{from:g,to:Q,insert:$}}}}else if(m&&r=="/"&&k.name=="IncompleteCloseTag"){let C=k.parent;if(k.from==g-2&&((p=C.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(w=Hu(o.doc,C,g))&&!jb.has(w)){let Q=g+(o.doc.sliceString(g,g+1)===">"?1:0),$=`${w}>`;return{range:me.cursor(g+$.length,-1),changes:{from:g,to:Q,insert:$}}}}return{range:c}});return l.changes.empty?!1:(n.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),g$=Tx({commentTokens:{block:{open:"<!--",close:"-->"}}}),O$=new ct,y$=UZ.configure({props:[Nl.add(n=>!n.is("Block")||n.is("Document")||Qy(n)!=null||bV(n)?void 0:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})),O$.add(Qy),ic.add({Document:()=>null}),dl.add({Document:g$})]});function Qy(n){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(n.name);return e?+e[1]:void 0}function bV(n){return n.name=="OrderedList"||n.name=="BulletList"}function PV(n,e){let t=n;for(;;){let r=t.nextSibling,i;if(!r||(i=Qy(r.type))!=null&&i<=e)break;t=r}return t.to}const QV=bC.of((n,e,t)=>{for(let r=Ut(n).resolveInner(t,-1);r&&!(r.from<e);r=r.parent){let i=r.type.prop(O$);if(i==null)continue;let s=PV(r,i);if(s>t)return{from:t,to:s}}return null});function Hx(n){return new di(g$,n,[],"markdown")}const CV=Hx(y$),TV=y$.configure([sX,aX,oX,lX,{props:[Nl.add({Table:(n,e)=>({from:e.doc.lineAt(n.from).to,to:n.to})})]}]),qp=Hx(TV);function $V(n,e){return t=>{if(t&&n){let r=null;if(t=/\S*/.exec(t)[0],typeof n=="function"?r=n(t):r=zp.matchLanguageName(n,t,!0),r instanceof zp)return r.support?r.support.language.parser:Gh.getSkippingParser(r.load());if(r)return r.parser}return e?e.parser:null}}class e0{constructor(e,t,r,i,s,o,l){this.node=e,this.from=t,this.to=r,this.spaceBefore=i,this.spaceAfter=s,this.type=o,this.item=l}blank(e,t=!0){let r=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;r.length<e;)r+=" ";return r}else{for(let i=this.to-this.from-r.length-this.spaceAfter.length;i>0;i--)r+=" ";return r+(t?this.spaceAfter:"")}}marker(e,t){let r=this.node.name=="OrderedList"?String(+v$(this.item,e)[2]+t):"";return this.spaceBefore+r+this.type+this.spaceAfter}}function x$(n,e){let t=[],r=[];for(let i=n;i;i=i.parent){if(i.name=="FencedCode")return r;(i.name=="ListItem"||i.name=="Blockquote")&&t.push(i)}for(let i=t.length-1;i>=0;i--){let s=t[i],o,l=e.lineAt(s.from),c=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(c))))r.push(new e0(s,c,c+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let h=o[3],f=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),f-=4),r.push(new e0(s.parent,c,c+f,o[1],h,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let h=o[4],f=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),f-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),r.push(new e0(s.parent,c,c+f,o[1],h,p,s))}}return r}function v$(n,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(n.from,n.from+10))}function t0(n,e,t,r=0){for(let i=-1,s=n;;){if(s.name=="ListItem"){let l=v$(s,e),c=+l[2];if(i>=0){if(c!=i+1)return;t.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(i+2+r)})}i=c}let o=s.nextSibling;if(!o)break;s=o}}function Gx(n,e){let t=/^[ \t]*/.exec(n)[0].length;if(!t||e.facet(xf)!=" ")return n;let r=eo(n,4,t),i="";for(let s=r;s>0;)s>=4?(i+=" ",s-=4):(i+=" ",s--);return i+n.slice(t)}const EV=(n={})=>({state:e,dispatch:t})=>{let r=Ut(e),{doc:i}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!qp.isActiveAt(e,l.from,-1)&&!qp.isActiveAt(e,l.from,1))return s={range:l};let c=l.from,h=i.lineAt(c),f=x$(r.resolveInner(c,-1),i);for(;f.length&&f[f.length-1].from>c-h.from;)f.pop();if(!f.length)return s={range:l};let p=f[f.length-1];if(p.to-p.spaceAfter.length>c-h.from)return s={range:l};let m=c>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&m){let Q=p.node.firstChild,$=p.node.getChild("ListItem","ListItem");if(Q.to>=c||$&&$.to<c||h.from>0&&!/[^\s>]/.test(i.lineAt(h.from-1).text)||n.nonTightLists===!1){let E=f.length>1?f[f.length-2]:null,Z,Y="";E&&E.item?(Z=h.from+E.from,Y=E.marker(i,1)):Z=h.from+(E?E.to:0);let _=[{from:Z,to:c,insert:Y}];return p.node.name=="OrderedList"&&t0(p.item,i,_,-2),E&&E.node.name=="OrderedList"&&t0(E.item,i,_),{range:me.cursor(Z+Y.length),changes:_}}else{let E=Nb(f,e,h);return{range:me.cursor(c+E.length+1),changes:{from:h.from,insert:E+e.lineBreak}}}}if(p.node.name=="Blockquote"&&m&&h.from){let Q=i.lineAt(h.from-1),$=/>\s*$/.exec(Q.text);if($&&$.index==p.from){let E=e.changes([{from:Q.from+$.index,to:Q.to},{from:h.from+p.from,to:h.to}]);return{range:l.map(E),changes:E}}}let g=[];p.node.name=="OrderedList"&&t0(p.item,i,g);let k=p.item&&p.item.from<h.from,w="";if(!k||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let Q=0,$=f.length-1;Q<=$;Q++)w+=Q==$&&!k?f[Q].marker(i,1):f[Q].blank(Q<$?eo(h.text,4,f[Q+1].from)-w.length:null);let C=c;for(;C>h.from&&/\s/.test(h.text.charAt(C-h.from-1));)C--;return w=Gx(w,e),jV(p.node,e.doc)&&(w=Nb(f,e,h)+e.lineBreak+w),g.push({from:C,to:c,insert:e.lineBreak+w}),{range:me.cursor(C+w.length+1),changes:g}});return s?!1:(t(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},MV=EV();function Rb(n){return n.name=="QuoteMark"||n.name=="ListMark"}function jV(n,e){if(n.name!="OrderedList"&&n.name!="BulletList")return!1;let t=n.firstChild,r=n.getChild("ListItem","ListItem");if(!r)return!1;let i=e.lineAt(t.to),s=e.lineAt(r.from),o=/^[\s>]*$/.test(i.text);return i.number+(o?0:1)<s.number}function Nb(n,e,t){let r="";for(let i=0,s=n.length-2;i<=s;i++)r+=n[i].blank(i<s?eo(t.text,4,n[i+1].from)-r.length:null,i<s);return Gx(r,e)}function RV(n,e){let t=n.resolveInner(e,-1),r=e;Rb(t)&&(r=t.from,t=t.parent);for(let i;i=t.childBefore(r);)if(Rb(i))r=i.from;else if(i.name=="OrderedList"||i.name=="BulletList")t=i.lastChild,r=t.to;else break;return t}const NV=({state:n,dispatch:e})=>{let t=Ut(n),r=null,i=n.changeByRange(s=>{let o=s.from,{doc:l}=n;if(s.empty&&qp.isActiveAt(n,s.from)){let c=l.lineAt(o),h=x$(RV(t,o),l);if(h.length){let f=h[h.length-1],p=f.to-f.spaceAfter.length+(f.spaceAfter?1:0);if(o-c.from>p&&!/\S/.test(c.text.slice(p,o-c.from)))return{range:me.cursor(c.from+p),changes:{from:c.from+p,to:o}};if(o-c.from==p&&(!f.item||c.from<=f.item.from||!/\S/.test(c.text.slice(0,f.to)))){let m=c.from+f.from;if(f.item&&f.node.from<f.item.from&&/\S/.test(c.text.slice(f.from,f.to))){let g=f.blank(eo(c.text,4,f.to)-eo(c.text,4,f.from));return m==c.from&&(g=Gx(g,n)),{range:me.cursor(m+g.length),changes:{from:m,to:c.from+f.to,insert:g}}}if(m<o)return{range:me.cursor(m),changes:{from:m,to:o}}}}}return r={range:s}});return r?!1:(e(n.update(i,{scrollIntoView:!0,userEvent:"delete"})),!0)},AV=[{key:"Enter",run:MV},{key:"Backspace",run:NV}],w$=kV({matchClosingTags:!1});function _V(n={}){let{codeLanguages:e,defaultCodeLanguage:t,addKeymap:r=!0,base:{parser:i}=CV,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=w$}=n;if(!(i instanceof mm))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=n.extensions?[n.extensions]:[],h=[l.support,QV],f;o&&h.push(IV),t instanceof Uu?(h.push(t.support),f=t.language):t&&(f=t);let p=e||f?$V(e,f):void 0;c.push(HZ({codeParser:p,htmlParser:l.language.parser})),r&&h.push(pf.high(cm.of(AV)));let m=Hx(i.configure(c));return s&&h.push(m.data.of({autocomplete:zV})),new Uu(m,h)}function zV(n){let{state:e,pos:t}=n,r=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(t-25,t));if(!r)return null;let i=Ut(e).resolveInner(t,-1);for(;i&&!i.type.isTop;){if(i.name=="CodeBlock"||i.name=="FencedCode"||i.name=="ProcessingInstructionBlock"||i.name=="CommentBlock"||i.name=="Link"||i.name=="Image")return null;i=i.parent}return{from:t-r[0].length,to:t,options:DV(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let n0=null;function DV(){if(n0)return n0;let n=xV(new uZ(At.create({extensions:w$}),0,!0));return n0=n?n.options:[]}const LV=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,IV=Ue.domEventHandlers({paste:(n,e)=>{var t;let{main:r}=e.state.selection;if(r.empty)return!1;let i=(t=n.clipboardData)===null||t===void 0?void 0:t.getData("text/plain");if(!i||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(i)||(/^www\./.test(i)&&(i="https://"+i),!qp.isActiveAt(e.state,r.from,1)))return!1;let s=Ut(e.state),o=!1;return s.iterate({from:r.from,to:r.to,enter:l=>{(l.from>r.from||LV.test(l.name))&&(o=!0)},leave:l=>{l.to<r.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:r.from,insert:"["},{from:r.to,insert:`](${i})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),ZV="#e5c07b",Ab="#e06c75",XV="#56b6c2",VV="#ffffff",mp="#abb2bf",Cy="#7d8799",WV="#61afef",FV="#98c379",_b="#d19a66",BV="#c678dd",YV="#21252b",zb="#2c313a",Db="#282c34",r0="#353a42",UV="#3E4451",Lb="#528bff",qV=Ue.theme({"&":{color:mp,backgroundColor:Db},".cm-content":{caretColor:Lb},".cm-cursor, .cm-dropCursor":{borderLeftColor:Lb},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:UV},".cm-panels":{backgroundColor:YV,color:mp},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Db,color:Cy,border:"none"},".cm-activeLineGutter":{backgroundColor:zb},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:r0},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:r0,borderBottomColor:r0},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:zb,color:mp}}},{dark:!0}),HV=vf.define([{tag:A.keyword,color:BV},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:Ab},{tag:[A.function(A.variableName),A.labelName],color:WV},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:_b},{tag:[A.definition(A.name),A.separator],color:mp},{tag:[A.typeName,A.className,A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:ZV},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:XV},{tag:[A.meta,A.comment],color:Cy},{tag:A.strong,fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.link,color:Cy,textDecoration:"underline"},{tag:A.heading,fontWeight:"bold",color:Ab},{tag:[A.atom,A.bool,A.special(A.variableName)],color:_b},{tag:[A.processingInstruction,A.string,A.inserted],color:FV},{tag:A.invalid,color:VV}]),GV=[qV,EC(HV)],Ib=typeof String.prototype.normalize=="function"?n=>n.normalize("NFKD"):n=>n;class k${constructor(e,t,r=0,i=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(r,i),this.bufferStart=r,this.normalize=s?l=>s(Ib(l)):Ib,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return df(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=sQ(e),r=this.bufferStart+this.bufferPos;this.bufferPos+=nm(e);let i=this.normalize(t);if(i.length)for(let s=0,o=r;;s++){let l=i.charCodeAt(s),c=this.match(l,o,this.bufferPos+this.bufferStart);if(s==i.length-1){if(c)return this.value=c,this;break}o==r&&s<t.length&&t.charCodeAt(s)==l&&o++}}}match(e,t,r){let i=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?i={from:this.matches[s+1],to:r}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?i={from:t,to:r}:this.matches.push(1,t)),i&&this.test&&!this.test(i.from,i.to,this.buffer,this.bufferStart)&&(i=null),i}}typeof Symbol<"u"&&(k$.prototype[Symbol.iterator]=function(){return this});const KV={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},JV=Ye.define({combine(n){return im(n,KV,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function eW(n){return[sW,iW]}const tW=pt.mark({class:"cm-selectionMatch"}),nW=pt.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Zb(n,e,t,r){return(t==0||n(e.sliceDoc(t-1,t))!=Un.Word)&&(r==e.doc.length||n(e.sliceDoc(r,r+1))!=Un.Word)}function rW(n,e,t,r){return n(e.sliceDoc(t,t+1))==Un.Word&&n(e.sliceDoc(r-1,r))==Un.Word}const iW=pi.fromClass(class{constructor(n){this.decorations=this.getDeco(n)}update(n){(n.selectionSet||n.docChanged||n.viewportChanged)&&(this.decorations=this.getDeco(n.view))}getDeco(n){let e=n.state.facet(JV),{state:t}=n,r=t.selection;if(r.ranges.length>1)return pt.none;let i=r.main,s,o=null;if(i.empty){if(!e.highlightWordAroundCursor)return pt.none;let c=t.wordAt(i.head);if(!c)return pt.none;o=t.charCategorizer(i.head),s=t.sliceDoc(c.from,c.to)}else{let c=i.to-i.from;if(c<e.minSelectionLength||c>200)return pt.none;if(e.wholeWords){if(s=t.sliceDoc(i.from,i.to),o=t.charCategorizer(i.head),!(Zb(o,t,i.from,i.to)&&rW(o,t,i.from,i.to)))return pt.none}else if(s=t.sliceDoc(i.from,i.to),!s)return pt.none}let l=[];for(let c of n.visibleRanges){let h=new k$(t.doc,s,c.from,c.to);for(;!h.next().done;){let{from:f,to:p}=h.value;if((!o||Zb(o,t,f,p))&&(i.empty&&f<=i.from&&p>=i.to?l.push(nW.range(f,p)):(f>=i.to||p<=i.from)&&l.push(tW.range(f,p)),l.length>e.maxMatches))return pt.none}}return pt.set(l)}},{decorations:n=>n.decorations}),sW=Ue.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});function oW(n){switch(n){case"json":return lZ();case"markdown":return _V();default:return[]}}function aW({value:n,language:e,onChange:t,readOnly:r=!1}){const i=V.useRef(null),s=V.useRef();return V.useEffect(()=>{if(!i.current)return;const o=[WL(),jL(),YL(),W3(),CZ(),R3(),eW(),EC(z3,{fallback:!0}),cm.of([...qI,HI]),oW(e),Ue.lineWrapping,GV,Ue.theme({"&":{height:"100%",fontSize:"13px"},".cm-scroller":{overflow:"auto",fontFamily:'ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace'},".cm-gutters":{backgroundColor:"#0f0f17",borderRight:"1px solid rgba(255,255,255,0.06)"},".cm-content":{padding:"8px 0"}})];r&&o.push(At.readOnly.of(!0)),t&&o.push(Ue.updateListener.of(h=>{h.docChanged&&t(h.state.doc.toString())}));const l=At.create({doc:n,extensions:o}),c=new Ue({state:l,parent:i.current});return s.current=c,()=>{c.destroy()}},[e,r]),V.useEffect(()=>{const o=s.current;if(!o)return;const l=o.state.doc.toString();l!==n&&o.dispatch({changes:{from:0,to:l.length,insert:n}})},[n]),x.jsx("div",{ref:i,className:"h-full w-full"})}function lW(n,e){return e.startsWith("connections")?{icon:du,color:"text-emerald-500/60"}:e.startsWith("skills")?{icon:du,color:"text-amber-500/60"}:e.startsWith("knowledge")?{icon:du,color:"text-blue-500/60"}:e.startsWith("automations")?{icon:du,color:"text-purple-500/60"}:n==="config.json"?{icon:du,color:"text-indigo-500/60"}:{icon:du,color:"text-gray-400"}}function uW(n){switch(n){case"connections":return"text-emerald-500/60";case"skills":return"text-amber-500/60";case"knowledge":return"text-blue-500/60";case"automations":return"text-purple-500/60";case"agents":return"text-cyan-500/60";case"stores":return"text-orange-500/60";case"tools":return"text-rose-500/60";case".amodal":return"text-indigo-500/60";default:return"text-gray-400"}}function S$({entry:n,depth:e,selectedPath:t,onSelect:r}){const[i,s]=V.useState(e<2);if(n.type==="file"){const{icon:c,color:h}=lW(n.name,n.path),f=t===n.path;return x.jsxs("button",{onClick:()=>r(n.path),className:Sr("flex items-center gap-2 w-full px-2 py-[5px] rounded text-[12px] text-left transition-colors",f?"bg-indigo-500/10 text-indigo-400":"text-gray-400 dark:text-white/40 hover:text-gray-700 dark:hover:text-white/70 hover:bg-gray-100 dark:hover:bg-white/[0.03]"),style:{paddingLeft:`${e*16+8}px`},children:[x.jsx(c,{className:Sr("h-3.5 w-3.5 shrink-0",f?"text-indigo-400":h)}),x.jsx("span",{className:"truncate font-mono",children:n.name})]})}const o=uW(n.name),l=i?Hj:Gj;return x.jsxs("div",{children:[x.jsxs("button",{onClick:()=>s(!i),className:"flex items-center gap-1.5 w-full px-2 py-[5px] rounded text-[12px] text-gray-500 dark:text-white/50 hover:text-gray-800 dark:hover:text-white/80 hover:bg-gray-100 dark:hover:bg-white/[0.03] transition-colors",style:{paddingLeft:`${e*16+8}px`},children:[x.jsx(Zy,{className:Sr("h-3 w-3 shrink-0 transition-transform",i&&"rotate-90")}),x.jsx(l,{className:Sr("h-3.5 w-3.5 shrink-0",o)}),x.jsx("span",{className:"truncate font-medium",children:n.name}),n.children&&x.jsx("span",{className:"text-[10px] text-gray-400 dark:text-white/20 ml-auto",children:String(n.children.length)})]}),i&&n.children&&x.jsx("div",{children:n.children.map(c=>x.jsx(S$,{entry:c,depth:e+1,selectedPath:t,onSelect:r},c.path))})]})}function cW(){const[n,e]=V.useState([]),[t,r]=V.useState(null),[i,s]=V.useState(null),[o,l]=V.useState(null),[c,h]=V.useState(!0),[f,p]=V.useState(!1),[m,g]=V.useState("idle");V.useEffect(()=>{fetch("/api/files").then(Q=>Q.json()).then(Q=>{e(Q.tree)}).catch(()=>{}).finally(()=>{h(!1)})},[]);const k=V.useCallback(Q=>{r(Q),l(null),g("idle"),fetch(`/api/files/${Q}`).then($=>{if(!$.ok)throw new Error("Failed to load");return $.json()}).then($=>{s($)}).catch(()=>{s(null)})},[]),w=V.useCallback(async()=>{if(!(!t||o===null)){p(!0),g("idle");try{(await fetch(`/api/files/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:o})})).ok?(g("saved"),s($=>$&&{...$,content:o}),l(null),setTimeout(()=>g("idle"),2e3)):g("error")}catch{g("error")}p(!1)}},[t,o]);V.useEffect(()=>{const Q=$=>{($.metaKey||$.ctrlKey)&&$.key==="s"&&($.preventDefault(),w())};return window.addEventListener("keydown",Q),()=>window.removeEventListener("keydown",Q)},[w]);const C=o!==null&&i!==null&&o!==i.content;return c?x.jsx("div",{className:"p-6 text-gray-500 dark:text-zinc-500 text-sm",children:"Loading..."}):x.jsxs("div",{className:"h-full flex",children:[x.jsxs("div",{className:"w-[240px] border-r border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0c0c14] flex flex-col shrink-0 overflow-hidden",children:[x.jsx("div",{className:"px-3 py-3 border-b border-gray-200 dark:border-white/[0.06]",children:x.jsx("span",{className:"text-[10px] font-semibold text-gray-400 dark:text-white/25 uppercase tracking-widest",children:"Agent Files"})}),x.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-thin py-1",children:[n.map(Q=>x.jsx(S$,{entry:Q,depth:0,selectedPath:t,onSelect:k},Q.path)),n.length===0&&x.jsx("div",{className:"px-3 py-4 text-xs text-gray-400 dark:text-zinc-600",children:"No files found"})]})]}),x.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t&&i?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"h-10 border-b border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] flex items-center justify-between px-4 shrink-0",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"text-[12px] text-gray-500 dark:text-white/40 font-mono",children:t}),C&&x.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-500 font-medium",children:"modified"})]}),x.jsxs("div",{className:"flex items-center gap-2",children:[m==="saved"&&x.jsx("span",{className:"text-[11px] text-emerald-500",children:"Saved"}),m==="error"&&x.jsx("span",{className:"text-[11px] text-red-500",children:"Save failed"}),x.jsxs("button",{onClick:()=>{w()},disabled:!C||f,className:Sr("flex items-center gap-1.5 px-3 py-1 rounded text-[12px] font-medium transition-colors",C?"bg-indigo-600 text-white hover:bg-indigo-500":"bg-gray-200 dark:bg-white/[0.06] text-gray-400 dark:text-white/20 cursor-not-allowed"),children:[f?x.jsx(ua,{className:"h-3 w-3 animate-spin"}):x.jsx(Jj,{className:"h-3 w-3"}),"Save"]})]})]}),x.jsx("div",{className:"flex-1 overflow-hidden",children:x.jsx(aW,{value:i.content,language:i.language,onChange:l})})]}):x.jsx("div",{className:"flex-1 flex items-center justify-center",children:x.jsxs("div",{className:"text-center",children:[x.jsx(Kj,{className:"h-8 w-8 text-gray-300 dark:text-white/10 mx-auto mb-3"}),x.jsx("p",{className:"text-sm text-gray-400 dark:text-zinc-600",children:"Select a file to view or edit"}),x.jsx("p",{className:"text-xs text-gray-300 dark:text-zinc-700 mt-1",children:"Changes are saved directly to your repo"})]})})})]})}function hW(){const[n,e]=V.useState([]),[t,r]=V.useState(""),[i,s]=V.useState(!1),[o,l]=V.useState(null),[c,h]=V.useState(null),f=V.useRef(null),p=V.useRef(null),m=V.useCallback(()=>{var w;(w=f.current)==null||w.scrollIntoView({behavior:"smooth"})},[]);V.useEffect(()=>{m()},[n,m]);const g=V.useCallback(async w=>{var Q;w.preventDefault();const C=t.trim();if(!(!C||i)){r(""),l(null),e($=>[...$,{role:"user",content:C}]),s(!0),e($=>[...$,{role:"assistant",content:""}]);try{const $=await fetch("/config/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:C,app_id:"admin",...c?{session_id:c}:{}})});if(!$.ok||!$.body)throw new Error(`Request failed: ${$.status}`);const E=$.body.getReader(),Z=new TextDecoder;let Y="";for(;;){const{done:_,value:R}=await E.read();if(_)break;Y+=Z.decode(R,{stream:!0});const q=Y.split(`
343
+ `);Y=q.pop()??"";for(const G of q){if(!G.startsWith("data: "))continue;const W=G.slice(6).trim();if(W)try{const z=JSON.parse(W);if(!z||typeof z!="object")continue;const D=z,se=String(D.type??"");if(se==="init"&&typeof D.session_id=="string")h(D.session_id);else if(se==="text_delta"&&typeof D.text=="string"){const oe=D.text;e(ne=>{const de=[...ne],ke=de[de.length-1];return ke&&ke.role==="assistant"&&(de[de.length-1]={...ke,content:ke.content+oe}),de})}else se==="error"&&l(typeof D.message=="string"?D.message:"Unknown error")}catch{}}}}catch($){const E=$ instanceof Error?$.message:String($);l(E)}finally{s(!1),(Q=p.current)==null||Q.focus()}}},[t,i,c]),k=V.useCallback(w=>{w.key==="Enter"&&!w.shiftKey&&(w.preventDefault(),g(w))},[g]);return x.jsxs("div",{className:"flex flex-col h-full",children:[x.jsxs("div",{className:"flex-1 overflow-y-auto scrollbar-thin px-6 py-4",children:[n.length===0&&x.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center",children:[x.jsx(RP,{className:"h-12 w-12 text-indigo-500/30 mb-4"}),x.jsx("h2",{className:"text-lg font-semibold text-gray-400 dark:text-white/40 mb-2",children:"Admin Agent"}),x.jsx("p",{className:"text-sm text-gray-400 dark:text-white/25 max-w-md",children:"I can help you configure your agent. Ask me to add connections, write skills, create automations, or validate your setup."})]}),n.map((w,C)=>x.jsx("div",{className:`mb-4 ${w.role==="user"?"flex justify-end":""}`,children:w.role==="user"?x.jsx("div",{className:"max-w-[80%] px-4 py-2.5 rounded-2xl rounded-br-md bg-indigo-600 text-white text-sm",children:w.content}):x.jsx("div",{className:"max-w-[90%] text-sm text-gray-800 dark:text-white/80 prose prose-sm dark:prose-invert prose-pre:bg-gray-100 dark:prose-pre:bg-zinc-800 prose-pre:text-xs max-w-none",children:x.jsx(ws,{children:w.content})})},C)),o&&x.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-red-500/10 border border-red-500/20 text-sm text-red-400 mb-4",children:[x.jsx(Yj,{className:"h-4 w-4 shrink-0"}),o]}),x.jsx("div",{ref:f})]}),x.jsx("div",{className:"shrink-0 border-t border-gray-200 dark:border-white/[0.06] bg-gray-50 dark:bg-[#0f0f17] px-4 py-3",children:x.jsxs("form",{onSubmit:w=>{g(w)},className:"flex items-end gap-2",children:[x.jsx("textarea",{ref:p,value:t,onChange:w=>r(w.target.value),onKeyDown:k,placeholder:"Ask me to add a connection, write a skill, or validate your config...",rows:1,className:"flex-1 resize-none rounded-xl border border-gray-300 dark:border-white/10 bg-white dark:bg-white/[0.04] px-4 py-2.5 text-sm text-gray-900 dark:text-white/90 placeholder-gray-400 dark:placeholder-white/25 focus:outline-none focus:border-indigo-500 dark:focus:border-indigo-500/50 transition-colors",disabled:i}),x.jsx("button",{type:"submit",disabled:!t.trim()||i,className:"h-10 w-10 rounded-xl flex items-center justify-center bg-indigo-600 text-white disabled:opacity-30 hover:bg-indigo-500 transition-colors shrink-0",children:i?x.jsx(ua,{className:"h-4 w-4 animate-spin"}):x.jsx(DP,{className:"h-4 w-4"})})]})})]})}const fW=ZM([{path:"/",element:x.jsx(VR,{}),children:[{index:!0,element:x.jsx(f4,{})},{path:"sessions",element:x.jsx(m4,{})},{path:"sessions/:sessionId",element:x.jsx(g4,{})},{path:"entities/:storeName",element:x.jsx(k4,{})},{path:"entities/:storeName/:key",element:x.jsx(N4,{})},{path:"automations",element:x.jsx(K4,{})},{path:"automations/:automationName",element:x.jsx(tz,{})},{path:"inspect/:kind/:name",element:x.jsx(uz,{})},{path:"pages/:pageName",element:x.jsx(nz,{})}]},{path:"/config",element:x.jsx(fz,{}),children:[{index:!0,element:x.jsx(hW,{})},{path:"agent",element:x.jsx(dz,{})},{path:"models",element:x.jsx(pz,{})},{path:"prompt",element:x.jsx(mz,{})},{path:"secrets",element:x.jsx(gz,{})},{path:"system",element:x.jsx(yz,{})},{path:"files",element:x.jsx(cW,{})}]}]),Xb=window.location.origin,dW="local",pW=new Mj({defaultOptions:{queries:{staleTime:1e4,refetchOnWindowFocus:!1}}});function mW(){return x.jsx(Rj,{client:pW,children:x.jsx(zj,{runtimeUrl:Xb,tenantId:dW,children:x.jsx(Xj,{runtimeUrl:Xb,children:x.jsx(qM,{router:fW})})})})}window.React=Jb;window.ReactDOM=nP;window.__AMODAL_PAGES__={};const b$=document.getElementById("app");if(!b$)throw new Error("Missing #app element");yE.createRoot(b$).render(x.jsx(V.StrictMode,{children:x.jsx(mW,{})}));