@amd-gaia/agent-ui 0.17.0 → 0.17.2

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.
@@ -1,432 +0,0 @@
1
- (function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(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=n(i);fetch(i.href,s)}})();var Ka=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ou(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var w0={exports:{}},Pu={},v0={exports:{}},ye={};/**
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 Gs=Symbol.for("react.element"),cE=Symbol.for("react.portal"),dE=Symbol.for("react.fragment"),fE=Symbol.for("react.strict_mode"),hE=Symbol.for("react.profiler"),mE=Symbol.for("react.provider"),pE=Symbol.for("react.context"),gE=Symbol.for("react.forward_ref"),EE=Symbol.for("react.suspense"),TE=Symbol.for("react.memo"),yE=Symbol.for("react.lazy"),$d=Symbol.iterator;function bE(e){return e===null||typeof e!="object"?null:(e=$d&&e[$d]||e["@@iterator"],typeof e=="function"?e:null)}var I0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},L0=Object.assign,D0={};function Pi(e,t,n){this.props=e,this.context=t,this.refs=D0,this.updater=n||I0}Pi.prototype.isReactComponent={};Pi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Pi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function R0(){}R0.prototype=Pi.prototype;function gc(e,t,n){this.props=e,this.context=t,this.refs=D0,this.updater=n||I0}var Ec=gc.prototype=new R0;Ec.constructor=gc;L0(Ec,Pi.prototype);Ec.isPureReactComponent=!0;var Yd=Array.isArray,O0=Object.prototype.hasOwnProperty,Tc={current:null},P0={key:!0,ref:!0,__self:!0,__source:!0};function M0(e,t,n){var r,i={},s=null,a=null;if(t!=null)for(r in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(s=""+t.key),t)O0.call(t,r)&&!P0.hasOwnProperty(r)&&(i[r]=t[r]);var u=arguments.length-2;if(u===1)i.children=n;else if(1<u){for(var l=Array(u),d=0;d<u;d++)l[d]=arguments[d+2];i.children=l}if(e&&e.defaultProps)for(r in u=e.defaultProps,u)i[r]===void 0&&(i[r]=u[r]);return{$$typeof:Gs,type:e,key:s,ref:a,props:i,_owner:Tc.current}}function xE(e,t){return{$$typeof:Gs,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function yc(e){return typeof e=="object"&&e!==null&&e.$$typeof===Gs}function _E(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Vd=/\/+/g;function fl(e,t){return typeof e=="object"&&e!==null&&e.key!=null?_E(""+e.key):t.toString(36)}function Ra(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Gs:case cE:a=!0}}if(a)return a=e,i=i(a),e=r===""?"."+fl(a,0):r,Yd(i)?(n="",e!=null&&(n=e.replace(Vd,"$&/")+"/"),Ra(i,t,n,"",function(d){return d})):i!=null&&(yc(i)&&(i=xE(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(Vd,"$&/")+"/")+e)),t.push(i)),1;if(a=0,r=r===""?".":r+":",Yd(e))for(var u=0;u<e.length;u++){s=e[u];var l=r+fl(s,u);a+=Ra(s,t,n,l,i)}else if(l=bE(e),typeof l=="function")for(e=l.call(e),u=0;!(s=e.next()).done;)s=s.value,l=r+fl(s,u++),a+=Ra(s,t,n,l,i);else if(s==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return a}function la(e,t,n){if(e==null)return e;var r=[],i=0;return Ra(e,r,"","",function(s){return t.call(n,s,i++)}),r}function kE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vt={current:null},Oa={transition:null},SE={ReactCurrentDispatcher:vt,ReactCurrentBatchConfig:Oa,ReactCurrentOwner:Tc};function F0(){throw Error("act(...) is not supported in production builds of React.")}ye.Children={map:la,forEach:function(e,t,n){la(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return la(e,function(){t++}),t},toArray:function(e){return la(e,function(t){return t})||[]},only:function(e){if(!yc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Component=Pi;ye.Fragment=dE;ye.Profiler=hE;ye.PureComponent=gc;ye.StrictMode=fE;ye.Suspense=EE;ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=SE;ye.act=F0;ye.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=L0({},e.props),i=e.key,s=e.ref,a=e._owner;if(t!=null){if(t.ref!==void 0&&(s=t.ref,a=Tc.current),t.key!==void 0&&(i=""+t.key),e.type&&e.type.defaultProps)var u=e.type.defaultProps;for(l in t)O0.call(t,l)&&!P0.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&u!==void 0?u[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){u=Array(l);for(var d=0;d<l;d++)u[d]=arguments[d+2];r.children=u}return{$$typeof:Gs,type:e.type,key:i,ref:s,props:r,_owner:a}};ye.createContext=function(e){return e={$$typeof:pE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:mE,_context:e},e.Consumer=e};ye.createElement=M0;ye.createFactory=function(e){var t=M0.bind(null,e);return t.type=e,t};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:gE,render:e}};ye.isValidElement=yc;ye.lazy=function(e){return{$$typeof:yE,_payload:{_status:-1,_result:e},_init:kE}};ye.memo=function(e,t){return{$$typeof:TE,type:e,compare:t===void 0?null:t}};ye.startTransition=function(e){var t=Oa.transition;Oa.transition={};try{e()}finally{Oa.transition=t}};ye.unstable_act=F0;ye.useCallback=function(e,t){return vt.current.useCallback(e,t)};ye.useContext=function(e){return vt.current.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e){return vt.current.useDeferredValue(e)};ye.useEffect=function(e,t){return vt.current.useEffect(e,t)};ye.useId=function(){return vt.current.useId()};ye.useImperativeHandle=function(e,t,n){return vt.current.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return vt.current.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return vt.current.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return vt.current.useMemo(e,t)};ye.useReducer=function(e,t,n){return vt.current.useReducer(e,t,n)};ye.useRef=function(e){return vt.current.useRef(e)};ye.useState=function(e){return vt.current.useState(e)};ye.useSyncExternalStore=function(e,t,n){return vt.current.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return vt.current.useTransition()};ye.version="18.3.1";v0.exports=ye;var S=v0.exports;const As=Ou(S);/**
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 CE=S,NE=Symbol.for("react.element"),AE=Symbol.for("react.fragment"),wE=Object.prototype.hasOwnProperty,vE=CE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,IE={key:!0,ref:!0,__self:!0,__source:!0};function B0(e,t,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(a=t.ref);for(r in t)wE.call(t,r)&&!IE.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:NE,type:e,key:s,ref:a,props:i,_owner:vE.current}}Pu.Fragment=AE;Pu.jsx=B0;Pu.jsxs=B0;w0.exports=Pu;var c=w0.exports,io={},j0={exports:{}},Gt={},U0={exports:{}},H0={};/**
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
- */(function(e){function t(P,G){var _=P.length;P.push(G);e:for(;0<_;){var Z=_-1>>>1,fe=P[Z];if(0<i(fe,G))P[Z]=G,P[_]=fe,_=Z;else break e}}function n(P){return P.length===0?null:P[0]}function r(P){if(P.length===0)return null;var G=P[0],_=P.pop();if(_!==G){P[0]=_;e:for(var Z=0,fe=P.length,N=fe>>>1;Z<N;){var Ne=2*(Z+1)-1,re=P[Ne],me=Ne+1,ve=P[me];if(0>i(re,_))me<fe&&0>i(ve,re)?(P[Z]=ve,P[me]=_,Z=me):(P[Z]=re,P[Ne]=_,Z=Ne);else if(me<fe&&0>i(ve,_))P[Z]=ve,P[me]=_,Z=me;else break e}}return G}function i(P,G){var _=P.sortIndex-G.sortIndex;return _!==0?_:P.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var l=[],d=[],h=1,f=null,p=3,m=!1,T=!1,x=!1,I=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(P){for(var G=n(d);G!==null;){if(G.callback===null)r(d);else if(G.startTime<=P)r(d),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(d)}}function v(P){if(x=!1,y(P),!T)if(n(l)!==null)T=!0,j(O);else{var G=n(d);G!==null&&z(v,G.startTime-P)}}function O(P,G){T=!1,x&&(x=!1,g(H),H=-1),m=!0;var _=p;try{for(y(G),f=n(l);f!==null&&(!(f.expirationTime>G)||P&&!Y());){var Z=f.callback;if(typeof Z=="function"){f.callback=null,p=f.priorityLevel;var fe=Z(f.expirationTime<=G);G=e.unstable_now(),typeof fe=="function"?f.callback=fe:f===n(l)&&r(l),y(G)}else r(l);f=n(l)}if(f!==null)var N=!0;else{var Ne=n(d);Ne!==null&&z(v,Ne.startTime-G),N=!1}return N}finally{f=null,p=_,m=!1}}var A=!1,F=null,H=-1,K=5,w=-1;function Y(){return!(e.unstable_now()-w<K)}function te(){if(F!==null){var P=e.unstable_now();w=P;var G=!0;try{G=F(!0,P)}finally{G?ce():(A=!1,F=null)}}else A=!1}var ce;if(typeof E=="function")ce=function(){E(te)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=te,ce=function(){ue.postMessage(null)}}else ce=function(){I(te,0)};function j(P){F=P,A||(A=!0,ce())}function z(P,G){H=I(function(){P(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(P){P.callback=null},e.unstable_continueExecution=function(){T||m||(T=!0,j(O))},e.unstable_forceFrameRate=function(P){0>P||125<P?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<P?Math.floor(1e3/P):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(P){switch(p){case 1:case 2:case 3:var G=3;break;default:G=p}var _=p;p=G;try{return P()}finally{p=_}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(P,G){switch(P){case 1:case 2:case 3:case 4:case 5:break;default:P=3}var _=p;p=P;try{return G()}finally{p=_}},e.unstable_scheduleCallback=function(P,G,_){var Z=e.unstable_now();switch(typeof _=="object"&&_!==null?(_=_.delay,_=typeof _=="number"&&0<_?Z+_:Z):_=Z,P){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=_+fe,P={id:h++,callback:G,priorityLevel:P,startTime:_,expirationTime:fe,sortIndex:-1},_>Z?(P.sortIndex=_,t(d,P),n(l)===null&&P===n(d)&&(x?(g(H),H=-1):x=!0,z(v,_-Z))):(P.sortIndex=fe,t(l,P),T||m||(T=!0,j(O))),P},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(P){var G=p;return function(){var _=p;p=G;try{return P.apply(this,arguments)}finally{p=_}}}})(H0);U0.exports=H0;var LE=U0.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 DE=S,Qt=LE;function q(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var z0=new Set,ws={};function Wr(e,t){ki(e,t),ki(e+"Capture",t)}function ki(e,t){for(ws[e]=t,e=0;e<t.length;e++)z0.add(t[e])}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),so=Object.prototype.hasOwnProperty,RE=/^[: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]*$/,Wd={},qd={};function OE(e){return so.call(qd,e)?!0:so.call(Wd,e)?!1:RE.test(e)?qd[e]=!0:(Wd[e]=!0,!1)}function PE(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ME(e,t,n,r){if(t===null||typeof t>"u"||PE(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function It(e,t,n,r,i,s,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=s,this.removeEmptyString=a}var mt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){mt[e]=new It(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];mt[t]=new It(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){mt[e]=new It(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){mt[e]=new It(e,2,!1,e,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(e){mt[e]=new It(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){mt[e]=new It(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){mt[e]=new It(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){mt[e]=new It(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){mt[e]=new It(e,5,!1,e.toLowerCase(),null,!1,!1)});var bc=/[\-:]([a-z])/g;function xc(e){return e[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(e){var t=e.replace(bc,xc);mt[t]=new It(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(bc,xc);mt[t]=new It(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(bc,xc);mt[t]=new It(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){mt[e]=new It(e,1,!1,e.toLowerCase(),null,!1,!1)});mt.xlinkHref=new It("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){mt[e]=new It(e,1,!1,e.toLowerCase(),null,!0,!0)});function _c(e,t,n,r){var i=mt.hasOwnProperty(t)?mt[t]:null;(i!==null?i.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ME(t,n,i,r)&&(n=null),r||i===null?OE(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:"":n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var qn=DE.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,oa=Symbol.for("react.element"),ni=Symbol.for("react.portal"),ri=Symbol.for("react.fragment"),kc=Symbol.for("react.strict_mode"),ao=Symbol.for("react.profiler"),$0=Symbol.for("react.provider"),Y0=Symbol.for("react.context"),Sc=Symbol.for("react.forward_ref"),uo=Symbol.for("react.suspense"),lo=Symbol.for("react.suspense_list"),Cc=Symbol.for("react.memo"),rr=Symbol.for("react.lazy"),V0=Symbol.for("react.offscreen"),Qd=Symbol.iterator;function $i(e){return e===null||typeof e!="object"?null:(e=Qd&&e[Qd]||e["@@iterator"],typeof e=="function"?e:null)}var Ke=Object.assign,hl;function rs(e){if(hl===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);hl=t&&t[1]||""}return`
34
- `+hl+e}var ml=!1;function pl(e,t){if(!e||ml)return"";ml=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(d){var r=d}Reflect.construct(e,[],t)}else{try{t.call()}catch(d){r=d}e.call(t.prototype)}else{try{throw Error()}catch(d){r=d}e()}}catch(d){if(d&&r&&typeof d.stack=="string"){for(var i=d.stack.split(`
35
- `),s=r.stack.split(`
36
- `),a=i.length-1,u=s.length-1;1<=a&&0<=u&&i[a]!==s[u];)u--;for(;1<=a&&0<=u;a--,u--)if(i[a]!==s[u]){if(a!==1||u!==1)do if(a--,u--,0>u||i[a]!==s[u]){var l=`
37
- `+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=a&&0<=u);break}}}finally{ml=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?rs(e):""}function FE(e){switch(e.tag){case 5:return rs(e.type);case 16:return rs("Lazy");case 13:return rs("Suspense");case 19:return rs("SuspenseList");case 0:case 2:case 15:return e=pl(e.type,!1),e;case 11:return e=pl(e.type.render,!1),e;case 1:return e=pl(e.type,!0),e;default:return""}}function oo(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ri:return"Fragment";case ni:return"Portal";case ao:return"Profiler";case kc:return"StrictMode";case uo:return"Suspense";case lo:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Y0:return(e.displayName||"Context")+".Consumer";case $0:return(e._context.displayName||"Context")+".Provider";case Sc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Cc:return t=e.displayName||null,t!==null?t:oo(e.type)||"Memo";case rr:t=e._payload,e=e._init;try{return oo(e(t))}catch{}}return null}function BE(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return oo(t);case 8:return t===kc?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Tr(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function W0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function jE(e){var t=W0(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ca(e){e._valueTracker||(e._valueTracker=jE(e))}function q0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Xa(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function co(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Gd(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Tr(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Q0(e,t){t=t.checked,t!=null&&_c(e,"checked",t,!1)}function fo(e,t){Q0(e,t);var n=Tr(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ho(e,t.type,n):t.hasOwnProperty("defaultValue")&&ho(e,t.type,Tr(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Kd(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ho(e,t,n){(t!=="number"||Xa(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var is=Array.isArray;function pi(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Tr(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function mo(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(q(91));return Ke({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Xd(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(q(92));if(is(n)){if(1<n.length)throw Error(q(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:Tr(n)}}function G0(e,t){var n=Tr(t.value),r=Tr(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function Jd(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function K0(e){switch(e){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 po(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?K0(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var da,X0=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(da=da||document.createElement("div"),da.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=da.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function vs(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var os={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},UE=["Webkit","ms","Moz","O"];Object.keys(os).forEach(function(e){UE.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),os[t]=os[e]})});function J0(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||os.hasOwnProperty(e)&&os[e]?(""+t).trim():t+"px"}function Z0(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=J0(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var HE=Ke({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 go(e,t){if(t){if(HE[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(q(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(q(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(q(61))}if(t.style!=null&&typeof t.style!="object")throw Error(q(62))}}function Eo(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 To=null;function Nc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yo=null,gi=null,Ei=null;function Zd(e){if(e=Js(e)){if(typeof yo!="function")throw Error(q(280));var t=e.stateNode;t&&(t=Uu(t),yo(e.stateNode,e.type,t))}}function em(e){gi?Ei?Ei.push(e):Ei=[e]:gi=e}function tm(){if(gi){var e=gi,t=Ei;if(Ei=gi=null,Zd(e),t)for(e=0;e<t.length;e++)Zd(t[e])}}function nm(e,t){return e(t)}function rm(){}var gl=!1;function im(e,t,n){if(gl)return e(t,n);gl=!0;try{return nm(e,t,n)}finally{gl=!1,(gi!==null||Ei!==null)&&(rm(),tm())}}function Is(e,t){var n=e.stateNode;if(n===null)return null;var r=Uu(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var bo=!1;if($n)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){bo=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{bo=!1}function zE(e,t,n,r,i,s,a,u,l){var d=Array.prototype.slice.call(arguments,3);try{t.apply(n,d)}catch(h){this.onError(h)}}var cs=!1,Ja=null,Za=!1,xo=null,$E={onError:function(e){cs=!0,Ja=e}};function YE(e,t,n,r,i,s,a,u,l){cs=!1,Ja=null,zE.apply($E,arguments)}function VE(e,t,n,r,i,s,a,u,l){if(YE.apply(this,arguments),cs){if(cs){var d=Ja;cs=!1,Ja=null}else throw Error(q(198));Za||(Za=!0,xo=d)}}function qr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function sm(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ef(e){if(qr(e)!==e)throw Error(q(188))}function WE(e){var t=e.alternate;if(!t){if(t=qr(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return ef(i),e;if(s===r)return ef(i),t;s=s.sibling}throw Error(q(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,u=i.child;u;){if(u===n){a=!0,n=i,r=s;break}if(u===r){a=!0,r=i,n=s;break}u=u.sibling}if(!a){for(u=s.child;u;){if(u===n){a=!0,n=s,r=i;break}if(u===r){a=!0,r=s,n=i;break}u=u.sibling}if(!a)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function am(e){return e=WE(e),e!==null?um(e):null}function um(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=um(e);if(t!==null)return t;e=e.sibling}return null}var lm=Qt.unstable_scheduleCallback,tf=Qt.unstable_cancelCallback,qE=Qt.unstable_shouldYield,QE=Qt.unstable_requestPaint,Ze=Qt.unstable_now,GE=Qt.unstable_getCurrentPriorityLevel,Ac=Qt.unstable_ImmediatePriority,om=Qt.unstable_UserBlockingPriority,eu=Qt.unstable_NormalPriority,KE=Qt.unstable_LowPriority,cm=Qt.unstable_IdlePriority,Mu=null,vn=null;function XE(e){if(vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Mu,e,void 0,(e.current.flags&128)===128)}catch{}}var pn=Math.clz32?Math.clz32:e2,JE=Math.log,ZE=Math.LN2;function e2(e){return e>>>=0,e===0?32:31-(JE(e)/ZE|0)|0}var fa=64,ha=4194304;function ss(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function tu(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes,a=n&268435455;if(a!==0){var u=a&~i;u!==0?r=ss(u):(s&=a,s!==0&&(r=ss(s)))}else a=n&~i,a!==0?r=ss(a):s!==0&&(r=ss(s));if(r===0)return 0;if(t!==0&&t!==r&&!(t&i)&&(i=r&-r,s=t&-t,i>=s||i===16&&(s&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-pn(t),i=1<<n,r|=e[n],t&=~i;return r}function t2(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 n2(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes;0<s;){var a=31-pn(s),u=1<<a,l=i[a];l===-1?(!(u&n)||u&r)&&(i[a]=t2(u,t)):l<=t&&(e.expiredLanes|=u),s&=~u}}function _o(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function dm(){var e=fa;return fa<<=1,!(fa&4194240)&&(fa=64),e}function El(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ks(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-pn(t),e[t]=n}function r2(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-pn(n),s=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~s}}function wc(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-pn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Oe=0;function fm(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var hm,vc,mm,pm,gm,ko=!1,ma=[],cr=null,dr=null,fr=null,Ls=new Map,Ds=new Map,sr=[],i2="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 nf(e,t){switch(e){case"focusin":case"focusout":cr=null;break;case"dragenter":case"dragleave":dr=null;break;case"mouseover":case"mouseout":fr=null;break;case"pointerover":case"pointerout":Ls.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ds.delete(t.pointerId)}}function Vi(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=Js(t),t!==null&&vc(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function s2(e,t,n,r,i){switch(t){case"focusin":return cr=Vi(cr,e,t,n,r,i),!0;case"dragenter":return dr=Vi(dr,e,t,n,r,i),!0;case"mouseover":return fr=Vi(fr,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Ls.set(s,Vi(Ls.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ds.set(s,Vi(Ds.get(s)||null,e,t,n,r,i)),!0}return!1}function Em(e){var t=Dr(e.target);if(t!==null){var n=qr(t);if(n!==null){if(t=n.tag,t===13){if(t=sm(n),t!==null){e.blockedOn=t,gm(e.priority,function(){mm(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Pa(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=So(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);To=r,n.target.dispatchEvent(r),To=null}else return t=Js(n),t!==null&&vc(t),e.blockedOn=n,!1;t.shift()}return!0}function rf(e,t,n){Pa(e)&&n.delete(t)}function a2(){ko=!1,cr!==null&&Pa(cr)&&(cr=null),dr!==null&&Pa(dr)&&(dr=null),fr!==null&&Pa(fr)&&(fr=null),Ls.forEach(rf),Ds.forEach(rf)}function Wi(e,t){e.blockedOn===t&&(e.blockedOn=null,ko||(ko=!0,Qt.unstable_scheduleCallback(Qt.unstable_NormalPriority,a2)))}function Rs(e){function t(i){return Wi(i,e)}if(0<ma.length){Wi(ma[0],e);for(var n=1;n<ma.length;n++){var r=ma[n];r.blockedOn===e&&(r.blockedOn=null)}}for(cr!==null&&Wi(cr,e),dr!==null&&Wi(dr,e),fr!==null&&Wi(fr,e),Ls.forEach(t),Ds.forEach(t),n=0;n<sr.length;n++)r=sr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<sr.length&&(n=sr[0],n.blockedOn===null);)Em(n),n.blockedOn===null&&sr.shift()}var Ti=qn.ReactCurrentBatchConfig,nu=!0;function u2(e,t,n,r){var i=Oe,s=Ti.transition;Ti.transition=null;try{Oe=1,Ic(e,t,n,r)}finally{Oe=i,Ti.transition=s}}function l2(e,t,n,r){var i=Oe,s=Ti.transition;Ti.transition=null;try{Oe=4,Ic(e,t,n,r)}finally{Oe=i,Ti.transition=s}}function Ic(e,t,n,r){if(nu){var i=So(e,t,n,r);if(i===null)Al(e,t,r,ru,n),nf(e,r);else if(s2(i,e,t,n,r))r.stopPropagation();else if(nf(e,r),t&4&&-1<i2.indexOf(e)){for(;i!==null;){var s=Js(i);if(s!==null&&hm(s),s=So(e,t,n,r),s===null&&Al(e,t,r,ru,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else Al(e,t,r,null,n)}}var ru=null;function So(e,t,n,r){if(ru=null,e=Nc(r),e=Dr(e),e!==null)if(t=qr(e),t===null)e=null;else if(n=t.tag,n===13){if(e=sm(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ru=e,null}function Tm(e){switch(e){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(GE()){case Ac:return 1;case om:return 4;case eu:case KE:return 16;case cm:return 536870912;default:return 16}default:return 16}}var ur=null,Lc=null,Ma=null;function ym(){if(Ma)return Ma;var e,t=Lc,n=t.length,r,i="value"in ur?ur.value:ur.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return Ma=i.slice(e,1<r?1-r:void 0)}function Fa(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pa(){return!0}function sf(){return!1}function Kt(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var u in e)e.hasOwnProperty(u)&&(n=e[u],this[u]=n?n(s):s[u]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?pa:sf,this.isPropagationStopped=sf,this}return Ke(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=pa)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=pa)},persist:function(){},isPersistent:pa}),t}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Dc=Kt(Mi),Xs=Ke({},Mi,{view:0,detail:0}),o2=Kt(Xs),Tl,yl,qi,Fu=Ke({},Xs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Rc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==qi&&(qi&&e.type==="mousemove"?(Tl=e.screenX-qi.screenX,yl=e.screenY-qi.screenY):yl=Tl=0,qi=e),Tl)},movementY:function(e){return"movementY"in e?e.movementY:yl}}),af=Kt(Fu),c2=Ke({},Fu,{dataTransfer:0}),d2=Kt(c2),f2=Ke({},Xs,{relatedTarget:0}),bl=Kt(f2),h2=Ke({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),m2=Kt(h2),p2=Ke({},Mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),g2=Kt(p2),E2=Ke({},Mi,{data:0}),uf=Kt(E2),T2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y2={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"},b2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x2(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=b2[e])?!!t[e]:!1}function Rc(){return x2}var _2=Ke({},Xs,{key:function(e){if(e.key){var t=T2[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Fa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y2[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Rc,charCode:function(e){return e.type==="keypress"?Fa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Fa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),k2=Kt(_2),S2=Ke({},Fu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lf=Kt(S2),C2=Ke({},Xs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Rc}),N2=Kt(C2),A2=Ke({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),w2=Kt(A2),v2=Ke({},Fu,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),I2=Kt(v2),L2=[9,13,27,32],Oc=$n&&"CompositionEvent"in window,ds=null;$n&&"documentMode"in document&&(ds=document.documentMode);var D2=$n&&"TextEvent"in window&&!ds,bm=$n&&(!Oc||ds&&8<ds&&11>=ds),of=" ",cf=!1;function xm(e,t){switch(e){case"keyup":return L2.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _m(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ii=!1;function R2(e,t){switch(e){case"compositionend":return _m(t);case"keypress":return t.which!==32?null:(cf=!0,of);case"textInput":return e=t.data,e===of&&cf?null:e;default:return null}}function O2(e,t){if(ii)return e==="compositionend"||!Oc&&xm(e,t)?(e=ym(),Ma=Lc=ur=null,ii=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return bm&&t.locale!=="ko"?null:t.data;default:return null}}var P2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function df(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!P2[e.type]:t==="textarea"}function km(e,t,n,r){em(r),t=iu(t,"onChange"),0<t.length&&(n=new Dc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var fs=null,Os=null;function M2(e){Om(e,0)}function Bu(e){var t=ui(e);if(q0(t))return e}function F2(e,t){if(e==="change")return t}var Sm=!1;if($n){var xl;if($n){var _l="oninput"in document;if(!_l){var ff=document.createElement("div");ff.setAttribute("oninput","return;"),_l=typeof ff.oninput=="function"}xl=_l}else xl=!1;Sm=xl&&(!document.documentMode||9<document.documentMode)}function hf(){fs&&(fs.detachEvent("onpropertychange",Cm),Os=fs=null)}function Cm(e){if(e.propertyName==="value"&&Bu(Os)){var t=[];km(t,Os,e,Nc(e)),im(M2,t)}}function B2(e,t,n){e==="focusin"?(hf(),fs=t,Os=n,fs.attachEvent("onpropertychange",Cm)):e==="focusout"&&hf()}function j2(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Bu(Os)}function U2(e,t){if(e==="click")return Bu(t)}function H2(e,t){if(e==="input"||e==="change")return Bu(t)}function z2(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:z2;function Ps(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!so.call(t,i)||!Tn(e[i],t[i]))return!1}return!0}function mf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pf(e,t){var n=mf(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=mf(n)}}function Nm(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nm(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Am(){for(var e=window,t=Xa();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xa(e.document)}return t}function Pc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function $2(e){var t=Am(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Nm(n.ownerDocument.documentElement,n)){if(r!==null&&Pc(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!e.extend&&s>r&&(i=r,r=s,s=i),i=pf(n,s);var a=pf(n,r);i&&a&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),s>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Y2=$n&&"documentMode"in document&&11>=document.documentMode,si=null,Co=null,hs=null,No=!1;function gf(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;No||si==null||si!==Xa(r)||(r=si,"selectionStart"in r&&Pc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),hs&&Ps(hs,r)||(hs=r,r=iu(Co,"onSelect"),0<r.length&&(t=new Dc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=si)))}function ga(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ai={animationend:ga("Animation","AnimationEnd"),animationiteration:ga("Animation","AnimationIteration"),animationstart:ga("Animation","AnimationStart"),transitionend:ga("Transition","TransitionEnd")},kl={},wm={};$n&&(wm=document.createElement("div").style,"AnimationEvent"in window||(delete ai.animationend.animation,delete ai.animationiteration.animation,delete ai.animationstart.animation),"TransitionEvent"in window||delete ai.transitionend.transition);function ju(e){if(kl[e])return kl[e];if(!ai[e])return e;var t=ai[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wm)return kl[e]=t[n];return e}var vm=ju("animationend"),Im=ju("animationiteration"),Lm=ju("animationstart"),Dm=ju("transitionend"),Rm=new Map,Ef="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 xr(e,t){Rm.set(e,t),Wr(t,[e])}for(var Sl=0;Sl<Ef.length;Sl++){var Cl=Ef[Sl],V2=Cl.toLowerCase(),W2=Cl[0].toUpperCase()+Cl.slice(1);xr(V2,"on"+W2)}xr(vm,"onAnimationEnd");xr(Im,"onAnimationIteration");xr(Lm,"onAnimationStart");xr("dblclick","onDoubleClick");xr("focusin","onFocus");xr("focusout","onBlur");xr(Dm,"onTransitionEnd");ki("onMouseEnter",["mouseout","mouseover"]);ki("onMouseLeave",["mouseout","mouseover"]);ki("onPointerEnter",["pointerout","pointerover"]);ki("onPointerLeave",["pointerout","pointerover"]);Wr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var as="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),q2=new Set("cancel close invalid load scroll toggle".split(" ").concat(as));function Tf(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,VE(r,t,void 0,e),e.currentTarget=null}function Om(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],l=u.instance,d=u.currentTarget;if(u=u.listener,l!==s&&i.isPropagationStopped())break e;Tf(i,u,d),s=l}else for(a=0;a<r.length;a++){if(u=r[a],l=u.instance,d=u.currentTarget,u=u.listener,l!==s&&i.isPropagationStopped())break e;Tf(i,u,d),s=l}}}if(Za)throw e=xo,Za=!1,xo=null,e}function $e(e,t){var n=t[Lo];n===void 0&&(n=t[Lo]=new Set);var r=e+"__bubble";n.has(r)||(Pm(t,e,2,!1),n.add(r))}function Nl(e,t,n){var r=0;t&&(r|=4),Pm(n,e,r,t)}var Ea="_reactListening"+Math.random().toString(36).slice(2);function Ms(e){if(!e[Ea]){e[Ea]=!0,z0.forEach(function(n){n!=="selectionchange"&&(q2.has(n)||Nl(n,!1,e),Nl(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ea]||(t[Ea]=!0,Nl("selectionchange",!1,t))}}function Pm(e,t,n,r){switch(Tm(t)){case 1:var i=u2;break;case 4:i=l2;break;default:i=Ic}n=i.bind(null,t,n,e),i=void 0,!bo||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Al(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var u=r.stateNode.containerInfo;if(u===i||u.nodeType===8&&u.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;u!==null;){if(a=Dr(u),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}u=u.parentNode}}r=r.return}im(function(){var d=s,h=Nc(n),f=[];e:{var p=Rm.get(e);if(p!==void 0){var m=Dc,T=e;switch(e){case"keypress":if(Fa(n)===0)break e;case"keydown":case"keyup":m=k2;break;case"focusin":T="focus",m=bl;break;case"focusout":T="blur",m=bl;break;case"beforeblur":case"afterblur":m=bl;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":m=af;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":m=d2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":m=N2;break;case vm:case Im:case Lm:m=m2;break;case Dm:m=w2;break;case"scroll":m=o2;break;case"wheel":m=I2;break;case"copy":case"cut":case"paste":m=g2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":m=lf}var x=(t&4)!==0,I=!x&&e==="scroll",g=x?p!==null?p+"Capture":null:p;x=[];for(var E=d,y;E!==null;){y=E;var v=y.stateNode;if(y.tag===5&&v!==null&&(y=v,g!==null&&(v=Is(E,g),v!=null&&x.push(Fs(E,v,y)))),I)break;E=E.return}0<x.length&&(p=new m(p,T,null,n,h),f.push({event:p,listeners:x}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",m=e==="mouseout"||e==="pointerout",p&&n!==To&&(T=n.relatedTarget||n.fromElement)&&(Dr(T)||T[Yn]))break e;if((m||p)&&(p=h.window===h?h:(p=h.ownerDocument)?p.defaultView||p.parentWindow:window,m?(T=n.relatedTarget||n.toElement,m=d,T=T?Dr(T):null,T!==null&&(I=qr(T),T!==I||T.tag!==5&&T.tag!==6)&&(T=null)):(m=null,T=d),m!==T)){if(x=af,v="onMouseLeave",g="onMouseEnter",E="mouse",(e==="pointerout"||e==="pointerover")&&(x=lf,v="onPointerLeave",g="onPointerEnter",E="pointer"),I=m==null?p:ui(m),y=T==null?p:ui(T),p=new x(v,E+"leave",m,n,h),p.target=I,p.relatedTarget=y,v=null,Dr(h)===d&&(x=new x(g,E+"enter",T,n,h),x.target=y,x.relatedTarget=I,v=x),I=v,m&&T)t:{for(x=m,g=T,E=0,y=x;y;y=Xr(y))E++;for(y=0,v=g;v;v=Xr(v))y++;for(;0<E-y;)x=Xr(x),E--;for(;0<y-E;)g=Xr(g),y--;for(;E--;){if(x===g||g!==null&&x===g.alternate)break t;x=Xr(x),g=Xr(g)}x=null}else x=null;m!==null&&yf(f,p,m,x,!1),T!==null&&I!==null&&yf(f,I,T,x,!0)}}e:{if(p=d?ui(d):window,m=p.nodeName&&p.nodeName.toLowerCase(),m==="select"||m==="input"&&p.type==="file")var O=F2;else if(df(p))if(Sm)O=H2;else{O=j2;var A=B2}else(m=p.nodeName)&&m.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(O=U2);if(O&&(O=O(e,d))){km(f,O,n,h);break e}A&&A(e,p,d),e==="focusout"&&(A=p._wrapperState)&&A.controlled&&p.type==="number"&&ho(p,"number",p.value)}switch(A=d?ui(d):window,e){case"focusin":(df(A)||A.contentEditable==="true")&&(si=A,Co=d,hs=null);break;case"focusout":hs=Co=si=null;break;case"mousedown":No=!0;break;case"contextmenu":case"mouseup":case"dragend":No=!1,gf(f,n,h);break;case"selectionchange":if(Y2)break;case"keydown":case"keyup":gf(f,n,h)}var F;if(Oc)e:{switch(e){case"compositionstart":var H="onCompositionStart";break e;case"compositionend":H="onCompositionEnd";break e;case"compositionupdate":H="onCompositionUpdate";break e}H=void 0}else ii?xm(e,n)&&(H="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(H="onCompositionStart");H&&(bm&&n.locale!=="ko"&&(ii||H!=="onCompositionStart"?H==="onCompositionEnd"&&ii&&(F=ym()):(ur=h,Lc="value"in ur?ur.value:ur.textContent,ii=!0)),A=iu(d,H),0<A.length&&(H=new uf(H,e,null,n,h),f.push({event:H,listeners:A}),F?H.data=F:(F=_m(n),F!==null&&(H.data=F)))),(F=D2?R2(e,n):O2(e,n))&&(d=iu(d,"onBeforeInput"),0<d.length&&(h=new uf("onBeforeInput","beforeinput",null,n,h),f.push({event:h,listeners:d}),h.data=F))}Om(f,t)})}function Fs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function iu(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=Is(e,n),s!=null&&r.unshift(Fs(e,s,i)),s=Is(e,t),s!=null&&r.push(Fs(e,s,i))),e=e.return}return r}function Xr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yf(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var u=n,l=u.alternate,d=u.stateNode;if(l!==null&&l===r)break;u.tag===5&&d!==null&&(u=d,i?(l=Is(n,s),l!=null&&a.unshift(Fs(n,l,u))):i||(l=Is(n,s),l!=null&&a.push(Fs(n,l,u)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Q2=/\r\n?/g,G2=/\u0000|\uFFFD/g;function bf(e){return(typeof e=="string"?e:""+e).replace(Q2,`
38
- `).replace(G2,"")}function Ta(e,t,n){if(t=bf(t),bf(e)!==t&&n)throw Error(q(425))}function su(){}var Ao=null,wo=null;function vo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Io=typeof setTimeout=="function"?setTimeout:void 0,K2=typeof clearTimeout=="function"?clearTimeout:void 0,xf=typeof Promise=="function"?Promise:void 0,X2=typeof queueMicrotask=="function"?queueMicrotask:typeof xf<"u"?function(e){return xf.resolve(null).then(e).catch(J2)}:Io;function J2(e){setTimeout(function(){throw e})}function wl(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){e.removeChild(i),Rs(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);Rs(t)}function hr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function _f(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var Fi=Math.random().toString(36).slice(2),An="__reactFiber$"+Fi,Bs="__reactProps$"+Fi,Yn="__reactContainer$"+Fi,Lo="__reactEvents$"+Fi,Z2="__reactListeners$"+Fi,eT="__reactHandles$"+Fi;function Dr(e){var t=e[An];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Yn]||n[An]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_f(e);e!==null;){if(n=e[An])return n;e=_f(e)}return t}e=n,n=e.parentNode}return null}function Js(e){return e=e[An]||e[Yn],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ui(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(q(33))}function Uu(e){return e[Bs]||null}var Do=[],li=-1;function _r(e){return{current:e}}function Ye(e){0>li||(e.current=Do[li],Do[li]=null,li--)}function Ue(e,t){li++,Do[li]=e.current,e.current=t}var yr={},bt=_r(yr),Ft=_r(!1),Ur=yr;function Si(e,t){var n=e.type.contextTypes;if(!n)return yr;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=t[s];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Bt(e){return e=e.childContextTypes,e!=null}function au(){Ye(Ft),Ye(bt)}function kf(e,t,n){if(bt.current!==yr)throw Error(q(168));Ue(bt,t),Ue(Ft,n)}function Mm(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(q(108,BE(e)||"Unknown",i));return Ke({},n,r)}function uu(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yr,Ur=bt.current,Ue(bt,e),Ue(Ft,Ft.current),!0}function Sf(e,t,n){var r=e.stateNode;if(!r)throw Error(q(169));n?(e=Mm(e,t,Ur),r.__reactInternalMemoizedMergedChildContext=e,Ye(Ft),Ye(bt),Ue(bt,e)):Ye(Ft),Ue(Ft,n)}var Fn=null,Hu=!1,vl=!1;function Fm(e){Fn===null?Fn=[e]:Fn.push(e)}function tT(e){Hu=!0,Fm(e)}function kr(){if(!vl&&Fn!==null){vl=!0;var e=0,t=Oe;try{var n=Fn;for(Oe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Fn=null,Hu=!1}catch(i){throw Fn!==null&&(Fn=Fn.slice(e+1)),lm(Ac,kr),i}finally{Oe=t,vl=!1}}return null}var oi=[],ci=0,lu=null,ou=0,Jt=[],Zt=0,Hr=null,jn=1,Un="";function vr(e,t){oi[ci++]=ou,oi[ci++]=lu,lu=e,ou=t}function Bm(e,t,n){Jt[Zt++]=jn,Jt[Zt++]=Un,Jt[Zt++]=Hr,Hr=e;var r=jn;e=Un;var i=32-pn(r)-1;r&=~(1<<i),n+=1;var s=32-pn(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,jn=1<<32-pn(t)+i|n<<i|r,Un=s+e}else jn=1<<s|n<<i|r,Un=e}function Mc(e){e.return!==null&&(vr(e,1),Bm(e,1,0))}function Fc(e){for(;e===lu;)lu=oi[--ci],oi[ci]=null,ou=oi[--ci],oi[ci]=null;for(;e===Hr;)Hr=Jt[--Zt],Jt[Zt]=null,Un=Jt[--Zt],Jt[Zt]=null,jn=Jt[--Zt],Jt[Zt]=null}var Wt=null,Vt=null,qe=!1,hn=null;function jm(e,t){var n=nn(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Cf(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=hr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Wt=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Hr!==null?{id:jn,overflow:Un}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=nn(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Wt=e,Vt=null,!0):!1;default:return!1}}function Ro(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Oo(e){if(qe){var t=Vt;if(t){var n=t;if(!Cf(e,t)){if(Ro(e))throw Error(q(418));t=hr(n.nextSibling);var r=Wt;t&&Cf(e,t)?jm(r,n):(e.flags=e.flags&-4097|2,qe=!1,Wt=e)}}else{if(Ro(e))throw Error(q(418));e.flags=e.flags&-4097|2,qe=!1,Wt=e}}}function Nf(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Wt=e}function ya(e){if(e!==Wt)return!1;if(!qe)return Nf(e),qe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!vo(e.type,e.memoizedProps)),t&&(t=Vt)){if(Ro(e))throw Um(),Error(q(418));for(;t;)jm(e,t),t=hr(t.nextSibling)}if(Nf(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=hr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Wt?hr(e.stateNode.nextSibling):null;return!0}function Um(){for(var e=Vt;e;)e=hr(e.nextSibling)}function Ci(){Vt=Wt=null,qe=!1}function Bc(e){hn===null?hn=[e]:hn.push(e)}var nT=qn.ReactCurrentBatchConfig;function Qi(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(q(309));var r=n.stateNode}if(!r)throw Error(q(147,e));var i=r,s=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===s?t.ref:(t=function(a){var u=i.refs;a===null?delete u[s]:u[s]=a},t._stringRef=s,t)}if(typeof e!="string")throw Error(q(284));if(!n._owner)throw Error(q(290,e))}return e}function ba(e,t){throw e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Af(e){var t=e._init;return t(e._payload)}function Hm(e){function t(g,E){if(e){var y=g.deletions;y===null?(g.deletions=[E],g.flags|=16):y.push(E)}}function n(g,E){if(!e)return null;for(;E!==null;)t(g,E),E=E.sibling;return null}function r(g,E){for(g=new Map;E!==null;)E.key!==null?g.set(E.key,E):g.set(E.index,E),E=E.sibling;return g}function i(g,E){return g=Er(g,E),g.index=0,g.sibling=null,g}function s(g,E,y){return g.index=y,e?(y=g.alternate,y!==null?(y=y.index,y<E?(g.flags|=2,E):y):(g.flags|=2,E)):(g.flags|=1048576,E)}function a(g){return e&&g.alternate===null&&(g.flags|=2),g}function u(g,E,y,v){return E===null||E.tag!==6?(E=Ml(y,g.mode,v),E.return=g,E):(E=i(E,y),E.return=g,E)}function l(g,E,y,v){var O=y.type;return O===ri?h(g,E,y.props.children,v,y.key):E!==null&&(E.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===rr&&Af(O)===E.type)?(v=i(E,y.props),v.ref=Qi(g,E,y),v.return=g,v):(v=Ya(y.type,y.key,y.props,null,g.mode,v),v.ref=Qi(g,E,y),v.return=g,v)}function d(g,E,y,v){return E===null||E.tag!==4||E.stateNode.containerInfo!==y.containerInfo||E.stateNode.implementation!==y.implementation?(E=Fl(y,g.mode,v),E.return=g,E):(E=i(E,y.children||[]),E.return=g,E)}function h(g,E,y,v,O){return E===null||E.tag!==7?(E=Br(y,g.mode,v,O),E.return=g,E):(E=i(E,y),E.return=g,E)}function f(g,E,y){if(typeof E=="string"&&E!==""||typeof E=="number")return E=Ml(""+E,g.mode,y),E.return=g,E;if(typeof E=="object"&&E!==null){switch(E.$$typeof){case oa:return y=Ya(E.type,E.key,E.props,null,g.mode,y),y.ref=Qi(g,null,E),y.return=g,y;case ni:return E=Fl(E,g.mode,y),E.return=g,E;case rr:var v=E._init;return f(g,v(E._payload),y)}if(is(E)||$i(E))return E=Br(E,g.mode,y,null),E.return=g,E;ba(g,E)}return null}function p(g,E,y,v){var O=E!==null?E.key:null;if(typeof y=="string"&&y!==""||typeof y=="number")return O!==null?null:u(g,E,""+y,v);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case oa:return y.key===O?l(g,E,y,v):null;case ni:return y.key===O?d(g,E,y,v):null;case rr:return O=y._init,p(g,E,O(y._payload),v)}if(is(y)||$i(y))return O!==null?null:h(g,E,y,v,null);ba(g,y)}return null}function m(g,E,y,v,O){if(typeof v=="string"&&v!==""||typeof v=="number")return g=g.get(y)||null,u(E,g,""+v,O);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case oa:return g=g.get(v.key===null?y:v.key)||null,l(E,g,v,O);case ni:return g=g.get(v.key===null?y:v.key)||null,d(E,g,v,O);case rr:var A=v._init;return m(g,E,y,A(v._payload),O)}if(is(v)||$i(v))return g=g.get(y)||null,h(E,g,v,O,null);ba(E,v)}return null}function T(g,E,y,v){for(var O=null,A=null,F=E,H=E=0,K=null;F!==null&&H<y.length;H++){F.index>H?(K=F,F=null):K=F.sibling;var w=p(g,F,y[H],v);if(w===null){F===null&&(F=K);break}e&&F&&w.alternate===null&&t(g,F),E=s(w,E,H),A===null?O=w:A.sibling=w,A=w,F=K}if(H===y.length)return n(g,F),qe&&vr(g,H),O;if(F===null){for(;H<y.length;H++)F=f(g,y[H],v),F!==null&&(E=s(F,E,H),A===null?O=F:A.sibling=F,A=F);return qe&&vr(g,H),O}for(F=r(g,F);H<y.length;H++)K=m(F,g,H,y[H],v),K!==null&&(e&&K.alternate!==null&&F.delete(K.key===null?H:K.key),E=s(K,E,H),A===null?O=K:A.sibling=K,A=K);return e&&F.forEach(function(Y){return t(g,Y)}),qe&&vr(g,H),O}function x(g,E,y,v){var O=$i(y);if(typeof O!="function")throw Error(q(150));if(y=O.call(y),y==null)throw Error(q(151));for(var A=O=null,F=E,H=E=0,K=null,w=y.next();F!==null&&!w.done;H++,w=y.next()){F.index>H?(K=F,F=null):K=F.sibling;var Y=p(g,F,w.value,v);if(Y===null){F===null&&(F=K);break}e&&F&&Y.alternate===null&&t(g,F),E=s(Y,E,H),A===null?O=Y:A.sibling=Y,A=Y,F=K}if(w.done)return n(g,F),qe&&vr(g,H),O;if(F===null){for(;!w.done;H++,w=y.next())w=f(g,w.value,v),w!==null&&(E=s(w,E,H),A===null?O=w:A.sibling=w,A=w);return qe&&vr(g,H),O}for(F=r(g,F);!w.done;H++,w=y.next())w=m(F,g,H,w.value,v),w!==null&&(e&&w.alternate!==null&&F.delete(w.key===null?H:w.key),E=s(w,E,H),A===null?O=w:A.sibling=w,A=w);return e&&F.forEach(function(te){return t(g,te)}),qe&&vr(g,H),O}function I(g,E,y,v){if(typeof y=="object"&&y!==null&&y.type===ri&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case oa:e:{for(var O=y.key,A=E;A!==null;){if(A.key===O){if(O=y.type,O===ri){if(A.tag===7){n(g,A.sibling),E=i(A,y.props.children),E.return=g,g=E;break e}}else if(A.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===rr&&Af(O)===A.type){n(g,A.sibling),E=i(A,y.props),E.ref=Qi(g,A,y),E.return=g,g=E;break e}n(g,A);break}else t(g,A);A=A.sibling}y.type===ri?(E=Br(y.props.children,g.mode,v,y.key),E.return=g,g=E):(v=Ya(y.type,y.key,y.props,null,g.mode,v),v.ref=Qi(g,E,y),v.return=g,g=v)}return a(g);case ni:e:{for(A=y.key;E!==null;){if(E.key===A)if(E.tag===4&&E.stateNode.containerInfo===y.containerInfo&&E.stateNode.implementation===y.implementation){n(g,E.sibling),E=i(E,y.children||[]),E.return=g,g=E;break e}else{n(g,E);break}else t(g,E);E=E.sibling}E=Fl(y,g.mode,v),E.return=g,g=E}return a(g);case rr:return A=y._init,I(g,E,A(y._payload),v)}if(is(y))return T(g,E,y,v);if($i(y))return x(g,E,y,v);ba(g,y)}return typeof y=="string"&&y!==""||typeof y=="number"?(y=""+y,E!==null&&E.tag===6?(n(g,E.sibling),E=i(E,y),E.return=g,g=E):(n(g,E),E=Ml(y,g.mode,v),E.return=g,g=E),a(g)):n(g,E)}return I}var Ni=Hm(!0),zm=Hm(!1),cu=_r(null),du=null,di=null,jc=null;function Uc(){jc=di=du=null}function Hc(e){var t=cu.current;Ye(cu),e._currentValue=t}function Po(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yi(e,t){du=e,jc=di=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Pt=!0),e.firstContext=null)}function sn(e){var t=e._currentValue;if(jc!==e)if(e={context:e,memoizedValue:t,next:null},di===null){if(du===null)throw Error(q(308));di=e,du.dependencies={lanes:0,firstContext:e}}else di=di.next=e;return t}var Rr=null;function zc(e){Rr===null?Rr=[e]:Rr.push(e)}function $m(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,zc(t)):(n.next=i.next,i.next=n),t.interleaved=n,Vn(e,r)}function Vn(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var ir=!1;function $c(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ym(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function zn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function mr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ce&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Vn(e,n)}return i=r.interleaved,i===null?(t.next=t,zc(r)):(t.next=i.next,i.next=t),r.interleaved=t,Vn(e,n)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wc(e,n)}}function wf(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function fu(e,t,n,r){var i=e.updateQueue;ir=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,u=i.shared.pending;if(u!==null){i.shared.pending=null;var l=u,d=l.next;l.next=null,a===null?s=d:a.next=d,a=l;var h=e.alternate;h!==null&&(h=h.updateQueue,u=h.lastBaseUpdate,u!==a&&(u===null?h.firstBaseUpdate=d:u.next=d,h.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;a=0,h=d=l=null,u=s;do{var p=u.lane,m=u.eventTime;if((r&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:u.tag,payload:u.payload,callback:u.callback,next:null});e:{var T=e,x=u;switch(p=t,m=n,x.tag){case 1:if(T=x.payload,typeof T=="function"){f=T.call(m,f,p);break e}f=T;break e;case 3:T.flags=T.flags&-65537|128;case 0:if(T=x.payload,p=typeof T=="function"?T.call(m,f,p):T,p==null)break e;f=Ke({},f,p);break e;case 2:ir=!0}}u.callback!==null&&u.lane!==0&&(e.flags|=64,p=i.effects,p===null?i.effects=[u]:p.push(u))}else m={eventTime:m,lane:p,tag:u.tag,payload:u.payload,callback:u.callback,next:null},h===null?(d=h=m,l=f):h=h.next=m,a|=p;if(u=u.next,u===null){if(u=i.shared.pending,u===null)break;p=u,u=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(!0);if(h===null&&(l=f),i.baseState=l,i.firstBaseUpdate=d,i.lastBaseUpdate=h,t=i.shared.interleaved,t!==null){i=t;do a|=i.lane,i=i.next;while(i!==t)}else s===null&&(i.shared.lanes=0);$r|=a,e.lanes=a,e.memoizedState=f}}function vf(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(q(191,i));i.call(r)}}}var Zs={},In=_r(Zs),js=_r(Zs),Us=_r(Zs);function Or(e){if(e===Zs)throw Error(q(174));return e}function Yc(e,t){switch(Ue(Us,t),Ue(js,e),Ue(In,Zs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:po(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=po(t,e)}Ye(In),Ue(In,t)}function Ai(){Ye(In),Ye(js),Ye(Us)}function Vm(e){Or(Us.current);var t=Or(In.current),n=po(t,e.type);t!==n&&(Ue(js,e),Ue(In,n))}function Vc(e){js.current===e&&(Ye(In),Ye(js))}var Qe=_r(0);function hu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Il=[];function Wc(){for(var e=0;e<Il.length;e++)Il[e]._workInProgressVersionPrimary=null;Il.length=0}var ja=qn.ReactCurrentDispatcher,Ll=qn.ReactCurrentBatchConfig,zr=0,Ge=null,rt=null,ut=null,mu=!1,ms=!1,Hs=0,rT=0;function gt(){throw Error(q(321))}function qc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function Qc(e,t,n,r,i,s){if(zr=s,Ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ja.current=e===null||e.memoizedState===null?uT:lT,e=n(r,i),ms){s=0;do{if(ms=!1,Hs=0,25<=s)throw Error(q(301));s+=1,ut=rt=null,t.updateQueue=null,ja.current=oT,e=n(r,i)}while(ms)}if(ja.current=pu,t=rt!==null&&rt.next!==null,zr=0,ut=rt=Ge=null,mu=!1,t)throw Error(q(300));return e}function Gc(){var e=Hs!==0;return Hs=0,e}function Sn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?Ge.memoizedState=ut=e:ut=ut.next=e,ut}function an(){if(rt===null){var e=Ge.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=ut===null?Ge.memoizedState:ut.next;if(t!==null)ut=t,rt=e;else{if(e===null)throw Error(q(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},ut===null?Ge.memoizedState=ut=e:ut=ut.next=e}return ut}function zs(e,t){return typeof t=="function"?t(e):t}function Dl(e){var t=an(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=rt,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var u=a=null,l=null,d=s;do{var h=d.lane;if((zr&h)===h)l!==null&&(l=l.next={lane:0,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null}),r=d.hasEagerState?d.eagerState:e(r,d.action);else{var f={lane:h,action:d.action,hasEagerState:d.hasEagerState,eagerState:d.eagerState,next:null};l===null?(u=l=f,a=r):l=l.next=f,Ge.lanes|=h,$r|=h}d=d.next}while(d!==null&&d!==s);l===null?a=r:l.next=u,Tn(r,t.memoizedState)||(Pt=!0),t.memoizedState=r,t.baseState=a,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){i=e;do s=i.lane,Ge.lanes|=s,$r|=s,i=i.next;while(i!==e)}else i===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Rl(e){var t=an(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);Tn(s,t.memoizedState)||(Pt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Wm(){}function qm(e,t){var n=Ge,r=an(),i=t(),s=!Tn(r.memoizedState,i);if(s&&(r.memoizedState=i,Pt=!0),r=r.queue,Kc(Km.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||ut!==null&&ut.memoizedState.tag&1){if(n.flags|=2048,$s(9,Gm.bind(null,n,r,i,t),void 0,null),ot===null)throw Error(q(349));zr&30||Qm(n,t,i)}return i}function Qm(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Gm(e,t,n,r){t.value=n,t.getSnapshot=r,Xm(t)&&Jm(e)}function Km(e,t,n){return n(function(){Xm(t)&&Jm(e)})}function Xm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function Jm(e){var t=Vn(e,1);t!==null&&gn(t,e,1,-1)}function If(e){var t=Sn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:zs,lastRenderedState:e},t.queue=e,e=e.dispatch=aT.bind(null,Ge,e),[t.memoizedState,e]}function $s(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ge.updateQueue,t===null?(t={lastEffect:null,stores:null},Ge.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Zm(){return an().memoizedState}function Ua(e,t,n,r){var i=Sn();Ge.flags|=e,i.memoizedState=$s(1|t,n,void 0,r===void 0?null:r)}function zu(e,t,n,r){var i=an();r=r===void 0?null:r;var s=void 0;if(rt!==null){var a=rt.memoizedState;if(s=a.destroy,r!==null&&qc(r,a.deps)){i.memoizedState=$s(t,n,s,r);return}}Ge.flags|=e,i.memoizedState=$s(1|t,n,s,r)}function Lf(e,t){return Ua(8390656,8,e,t)}function Kc(e,t){return zu(2048,8,e,t)}function ep(e,t){return zu(4,2,e,t)}function tp(e,t){return zu(4,4,e,t)}function np(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function rp(e,t,n){return n=n!=null?n.concat([e]):null,zu(4,4,np.bind(null,t,e),n)}function Xc(){}function ip(e,t){var n=an();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qc(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function sp(e,t){var n=an();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&qc(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ap(e,t,n){return zr&21?(Tn(n,t)||(n=dm(),Ge.lanes|=n,$r|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Pt=!0),e.memoizedState=n)}function iT(e,t){var n=Oe;Oe=n!==0&&4>n?n:4,e(!0);var r=Ll.transition;Ll.transition={};try{e(!1),t()}finally{Oe=n,Ll.transition=r}}function up(){return an().memoizedState}function sT(e,t,n){var r=gr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},lp(e))op(t,n);else if(n=$m(e,t,n,r),n!==null){var i=wt();gn(n,e,r,i),cp(n,t,r)}}function aT(e,t,n){var r=gr(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(lp(e))op(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,u=s(a,n);if(i.hasEagerState=!0,i.eagerState=u,Tn(u,a)){var l=t.interleaved;l===null?(i.next=i,zc(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=$m(e,t,i,r),n!==null&&(i=wt(),gn(n,e,r,i),cp(n,t,r))}}function lp(e){var t=e.alternate;return e===Ge||t!==null&&t===Ge}function op(e,t){ms=mu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function cp(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,wc(e,n)}}var pu={readContext:sn,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useInsertionEffect:gt,useLayoutEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useMutableSource:gt,useSyncExternalStore:gt,useId:gt,unstable_isNewReconciler:!1},uT={readContext:sn,useCallback:function(e,t){return Sn().memoizedState=[e,t===void 0?null:t],e},useContext:sn,useEffect:Lf,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ua(4194308,4,np.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ua(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ua(4,2,e,t)},useMemo:function(e,t){var n=Sn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Sn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=sT.bind(null,Ge,e),[r.memoizedState,e]},useRef:function(e){var t=Sn();return e={current:e},t.memoizedState=e},useState:If,useDebugValue:Xc,useDeferredValue:function(e){return Sn().memoizedState=e},useTransition:function(){var e=If(!1),t=e[0];return e=iT.bind(null,e[1]),Sn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Ge,i=Sn();if(qe){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),ot===null)throw Error(q(349));zr&30||Qm(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Lf(Km.bind(null,r,s,e),[e]),r.flags|=2048,$s(9,Gm.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Sn(),t=ot.identifierPrefix;if(qe){var n=Un,r=jn;n=(r&~(1<<32-pn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Hs++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=rT++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},lT={readContext:sn,useCallback:ip,useContext:sn,useEffect:Kc,useImperativeHandle:rp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Dl,useRef:Zm,useState:function(){return Dl(zs)},useDebugValue:Xc,useDeferredValue:function(e){var t=an();return ap(t,rt.memoizedState,e)},useTransition:function(){var e=Dl(zs)[0],t=an().memoizedState;return[e,t]},useMutableSource:Wm,useSyncExternalStore:qm,useId:up,unstable_isNewReconciler:!1},oT={readContext:sn,useCallback:ip,useContext:sn,useEffect:Kc,useImperativeHandle:rp,useInsertionEffect:ep,useLayoutEffect:tp,useMemo:sp,useReducer:Rl,useRef:Zm,useState:function(){return Rl(zs)},useDebugValue:Xc,useDeferredValue:function(e){var t=an();return rt===null?t.memoizedState=e:ap(t,rt.memoizedState,e)},useTransition:function(){var e=Rl(zs)[0],t=an().memoizedState;return[e,t]},useMutableSource:Wm,useSyncExternalStore:qm,useId:up,unstable_isNewReconciler:!1};function dn(e,t){if(e&&e.defaultProps){t=Ke({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Mo(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Ke({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $u={isMounted:function(e){return(e=e._reactInternals)?qr(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wt(),i=gr(e),s=zn(r,i);s.payload=t,n!=null&&(s.callback=n),t=mr(e,s,i),t!==null&&(gn(t,e,i,r),Ba(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wt(),i=gr(e),s=zn(r,i);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=mr(e,s,i),t!==null&&(gn(t,e,i,r),Ba(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),r=gr(e),i=zn(n,r);i.tag=2,t!=null&&(i.callback=t),t=mr(e,i,r),t!==null&&(gn(t,e,r,n),Ba(t,e,r))}};function Df(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!Ps(n,r)||!Ps(i,s):!0}function dp(e,t,n){var r=!1,i=yr,s=t.contextType;return typeof s=="object"&&s!==null?s=sn(s):(i=Bt(t)?Ur:bt.current,r=t.contextTypes,s=(r=r!=null)?Si(e,i):yr),t=new t(n,s),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=$u,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=s),t}function Rf(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&$u.enqueueReplaceState(t,t.state,null)}function Fo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},$c(e);var s=t.contextType;typeof s=="object"&&s!==null?i.context=sn(s):(s=Bt(t)?Ur:bt.current,i.context=Si(e,s)),i.state=e.memoizedState,s=t.getDerivedStateFromProps,typeof s=="function"&&(Mo(e,t,s,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(t=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),t!==i.state&&$u.enqueueReplaceState(i,i.state,null),fu(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308)}function wi(e,t){try{var n="",r=t;do n+=FE(r),r=r.return;while(r);var i=n}catch(s){i=`
39
- Error generating stack: `+s.message+`
40
- `+s.stack}return{value:e,source:t,stack:i,digest:null}}function Ol(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Bo(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var cT=typeof WeakMap=="function"?WeakMap:Map;function fp(e,t,n){n=zn(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Eu||(Eu=!0,Qo=r),Bo(e,t)},n}function hp(e,t,n){n=zn(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Bo(e,t)}}var s=e.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){Bo(e,t),typeof r!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var a=t.stack;this.componentDidCatch(t.value,{componentStack:a!==null?a:""})}),n}function Of(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new cT;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=ST.bind(null,e,t,n),t.then(e,e))}function Pf(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Mf(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=zn(-1,1),t.tag=2,mr(n,t,1))),n.lanes|=1),e)}var dT=qn.ReactCurrentOwner,Pt=!1;function Nt(e,t,n,r){t.child=e===null?zm(t,null,n,r):Ni(t,e.child,n,r)}function Ff(e,t,n,r,i){n=n.render;var s=t.ref;return yi(t,i),r=Qc(e,t,n,r,s,i),n=Gc(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(qe&&n&&Mc(t),t.flags|=1,Nt(e,t,r,i),t.child)}function Bf(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!sd(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=s,mp(e,t,s,r,i)):(e=Ya(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!(e.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ps,n(a,r)&&e.ref===t.ref)return Wn(e,t,i)}return t.flags|=1,e=Er(s,r),e.ref=t.ref,e.return=t,t.child=e}function mp(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Ps(s,r)&&e.ref===t.ref)if(Pt=!1,t.pendingProps=r=s,(e.lanes&i)!==0)e.flags&131072&&(Pt=!0);else return t.lanes=e.lanes,Wn(e,t,i)}return jo(e,t,n,r,i)}function pp(e,t,n){var r=t.pendingProps,i=r.children,s=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ue(hi,Yt),Yt|=n;else{if(!(n&1073741824))return e=s!==null?s.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ue(hi,Yt),Yt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,Ue(hi,Yt),Yt|=r}else s!==null?(r=s.baseLanes|n,t.memoizedState=null):r=n,Ue(hi,Yt),Yt|=r;return Nt(e,t,i,n),t.child}function gp(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function jo(e,t,n,r,i){var s=Bt(n)?Ur:bt.current;return s=Si(t,s),yi(t,i),n=Qc(e,t,n,r,s,i),r=Gc(),e!==null&&!Pt?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wn(e,t,i)):(qe&&r&&Mc(t),t.flags|=1,Nt(e,t,n,i),t.child)}function jf(e,t,n,r,i){if(Bt(n)){var s=!0;uu(t)}else s=!1;if(yi(t,i),t.stateNode===null)Ha(e,t),dp(t,n,r),Fo(t,n,r,i),r=!0;else if(e===null){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,d=n.contextType;typeof d=="object"&&d!==null?d=sn(d):(d=Bt(n)?Ur:bt.current,d=Si(t,d));var h=n.getDerivedStateFromProps,f=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function";f||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==r||l!==d)&&Rf(t,a,r,d),ir=!1;var p=t.memoizedState;a.state=p,fu(t,r,a,i),l=t.memoizedState,u!==r||p!==l||Ft.current||ir?(typeof h=="function"&&(Mo(t,n,h,r),l=t.memoizedState),(u=ir||Df(t,n,u,r,p,l,d))?(f||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=d,r=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Ym(e,t),u=t.memoizedProps,d=t.type===t.elementType?u:dn(t.type,u),a.props=d,f=t.pendingProps,p=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=sn(l):(l=Bt(n)?Ur:bt.current,l=Si(t,l));var m=n.getDerivedStateFromProps;(h=typeof m=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(u!==f||p!==l)&&Rf(t,a,r,l),ir=!1,p=t.memoizedState,a.state=p,fu(t,r,a,i);var T=t.memoizedState;u!==f||p!==T||Ft.current||ir?(typeof m=="function"&&(Mo(t,n,m,r),T=t.memoizedState),(d=ir||Df(t,n,d,r,p,T,l)||!1)?(h||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,T,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,T,l)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=T),a.props=r,a.state=T,a.context=l,r=d):(typeof a.componentDidUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),r=!1)}return Uo(e,t,n,r,s,i)}function Uo(e,t,n,r,i,s){gp(e,t);var a=(t.flags&128)!==0;if(!r&&!a)return i&&Sf(t,n,!1),Wn(e,t,s);r=t.stateNode,dT.current=t;var u=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&a?(t.child=Ni(t,e.child,null,s),t.child=Ni(t,null,u,s)):Nt(e,t,u,s),t.memoizedState=r.state,i&&Sf(t,n,!0),t.child}function Ep(e){var t=e.stateNode;t.pendingContext?kf(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kf(e,t.context,!1),Yc(e,t.containerInfo)}function Uf(e,t,n,r,i){return Ci(),Bc(i),t.flags|=256,Nt(e,t,n,r),t.child}var Ho={dehydrated:null,treeContext:null,retryLane:0};function zo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Tp(e,t,n){var r=t.pendingProps,i=Qe.current,s=!1,a=(t.flags&128)!==0,u;if((u=a)||(u=e!==null&&e.memoizedState===null?!1:(i&2)!==0),u?(s=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ue(Qe,i&1),e===null)return Oo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(a=r.children,e=r.fallback,s?(r=t.mode,s=t.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=Wu(a,r,0,null),e=Br(e,r,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=zo(n),t.memoizedState=Ho,e):Jc(t,a));if(i=e.memoizedState,i!==null&&(u=i.dehydrated,u!==null))return fT(e,t,a,r,u,i,n);if(s){s=r.fallback,a=t.mode,i=e.child,u=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Er(i,l),r.subtreeFlags=i.subtreeFlags&14680064),u!==null?s=Er(u,s):(s=Br(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,r=s,s=t.child,a=e.child.memoizedState,a=a===null?zo(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=e.childLanes&~n,t.memoizedState=Ho,r}return s=e.child,e=s.sibling,r=Er(s,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Jc(e,t){return t=Wu({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function xa(e,t,n,r){return r!==null&&Bc(r),Ni(t,e.child,null,n),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function fT(e,t,n,r,i,s,a){if(n)return t.flags&256?(t.flags&=-257,r=Ol(Error(q(422))),xa(e,t,a,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Wu({mode:"visible",children:r.children},i,0,null),s=Br(s,i,a,null),s.flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,t.mode&1&&Ni(t,e.child,null,a),t.child.memoizedState=zo(a),t.memoizedState=Ho,s);if(!(t.mode&1))return xa(e,t,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var u=r.dgst;return r=u,s=Error(q(419)),r=Ol(s,r,void 0),xa(e,t,a,r)}if(u=(a&e.childLanes)!==0,Pt||u){if(r=ot,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=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:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,Vn(e,i),gn(r,e,i,-1))}return id(),r=Ol(Error(q(421))),xa(e,t,a,r)}return i.data==="$?"?(t.flags|=128,t.child=e.child,t=CT.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,Vt=hr(i.nextSibling),Wt=t,qe=!0,hn=null,e!==null&&(Jt[Zt++]=jn,Jt[Zt++]=Un,Jt[Zt++]=Hr,jn=e.id,Un=e.overflow,Hr=t),t=Jc(t,r.children),t.flags|=4096,t)}function Hf(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Po(e.return,t,n)}function Pl(e,t,n,r,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function yp(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;if(Nt(e,t,r.children,n),r=Qe.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Hf(e,n,t);else if(e.tag===19)Hf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ue(Qe,r),!(t.mode&1))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&hu(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Pl(t,!1,i,n,s);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&hu(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Pl(t,!0,n,null,s);break;case"together":Pl(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ha(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),$r|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=Er(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Er(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function hT(e,t,n){switch(t.tag){case 3:Ep(t),Ci();break;case 5:Vm(t);break;case 1:Bt(t.type)&&uu(t);break;case 4:Yc(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ue(cu,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Ue(Qe,Qe.current&1),t.flags|=128,null):n&t.child.childLanes?Tp(e,t,n):(Ue(Qe,Qe.current&1),e=Wn(e,t,n),e!==null?e.sibling:null);Ue(Qe,Qe.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return yp(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ue(Qe,Qe.current),r)break;return null;case 22:case 23:return t.lanes=0,pp(e,t,n)}return Wn(e,t,n)}var bp,$o,xp,_p;bp=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};$o=function(){};xp=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Or(In.current);var s=null;switch(n){case"input":i=co(e,i),r=co(e,r),s=[];break;case"select":i=Ke({},i,{value:void 0}),r=Ke({},r,{value:void 0}),s=[];break;case"textarea":i=mo(e,i),r=mo(e,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=su)}go(n,r);var a;n=null;for(d in i)if(!r.hasOwnProperty(d)&&i.hasOwnProperty(d)&&i[d]!=null)if(d==="style"){var u=i[d];for(a in u)u.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else d!=="dangerouslySetInnerHTML"&&d!=="children"&&d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ws.hasOwnProperty(d)?s||(s=[]):(s=s||[]).push(d,null));for(d in r){var l=r[d];if(u=i!=null?i[d]:void 0,r.hasOwnProperty(d)&&l!==u&&(l!=null||u!=null))if(d==="style")if(u){for(a in u)!u.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&u[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(d,n)),n=l;else d==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,u=u?u.__html:void 0,l!=null&&u!==l&&(s=s||[]).push(d,l)):d==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(d,""+l):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&(ws.hasOwnProperty(d)?(l!=null&&d==="onScroll"&&$e("scroll",e),s||u===l||(s=[])):(s=s||[]).push(d,l))}n&&(s=s||[]).push("style",n);var d=s;(t.updateQueue=d)&&(t.flags|=4)}};_p=function(e,t,n,r){n!==r&&(t.flags|=4)};function Gi(e,t){if(!qe)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function mT(e,t,n){var r=t.pendingProps;switch(Fc(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Et(t),null;case 1:return Bt(t.type)&&au(),Et(t),null;case 3:return r=t.stateNode,Ai(),Ye(Ft),Ye(bt),Wc(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ya(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,hn!==null&&(Xo(hn),hn=null))),$o(e,t),Et(t),null;case 5:Vc(t);var i=Or(Us.current);if(n=t.type,e!==null&&t.stateNode!=null)xp(e,t,n,r,i),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Et(t),null}if(e=Or(In.current),ya(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[An]=t,r[Bs]=s,e=(t.mode&1)!==0,n){case"dialog":$e("cancel",r),$e("close",r);break;case"iframe":case"object":case"embed":$e("load",r);break;case"video":case"audio":for(i=0;i<as.length;i++)$e(as[i],r);break;case"source":$e("error",r);break;case"img":case"image":case"link":$e("error",r),$e("load",r);break;case"details":$e("toggle",r);break;case"input":Gd(r,s),$e("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},$e("invalid",r);break;case"textarea":Xd(r,s),$e("invalid",r)}go(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var u=s[a];a==="children"?typeof u=="string"?r.textContent!==u&&(s.suppressHydrationWarning!==!0&&Ta(r.textContent,u,e),i=["children",u]):typeof u=="number"&&r.textContent!==""+u&&(s.suppressHydrationWarning!==!0&&Ta(r.textContent,u,e),i=["children",""+u]):ws.hasOwnProperty(a)&&u!=null&&a==="onScroll"&&$e("scroll",r)}switch(n){case"input":ca(r),Kd(r,s,!0);break;case"textarea":ca(r),Jd(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=su)}r=i,t.updateQueue=r,r!==null&&(t.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=K0(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=a.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=a.createElement(n,{is:r.is}):(e=a.createElement(n),n==="select"&&(a=e,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):e=a.createElementNS(e,n),e[An]=t,e[Bs]=r,bp(e,t,!1,!1),t.stateNode=e;e:{switch(a=Eo(n,r),n){case"dialog":$e("cancel",e),$e("close",e),i=r;break;case"iframe":case"object":case"embed":$e("load",e),i=r;break;case"video":case"audio":for(i=0;i<as.length;i++)$e(as[i],e);i=r;break;case"source":$e("error",e),i=r;break;case"img":case"image":case"link":$e("error",e),$e("load",e),i=r;break;case"details":$e("toggle",e),i=r;break;case"input":Gd(e,r),i=co(e,r),$e("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=Ke({},r,{value:void 0}),$e("invalid",e);break;case"textarea":Xd(e,r),i=mo(e,r),$e("invalid",e);break;default:i=r}go(n,i),u=i;for(s in u)if(u.hasOwnProperty(s)){var l=u[s];s==="style"?Z0(e,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&X0(e,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&vs(e,l):typeof l=="number"&&vs(e,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(ws.hasOwnProperty(s)?l!=null&&s==="onScroll"&&$e("scroll",e):l!=null&&_c(e,s,l,a))}switch(n){case"input":ca(e),Kd(e,r,!1);break;case"textarea":ca(e),Jd(e);break;case"option":r.value!=null&&e.setAttribute("value",""+Tr(r.value));break;case"select":e.multiple=!!r.multiple,s=r.value,s!=null?pi(e,!!r.multiple,s,!1):r.defaultValue!=null&&pi(e,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(e.onclick=su)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Et(t),null;case 6:if(e&&t.stateNode!=null)_p(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(n=Or(Us.current),Or(In.current),ya(t)){if(r=t.stateNode,n=t.memoizedProps,r[An]=t,(s=r.nodeValue!==n)&&(e=Wt,e!==null))switch(e.tag){case 3:Ta(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ta(r.nodeValue,n,(e.mode&1)!==0)}s&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[An]=t,t.stateNode=r}return Et(t),null;case 13:if(Ye(Qe),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(qe&&Vt!==null&&t.mode&1&&!(t.flags&128))Um(),Ci(),t.flags|=98560,s=!1;else if(s=ya(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[An]=t}else Ci(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Et(t),s=!1}else hn!==null&&(Xo(hn),hn=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Qe.current&1?it===0&&(it=3):id())),t.updateQueue!==null&&(t.flags|=4),Et(t),null);case 4:return Ai(),$o(e,t),e===null&&Ms(t.stateNode.containerInfo),Et(t),null;case 10:return Hc(t.type._context),Et(t),null;case 17:return Bt(t.type)&&au(),Et(t),null;case 19:if(Ye(Qe),s=t.memoizedState,s===null)return Et(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)Gi(s,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=hu(e),a!==null){for(t.flags|=128,Gi(s,!1),r=a.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)s=n,e=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,e=a.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ue(Qe,Qe.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ze()>vi&&(t.flags|=128,r=!0,Gi(s,!1),t.lanes=4194304)}else{if(!r)if(e=hu(a),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Gi(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!qe)return Et(t),null}else 2*Ze()-s.renderingStartTime>vi&&n!==1073741824&&(t.flags|=128,r=!0,Gi(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(n=s.last,n!==null?n.sibling=a:t.child=a,s.last=a)}return s.tail!==null?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ze(),t.sibling=null,n=Qe.current,Ue(Qe,r?n&1|2:n&1),t):(Et(t),null);case 22:case 23:return rd(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Yt&1073741824&&(Et(t),t.subtreeFlags&6&&(t.flags|=8192)):Et(t),null;case 24:return null;case 25:return null}throw Error(q(156,t.tag))}function pT(e,t){switch(Fc(t),t.tag){case 1:return Bt(t.type)&&au(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ai(),Ye(Ft),Ye(bt),Wc(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Vc(t),null;case 13:if(Ye(Qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Ci()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ye(Qe),null;case 4:return Ai(),null;case 10:return Hc(t.type._context),null;case 22:case 23:return rd(),null;case 24:return null;default:return null}}var _a=!1,Tt=!1,gT=typeof WeakSet=="function"?WeakSet:Set,ie=null;function fi(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Xe(e,t,r)}else n.current=null}function Yo(e,t,n){try{n()}catch(r){Xe(e,t,r)}}var zf=!1;function ET(e,t){if(Ao=nu,e=Am(),Pc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,u=-1,l=-1,d=0,h=0,f=e,p=null;t:for(;;){for(var m;f!==n||i!==0&&f.nodeType!==3||(u=a+i),f!==s||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break t;if(p===n&&++d===i&&(u=a),p===s&&++h===r&&(l=a),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=u===-1||l===-1?null:{start:u,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(wo={focusedElem:e,selectionRange:n},nu=!1,ie=t;ie!==null;)if(t=ie,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ie=e;else for(;ie!==null;){t=ie;try{var T=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(T!==null){var x=T.memoizedProps,I=T.memoizedState,g=t.stateNode,E=g.getSnapshotBeforeUpdate(t.elementType===t.type?x:dn(t.type,x),I);g.__reactInternalSnapshotBeforeUpdate=E}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent="":y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(q(163))}}catch(v){Xe(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,ie=e;break}ie=t.return}return T=zf,zf=!1,T}function ps(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var s=i.destroy;i.destroy=void 0,s!==void 0&&Yo(t,n,s)}i=i.next}while(i!==r)}}function Yu(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Vo(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function kp(e){var t=e.alternate;t!==null&&(e.alternate=null,kp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[An],delete t[Bs],delete t[Lo],delete t[Z2],delete t[eT])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Sp(e){return e.tag===5||e.tag===3||e.tag===4}function $f(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=su));else if(r!==4&&(e=e.child,e!==null))for(Wo(e,t,n),e=e.sibling;e!==null;)Wo(e,t,n),e=e.sibling}function qo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(qo(e,t,n),e=e.sibling;e!==null;)qo(e,t,n),e=e.sibling}var ft=null,fn=!1;function Xn(e,t,n){for(n=n.child;n!==null;)Cp(e,t,n),n=n.sibling}function Cp(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Mu,n)}catch{}switch(n.tag){case 5:Tt||fi(n,t);case 6:var r=ft,i=fn;ft=null,Xn(e,t,n),ft=r,fn=i,ft!==null&&(fn?(e=ft,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ft.removeChild(n.stateNode));break;case 18:ft!==null&&(fn?(e=ft,n=n.stateNode,e.nodeType===8?wl(e.parentNode,n):e.nodeType===1&&wl(e,n),Rs(e)):wl(ft,n.stateNode));break;case 4:r=ft,i=fn,ft=n.stateNode.containerInfo,fn=!0,Xn(e,t,n),ft=r,fn=i;break;case 0:case 11:case 14:case 15:if(!Tt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&Yo(n,t,a),i=i.next}while(i!==r)}Xn(e,t,n);break;case 1:if(!Tt&&(fi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){Xe(n,t,u)}Xn(e,t,n);break;case 21:Xn(e,t,n);break;case 22:n.mode&1?(Tt=(r=Tt)||n.memoizedState!==null,Xn(e,t,n),Tt=r):Xn(e,t,n);break;default:Xn(e,t,n)}}function Yf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gT),t.forEach(function(r){var i=NT.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function on(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,a=t,u=a;e:for(;u!==null;){switch(u.tag){case 5:ft=u.stateNode,fn=!1;break e;case 3:ft=u.stateNode.containerInfo,fn=!0;break e;case 4:ft=u.stateNode.containerInfo,fn=!0;break e}u=u.return}if(ft===null)throw Error(q(160));Cp(s,a,i),ft=null,fn=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(d){Xe(i,t,d)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Np(t,e),t=t.sibling}function Np(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(on(t,e),kn(e),r&4){try{ps(3,e,e.return),Yu(3,e)}catch(x){Xe(e,e.return,x)}try{ps(5,e,e.return)}catch(x){Xe(e,e.return,x)}}break;case 1:on(t,e),kn(e),r&512&&n!==null&&fi(n,n.return);break;case 5:if(on(t,e),kn(e),r&512&&n!==null&&fi(n,n.return),e.flags&32){var i=e.stateNode;try{vs(i,"")}catch(x){Xe(e,e.return,x)}}if(r&4&&(i=e.stateNode,i!=null)){var s=e.memoizedProps,a=n!==null?n.memoizedProps:s,u=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{u==="input"&&s.type==="radio"&&s.name!=null&&Q0(i,s),Eo(u,a);var d=Eo(u,s);for(a=0;a<l.length;a+=2){var h=l[a],f=l[a+1];h==="style"?Z0(i,f):h==="dangerouslySetInnerHTML"?X0(i,f):h==="children"?vs(i,f):_c(i,h,f,d)}switch(u){case"input":fo(i,s);break;case"textarea":G0(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var m=s.value;m!=null?pi(i,!!s.multiple,m,!1):p!==!!s.multiple&&(s.defaultValue!=null?pi(i,!!s.multiple,s.defaultValue,!0):pi(i,!!s.multiple,s.multiple?[]:"",!1))}i[Bs]=s}catch(x){Xe(e,e.return,x)}}break;case 6:if(on(t,e),kn(e),r&4){if(e.stateNode===null)throw Error(q(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(x){Xe(e,e.return,x)}}break;case 3:if(on(t,e),kn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Rs(t.containerInfo)}catch(x){Xe(e,e.return,x)}break;case 4:on(t,e),kn(e);break;case 13:on(t,e),kn(e),i=e.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(td=Ze())),r&4&&Yf(e);break;case 22:if(h=n!==null&&n.memoizedState!==null,e.mode&1?(Tt=(d=Tt)||h,on(t,e),Tt=d):on(t,e),kn(e),r&8192){if(d=e.memoizedState!==null,(e.stateNode.isHidden=d)&&!h&&e.mode&1)for(ie=e,h=e.child;h!==null;){for(f=ie=h;ie!==null;){switch(p=ie,m=p.child,p.tag){case 0:case 11:case 14:case 15:ps(4,p,p.return);break;case 1:fi(p,p.return);var T=p.stateNode;if(typeof T.componentWillUnmount=="function"){r=p,n=p.return;try{t=r,T.props=t.memoizedProps,T.state=t.memoizedState,T.componentWillUnmount()}catch(x){Xe(r,n,x)}}break;case 5:fi(p,p.return);break;case 22:if(p.memoizedState!==null){Wf(f);continue}}m!==null?(m.return=p,ie=m):Wf(f)}h=h.sibling}e:for(h=null,f=e;;){if(f.tag===5){if(h===null){h=f;try{i=f.stateNode,d?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(u=f.stateNode,l=f.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,u.style.display=J0("display",a))}catch(x){Xe(e,e.return,x)}}}else if(f.tag===6){if(h===null)try{f.stateNode.nodeValue=d?"":f.memoizedProps}catch(x){Xe(e,e.return,x)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;h===f&&(h=null),f=f.return}h===f&&(h=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:on(t,e),kn(e),r&4&&Yf(e);break;case 21:break;default:on(t,e),kn(e)}}function kn(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Sp(n)){var r=n;break e}n=n.return}throw Error(q(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(vs(i,""),r.flags&=-33);var s=$f(e);qo(e,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,u=$f(e);Wo(e,u,a);break;default:throw Error(q(161))}}catch(l){Xe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function TT(e,t,n){ie=e,Ap(e)}function Ap(e,t,n){for(var r=(e.mode&1)!==0;ie!==null;){var i=ie,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||_a;if(!a){var u=i.alternate,l=u!==null&&u.memoizedState!==null||Tt;u=_a;var d=Tt;if(_a=a,(Tt=l)&&!d)for(ie=i;ie!==null;)a=ie,l=a.child,a.tag===22&&a.memoizedState!==null?qf(i):l!==null?(l.return=a,ie=l):qf(i);for(;s!==null;)ie=s,Ap(s),s=s.sibling;ie=i,_a=u,Tt=d}Vf(e)}else i.subtreeFlags&8772&&s!==null?(s.return=i,ie=s):Vf(e)}}function Vf(e){for(;ie!==null;){var t=ie;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Tt||Yu(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Tt)if(n===null)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:dn(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;s!==null&&vf(t,s,r);break;case 3:var a=t.updateQueue;if(a!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}vf(t,a,n)}break;case 5:var u=t.stateNode;if(n===null&&t.flags&4){n=u;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var d=t.alternate;if(d!==null){var h=d.memoizedState;if(h!==null){var f=h.dehydrated;f!==null&&Rs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(q(163))}Tt||t.flags&512&&Vo(t)}catch(p){Xe(t,t.return,p)}}if(t===e){ie=null;break}if(n=t.sibling,n!==null){n.return=t.return,ie=n;break}ie=t.return}}function Wf(e){for(;ie!==null;){var t=ie;if(t===e){ie=null;break}var n=t.sibling;if(n!==null){n.return=t.return,ie=n;break}ie=t.return}}function qf(e){for(;ie!==null;){var t=ie;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Yu(4,t)}catch(l){Xe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var i=t.return;try{r.componentDidMount()}catch(l){Xe(t,i,l)}}var s=t.return;try{Vo(t)}catch(l){Xe(t,s,l)}break;case 5:var a=t.return;try{Vo(t)}catch(l){Xe(t,a,l)}}}catch(l){Xe(t,t.return,l)}if(t===e){ie=null;break}var u=t.sibling;if(u!==null){u.return=t.return,ie=u;break}ie=t.return}}var yT=Math.ceil,gu=qn.ReactCurrentDispatcher,Zc=qn.ReactCurrentOwner,rn=qn.ReactCurrentBatchConfig,Ce=0,ot=null,nt=null,ht=0,Yt=0,hi=_r(0),it=0,Ys=null,$r=0,Vu=0,ed=0,gs=null,Ot=null,td=0,vi=1/0,Mn=null,Eu=!1,Qo=null,pr=null,ka=!1,lr=null,Tu=0,Es=0,Go=null,za=-1,$a=0;function wt(){return Ce&6?Ze():za!==-1?za:za=Ze()}function gr(e){return e.mode&1?Ce&2&&ht!==0?ht&-ht:nT.transition!==null?($a===0&&($a=dm()),$a):(e=Oe,e!==0||(e=window.event,e=e===void 0?16:Tm(e.type)),e):1}function gn(e,t,n,r){if(50<Es)throw Es=0,Go=null,Error(q(185));Ks(e,n,r),(!(Ce&2)||e!==ot)&&(e===ot&&(!(Ce&2)&&(Vu|=n),it===4&&ar(e,ht)),jt(e,r),n===1&&Ce===0&&!(t.mode&1)&&(vi=Ze()+500,Hu&&kr()))}function jt(e,t){var n=e.callbackNode;n2(e,t);var r=tu(e,e===ot?ht:0);if(r===0)n!==null&&tf(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&tf(n),t===1)e.tag===0?tT(Qf.bind(null,e)):Fm(Qf.bind(null,e)),X2(function(){!(Ce&6)&&kr()}),n=null;else{switch(fm(r)){case 1:n=Ac;break;case 4:n=om;break;case 16:n=eu;break;case 536870912:n=cm;break;default:n=eu}n=Pp(n,wp.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function wp(e,t){if(za=-1,$a=0,Ce&6)throw Error(q(327));var n=e.callbackNode;if(bi()&&e.callbackNode!==n)return null;var r=tu(e,e===ot?ht:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=yu(e,r);else{t=r;var i=Ce;Ce|=2;var s=Ip();(ot!==e||ht!==t)&&(Mn=null,vi=Ze()+500,Fr(e,t));do try{_T();break}catch(u){vp(e,u)}while(!0);Uc(),gu.current=s,Ce=i,nt!==null?t=0:(ot=null,ht=0,t=it)}if(t!==0){if(t===2&&(i=_o(e),i!==0&&(r=i,t=Ko(e,i))),t===1)throw n=Ys,Fr(e,0),ar(e,r),jt(e,Ze()),n;if(t===6)ar(e,r);else{if(i=e.current.alternate,!(r&30)&&!bT(i)&&(t=yu(e,r),t===2&&(s=_o(e),s!==0&&(r=s,t=Ko(e,s))),t===1))throw n=Ys,Fr(e,0),ar(e,r),jt(e,Ze()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(q(345));case 2:Ir(e,Ot,Mn);break;case 3:if(ar(e,r),(r&130023424)===r&&(t=td+500-Ze(),10<t)){if(tu(e,0)!==0)break;if(i=e.suspendedLanes,(i&r)!==r){wt(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Io(Ir.bind(null,e,Ot,Mn),t);break}Ir(e,Ot,Mn);break;case 4:if(ar(e,r),(r&4194240)===r)break;for(t=e.eventTimes,i=-1;0<r;){var a=31-pn(r);s=1<<a,a=t[a],a>i&&(i=a),r&=~s}if(r=i,r=Ze()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*yT(r/1960))-r,10<r){e.timeoutHandle=Io(Ir.bind(null,e,Ot,Mn),r);break}Ir(e,Ot,Mn);break;case 5:Ir(e,Ot,Mn);break;default:throw Error(q(329))}}}return jt(e,Ze()),e.callbackNode===n?wp.bind(null,e):null}function Ko(e,t){var n=gs;return e.current.memoizedState.isDehydrated&&(Fr(e,t).flags|=256),e=yu(e,t),e!==2&&(t=Ot,Ot=n,t!==null&&Xo(t)),e}function Xo(e){Ot===null?Ot=e:Ot.push.apply(Ot,e)}function bT(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Tn(s(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ar(e,t){for(t&=~ed,t&=~Vu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-pn(t),r=1<<n;e[n]=-1,t&=~r}}function Qf(e){if(Ce&6)throw Error(q(327));bi();var t=tu(e,0);if(!(t&1))return jt(e,Ze()),null;var n=yu(e,t);if(e.tag!==0&&n===2){var r=_o(e);r!==0&&(t=r,n=Ko(e,r))}if(n===1)throw n=Ys,Fr(e,0),ar(e,t),jt(e,Ze()),n;if(n===6)throw Error(q(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ir(e,Ot,Mn),jt(e,Ze()),null}function nd(e,t){var n=Ce;Ce|=1;try{return e(t)}finally{Ce=n,Ce===0&&(vi=Ze()+500,Hu&&kr())}}function Yr(e){lr!==null&&lr.tag===0&&!(Ce&6)&&bi();var t=Ce;Ce|=1;var n=rn.transition,r=Oe;try{if(rn.transition=null,Oe=1,e)return e()}finally{Oe=r,rn.transition=n,Ce=t,!(Ce&6)&&kr()}}function rd(){Yt=hi.current,Ye(hi)}function Fr(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,K2(n)),nt!==null)for(n=nt.return;n!==null;){var r=n;switch(Fc(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&au();break;case 3:Ai(),Ye(Ft),Ye(bt),Wc();break;case 5:Vc(r);break;case 4:Ai();break;case 13:Ye(Qe);break;case 19:Ye(Qe);break;case 10:Hc(r.type._context);break;case 22:case 23:rd()}n=n.return}if(ot=e,nt=e=Er(e.current,null),ht=Yt=t,it=0,Ys=null,ed=Vu=$r=0,Ot=gs=null,Rr!==null){for(t=0;t<Rr.length;t++)if(n=Rr[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Rr=null}return e}function vp(e,t){do{var n=nt;try{if(Uc(),ja.current=pu,mu){for(var r=Ge.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}mu=!1}if(zr=0,ut=rt=Ge=null,ms=!1,Hs=0,Zc.current=null,n===null||n.return===null){it=1,Ys=t,nt=null;break}e:{var s=e,a=n.return,u=n,l=t;if(t=ht,u.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=l,h=u,f=h.tag;if(!(h.mode&1)&&(f===0||f===11||f===15)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var m=Pf(a);if(m!==null){m.flags&=-257,Mf(m,a,u,s,t),m.mode&1&&Of(s,d,t),t=m,l=d;var T=t.updateQueue;if(T===null){var x=new Set;x.add(l),t.updateQueue=x}else T.add(l);break e}else{if(!(t&1)){Of(s,d,t),id();break e}l=Error(q(426))}}else if(qe&&u.mode&1){var I=Pf(a);if(I!==null){!(I.flags&65536)&&(I.flags|=256),Mf(I,a,u,s,t),Bc(wi(l,u));break e}}s=l=wi(l,u),it!==4&&(it=2),gs===null?gs=[s]:gs.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t;var g=fp(s,l,t);wf(s,g);break e;case 1:u=l;var E=s.type,y=s.stateNode;if(!(s.flags&128)&&(typeof E.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(pr===null||!pr.has(y)))){s.flags|=65536,t&=-t,s.lanes|=t;var v=hp(s,u,t);wf(s,v);break e}}s=s.return}while(s!==null)}Dp(n)}catch(O){t=O,nt===n&&n!==null&&(nt=n=n.return);continue}break}while(!0)}function Ip(){var e=gu.current;return gu.current=pu,e===null?pu:e}function id(){(it===0||it===3||it===2)&&(it=4),ot===null||!($r&268435455)&&!(Vu&268435455)||ar(ot,ht)}function yu(e,t){var n=Ce;Ce|=2;var r=Ip();(ot!==e||ht!==t)&&(Mn=null,Fr(e,t));do try{xT();break}catch(i){vp(e,i)}while(!0);if(Uc(),Ce=n,gu.current=r,nt!==null)throw Error(q(261));return ot=null,ht=0,it}function xT(){for(;nt!==null;)Lp(nt)}function _T(){for(;nt!==null&&!qE();)Lp(nt)}function Lp(e){var t=Op(e.alternate,e,Yt);e.memoizedProps=e.pendingProps,t===null?Dp(e):nt=t,Zc.current=null}function Dp(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=pT(n,t),n!==null){n.flags&=32767,nt=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{it=6,nt=null;return}}else if(n=mT(n,t,Yt),n!==null){nt=n;return}if(t=t.sibling,t!==null){nt=t;return}nt=t=e}while(t!==null);it===0&&(it=5)}function Ir(e,t,n){var r=Oe,i=rn.transition;try{rn.transition=null,Oe=1,kT(e,t,n,r)}finally{rn.transition=i,Oe=r}return null}function kT(e,t,n,r){do bi();while(lr!==null);if(Ce&6)throw Error(q(327));n=e.finishedWork;var i=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(q(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(r2(e,s),e===ot&&(nt=ot=null,ht=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||ka||(ka=!0,Pp(eu,function(){return bi(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=rn.transition,rn.transition=null;var a=Oe;Oe=1;var u=Ce;Ce|=4,Zc.current=null,ET(e,n),Np(n,e),$2(wo),nu=!!Ao,wo=Ao=null,e.current=n,TT(n),QE(),Ce=u,Oe=a,rn.transition=s}else e.current=n;if(ka&&(ka=!1,lr=e,Tu=i),s=e.pendingLanes,s===0&&(pr=null),XE(n.stateNode),jt(e,Ze()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Eu)throw Eu=!1,e=Qo,Qo=null,e;return Tu&1&&e.tag!==0&&bi(),s=e.pendingLanes,s&1?e===Go?Es++:(Es=0,Go=e):Es=0,kr(),null}function bi(){if(lr!==null){var e=fm(Tu),t=rn.transition,n=Oe;try{if(rn.transition=null,Oe=16>e?16:e,lr===null)var r=!1;else{if(e=lr,lr=null,Tu=0,Ce&6)throw Error(q(331));var i=Ce;for(Ce|=4,ie=e.current;ie!==null;){var s=ie,a=s.child;if(ie.flags&16){var u=s.deletions;if(u!==null){for(var l=0;l<u.length;l++){var d=u[l];for(ie=d;ie!==null;){var h=ie;switch(h.tag){case 0:case 11:case 15:ps(8,h,s)}var f=h.child;if(f!==null)f.return=h,ie=f;else for(;ie!==null;){h=ie;var p=h.sibling,m=h.return;if(kp(h),h===d){ie=null;break}if(p!==null){p.return=m,ie=p;break}ie=m}}}var T=s.alternate;if(T!==null){var x=T.child;if(x!==null){T.child=null;do{var I=x.sibling;x.sibling=null,x=I}while(x!==null)}}ie=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,ie=a;else e:for(;ie!==null;){if(s=ie,s.flags&2048)switch(s.tag){case 0:case 11:case 15:ps(9,s,s.return)}var g=s.sibling;if(g!==null){g.return=s.return,ie=g;break e}ie=s.return}}var E=e.current;for(ie=E;ie!==null;){a=ie;var y=a.child;if(a.subtreeFlags&2064&&y!==null)y.return=a,ie=y;else e:for(a=E;ie!==null;){if(u=ie,u.flags&2048)try{switch(u.tag){case 0:case 11:case 15:Yu(9,u)}}catch(O){Xe(u,u.return,O)}if(u===a){ie=null;break e}var v=u.sibling;if(v!==null){v.return=u.return,ie=v;break e}ie=u.return}}if(Ce=i,kr(),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Mu,e)}catch{}r=!0}return r}finally{Oe=n,rn.transition=t}}return!1}function Gf(e,t,n){t=wi(n,t),t=fp(e,t,1),e=mr(e,t,1),t=wt(),e!==null&&(Ks(e,1,t),jt(e,t))}function Xe(e,t,n){if(e.tag===3)Gf(e,e,n);else for(;t!==null;){if(t.tag===3){Gf(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(pr===null||!pr.has(r))){e=wi(n,e),e=hp(t,e,1),t=mr(t,e,1),e=wt(),t!==null&&(Ks(t,1,e),jt(t,e));break}}t=t.return}}function ST(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=wt(),e.pingedLanes|=e.suspendedLanes&n,ot===e&&(ht&n)===n&&(it===4||it===3&&(ht&130023424)===ht&&500>Ze()-td?Fr(e,0):ed|=n),jt(e,t)}function Rp(e,t){t===0&&(e.mode&1?(t=ha,ha<<=1,!(ha&130023424)&&(ha=4194304)):t=1);var n=wt();e=Vn(e,t),e!==null&&(Ks(e,t,n),jt(e,n))}function CT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rp(e,n)}function NT(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(q(314))}r!==null&&r.delete(t),Rp(e,n)}var Op;Op=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ft.current)Pt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Pt=!1,hT(e,t,n);Pt=!!(e.flags&131072)}else Pt=!1,qe&&t.flags&1048576&&Bm(t,ou,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ha(e,t),e=t.pendingProps;var i=Si(t,bt.current);yi(t,n),i=Qc(null,t,r,e,i,n);var s=Gc();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Bt(r)?(s=!0,uu(t)):s=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,$c(t),i.updater=$u,t.stateNode=i,i._reactInternals=t,Fo(t,r,e,n),t=Uo(null,t,r,!0,s,n)):(t.tag=0,qe&&s&&Mc(t),Nt(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ha(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=wT(r),e=dn(r,e),i){case 0:t=jo(null,t,r,e,n);break e;case 1:t=jf(null,t,r,e,n);break e;case 11:t=Ff(null,t,r,e,n);break e;case 14:t=Bf(null,t,r,dn(r.type,e),n);break e}throw Error(q(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),jo(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),jf(e,t,r,i,n);case 3:e:{if(Ep(t),e===null)throw Error(q(387));r=t.pendingProps,s=t.memoizedState,i=s.element,Ym(e,t),fu(t,r,null,n);var a=t.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){i=wi(Error(q(423)),t),t=Uf(e,t,r,n,i);break e}else if(r!==i){i=wi(Error(q(424)),t),t=Uf(e,t,r,n,i);break e}else for(Vt=hr(t.stateNode.containerInfo.firstChild),Wt=t,qe=!0,hn=null,n=zm(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ci(),r===i){t=Wn(e,t,n);break e}Nt(e,t,r,n)}t=t.child}return t;case 5:return Vm(t),e===null&&Oo(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,vo(r,i)?a=null:s!==null&&vo(r,s)&&(t.flags|=32),gp(e,t),Nt(e,t,a,n),t.child;case 6:return e===null&&Oo(t),null;case 13:return Tp(e,t,n);case 4:return Yc(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ni(t,null,r,n):Nt(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),Ff(e,t,r,i,n);case 7:return Nt(e,t,t.pendingProps,n),t.child;case 8:return Nt(e,t,t.pendingProps.children,n),t.child;case 12:return Nt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,a=i.value,Ue(cu,r._currentValue),r._currentValue=a,s!==null)if(Tn(s.value,a)){if(s.children===i.children&&!Ft.current){t=Wn(e,t,n);break e}}else for(s=t.child,s!==null&&(s.return=t);s!==null;){var u=s.dependencies;if(u!==null){a=s.child;for(var l=u.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=zn(-1,n&-n),l.tag=2;var d=s.updateQueue;if(d!==null){d=d.shared;var h=d.pending;h===null?l.next=l:(l.next=h.next,h.next=l),d.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Po(s.return,n,t),u.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===t.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(q(341));a.lanes|=n,u=a.alternate,u!==null&&(u.lanes|=n),Po(a,n,t),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===t){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Nt(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,yi(t,n),i=sn(i),r=r(i),t.flags|=1,Nt(e,t,r,n),t.child;case 14:return r=t.type,i=dn(r,t.pendingProps),i=dn(r.type,i),Bf(e,t,r,i,n);case 15:return mp(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:dn(r,i),Ha(e,t),t.tag=1,Bt(r)?(e=!0,uu(t)):e=!1,yi(t,n),dp(t,r,i),Fo(t,r,i,n),Uo(null,t,r,!0,e,n);case 19:return yp(e,t,n);case 22:return pp(e,t,n)}throw Error(q(156,t.tag))};function Pp(e,t){return lm(e,t)}function AT(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nn(e,t,n,r){return new AT(e,t,n,r)}function sd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wT(e){if(typeof e=="function")return sd(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Sc)return 11;if(e===Cc)return 14}return 2}function Er(e,t){var n=e.alternate;return n===null?(n=nn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ya(e,t,n,r,i,s){var a=2;if(r=e,typeof e=="function")sd(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case ri:return Br(n.children,i,s,t);case kc:a=8,i|=8;break;case ao:return e=nn(12,n,t,i|2),e.elementType=ao,e.lanes=s,e;case uo:return e=nn(13,n,t,i),e.elementType=uo,e.lanes=s,e;case lo:return e=nn(19,n,t,i),e.elementType=lo,e.lanes=s,e;case V0:return Wu(n,i,s,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $0:a=10;break e;case Y0:a=9;break e;case Sc:a=11;break e;case Cc:a=14;break e;case rr:a=16,r=null;break e}throw Error(q(130,e==null?e:typeof e,""))}return t=nn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Br(e,t,n,r){return e=nn(7,e,r,t),e.lanes=n,e}function Wu(e,t,n,r){return e=nn(22,e,r,t),e.elementType=V0,e.lanes=n,e.stateNode={isHidden:!1},e}function Ml(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function Fl(e,t,n){return t=nn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vT(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=El(0),this.expirationTimes=El(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=El(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function ad(e,t,n,r,i,s,a,u,l){return e=new vT(e,t,n,u,l),t===1?(t=1,s===!0&&(t|=8)):t=0,s=nn(3,null,null,t),e.current=s,s.stateNode=e,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},$c(s),e}function IT(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ni,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Mp(e){if(!e)return yr;e=e._reactInternals;e:{if(qr(e)!==e||e.tag!==1)throw Error(q(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Bt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(q(171))}if(e.tag===1){var n=e.type;if(Bt(n))return Mm(e,n,t)}return t}function Fp(e,t,n,r,i,s,a,u,l){return e=ad(n,r,!0,e,i,s,a,u,l),e.context=Mp(null),n=e.current,r=wt(),i=gr(n),s=zn(r,i),s.callback=t??null,mr(n,s,i),e.current.lanes=i,Ks(e,i,r),jt(e,r),e}function qu(e,t,n,r){var i=t.current,s=wt(),a=gr(i);return n=Mp(n),t.context===null?t.context=n:t.pendingContext=n,t=zn(s,a),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=mr(i,t,a),e!==null&&(gn(e,i,a,s),Ba(e,i,a)),a}function bu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Kf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ud(e,t){Kf(e,t),(e=e.alternate)&&Kf(e,t)}function LT(){return null}var Bp=typeof reportError=="function"?reportError:function(e){console.error(e)};function ld(e){this._internalRoot=e}Qu.prototype.render=ld.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));qu(e,t,null,null)};Qu.prototype.unmount=ld.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yr(function(){qu(null,e,null,null)}),t[Yn]=null}};function Qu(e){this._internalRoot=e}Qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=pm();e={blockedOn:null,target:e,priority:t};for(var n=0;n<sr.length&&t!==0&&t<sr[n].priority;n++);sr.splice(n,0,e),n===0&&Em(e)}};function od(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Gu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Xf(){}function DT(e,t,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var d=bu(a);s.call(d)}}var a=Fp(t,r,e,0,null,!1,!1,"",Xf);return e._reactRootContainer=a,e[Yn]=a.current,Ms(e.nodeType===8?e.parentNode:e),Yr(),a}for(;i=e.lastChild;)e.removeChild(i);if(typeof r=="function"){var u=r;r=function(){var d=bu(l);u.call(d)}}var l=ad(e,0,!1,null,null,!1,!1,"",Xf);return e._reactRootContainer=l,e[Yn]=l.current,Ms(e.nodeType===8?e.parentNode:e),Yr(function(){qu(t,l,n,r)}),l}function Ku(e,t,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var u=i;i=function(){var l=bu(a);u.call(l)}}qu(t,a,e,i)}else a=DT(n,t,e,i,r);return bu(a)}hm=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ss(t.pendingLanes);n!==0&&(wc(t,n|1),jt(t,Ze()),!(Ce&6)&&(vi=Ze()+500,kr()))}break;case 13:Yr(function(){var r=Vn(e,1);if(r!==null){var i=wt();gn(r,e,1,i)}}),ud(e,1)}};vc=function(e){if(e.tag===13){var t=Vn(e,134217728);if(t!==null){var n=wt();gn(t,e,134217728,n)}ud(e,134217728)}};mm=function(e){if(e.tag===13){var t=gr(e),n=Vn(e,t);if(n!==null){var r=wt();gn(n,e,t,r)}ud(e,t)}};pm=function(){return Oe};gm=function(e,t){var n=Oe;try{return Oe=e,t()}finally{Oe=n}};yo=function(e,t,n){switch(t){case"input":if(fo(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=Uu(r);if(!i)throw Error(q(90));q0(r),fo(r,i)}}}break;case"textarea":G0(e,n);break;case"select":t=n.value,t!=null&&pi(e,!!n.multiple,t,!1)}};nm=nd;rm=Yr;var RT={usingClientEntryPoint:!1,Events:[Js,ui,Uu,em,tm,nd]},Ki={findFiberByHostInstance:Dr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},OT={bundleType:Ki.bundleType,version:Ki.version,rendererPackageName:Ki.rendererPackageName,rendererConfig:Ki.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:qn.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=am(e),e===null?null:e.stateNode},findFiberByHostInstance:Ki.findFiberByHostInstance||LT,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 Sa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sa.isDisabled&&Sa.supportsFiber)try{Mu=Sa.inject(OT),vn=Sa}catch{}}Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=RT;Gt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!od(t))throw Error(q(200));return IT(e,t,null,n)};Gt.createRoot=function(e,t){if(!od(e))throw Error(q(299));var n=!1,r="",i=Bp;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=ad(e,1,!1,null,null,n,!1,r,i),e[Yn]=t.current,Ms(e.nodeType===8?e.parentNode:e),new ld(t)};Gt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=am(t),e=e===null?null:e.stateNode,e};Gt.flushSync=function(e){return Yr(e)};Gt.hydrate=function(e,t,n){if(!Gu(t))throw Error(q(200));return Ku(null,e,t,!0,n)};Gt.hydrateRoot=function(e,t,n){if(!od(e))throw Error(q(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=Bp;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),t=Fp(t,null,e,1,n??null,i,!1,s,a),e[Yn]=t.current,Ms(e),r)for(e=0;e<r.length;e++)n=r[e],i=n._getVersion,i=i(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Qu(t)};Gt.render=function(e,t,n){if(!Gu(t))throw Error(q(200));return Ku(null,e,t,!1,n)};Gt.unmountComponentAtNode=function(e){if(!Gu(e))throw Error(q(40));return e._reactRootContainer?(Yr(function(){Ku(null,null,e,!1,function(){e._reactRootContainer=null,e[Yn]=null})}),!0):!1};Gt.unstable_batchedUpdates=nd;Gt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Gu(n))throw Error(q(200));if(e==null||e._reactInternals===void 0)throw Error(q(38));return Ku(e,t,n,!1,r)};Gt.version="18.3.1-next-f1338f8080-20240426";function jp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(jp)}catch(e){console.error(e)}}jp(),j0.exports=Gt;var PT=j0.exports,Jf=PT;io.createRoot=Jf.createRoot,io.hydrateRoot=Jf.hydrateRoot;/**
41
- * @license lucide-react v0.312.0 - ISC
42
- *
43
- * This source code is licensed under the ISC license.
44
- * See the LICENSE file in the root directory of this source tree.
45
- */var MT={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"};/**
46
- * @license lucide-react v0.312.0 - ISC
47
- *
48
- * This source code is licensed under the ISC license.
49
- * See the LICENSE file in the root directory of this source tree.
50
- */const FT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),se=(e,t)=>{const n=S.forwardRef(({color:r="currentColor",size:i=24,strokeWidth:s=2,absoluteStrokeWidth:a,className:u="",children:l,...d},h)=>S.createElement("svg",{ref:h,...MT,width:i,height:i,stroke:r,strokeWidth:a?Number(s)*24/Number(i):s,className:["lucide",`lucide-${FT(e)}`,u].join(" "),...d},[...t.map(([f,p])=>S.createElement(f,p)),...Array.isArray(l)?l:[l]]));return n.displayName=`${e}`,n};/**
51
- * @license lucide-react v0.312.0 - ISC
52
- *
53
- * This source code is licensed under the ISC license.
54
- * See the LICENSE file in the root directory of this source tree.
55
- */const br=se("AlertCircle",[["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"}]]);/**
56
- * @license lucide-react v0.312.0 - ISC
57
- *
58
- * This source code is licensed under the ISC license.
59
- * See the LICENSE file in the root directory of this source tree.
60
- */const Ii=se("AlertTriangle",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"c3ski4"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
61
- * @license lucide-react v0.312.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const BT=se("ArrowDown",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);/**
66
- * @license lucide-react v0.312.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */const jT=se("ArrowUp",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);/**
71
- * @license lucide-react v0.312.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const Zf=se("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/**
76
- * @license lucide-react v0.312.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Zr=se("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/**
81
- * @license lucide-react v0.312.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const UT=se("Brain",[["path",{d:"M9.5 2A2.5 2.5 0 0 1 12 4.5v15a2.5 2.5 0 0 1-4.96.44 2.5 2.5 0 0 1-2.96-3.08 3 3 0 0 1-.34-5.58 2.5 2.5 0 0 1 1.32-4.24 2.5 2.5 0 0 1 1.98-3A2.5 2.5 0 0 1 9.5 2Z",key:"1mhkh5"}],["path",{d:"M14.5 2A2.5 2.5 0 0 0 12 4.5v15a2.5 2.5 0 0 0 4.96.44 2.5 2.5 0 0 0 2.96-3.08 3 3 0 0 0 .34-5.58 2.5 2.5 0 0 0-1.32-4.24 2.5 2.5 0 0 0-1.98-3A2.5 2.5 0 0 0 14.5 2Z",key:"1d6s00"}]]);/**
86
- * @license lucide-react v0.312.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const HT=se("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/**
91
- * @license lucide-react v0.312.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const cd=se("CheckCircle2",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/**
96
- * @license lucide-react v0.312.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const ea=se("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
101
- * @license lucide-react v0.312.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const Up=se("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
106
- * @license lucide-react v0.312.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const ta=se("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
111
- * @license lucide-react v0.312.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const Hp=se("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);/**
116
- * @license lucide-react v0.312.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const zT=se("Code2",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
121
- * @license lucide-react v0.312.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const $T=se("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/**
126
- * @license lucide-react v0.312.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const Xu=se("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);/**
131
- * @license lucide-react v0.312.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const YT=se("Cpu",[["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"9",y:"9",width:"6",height:"6",key:"o3kz5p"}],["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"}]]);/**
136
- * @license lucide-react v0.312.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const Xi=se("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"}]]);/**
141
- * @license lucide-react v0.312.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const VT=se("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"}]]);/**
146
- * @license lucide-react v0.312.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const dd=se("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/**
151
- * @license lucide-react v0.312.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const WT=se("FilePen",[["path",{d:"M12 22h6a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v10",key:"x7tsz2"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10.4 12.6a2 2 0 1 1 3 3L8 21l-4 1 1-4Z",key:"o3xyfb"}]]);/**
156
- * @license lucide-react v0.312.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const wn=se("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"}]]);/**
161
- * @license lucide-react v0.312.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const zp=se("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"}]]);/**
166
- * @license lucide-react v0.312.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const Hn=se("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"}]]);/**
171
- * @license lucide-react v0.312.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const eh=se("FolderSearch",[["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["path",{d:"M10.7 20H4a2 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.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.5-1.5",key:"3sg1j"}]]);/**
176
- * @license lucide-react v0.312.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const $p=se("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"}]]);/**
181
- * @license lucide-react v0.312.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const qT=se("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/**
186
- * @license lucide-react v0.312.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const QT=se("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]);/**
191
- * @license lucide-react v0.312.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const GT=se("Home",[["path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"y5dka4"}],["polyline",{points:"9 22 9 12 15 12 15 22",key:"e2us08"}]]);/**
196
- * @license lucide-react v0.312.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const KT=se("Layers",[["path",{d:"m12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z",key:"8b97xw"}],["path",{d:"m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65",key:"dd6zsq"}],["path",{d:"m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65",key:"ep9fru"}]]);/**
201
- * @license lucide-react v0.312.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const XT=se("Link2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
206
- * @license lucide-react v0.312.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const JT=se("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/**
211
- * @license lucide-react v0.312.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const ZT=se("ListChecks",[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]);/**
216
- * @license lucide-react v0.312.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const xi=se("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
221
- * @license lucide-react v0.312.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const ey=se("Loader",[["line",{x1:"12",x2:"12",y1:"2",y2:"6",key:"gza1u7"}],["line",{x1:"12",x2:"12",y1:"18",y2:"22",key:"1qhbu9"}],["line",{x1:"4.93",x2:"7.76",y1:"4.93",y2:"7.76",key:"xae44r"}],["line",{x1:"16.24",x2:"19.07",y1:"16.24",y2:"19.07",key:"bxnmvf"}],["line",{x1:"2",x2:"6",y1:"12",y2:"12",key:"89khin"}],["line",{x1:"18",x2:"22",y1:"12",y2:"12",key:"pb8tfm"}],["line",{x1:"4.93",x2:"7.76",y1:"19.07",y2:"16.24",key:"1uxjnu"}],["line",{x1:"16.24",x2:"19.07",y1:"7.76",y2:"4.93",key:"6duxfx"}]]);/**
226
- * @license lucide-react v0.312.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const Yp=se("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);/**
231
- * @license lucide-react v0.312.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const ty=se("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/**
236
- * @license lucide-react v0.312.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const ny=se("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"}]]);/**
241
- * @license lucide-react v0.312.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const ry=se("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/**
246
- * @license lucide-react v0.312.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const iy=se("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/**
251
- * @license lucide-react v0.312.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const sy=se("PanelLeftClose",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]]);/**
256
- * @license lucide-react v0.312.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const ay=se("PanelLeftOpen",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]]);/**
261
- * @license lucide-react v0.312.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const uy=se("Paperclip",[["path",{d:"m21.44 11.05-9.19 9.19a6 6 0 0 1-8.49-8.49l8.57-8.57A4 4 0 1 1 18 8.84l-8.59 8.57a2 2 0 0 1-2.83-2.83l8.49-8.48",key:"1u3ebp"}]]);/**
266
- * @license lucide-react v0.312.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const ly=se("PenLine",[["path",{d:"M12 20h9",key:"t2du7b"}],["path",{d:"M16.5 3.5a2.12 2.12 0 0 1 3 3L7 19l-4 1 1-4Z",key:"ymcmye"}]]);/**
271
- * @license lucide-react v0.312.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const oy=se("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
276
- * @license lucide-react v0.312.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const cy=se("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/**
281
- * @license lucide-react v0.312.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const Pr=se("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
286
- * @license lucide-react v0.312.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const dy=se("Send",[["path",{d:"m22 2-7 20-4-9-9-4Z",key:"1q3vgg"}],["path",{d:"M22 2 11 13",key:"nzbqef"}]]);/**
291
- * @license lucide-react v0.312.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const fy=se("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"}]]);/**
296
- * @license lucide-react v0.312.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const hy=se("ShieldAlert",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/**
301
- * @license lucide-react v0.312.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const Vp=se("Smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);/**
306
- * @license lucide-react v0.312.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const my=se("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/**
311
- * @license lucide-react v0.312.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const th=se("StopCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{width:"6",height:"6",x:"9",y:"9",key:"1wrtvo"}]]);/**
316
- * @license lucide-react v0.312.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const py=se("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"}]]);/**
321
- * @license lucide-react v0.312.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const gy=se("Table",[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]);/**
326
- * @license lucide-react v0.312.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const xu=se("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
331
- * @license lucide-react v0.312.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const _u=se("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
336
- * @license lucide-react v0.312.0 - ISC
337
- *
338
- * This source code is licensed under the ISC license.
339
- * See the LICENSE file in the root directory of this source tree.
340
- */const ku=se("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/**
341
- * @license lucide-react v0.312.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const Ey=se("WifiOff",[["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}],["path",{d:"M8.5 16.5a5 5 0 0 1 7 0",key:"sej527"}],["path",{d:"M2 8.82a15 15 0 0 1 4.17-2.65",key:"11utq1"}],["path",{d:"M10.66 5c4.01-.36 8.14.9 11.34 3.76",key:"hxefdu"}],["path",{d:"M16.85 11.25a10 10 0 0 1 2.22 1.68",key:"q734kn"}],["path",{d:"M5 13a10 10 0 0 1 5.24-2.76",key:"piq4yl"}],["line",{x1:"12",x2:"12.01",y1:"20",y2:"20",key:"of4bc4"}]]);/**
346
- * @license lucide-react v0.312.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const Ty=se("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"}]]);/**
351
- * @license lucide-react v0.312.0 - ISC
352
- *
353
- * This source code is licensed under the ISC license.
354
- * See the LICENSE file in the root directory of this source tree.
355
- */const Mt=se("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/**
356
- * @license lucide-react v0.312.0 - ISC
357
- *
358
- * This source code is licensed under the ISC license.
359
- * See the LICENSE file in the root directory of this source tree.
360
- */const Wp=se("Zap",[["polygon",{points:"13 2 3 14 12 14 11 22 21 10 12 10 13 2",key:"45s27k"}]]),yy={},nh=e=>{let t;const n=new Set,r=(h,f)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const m=t;t=f??(typeof p!="object"||p===null)?p:Object.assign({},t,p),n.forEach(T=>T(t,m))}},i=()=>t,l={setState:r,getState:i,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{(yy?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},d=t=e(r,i,l);return l},by=e=>e?nh(e):nh;var qp={exports:{}},Qp={},Gp={exports:{}},Kp={};/**
361
- * @license React
362
- * use-sync-external-store-shim.production.js
363
- *
364
- * Copyright (c) Meta Platforms, Inc. and affiliates.
365
- *
366
- * This source code is licensed under the MIT license found in the
367
- * LICENSE file in the root directory of this source tree.
368
- */var Li=S;function xy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _y=typeof Object.is=="function"?Object.is:xy,ky=Li.useState,Sy=Li.useEffect,Cy=Li.useLayoutEffect,Ny=Li.useDebugValue;function Ay(e,t){var n=t(),r=ky({inst:{value:n,getSnapshot:t}}),i=r[0].inst,s=r[1];return Cy(function(){i.value=n,i.getSnapshot=t,Bl(i)&&s({inst:i})},[e,n,t]),Sy(function(){return Bl(i)&&s({inst:i}),e(function(){Bl(i)&&s({inst:i})})},[e]),Ny(n),n}function Bl(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_y(e,n)}catch{return!0}}function wy(e,t){return t()}var vy=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?wy:Ay;Kp.useSyncExternalStore=Li.useSyncExternalStore!==void 0?Li.useSyncExternalStore:vy;Gp.exports=Kp;var Iy=Gp.exports;/**
369
- * @license React
370
- * use-sync-external-store-shim/with-selector.production.js
371
- *
372
- * Copyright (c) Meta Platforms, Inc. and affiliates.
373
- *
374
- * This source code is licensed under the MIT license found in the
375
- * LICENSE file in the root directory of this source tree.
376
- */var Ju=S,Ly=Iy;function Dy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ry=typeof Object.is=="function"?Object.is:Dy,Oy=Ly.useSyncExternalStore,Py=Ju.useRef,My=Ju.useEffect,Fy=Ju.useMemo,By=Ju.useDebugValue;Qp.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var s=Py(null);if(s.current===null){var a={hasValue:!1,value:null};s.current=a}else a=s.current;s=Fy(function(){function l(m){if(!d){if(d=!0,h=m,m=r(m),i!==void 0&&a.hasValue){var T=a.value;if(i(T,m))return f=T}return f=m}if(T=f,Ry(h,m))return T;var x=r(m);return i!==void 0&&i(T,x)?(h=m,T):(h=m,f=x)}var d=!1,h,f,p=n===void 0?null:n;return[function(){return l(t())},p===null?void 0:function(){return l(p())}]},[t,n,r,i]);var u=Oy(e,s[0],s[1]);return My(function(){a.hasValue=!0,a.value=u},[u]),By(u),u};qp.exports=Qp;var jy=qp.exports;const Uy=Ou(jy),Xp={},{useDebugValue:Hy}=As,{useSyncExternalStoreWithSelector:zy}=Uy;let rh=!1;const $y=e=>e;function Yy(e,t=$y,n){(Xp?"production":void 0)!=="production"&&n&&!rh&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),rh=!0);const r=zy(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Hy(r),r}const ih=e=>{(Xp?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?by(e):e,n=(r,i)=>Yy(t,r,i);return Object.assign(n,t),n},Jp=e=>e?ih(e):ih,we=Jp((e,t)=>({sessions:[],currentSessionId:null,pendingDeleteIds:[],setSessions:n=>e(r=>({sessions:n.filter(i=>!r.pendingDeleteIds.includes(i.id))})),setCurrentSession:n=>e({currentSessionId:n}),addSession:n=>e(r=>({sessions:[n,...r.sessions]})),removeSession:n=>e(r=>({sessions:r.sessions.filter(i=>i.id!==n),currentSessionId:r.currentSessionId===n?null:r.currentSessionId,messages:r.currentSessionId===n?[]:r.messages})),updateSessionInList:(n,r)=>e(i=>({sessions:i.sessions.map(s=>s.id===n?{...s,...r}:s)})),addPendingDelete:n=>e(r=>({pendingDeleteIds:[...r.pendingDeleteIds,n]})),removePendingDelete:n=>e(r=>({pendingDeleteIds:r.pendingDeleteIds.filter(i=>i!==n)})),messages:[],setMessages:n=>e({messages:n}),addMessage:n=>e(r=>({messages:[...r.messages,n]})),removeMessage:n=>e(r=>({messages:r.messages.filter(i=>i.id!==n)})),removeMessagesFrom:n=>e(r=>{const i=r.messages.findIndex(s=>s.id===n);return i===-1?r:{messages:r.messages.slice(0,i)}}),isStreaming:!1,streamingContent:"",setStreaming:n=>e({isStreaming:n}),appendStreamContent:n=>e(r=>({streamingContent:r.streamingContent+n})),setStreamContent:n=>e({streamingContent:n}),clearStreamContent:()=>e({streamingContent:""}),agentSteps:[],addAgentStep:n=>e(r=>({agentSteps:[...r.agentSteps.map(i=>({...i,active:!1})),n]})),updateLastAgentStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];return i[i.length-1]={...i[i.length-1],...n},{agentSteps:i}}),appendThinkingContent:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps],s=i[i.length-1];return s.type!=="thinking"?r:(i[i.length-1]={...s,detail:(s.detail?s.detail+`
377
- `:"")+n,active:!0},{agentSteps:i})}),updateLastToolStep:n=>e(r=>{if(r.agentSteps.length===0)return r;const i=[...r.agentSteps];for(let s=i.length-1;s>=0;s--)if(i[s].type==="tool")return i[s]={...i[s],...n},{agentSteps:i};return r}),clearAgentSteps:()=>e({agentSteps:[]}),documents:[],setDocuments:n=>e({documents:n}),systemStatus:null,backendConnected:!0,setSystemStatus:n=>e({systemStatus:n}),setBackendConnected:n=>e({backendConnected:n}),theme:(()=>{try{return localStorage.getItem("gaia-chat-theme")||"dark"}catch{return"dark"}})(),showDocLibrary:!1,showFileBrowser:!1,showSettings:!1,toggleTheme:()=>e(n=>{const r=n.theme==="dark"?"light":"dark";try{localStorage.setItem("gaia-chat-theme",r)}catch{}return document.documentElement.setAttribute("data-theme",r),{theme:r}}),sidebarOpen:typeof window<"u"?window.innerWidth>768:!0,sidebarCollapsed:(()=>{try{return typeof window<"u"&&localStorage.getItem("gaia-chat-sidebar-collapsed")==="true"}catch{return!1}})(),sidebarWidth:(()=>{try{return typeof window<"u"?parseInt(localStorage.getItem("gaia-chat-sidebar-width")||"300",10):300}catch{return 300}})(),isLoadingMessages:!1,pendingPrompt:null,setShowDocLibrary:n=>e({showDocLibrary:n}),setShowFileBrowser:n=>e({showFileBrowser:n}),setShowSettings:n=>e({showSettings:n}),toggleSidebar:()=>e(n=>({sidebarOpen:!n.sidebarOpen})),setSidebarOpen:n=>e({sidebarOpen:n}),toggleSidebarCollapsed:()=>e(n=>{const r=!n.sidebarCollapsed;try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(r))}catch{}return{sidebarCollapsed:r}}),setSidebarCollapsed:n=>{try{localStorage.setItem("gaia-chat-sidebar-collapsed",String(n))}catch{}e({sidebarCollapsed:n})},setSidebarWidth:n=>{const r=Math.max(200,Math.min(500,n));try{localStorage.setItem("gaia-chat-sidebar-width",String(r))}catch{}e({sidebarWidth:r})},setLoadingMessages:n=>e({isLoadingMessages:n}),setPendingPrompt:n=>e({pendingPrompt:n})})),Vy={api:"#4fc3f7",store:"#ce93d8",chat:"#81c784",stream:"#ffb74d",ui:"#90a4ae",doc:"#a1887f",system:"#e57373",nav:"#fff176"},Wy={api:"fetch",store:"state",chat:"chat",stream:"stream",ui:"ui",doc:"docs",system:"sys",nav:"nav"},Va=(()=>{try{if(localStorage.getItem("gaia-debug")==="true")return!0;if(typeof location<"u"){const e=new URLSearchParams(location.search);if(e.has("debug")||e.has("verbose"))return!0}}catch{}return!1})();function Ji(){const e=new Date;return e.toLocaleTimeString("en-US",{hour12:!1})+"."+String(e.getMilliseconds()).padStart(3,"0")}function Jn(e){const t=Vy[e]||"#ccc",r=`%c[${Wy[e]||e}]`,i=`color: ${t}; font-weight: bold;`,s="color: #888; font-weight: normal;";return{info:(a,...u)=>{if(!Va)return;const l=Ji();u.length>0?console.log(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u):console.log(`${r} %c${l} %c${a}`,i,s,"color: inherit;")},warn:(a,...u)=>{const l=Ji();console.warn(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},error:(a,...u)=>{const l=Ji();console.error(`${r} %c${l} %c${a}`,i,s,"color: inherit;",...u)},debug:(a,...u)=>{if(!Va)return;const l=Ji();console.debug(`${r} %c${l} %c${a}`,i,s,"color: #999;",...u)},timed:(a,u,...l)=>{if(!Va)return;const d=Math.round(performance.now()-u),h=Ji(),f=d>2e3?"color: #e57373;":d>500?"color: #ffb74d;":"color: #81c784;";l.length>0?console.log(`${r} %c${h} %c${a} %c(${d}ms)`,i,s,"color: inherit;",f,...l):console.log(`${r} %c${h} %c${a} %c(${d}ms)`,i,s,"color: inherit;",f)},time:()=>performance.now()}}const D={api:Jn("api"),store:Jn("store"),chat:Jn("chat"),stream:Jn("stream"),ui:Jn("ui"),doc:Jn("doc"),system:Jn("system"),nav:Jn("nav")};function qy(e){console.log("%c GAIA Agent UI %c v"+e+" %c Local AI Desktop","background: #E23C40; color: white; font-weight: bold; padding: 4px 8px; border-radius: 4px 0 0 4px;","background: #333; color: #fff; padding: 4px 8px;","background: #1a1a1a; color: #888; padding: 4px 8px; border-radius: 0 4px 4px 0;"),console.log(Va?"%cVerbose logging enabled. Categories: [fetch] [state] [chat] [stream] [ui] [docs] [sys] [nav]":'%cVerbose logging: add ?debug to URL or run localStorage.setItem("gaia-debug","true")',"color: #666; font-style: italic;")}const fd="/api";function Qy(e,t){switch(e){case 403:return"Access denied. This location is outside your home directory.";case 404:return"Not found. The file or folder may have been moved or deleted.";case 413:return"File too large to process.";case 500:return"Server error. Please try again.";case 502:case 503:return"Service unavailable. Is the backend running?";default:return t||`Request failed (HTTP ${e})`}}async function Pe(e,t,n){const r=`${fd}${t}`,i=D.api.time();D.api.info(`${e} ${r}`,n!==void 0?{body:n}:"");const s={method:e,headers:n!==void 0?{"Content-Type":"application/json"}:void 0,body:n!==void 0?JSON.stringify(n):void 0};let a;try{a=await fetch(r,s)}catch(d){throw D.api.error(`${e} ${r} - network error`,d),d}if(!a.ok){const d=await a.text().catch(()=>"");D.api.error(`${e} ${r} - HTTP ${a.status}`,{errorText:d});let h=d;try{h=JSON.parse(d).detail||d}catch{}throw new Error(Qy(a.status,h))}if(!(a.headers.get("content-type")||"").includes("application/json")){D.api.timed(`${e} ${r} -> ${a.status} (no body)`,i);return}const l=await a.json();return D.api.timed(`${e} ${r} -> ${a.status}`,i,l),l}async function hd(){return Pe("GET","/system/status")}async function Gy(e,t){return Pe("POST","/system/load-model",{model_name:e,ctx_size:t})}async function Ky(e,t=!1){return Pe("POST","/system/download-model",{model_name:e,force:t})}async function Xy(){return Pe("GET","/sessions")}async function Zp(e={}){return Pe("POST","/sessions",e)}async function sh(e,t){return Pe("PUT",`/sessions/${e}`,t)}async function e1(e){return Pe("DELETE",`/sessions/${e}`)}async function us(e){return Pe("GET",`/sessions/${e}/messages`)}async function Jy(e){return Pe("GET",`/sessions/${e}/export?format=markdown`)}async function Zy(e,t){return Pe("DELETE",`/sessions/${e}/messages/${t}`)}async function eb(e,t){return Pe("DELETE",`/sessions/${e}/messages/${t}/and-below`)}const tb=new Set(["status","step","thinking","plan","tool_start","tool_end","tool_result","tool_args","tool_confirm","agent_error","permission_request"]);function nb(e,t,n,r,i){let s;typeof n=="function"?s={onChunk:n,onAgentEvent:()=>{},onDone:()=>{},onError:f=>{D.stream.error("Unhandled stream error",f)}}:s=n;const a=new AbortController,u=D.stream.time();let l=0,d=0,h=0;return D.stream.info(`Starting SSE stream for session=${e}`,{messageLength:t.length}),fetch(`${fd}/chat/send`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({session_id:e,message:t,stream:!0}),signal:a.signal}).then(async f=>{var I;if(D.stream.info(`SSE connection opened -> HTTP ${f.status}`),!f.ok){const g=await f.text().catch(()=>"");D.stream.error(`SSE connection failed: HTTP ${f.status}`,g),s.onError(new Error(`HTTP ${f.status}: ${g}`));return}const p=(I=f.body)==null?void 0:I.getReader();if(!p){D.stream.error("No response body reader available"),s.onError(new Error("No response body"));return}const m=new TextDecoder;let T="",x=!1;try{for(;;){const{done:g,value:E}=await p.read();if(g){D.stream.debug("SSE reader done (stream ended)");break}T+=m.decode(E,{stream:!0});const y=T.split(`
378
- `);T=y.pop()||"";for(const v of y)if(v.startsWith("data: ")){const O=v.slice(6).trim();if(!O)continue;try{const A=JSON.parse(O);A.type==="chunk"?(l++,d+=(A.content||"").length,(l<=3||l%50===0)&&D.stream.debug(`Chunk #${l} (+${(A.content||"").length} chars)`),s.onChunk(A)):A.type==="answer"?s.onChunk(A):A.type==="done"?(x=!0,D.stream.timed(`Stream complete: ${l} chunks, ${d} chars, ${h} agent events`,u),s.onDone(A)):A.type==="error"?(D.stream.error("Stream error event:",A.content),s.onError(new Error(A.content||"Unknown error"))):tb.has(A.type)?(h++,D.stream.debug(`Agent event: ${A.type}`,A),s.onAgentEvent(A)):D.stream.warn(`Unknown SSE event type: ${A.type}`,A)}catch{D.stream.warn("Malformed SSE data, skipping",{raw:O.slice(0,100)})}}}}finally{p.releaseLock()}x||(D.stream.timed(`SSE connection closed without done event: ${l} chunks, ${h} agent events`,u),s.onDone({type:"done"}))}).catch(f=>{f.name==="AbortError"?D.stream.warn(`Stream aborted by user after ${l} chunks`):(D.stream.error("Stream fetch error",f),s.onError(f))}),a}async function rb(e,t,n,r){return Pe("POST","/chat/confirm",{session_id:e,confirm_id:t,action:n,remember:r})}async function t1(e,t){return Pe("POST","/chat/confirm-tool",{session_id:e,approved:t})}async function ei(){return Pe("GET","/documents")}async function md(e){return Pe("POST","/documents/upload-path",{filepath:e})}async function ib(e){return Pe("DELETE",`/documents/${e}`)}async function sb(e){return Pe("GET",`/documents/${e}/status`)}async function ab(e){return Pe("POST",`/documents/${e}/cancel`)}async function Su(e,t){return Pe("POST",`/sessions/${e}/documents`,{document_id:t})}async function ub(e,t){return Pe("DELETE",`/sessions/${e}/documents/${t}`)}async function lb(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Pe("GET",`/files/browse${t}`)}async function ob(e,t=!0){return Pe("POST","/documents/index-folder",{folder_path:e,recursive:t})}async function pd(e,t=!0){return Pe("POST","/files/open",{path:e,reveal:t})}async function ah(e){const t=`${fd}/files/upload`,n=D.api.time();D.api.info(`POST ${t}`,{fileName:e.name,size:e.size});const r=new FormData;r.append("file",e);const i=await fetch(t,{method:"POST",body:r});if(!i.ok){const a=await i.text().catch(()=>"Upload failed");throw D.api.error(`POST ${t} - HTTP ${i.status}`,{errorText:a}),new Error(`Upload failed: ${a}`)}const s=await i.json();return D.api.timed(`POST ${t} -> ${i.status}`,n,s),s}async function cb(e,t,n){const r=new URLSearchParams({query:e});return t&&r.set("file_types",t),r.set("max_results",String(n)),Pe("GET",`/files/search?${r}`)}async function db(e,t){const n=new URLSearchParams({path:e});return Pe("GET",`/files/preview?${n}`)}async function fb(){return Pe("POST","/tunnel/start")}async function hb(){return Pe("POST","/tunnel/stop")}async function n1(){return Pe("GET","/tunnel/status")}async function mb(){return Pe("GET","/mcp/status")}function mn(e){return e.replace(/-/g,"").slice(0,7)}function pb(e,t){const n=t.replace(/^#/,"").toLowerCase();if(!n||n.length<4)return null;const r=e.find(i=>i.id.replace(/-/g,"").toLowerCase().startsWith(n));return r?r.id:null}const r1=""+new URL("gaia-robot-NKaQnEIp.png",import.meta.url).href;function gb(e,t){e.stopPropagation(),e.preventDefault();const n=mn(t),r=`${window.location.origin}${window.location.pathname}#${n}`;navigator.clipboard.writeText(r).then(()=>{D.ui.info(`Copied session link: ${r}`)}).catch(()=>{D.ui.warn("Clipboard write failed")})}function uh({session:e,isActive:t,isPendingDelete:n,isDeleting:r,onSelect:i,onKeyDown:s,onDelete:a,formatTime:u}){const[l,d]=S.useState(!1),h=S.useCallback(f=>{gb(f,e.id),d(!0),setTimeout(()=>d(!1),1500)},[e.id]);return c.jsxs("div",{className:`session-item ${t?"active":""} ${r?"session-deleting":""}`,onClick:()=>i(e.id),onKeyDown:f=>s(f,e.id),role:"button",tabIndex:0,"aria-label":`Open task: ${e.title}`,"aria-current":t?"true":void 0,children:[c.jsx("span",{className:"session-title",children:e.title}),c.jsxs("a",{className:`session-hash ${l?"copied":""}`,href:`#${mn(e.id)}`,onClick:h,title:l?"Copied!":`Copy link #${mn(e.id)}`,"aria-label":`Copy link for session ${mn(e.id)}`,children:["#",mn(e.id)]}),c.jsx("span",{className:"session-time",children:u(e.updated_at)}),n?c.jsxs("button",{className:"session-delete confirm",onClick:f=>a(f,e.id),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&a(f,e.id)},title:"Click to confirm delete","aria-label":`Confirm delete: ${e.title}`,children:[c.jsx(_u,{size:12}),c.jsx("span",{className:"confirm-label",children:"Delete?"})]}):c.jsx("button",{className:"session-delete",onClick:f=>a(f,e.id),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&a(f,e.id)},title:"Delete","aria-label":`Delete: ${e.title}`,children:c.jsx(_u,{size:13})})]})}function Eb({onNewTask:e,tunnelActive:t,tunnelLoading:n,onMobileToggle:r}){const{sessions:i,currentSessionId:s,setCurrentSession:a,removeSession:u,addSession:l,setMessages:d,theme:h,toggleTheme:f,setShowSettings:p,sidebarOpen:m,setSidebarOpen:T,setLoadingMessages:x,sidebarCollapsed:I,toggleSidebarCollapsed:g,sidebarWidth:E,setSidebarWidth:y,addPendingDelete:v,removePendingDelete:O}=we(),[A,F]=S.useState(""),[H,K]=S.useState(null),[w,Y]=S.useState(null),[te,ce]=S.useState(!1),[le,ue]=S.useState(null),j=S.useRef(null),z=S.useRef(null),P=S.useRef(null);S.useEffect(()=>{const R=()=>{var W;I?(g(),requestAnimationFrame(()=>{var de;return(de=z.current)==null?void 0:de.focus()})):(W=z.current)==null||W.focus()};return window.addEventListener("gaia:focus-search",R),()=>window.removeEventListener("gaia:focus-search",R)},[I,g]);const G=A?i.filter(R=>R.title.toLowerCase().includes(A.toLowerCase())):i,_=S.useMemo(()=>{if(A)return null;const R=new Date,W=new Date(R.getFullYear(),R.getMonth(),R.getDate()).getTime(),de=W-864e5,Ae=W-7*864e5,be=[{label:"Today",sessions:[]},{label:"Yesterday",sessions:[]},{label:"Previous 7 Days",sessions:[]},{label:"Older",sessions:[]}];for(const Re of G){const ze=new Date(Re.updated_at).getTime();ze>=W?be[0].sessions.push(Re):ze>=de?be[1].sessions.push(Re):ze>=Ae?be[2].sessions.push(Re):be[3].sessions.push(Re)}return be.filter(Re=>Re.sessions.length>0)},[G,A]),Z=S.useCallback(async R=>{var de;if(R===s)return;const W=((de=i.find(Ae=>Ae.id===R))==null?void 0:de.title)||"?";D.nav.info(`Selecting session: "${W}" (${R})`),a(R),d([]),x(!0),window.innerWidth<=768&&T(!1);try{const Ae=await us(R);if(!(we.getState().currentSessionId===R)){D.nav.debug(`Discarding stale message load for session=${R} (user switched away)`);return}d(Ae.messages||[]),D.nav.info(`Loaded ${(Ae.messages||[]).length} message(s) for "${W}"`)}catch(Ae){D.nav.error(`Failed to load messages for session ${R}`,Ae),d([])}finally{x(!1)}},[s,i,a,d,T,x]),fe=S.useCallback(async(R,W)=>{R.stopPropagation(),R.preventDefault();const de=i.find(be=>be.id===W),Ae=(de==null?void 0:de.title)||"?";if(H===W){D.chat.info(`Deleting session: "${Ae}" (${W})`),K(null),Y(W),v(W),e1(W).then(()=>{D.chat.info(`Session deleted from backend: "${Ae}"`),O(W)}).catch(Re=>{D.chat.warn(`Backend delete failed for "${Ae}"`,Re),O(W)}),le!=null&&le.timer&&clearTimeout(le.timer);const be=setTimeout(()=>{ue(null)},5e3);de&&ue({session:de,timer:be}),setTimeout(()=>{u(W),Y(null)},250);return}D.chat.debug(`Delete pending confirmation for: "${Ae}" (${W})`),K(W),P.current&&clearTimeout(P.current),P.current=setTimeout(()=>K(be=>be===W?null:be),3e3)},[H,i,u,le,v,O]),N=S.useCallback(()=>{if(!le)return;clearTimeout(le.timer);const{session:R}=le;D.chat.info(`Undo delete: re-creating "${R.title}"`),O(R.id),Zp({title:R.title}).then(W=>{l(W),D.chat.info(`Undo delete: re-created "${W.title}" (new id=${W.id})`)}).catch(W=>{D.chat.warn(`Undo delete failed for "${R.title}"`,W)}),ue(null)},[le,l,O]);S.useEffect(()=>{if(!H)return;const R=()=>K(null);return window.addEventListener("click",R,{once:!0}),()=>window.removeEventListener("click",R)},[H]);const Ne=S.useCallback((R,W)=>{(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),Z(W))},[Z]),re=S.useRef(null),me=S.useCallback(R=>{R.preventDefault(),ce(!0),D.ui.debug("Sidebar resize started");const W=R.clientX,de=E,Ae=Re=>{const ze=Re.clientX-W;y(de+ze)},be=()=>{ce(!1),document.removeEventListener("mousemove",Ae),document.removeEventListener("mouseup",be),document.body.style.cursor="",document.body.style.userSelect="",re.current=null,D.ui.debug("Sidebar resize ended")};re.current=be,document.body.style.cursor="col-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",Ae),document.addEventListener("mouseup",be)},[E,y]);S.useEffect(()=>()=>{re.current&&re.current(),P.current&&clearTimeout(P.current)},[]);const ve=R=>{const W=new Date(R),Ae=new Date().getTime()-W.getTime(),be=Math.floor(Ae/6e4);if(be<1)return"now";if(be<60)return`${be}m`;const Re=Math.floor(be/60);if(Re<24)return`${Re}h`;const ze=Math.floor(Re/24);return ze<7?`${ze}d`:W.toLocaleDateString(void 0,{month:"short",day:"numeric"})},He=typeof window<"u"&&window.innerWidth<=768?void 0:{width:I?56:E,minWidth:I?56:E};return c.jsxs("aside",{ref:j,className:`sidebar ${m?"open":""} ${I?"collapsed":""} ${te?"resizing":""}`,style:He,role:"complementary","aria-label":"Task sidebar",children:[c.jsxs("div",{className:"sidebar-top",children:[c.jsxs("div",{className:"sidebar-brand",children:[c.jsx("div",{className:"brand-icon","aria-hidden":"true",children:c.jsx("img",{src:r1,alt:"",width:28,height:28})}),c.jsxs("div",{className:"brand-text",children:[c.jsx("span",{className:"brand-name",children:"GAIA"}),c.jsxs("span",{className:"brand-version",children:["v","0.17.0"]}),c.jsx("span",{className:"beta-badge",children:"BETA"})]})]}),c.jsxs("div",{className:"sidebar-top-actions",children:[c.jsx("button",{className:"new-task-btn",onClick:e,title:"New Task","aria-label":"New Task",children:c.jsx(oy,{size:18})}),c.jsx("button",{className:"collapse-btn",onClick:g,title:I?"Expand sidebar":"Collapse sidebar","aria-label":I?"Expand sidebar":"Collapse sidebar",children:I?c.jsx(ay,{size:18}):c.jsx(sy,{size:18})})]})]}),c.jsxs("div",{className:"sidebar-search",children:[c.jsx(Pr,{size:14,className:"search-icon","aria-hidden":"true"}),c.jsx("input",{ref:z,type:"text",placeholder:"Search... (Ctrl+K)",value:A,onChange:R=>F(R.target.value),"aria-label":"Search tasks"})]}),c.jsxs("nav",{className:"session-list","aria-label":"Task sessions",children:[G.length===0&&c.jsx("div",{className:"empty-hint",children:A?"No results":"No tasks yet"}),_?_.map(R=>c.jsxs("div",{children:[c.jsx("div",{className:"session-group-label",children:R.label}),R.sessions.map(W=>c.jsx(uh,{session:W,isActive:W.id===s,isPendingDelete:H===W.id,isDeleting:w===W.id,onSelect:Z,onKeyDown:Ne,onDelete:fe,formatTime:ve},W.id))]},R.label)):G.map(R=>c.jsx(uh,{session:R,isActive:R.id===s,isPendingDelete:H===R.id,isDeleting:w===R.id,onSelect:Z,onKeyDown:Ne,onDelete:fe,formatTime:ve},R.id))]}),c.jsxs("div",{className:"sidebar-bottom",children:[c.jsxs("div",{className:"privacy-badge",children:[c.jsx("span",{className:"privacy-dot","aria-hidden":"true"}),c.jsx("span",{children:"100% Local"}),c.jsxs("span",{className:"version-badge",children:["v","0.17.0"]})]}),c.jsxs("div",{className:"sidebar-actions",children:[r&&c.jsx("button",{className:`btn-icon mobile-toggle-btn ${t?"active":""} ${n?"loading":""}`,onClick:r,disabled:n,title:t?"Stop mobile access":"Enable mobile access","aria-label":t?"Stop mobile access":"Enable mobile access",children:c.jsx(Vp,{size:17})}),c.jsx("button",{className:"btn-icon",onClick:()=>p(!0),title:"Settings","aria-label":"Settings",children:c.jsx(fy,{size:17})}),c.jsx("button",{className:"btn-icon",onClick:f,title:"Toggle theme","aria-label":`Switch to ${h==="dark"?"light":"dark"} theme`,children:h==="dark"?c.jsx(py,{size:17}):c.jsx(iy,{size:17})})]})]}),!I&&c.jsx("div",{className:"sidebar-resize-handle",onMouseDown:me,title:"Drag to resize sidebar","aria-hidden":"true"}),le&&c.jsxs("div",{className:"toast toast-undo",role:"status",children:["Deleted “",le.session.title,"”",c.jsx("span",{className:"toast-action",onClick:N,children:"Undo"})]})]})}function lh(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const a=n.slice(i,r).trim();(a||!s)&&t.push(a),i=r+1,r=n.indexOf(",",i)}return t}function i1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Tb=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bb={};function oh(e,t){return(bb.jsx?yb:Tb).test(e)}const xb=/[ \t\n\f\r]/g;function _b(e){return typeof e=="object"?e.type==="text"?ch(e.value):!1:ch(e)}function ch(e){return e.replace(xb,"")===""}class na{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}na.prototype.normal={};na.prototype.property={};na.prototype.space=void 0;function s1(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new na(n,r,t)}function Vs(e){return e.toLowerCase()}class Ut{constructor(t,n){this.attribute=n,this.property=t}}Ut.prototype.attribute="";Ut.prototype.booleanish=!1;Ut.prototype.boolean=!1;Ut.prototype.commaOrSpaceSeparated=!1;Ut.prototype.commaSeparated=!1;Ut.prototype.defined=!1;Ut.prototype.mustUseProperty=!1;Ut.prototype.number=!1;Ut.prototype.overloadedBoolean=!1;Ut.prototype.property="";Ut.prototype.spaceSeparated=!1;Ut.prototype.space=void 0;let kb=0;const pe=Qr(),tt=Qr(),Jo=Qr(),Q=Qr(),je=Qr(),_i=Qr(),$t=Qr();function Qr(){return 2**++kb}const Zo=Object.freeze(Object.defineProperty({__proto__:null,boolean:pe,booleanish:tt,commaOrSpaceSeparated:$t,commaSeparated:_i,number:Q,overloadedBoolean:Jo,spaceSeparated:je},Symbol.toStringTag,{value:"Module"})),jl=Object.keys(Zo);class gd extends Ut{constructor(t,n,r,i){let s=-1;if(super(t,n),dh(this,"space",i),typeof r=="number")for(;++s<jl.length;){const a=jl[s];dh(this,jl[s],(r&Zo[a])===Zo[a])}}}gd.prototype.defined=!0;function dh(e,t,n){n&&(e[t]=n)}function Bi(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new gd(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Vs(r)]=r,n[Vs(s.attribute)]=r}return new na(t,n,e.space)}const a1=Bi({properties:{ariaActiveDescendant:null,ariaAtomic:tt,ariaAutoComplete:null,ariaBusy:tt,ariaChecked:tt,ariaColCount:Q,ariaColIndex:Q,ariaColSpan:Q,ariaControls:je,ariaCurrent:null,ariaDescribedBy:je,ariaDetails:null,ariaDisabled:tt,ariaDropEffect:je,ariaErrorMessage:null,ariaExpanded:tt,ariaFlowTo:je,ariaGrabbed:tt,ariaHasPopup:null,ariaHidden:tt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:je,ariaLevel:Q,ariaLive:null,ariaModal:tt,ariaMultiLine:tt,ariaMultiSelectable:tt,ariaOrientation:null,ariaOwns:je,ariaPlaceholder:null,ariaPosInSet:Q,ariaPressed:tt,ariaReadOnly:tt,ariaRelevant:null,ariaRequired:tt,ariaRoleDescription:je,ariaRowCount:Q,ariaRowIndex:Q,ariaRowSpan:Q,ariaSelected:tt,ariaSetSize:Q,ariaSort:null,ariaValueMax:Q,ariaValueMin:Q,ariaValueNow:Q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function u1(e,t){return t in e?e[t]:t}function l1(e,t){return u1(e,t.toLowerCase())}const Sb=Bi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:_i,acceptCharset:je,accessKey:je,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:je,autoFocus:pe,autoPlay:pe,blocking:je,capture:null,charSet:null,checked:pe,cite:null,className:je,cols:Q,colSpan:null,content:null,contentEditable:tt,controls:pe,controlsList:je,coords:Q|_i,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:Jo,draggable:tt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:je,height:Q,hidden:Jo,high:Q,href:null,hrefLang:null,htmlFor:je,httpEquiv:je,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:je,itemRef:je,itemScope:pe,itemType:je,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:Q,manifest:null,max:null,maxLength:Q,media:null,method:null,min:null,minLength:Q,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:Q,pattern:null,ping:je,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:je,required:pe,reversed:pe,rows:Q,rowSpan:Q,sandbox:je,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:Q,sizes:null,slot:null,span:Q,spellCheck:tt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Q,step:null,style:null,tabIndex:Q,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:tt,width:Q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:je,axis:null,background:null,bgColor:null,border:Q,borderColor:null,bottomMargin:Q,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:Q,leftMargin:Q,link:null,longDesc:null,lowSrc:null,marginHeight:Q,marginWidth:Q,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:Q,rules:null,scheme:null,scrolling:tt,standby:null,summary:null,text:null,topMargin:Q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:Q,security:null,unselectable:null},space:"html",transform:l1}),Cb=Bi({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:$t,accentHeight:Q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Q,amplitude:Q,arabicForm:null,ascent:Q,attributeName:null,attributeType:null,azimuth:Q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Q,by:null,calcMode:null,capHeight:Q,className:je,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:Q,diffuseConstant:Q,direction:null,display:null,dur:null,divisor:Q,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:Q,enableBackground:null,end:null,event:null,exponent:Q,externalResourcesRequired:null,fill:null,fillOpacity:Q,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:_i,g2:_i,glyphName:_i,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Q,horizOriginX:Q,horizOriginY:Q,id:null,ideographic:Q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Q,k:Q,k1:Q,k2:Q,k3:Q,k4:Q,kernelMatrix:$t,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Q,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:Q,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:Q,overlineThickness:Q,paintOrder:null,panose1:null,path:null,pathLength:Q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:je,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Q,pointsAtY:Q,pointsAtZ:Q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$t,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$t,rev:$t,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$t,requiredFeatures:$t,requiredFonts:$t,requiredFormats:$t,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:Q,specularExponent:Q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Q,strikethroughThickness:Q,string:null,stroke:null,strokeDashArray:$t,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Q,strokeOpacity:Q,strokeWidth:null,style:null,surfaceScale:Q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$t,tabIndex:Q,tableValues:null,target:null,targetX:Q,targetY:Q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$t,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Q,underlineThickness:Q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Q,values:null,vAlphabetic:Q,vMathematical:Q,vectorEffect:null,vHanging:Q,vIdeographic:Q,version:null,vertAdvY:Q,vertOriginX:Q,vertOriginY:Q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:u1}),o1=Bi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),c1=Bi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:l1}),d1=Bi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Nb={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"},Ab=/[A-Z]/g,fh=/-[a-z]/g,wb=/^data[-\w.:]+$/i;function Zu(e,t){const n=Vs(t);let r=t,i=Ut;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&wb.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(fh,Ib);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!fh.test(s)){let a=s.replace(Ab,vb);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=gd}return new i(r,t)}function vb(e){return"-"+e.toLowerCase()}function Ib(e){return e.charAt(1).toUpperCase()}const ra=s1([a1,Sb,o1,c1,d1],"html"),Sr=s1([a1,Cb,o1,c1,d1],"svg");function hh(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function f1(e){return e.join(" ").trim()}var Ed={},mh=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Lb=/\n/g,Db=/^\s*/,Rb=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Ob=/^:\s*/,Pb=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Mb=/^[;\s]*/,Fb=/^\s+|\s+$/g,Bb=`
379
- `,ph="/",gh="*",Lr="",jb="comment",Ub="declaration";function Hb(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function i(T){var x=T.match(Lb);x&&(n+=x.length);var I=T.lastIndexOf(Bb);r=~I?T.length-I:r+T.length}function s(){var T={line:n,column:r};return function(x){return x.position=new a(T),d(),x}}function a(T){this.start=T,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function u(T){var x=new Error(t.source+":"+n+":"+r+": "+T);if(x.reason=T,x.filename=t.source,x.line=n,x.column=r,x.source=e,!t.silent)throw x}function l(T){var x=T.exec(e);if(x){var I=x[0];return i(I),e=e.slice(I.length),x}}function d(){l(Db)}function h(T){var x;for(T=T||[];x=f();)x!==!1&&T.push(x);return T}function f(){var T=s();if(!(ph!=e.charAt(0)||gh!=e.charAt(1))){for(var x=2;Lr!=e.charAt(x)&&(gh!=e.charAt(x)||ph!=e.charAt(x+1));)++x;if(x+=2,Lr===e.charAt(x-1))return u("End of comment missing");var I=e.slice(2,x-2);return r+=2,i(I),e=e.slice(x),r+=2,T({type:jb,comment:I})}}function p(){var T=s(),x=l(Rb);if(x){if(f(),!l(Ob))return u("property missing ':'");var I=l(Pb),g=T({type:Ub,property:Eh(x[0].replace(mh,Lr)),value:I?Eh(I[0].replace(mh,Lr)):Lr});return l(Mb),g}}function m(){var T=[];h(T);for(var x;x=p();)x!==!1&&(T.push(x),h(T));return T}return d(),m()}function Eh(e){return e?e.replace(Fb,Lr):Lr}var zb=Hb,$b=Ka&&Ka.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ed,"__esModule",{value:!0});Ed.default=Vb;const Yb=$b(zb);function Vb(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,Yb.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:u}=s;i?t(a,u,s):u&&(n=n||{},n[a]=u)}),n}var el={};Object.defineProperty(el,"__esModule",{value:!0});el.camelCase=void 0;var Wb=/^--[a-zA-Z0-9_-]+$/,qb=/-([a-z])/g,Qb=/^[^-]+$/,Gb=/^-(webkit|moz|ms|o|khtml)-/,Kb=/^-(ms)-/,Xb=function(e){return!e||Qb.test(e)||Wb.test(e)},Jb=function(e,t){return t.toUpperCase()},Th=function(e,t){return"".concat(t,"-")},Zb=function(e,t){return t===void 0&&(t={}),Xb(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Kb,Th):e=e.replace(Gb,Th),e.replace(qb,Jb))};el.camelCase=Zb;var ex=Ka&&Ka.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},tx=ex(Ed),nx=el;function ec(e,t){var n={};return!e||typeof e!="string"||(0,tx.default)(e,function(r,i){r&&i&&(n[(0,nx.camelCase)(r,t)]=i)}),n}ec.default=ec;var rx=ec;const ix=Ou(rx),tl=h1("end"),Ln=h1("start");function h1(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function sx(e){const t=Ln(e),n=tl(e);if(t&&n)return{start:t,end:n}}function Ts(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yh(e.position):"start"in e||"end"in e?yh(e):"line"in e||"column"in e?tc(e):""}function tc(e){return bh(e&&e.line)+":"+bh(e&&e.column)}function yh(e){return tc(e&&e.start)+"-"+tc(e&&e.end)}function bh(e){return e&&typeof e=="number"?e:1}class xt extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const u=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=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=Ts(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=a&&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}}xt.prototype.file="";xt.prototype.name="";xt.prototype.reason="";xt.prototype.message="";xt.prototype.stack="";xt.prototype.column=void 0;xt.prototype.line=void 0;xt.prototype.ancestors=void 0;xt.prototype.cause=void 0;xt.prototype.fatal=void 0;xt.prototype.place=void 0;xt.prototype.ruleId=void 0;xt.prototype.source=void 0;const Td={}.hasOwnProperty,ax=new Map,ux=/[A-Z]/g,lx=new Set(["table","tbody","thead","tfoot","tr"]),ox=new Set(["td","th"]),m1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function cx(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Tx(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Ex(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Sr:ra,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=p1(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function p1(e,t,n){if(t.type==="element")return dx(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return fx(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return mx(e,t,n);if(t.type==="mdxjsEsm")return hx(e,t);if(t.type==="root")return px(e,t,n);if(t.type==="text")return gx(e,t)}function dx(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Sr,e.schema=i),e.ancestors.push(t);const s=E1(e,t.tagName,!1),a=yx(e,t);let u=bd(e,t);return lx.has(t.tagName)&&(u=u.filter(function(l){return typeof l=="string"?!_b(l):!0})),g1(e,a,s,t),yd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function fx(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Ws(e,t.position)}function hx(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Ws(e,t.position)}function mx(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Sr,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:E1(e,t.name,!0),a=bx(e,t),u=bd(e,t);return g1(e,a,s,t),yd(a,u),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function px(e,t,n){const r={};return yd(r,bd(e,t)),e.create(t,e.Fragment,r,n)}function gx(e,t){return t.value}function g1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function yd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Ex(e,t,n){return r;function r(i,s,a,u){const d=Array.isArray(a.children)?n:t;return u?d(s,a,u):d(s,a)}}function Tx(e,t){return n;function n(r,i,s,a){const u=Array.isArray(s.children),l=Ln(r);return t(i,s,a,u,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function yx(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Td.call(t.properties,i)){const s=xx(e,i,t.properties[i]);if(s){const[a,u]=s;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&ox.has(t.tagName)?r=u:n[a]=u}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function bx(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else Ws(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,s=e.evaluater.evaluateExpression(u.expression)}else Ws(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function bd(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:ax;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const d=i.get(l)||0;a=l+"-"+d,i.set(l,d+1)}}const u=p1(e,s,a);u!==void 0&&n.push(u)}return n}function xx(e,t,n){const r=Zu(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?i1(n):f1(n)),r.property==="style"){let i=typeof n=="object"?n:_x(e,String(n));return e.stylePropertyNameCase==="css"&&(i=kx(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?Nb[r.property]||r.property:r.attribute,n]}}function _x(e,t){try{return ix(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new xt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=m1+"#cannot-parse-style-attribute",i}}function E1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const u=oh(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(s&&u.type==="Literal"),optional:!1}:u}r=a}else r=oh(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Td.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Ws(e)}function Ws(e,t){const n=new xt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=m1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function kx(e){const t={};let n;for(n in e)Td.call(e,n)&&(t[Sx(n)]=e[n]);return t}function Sx(e){let t=e.replace(ux,Cx);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Cx(e){return"-"+e.toLowerCase()}const Ul={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"]},Nx={};function xd(e,t){const n=Nx,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return T1(e,r,i)}function T1(e,t,n){if(Ax(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return xh(e.children,t,n)}return Array.isArray(e)?xh(e,t,n):""}function xh(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=T1(e[i],t,n);return r.join("")}function Ax(e){return!!(e&&typeof e=="object")}const _h=document.createElement("i");function _d(e){const t="&"+e+";";_h.innerHTML=t;const n=_h.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function qt(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function en(e,t){return e.length>0?(qt(e,e.length,0,t),e):t}const kh={}.hasOwnProperty;function y1(e){const t={};let n=-1;for(;++n<e.length;)wx(t,e[n]);return t}function wx(e,t){let n;for(n in t){const i=(kh.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){kh.call(i,a)||(i[a]=[]);const u=s[a];vx(i[a],Array.isArray(u)?u:u?[u]:[])}}}function vx(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);qt(e,0,0,r)}function b1(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function En(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const At=Cr(/[A-Za-z]/),yt=Cr(/[\dA-Za-z]/),Ix=Cr(/[#-'*+\--9=?A-Z^-~]/);function Cu(e){return e!==null&&(e<32||e===127)}const nc=Cr(/\d/),Lx=Cr(/[\dA-Fa-f]/),Dx=Cr(/[!-/:-@[-`{-~]/);function oe(e){return e!==null&&e<-2}function Be(e){return e!==null&&(e<0||e===32)}function Te(e){return e===-2||e===-1||e===32}const nl=Cr(new RegExp("\\p{P}|\\p{S}","u")),Vr=Cr(/\s/);function Cr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ji(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&yt(e.charCodeAt(n+1))&&yt(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const u=e.charCodeAt(n+1);s<56320&&u>56319&&u<57344?(a=String.fromCharCode(s,u),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function ke(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return Te(l)?(e.enter(n),u(l)):t(l)}function u(l){return Te(l)&&s++<i?(e.consume(l),u):(e.exit(n),t(l))}}const Rx={tokenize:Ox};function Ox(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),ke(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),s(u)}function s(u){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return oe(u)?(e.consume(u),e.exit("chunkText"),s):(e.consume(u),a)}}const Px={tokenize:Mx},Sh={tokenize:Fx};function Mx(e){const t=this,n=[];let r=0,i,s,a;return u;function u(y){if(r<n.length){const v=n[r];return t.containerState=v[1],e.attempt(v[0].continuation,l,d)(y)}return d(y)}function l(y){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&E();const v=t.events.length;let O=v,A;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){A=t.events[O][1].end;break}g(r);let F=v;for(;F<t.events.length;)t.events[F][1].end={...A},F++;return qt(t.events,O+1,0,t.events.slice(v)),t.events.length=F,d(y)}return u(y)}function d(y){if(r===n.length){if(!i)return p(y);if(i.currentConstruct&&i.currentConstruct.concrete)return T(y);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Sh,h,f)(y)}function h(y){return i&&E(),g(r),p(y)}function f(y){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,T(y)}function p(y){return t.containerState={},e.attempt(Sh,m,T)(y)}function m(y){return r++,n.push([t.currentConstruct,t.containerState]),p(y)}function T(y){if(y===null){i&&E(),g(0),e.consume(y);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),x(y)}function x(y){if(y===null){I(e.exit("chunkFlow"),!0),g(0),e.consume(y);return}return oe(y)?(e.consume(y),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(y),x)}function I(y,v){const O=t.sliceStream(y);if(v&&O.push(null),y.previous=s,s&&(s.next=y),s=y,i.defineSkip(y.start),i.write(O),t.parser.lazy[y.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<a&&(!i.events[A][1].end||i.events[A][1].end.offset>a))return;const F=t.events.length;let H=F,K,w;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(K){w=t.events[H][1].end;break}K=!0}for(g(r),A=F;A<t.events.length;)t.events[A][1].end={...w},A++;qt(t.events,H+1,0,t.events.slice(F)),t.events.length=A}}function g(y){let v=n.length;for(;v-- >y;){const O=n[v];t.containerState=O[1],O[0].exit.call(t,e)}n.length=y}function E(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Fx(e,t,n){return ke(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Di(e){if(e===null||Be(e)||Vr(e))return 1;if(nl(e))return 2}function rl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const rc={name:"attention",resolveAll:Bx,tokenize:jx};function Bx(e,t){let n=-1,r,i,s,a,u,l,d,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;l=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},p={...e[n][1].start};Ch(f,-l),Ch(p,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},u={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:p},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},d=[],e[r][1].end.offset-e[r][1].start.offset&&(d=en(d,[["enter",e[r][1],t],["exit",e[r][1],t]])),d=en(d,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),d=en(d,rl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),d=en(d,[["exit",s,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,d=en(d,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,qt(e,r-1,n-r+3,d),n=r+d.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function jx(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Di(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),u(l)}function u(l){if(l===s)return e.consume(l),u;const d=e.exit("attentionSequence"),h=Di(l),f=!h||h===2&&i||n.includes(l),p=!i||i===2&&h||n.includes(r);return d._open=!!(s===42?f:f&&(i||!p)),d._close=!!(s===42?p:p&&(h||!f)),t(l)}}function Ch(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Ux={name:"autolink",tokenize:Hx};function Hx(e,t,n){let r=0;return i;function i(m){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(m){return At(m)?(e.consume(m),a):m===64?n(m):d(m)}function a(m){return m===43||m===45||m===46||yt(m)?(r=1,u(m)):d(m)}function u(m){return m===58?(e.consume(m),r=0,l):(m===43||m===45||m===46||yt(m))&&r++<32?(e.consume(m),u):(r=0,d(m))}function l(m){return m===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):m===null||m===32||m===60||Cu(m)?n(m):(e.consume(m),l)}function d(m){return m===64?(e.consume(m),h):Ix(m)?(e.consume(m),d):n(m)}function h(m){return yt(m)?f(m):n(m)}function f(m){return m===46?(e.consume(m),r=0,h):m===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(m),e.exit("autolinkMarker"),e.exit("autolink"),t):p(m)}function p(m){if((m===45||yt(m))&&r++<63){const T=m===45?p:f;return e.consume(m),T}return n(m)}}const ia={partial:!0,tokenize:zx};function zx(e,t,n){return r;function r(s){return Te(s)?ke(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||oe(s)?t(s):n(s)}}const x1={continuation:{tokenize:Yx},exit:Vx,name:"blockQuote",tokenize:$x};function $x(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return Te(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function Yx(e,t,n){const r=this;return i;function i(a){return Te(a)?ke(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(x1,t,n)(a)}}function Vx(e){e.exit("blockQuote")}const _1={name:"characterEscape",tokenize:Wx};function Wx(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return Dx(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const k1={name:"characterReference",tokenize:qx};function qx(e,t,n){const r=this;let i=0,s,a;return u;function u(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),d):(e.enter("characterReferenceValue"),s=31,a=yt,h(f))}function d(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=Lx,h):(e.enter("characterReferenceValue"),s=7,a=nc,h(f))}function h(f){if(f===59&&i){const p=e.exit("characterReferenceValue");return a===yt&&!_d(r.sliceSerialize(p))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<s?(e.consume(f),h):n(f)}}const Nh={partial:!0,tokenize:Gx},Ah={concrete:!0,name:"codeFenced",tokenize:Qx};function Qx(e,t,n){const r=this,i={partial:!0,tokenize:O};let s=0,a=0,u;return l;function l(A){return d(A)}function d(A){const F=r.events[r.events.length-1];return s=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,u=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===u?(a++,e.consume(A),h):a<3?n(A):(e.exit("codeFencedFenceSequence"),Te(A)?ke(e,f,"whitespace")(A):f(A))}function f(A){return A===null||oe(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Nh,x,v)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),p(A))}function p(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(A)):Te(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),ke(e,m,"whitespace")(A)):A===96&&A===u?n(A):(e.consume(A),p)}function m(A){return A===null||oe(A)?f(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(A))}function T(A){return A===null||oe(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(A)):A===96&&A===u?n(A):(e.consume(A),T)}function x(A){return e.attempt(i,v,I)(A)}function I(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),g}function g(A){return s>0&&Te(A)?ke(e,E,"linePrefix",s+1)(A):E(A)}function E(A){return A===null||oe(A)?e.check(Nh,x,v)(A):(e.enter("codeFlowValue"),y(A))}function y(A){return A===null||oe(A)?(e.exit("codeFlowValue"),E(A)):(e.consume(A),y)}function v(A){return e.exit("codeFenced"),t(A)}function O(A,F,H){let K=0;return w;function w(ue){return A.enter("lineEnding"),A.consume(ue),A.exit("lineEnding"),Y}function Y(ue){return A.enter("codeFencedFence"),Te(ue)?ke(A,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):te(ue)}function te(ue){return ue===u?(A.enter("codeFencedFenceSequence"),ce(ue)):H(ue)}function ce(ue){return ue===u?(K++,A.consume(ue),ce):K>=a?(A.exit("codeFencedFenceSequence"),Te(ue)?ke(A,le,"whitespace")(ue):le(ue)):H(ue)}function le(ue){return ue===null||oe(ue)?(A.exit("codeFencedFence"),F(ue)):H(ue)}}}function Gx(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Hl={name:"codeIndented",tokenize:Xx},Kx={partial:!0,tokenize:Jx};function Xx(e,t,n){const r=this;return i;function i(d){return e.enter("codeIndented"),ke(e,s,"linePrefix",5)(d)}function s(d){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(d):n(d)}function a(d){return d===null?l(d):oe(d)?e.attempt(Kx,a,l)(d):(e.enter("codeFlowValue"),u(d))}function u(d){return d===null||oe(d)?(e.exit("codeFlowValue"),a(d)):(e.consume(d),u)}function l(d){return e.exit("codeIndented"),t(d)}}function Jx(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):ke(e,s,"linePrefix",5)(a)}function s(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):oe(a)?i(a):n(a)}}const Zx={name:"codeText",previous:t_,resolve:e_,tokenize:n_};function e_(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function t_(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function n_(e,t,n){let r=0,i,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),u(f)}function u(f){return f===96?(e.consume(f),r++,u):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(s=e.enter("codeTextSequence"),i=0,h(f)):oe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),d(f))}function d(f){return f===null||f===32||f===96||oe(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),d)}function h(f){return f===96?(e.consume(f),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",d(f))}}class r_{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Zi(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Zi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Zi(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zi(this.left,n.reverse())}}}function Zi(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function S1(e){const t={};let n=-1,r,i,s,a,u,l,d;const h=new r_(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,i_(h,n)),n=t[n],d=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=h.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return qt(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!d}function i_(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,l=[],d={};let h,f,p=-1,m=n,T=0,x=0;const I=[x];for(;m;){for(;e.get(++i)[1]!==m;);s.push(i),m._tokenizer||(h=r.sliceStream(m),m.next||h.push(null),f&&a.defineSkip(m.start),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),m._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=m,m=m.next}for(m=n;++p<u.length;)u[p][0]==="exit"&&u[p-1][0]==="enter"&&u[p][1].type===u[p-1][1].type&&u[p][1].start.line!==u[p][1].end.line&&(x=p+1,I.push(x),m._tokenizer=void 0,m.previous=void 0,m=m.next);for(a.events=[],m?(m._tokenizer=void 0,m.previous=void 0):I.pop(),p=I.length;p--;){const g=u.slice(I[p],I[p+1]),E=s.pop();l.push([E,E+g.length-1]),e.splice(E,2,g)}for(l.reverse(),p=-1;++p<l.length;)d[T+l[p][0]]=T+l[p][1],T+=l[p][1]-l[p][0]-1;return d}const s_={resolve:u_,tokenize:l_},a_={partial:!0,tokenize:o_};function u_(e){return S1(e),e}function l_(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?s(u):oe(u)?e.check(a_,a,s)(u):(e.consume(u),i)}function s(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function o_(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),ke(e,s,"linePrefix")}function s(a){if(a===null||oe(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function C1(e,t,n,r,i,s,a,u,l){const d=l||Number.POSITIVE_INFINITY;let h=0;return f;function f(g){return g===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(g),e.exit(s),p):g===null||g===32||g===41||Cu(g)?n(g):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),x(g))}function p(g){return g===62?(e.enter(s),e.consume(g),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),m(g))}function m(g){return g===62?(e.exit("chunkString"),e.exit(u),p(g)):g===null||g===60||oe(g)?n(g):(e.consume(g),g===92?T:m)}function T(g){return g===60||g===62||g===92?(e.consume(g),m):m(g)}function x(g){return!h&&(g===null||g===41||Be(g))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(g)):h<d&&g===40?(e.consume(g),h++,x):g===41?(e.consume(g),h--,x):g===null||g===32||g===40||Cu(g)?n(g):(e.consume(g),g===92?I:x)}function I(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function N1(e,t,n,r,i,s){const a=this;let u=0,l;return d;function d(m){return e.enter(r),e.enter(i),e.consume(m),e.exit(i),e.enter(s),h}function h(m){return u>999||m===null||m===91||m===93&&!l||m===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(m):m===93?(e.exit(s),e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):oe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||oe(m)||u++>999?(e.exit("chunkString"),h(m)):(e.consume(m),l||(l=!Te(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),u++,f):f(m)}}function A1(e,t,n,r,i,s){let a;return u;function u(p){return p===34||p===39||p===40?(e.enter(r),e.enter(i),e.consume(p),e.exit(i),a=p===40?41:p,l):n(p)}function l(p){return p===a?(e.enter(i),e.consume(p),e.exit(i),e.exit(r),t):(e.enter(s),d(p))}function d(p){return p===a?(e.exit(s),l(a)):p===null?n(p):oe(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),ke(e,d,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||oe(p)?(e.exit("chunkString"),d(p)):(e.consume(p),p===92?f:h)}function f(p){return p===a||p===92?(e.consume(p),h):h(p)}}function ys(e,t){let n;return r;function r(i){return oe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):Te(i)?ke(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const c_={name:"definition",tokenize:f_},d_={partial:!0,tokenize:h_};function f_(e,t,n){const r=this;let i;return s;function s(m){return e.enter("definition"),a(m)}function a(m){return N1.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function u(m){return i=En(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),m===58?(e.enter("definitionMarker"),e.consume(m),e.exit("definitionMarker"),l):n(m)}function l(m){return Be(m)?ys(e,d)(m):d(m)}function d(m){return C1(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(d_,f,f)(m)}function f(m){return Te(m)?ke(e,p,"whitespace")(m):p(m)}function p(m){return m===null||oe(m)?(e.exit("definition"),r.parser.defined.push(i),t(m)):n(m)}}function h_(e,t,n){return r;function r(u){return Be(u)?ys(e,i)(u):n(u)}function i(u){return A1(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function s(u){return Te(u)?ke(e,a,"whitespace")(u):a(u)}function a(u){return u===null||oe(u)?t(u):n(u)}}const m_={name:"hardBreakEscape",tokenize:p_};function p_(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return oe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const g_={name:"headingAtx",resolve:E_,tokenize:T_};function E_(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},qt(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function T_(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Be(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),l(h)):h===null||oe(h)?(e.exit("atxHeading"),t(h)):Te(h)?ke(e,u,"whitespace")(h):(e.enter("atxHeadingText"),d(h))}function l(h){return h===35?(e.consume(h),l):(e.exit("atxHeadingSequence"),u(h))}function d(h){return h===null||h===35||Be(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),d)}}const y_=["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"],wh=["pre","script","style","textarea"],b_={concrete:!0,name:"htmlFlow",resolveTo:k_,tokenize:S_},x_={partial:!0,tokenize:N_},__={partial:!0,tokenize:C_};function k_(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function S_(e,t,n){const r=this;let i,s,a,u,l;return d;function d(N){return h(N)}function h(N){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(N),f}function f(N){return N===33?(e.consume(N),p):N===47?(e.consume(N),s=!0,x):N===63?(e.consume(N),i=3,r.interrupt?t:_):At(N)?(e.consume(N),a=String.fromCharCode(N),I):n(N)}function p(N){return N===45?(e.consume(N),i=2,m):N===91?(e.consume(N),i=5,u=0,T):At(N)?(e.consume(N),i=4,r.interrupt?t:_):n(N)}function m(N){return N===45?(e.consume(N),r.interrupt?t:_):n(N)}function T(N){const Ne="CDATA[";return N===Ne.charCodeAt(u++)?(e.consume(N),u===Ne.length?r.interrupt?t:te:T):n(N)}function x(N){return At(N)?(e.consume(N),a=String.fromCharCode(N),I):n(N)}function I(N){if(N===null||N===47||N===62||Be(N)){const Ne=N===47,re=a.toLowerCase();return!Ne&&!s&&wh.includes(re)?(i=1,r.interrupt?t(N):te(N)):y_.includes(a.toLowerCase())?(i=6,Ne?(e.consume(N),g):r.interrupt?t(N):te(N)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(N):s?E(N):y(N))}return N===45||yt(N)?(e.consume(N),a+=String.fromCharCode(N),I):n(N)}function g(N){return N===62?(e.consume(N),r.interrupt?t:te):n(N)}function E(N){return Te(N)?(e.consume(N),E):w(N)}function y(N){return N===47?(e.consume(N),w):N===58||N===95||At(N)?(e.consume(N),v):Te(N)?(e.consume(N),y):w(N)}function v(N){return N===45||N===46||N===58||N===95||yt(N)?(e.consume(N),v):O(N)}function O(N){return N===61?(e.consume(N),A):Te(N)?(e.consume(N),O):y(N)}function A(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),l=N,F):Te(N)?(e.consume(N),A):H(N)}function F(N){return N===l?(e.consume(N),l=null,K):N===null||oe(N)?n(N):(e.consume(N),F)}function H(N){return N===null||N===34||N===39||N===47||N===60||N===61||N===62||N===96||Be(N)?O(N):(e.consume(N),H)}function K(N){return N===47||N===62||Te(N)?y(N):n(N)}function w(N){return N===62?(e.consume(N),Y):n(N)}function Y(N){return N===null||oe(N)?te(N):Te(N)?(e.consume(N),Y):n(N)}function te(N){return N===45&&i===2?(e.consume(N),j):N===60&&i===1?(e.consume(N),z):N===62&&i===4?(e.consume(N),Z):N===63&&i===3?(e.consume(N),_):N===93&&i===5?(e.consume(N),G):oe(N)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(x_,fe,ce)(N)):N===null||oe(N)?(e.exit("htmlFlowData"),ce(N)):(e.consume(N),te)}function ce(N){return e.check(__,le,fe)(N)}function le(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),ue}function ue(N){return N===null||oe(N)?ce(N):(e.enter("htmlFlowData"),te(N))}function j(N){return N===45?(e.consume(N),_):te(N)}function z(N){return N===47?(e.consume(N),a="",P):te(N)}function P(N){if(N===62){const Ne=a.toLowerCase();return wh.includes(Ne)?(e.consume(N),Z):te(N)}return At(N)&&a.length<8?(e.consume(N),a+=String.fromCharCode(N),P):te(N)}function G(N){return N===93?(e.consume(N),_):te(N)}function _(N){return N===62?(e.consume(N),Z):N===45&&i===2?(e.consume(N),_):te(N)}function Z(N){return N===null||oe(N)?(e.exit("htmlFlowData"),fe(N)):(e.consume(N),Z)}function fe(N){return e.exit("htmlFlow"),t(N)}}function C_(e,t,n){const r=this;return i;function i(a){return oe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function N_(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ia,t,n)}}const A_={name:"htmlText",tokenize:w_};function w_(e,t,n){const r=this;let i,s,a;return u;function u(_){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(_),l}function l(_){return _===33?(e.consume(_),d):_===47?(e.consume(_),O):_===63?(e.consume(_),y):At(_)?(e.consume(_),H):n(_)}function d(_){return _===45?(e.consume(_),h):_===91?(e.consume(_),s=0,T):At(_)?(e.consume(_),E):n(_)}function h(_){return _===45?(e.consume(_),m):n(_)}function f(_){return _===null?n(_):_===45?(e.consume(_),p):oe(_)?(a=f,z(_)):(e.consume(_),f)}function p(_){return _===45?(e.consume(_),m):f(_)}function m(_){return _===62?j(_):_===45?p(_):f(_)}function T(_){const Z="CDATA[";return _===Z.charCodeAt(s++)?(e.consume(_),s===Z.length?x:T):n(_)}function x(_){return _===null?n(_):_===93?(e.consume(_),I):oe(_)?(a=x,z(_)):(e.consume(_),x)}function I(_){return _===93?(e.consume(_),g):x(_)}function g(_){return _===62?j(_):_===93?(e.consume(_),g):x(_)}function E(_){return _===null||_===62?j(_):oe(_)?(a=E,z(_)):(e.consume(_),E)}function y(_){return _===null?n(_):_===63?(e.consume(_),v):oe(_)?(a=y,z(_)):(e.consume(_),y)}function v(_){return _===62?j(_):y(_)}function O(_){return At(_)?(e.consume(_),A):n(_)}function A(_){return _===45||yt(_)?(e.consume(_),A):F(_)}function F(_){return oe(_)?(a=F,z(_)):Te(_)?(e.consume(_),F):j(_)}function H(_){return _===45||yt(_)?(e.consume(_),H):_===47||_===62||Be(_)?K(_):n(_)}function K(_){return _===47?(e.consume(_),j):_===58||_===95||At(_)?(e.consume(_),w):oe(_)?(a=K,z(_)):Te(_)?(e.consume(_),K):j(_)}function w(_){return _===45||_===46||_===58||_===95||yt(_)?(e.consume(_),w):Y(_)}function Y(_){return _===61?(e.consume(_),te):oe(_)?(a=Y,z(_)):Te(_)?(e.consume(_),Y):K(_)}function te(_){return _===null||_===60||_===61||_===62||_===96?n(_):_===34||_===39?(e.consume(_),i=_,ce):oe(_)?(a=te,z(_)):Te(_)?(e.consume(_),te):(e.consume(_),le)}function ce(_){return _===i?(e.consume(_),i=void 0,ue):_===null?n(_):oe(_)?(a=ce,z(_)):(e.consume(_),ce)}function le(_){return _===null||_===34||_===39||_===60||_===61||_===96?n(_):_===47||_===62||Be(_)?K(_):(e.consume(_),le)}function ue(_){return _===47||_===62||Be(_)?K(_):n(_)}function j(_){return _===62?(e.consume(_),e.exit("htmlTextData"),e.exit("htmlText"),t):n(_)}function z(_){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),P}function P(_){return Te(_)?ke(e,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(_):G(_)}function G(_){return e.enter("htmlTextData"),a(_)}}const kd={name:"labelEnd",resolveAll:D_,resolveTo:R_,tokenize:O_},v_={tokenize:P_},I_={tokenize:M_},L_={tokenize:F_};function D_(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&qt(e,0,e.length,n),e}function R_(e,t){let n=e.length,r=0,i,s,a,u;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},d={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",l,t],["enter",d,t]],u=en(u,e.slice(s+1,s+r+3)),u=en(u,[["enter",h,t]]),u=en(u,rl(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),u=en(u,[["exit",h,t],e[a-2],e[a-1],["exit",d,t]]),u=en(u,e.slice(a+1)),u=en(u,[["exit",l,t]]),qt(e,s,e.length,u),e}function O_(e,t,n){const r=this;let i=r.events.length,s,a;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 u;function u(p){return s?s._inactive?f(p):(a=r.parser.defined.includes(En(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(p),e.exit("labelMarker"),e.exit("labelEnd"),l):n(p)}function l(p){return p===40?e.attempt(v_,h,a?h:f)(p):p===91?e.attempt(I_,h,a?d:f)(p):a?h(p):f(p)}function d(p){return e.attempt(L_,h,f)(p)}function h(p){return t(p)}function f(p){return s._balanced=!0,n(p)}}function P_(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return Be(f)?ys(e,s)(f):s(f)}function s(f){return f===41?h(f):C1(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return Be(f)?ys(e,l)(f):h(f)}function u(f){return n(f)}function l(f){return f===34||f===39||f===40?A1(e,d,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):h(f)}function d(f){return Be(f)?ys(e,h)(f):h(f)}function h(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function M_(e,t,n){const r=this;return i;function i(u){return N1.call(r,e,s,a,"reference","referenceMarker","referenceString")(u)}function s(u){return r.parser.defined.includes(En(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function F_(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const B_={name:"labelStartImage",resolveAll:kd.resolveAll,tokenize:j_};function j_(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),s}function s(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const U_={name:"labelStartLink",resolveAll:kd.resolveAll,tokenize:H_};function H_(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const zl={name:"lineEnding",tokenize:z_};function z_(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),ke(e,t,"linePrefix")}}const Wa={name:"thematicBreak",tokenize:$_};function $_(e,t,n){let r=0,i;return s;function s(d){return e.enter("thematicBreak"),a(d)}function a(d){return i=d,u(d)}function u(d){return d===i?(e.enter("thematicBreakSequence"),l(d)):r>=3&&(d===null||oe(d))?(e.exit("thematicBreak"),t(d)):n(d)}function l(d){return d===i?(e.consume(d),r++,l):(e.exit("thematicBreakSequence"),Te(d)?ke(e,u,"whitespace")(d):u(d))}}const Rt={continuation:{tokenize:q_},exit:G_,name:"list",tokenize:W_},Y_={partial:!0,tokenize:K_},V_={partial:!0,tokenize:Q_};function W_(e,t,n){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,a=0;return u;function u(m){const T=r.containerState.type||(m===42||m===43||m===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||m===r.containerState.marker:nc(m)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),m===42||m===45?e.check(Wa,n,d)(m):d(m);if(!r.interrupt||m===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(m)}return n(m)}function l(m){return nc(m)&&++a<10?(e.consume(m),l):(!r.interrupt||a<2)&&(r.containerState.marker?m===r.containerState.marker:m===41||m===46)?(e.exit("listItemValue"),d(m)):n(m)}function d(m){return e.enter("listItemMarker"),e.consume(m),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||m,e.check(ia,r.interrupt?n:h,e.attempt(Y_,p,f))}function h(m){return r.containerState.initialBlankLine=!0,s++,p(m)}function f(m){return Te(m)?(e.enter("listItemPrefixWhitespace"),e.consume(m),e.exit("listItemPrefixWhitespace"),p):n(m)}function p(m){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(m)}}function q_(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ia,i,s);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,ke(e,t,"listItemIndent",r.containerState.size+1)(u)}function s(u){return r.containerState.furtherBlankLines||!Te(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(V_,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,ke(e,e.attempt(Rt,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function Q_(e,t,n){const r=this;return ke(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function G_(e){e.exit(this.containerState.type)}function K_(e,t,n){const r=this;return ke(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!Te(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const vh={name:"setextUnderline",resolveTo:X_,tokenize:J_};function X_(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function J_(e,t,n){const r=this;let i;return s;function s(d){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),i=d,a(d)):n(d)}function a(d){return e.enter("setextHeadingLineSequence"),u(d)}function u(d){return d===i?(e.consume(d),u):(e.exit("setextHeadingLineSequence"),Te(d)?ke(e,l,"lineSuffix")(d):l(d))}function l(d){return d===null||oe(d)?(e.exit("setextHeadingLine"),t(d)):n(d)}}const Z_={tokenize:ek};function ek(e){const t=this,n=e.attempt(ia,r,e.attempt(this.parser.constructs.flowInitial,i,ke(e,e.attempt(this.parser.constructs.flow,i,e.attempt(s_,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const tk={resolveAll:v1()},nk=w1("string"),rk=w1("text");function w1(e){return{resolveAll:v1(e==="text"?ik:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,u);return a;function a(h){return d(h)?s(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),l}function l(h){return d(h)?(n.exit("data"),s(h)):(n.consume(h),l)}function d(h){if(h===null)return!0;const f=i[h];let p=-1;if(f)for(;++p<f.length;){const m=f[p];if(!m.previous||m.previous.call(r,r.previous))return!0}return!1}}}function v1(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function ik(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,u=0,l;for(;s--;){const d=i[s];if(typeof d=="string"){for(a=d.length;d.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(d===-2)l=!0,u++;else if(d!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const d={type:n===e.length||l||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...d.start},r.start.offset===r.end.offset?Object.assign(r,d):(e.splice(n,0,["enter",d,t],["exit",d,t]),n+=2)}n++}return e}const sk={42:Rt,43:Rt,45:Rt,48:Rt,49:Rt,50:Rt,51:Rt,52:Rt,53:Rt,54:Rt,55:Rt,56:Rt,57:Rt,62:x1},ak={91:c_},uk={[-2]:Hl,[-1]:Hl,32:Hl},lk={35:g_,42:Wa,45:[vh,Wa],60:b_,61:vh,95:Wa,96:Ah,126:Ah},ok={38:k1,92:_1},ck={[-5]:zl,[-4]:zl,[-3]:zl,33:B_,38:k1,42:rc,60:[Ux,A_],91:U_,92:[m_,_1],93:kd,95:rc,96:Zx},dk={null:[rc,tk]},fk={null:[42,95]},hk={null:[]},mk=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:fk,contentInitial:ak,disable:hk,document:sk,flow:lk,flowInitial:uk,insideSpan:dk,string:ok,text:ck},Symbol.toStringTag,{value:"Module"}));function pk(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],u=[];const l={attempt:F(O),check:F(A),consume:E,enter:y,exit:v,interrupt:F(A,{interrupt:!0})},d={code:null,containerState:{},defineSkip:x,events:[],now:T,parser:e,previous:null,sliceSerialize:p,sliceStream:m,write:f};let h=t.tokenize.call(d,l);return t.resolveAll&&s.push(t),d;function f(Y){return a=en(a,Y),I(),a[a.length-1]!==null?[]:(H(t,0),d.events=rl(s,d.events,d),d.events)}function p(Y,te){return Ek(m(Y),te)}function m(Y){return gk(a,Y)}function T(){const{_bufferIndex:Y,_index:te,line:ce,column:le,offset:ue}=r;return{_bufferIndex:Y,_index:te,line:ce,column:le,offset:ue}}function x(Y){i[Y.line]=Y.column,w()}function I(){let Y;for(;r._index<a.length;){const te=a[r._index];if(typeof te=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<te.length;)g(te.charCodeAt(r._bufferIndex));else g(te)}}function g(Y){h=h(Y)}function E(Y){oe(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,w()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),d.previous=Y}function y(Y,te){const ce=te||{};return ce.type=Y,ce.start=T(),d.events.push(["enter",ce,d]),u.push(ce),ce}function v(Y){const te=u.pop();return te.end=T(),d.events.push(["exit",te,d]),te}function O(Y,te){H(Y,te.from)}function A(Y,te){te.restore()}function F(Y,te){return ce;function ce(le,ue,j){let z,P,G,_;return Array.isArray(le)?fe(le):"tokenize"in le?fe([le]):Z(le);function Z(me){return ve;function ve(De){const He=De!==null&&me[De],R=De!==null&&me.null,W=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(R)?R:R?[R]:[]];return fe(W)(De)}}function fe(me){return z=me,P=0,me.length===0?j:N(me[P])}function N(me){return ve;function ve(De){return _=K(),G=me,me.partial||(d.currentConstruct=me),me.name&&d.parser.constructs.disable.null.includes(me.name)?re():me.tokenize.call(te?Object.assign(Object.create(d),te):d,l,Ne,re)(De)}}function Ne(me){return Y(G,_),ue}function re(me){return _.restore(),++P<z.length?N(z[P]):j}}}function H(Y,te){Y.resolveAll&&!s.includes(Y)&&s.push(Y),Y.resolve&&qt(d.events,te,d.events.length-te,Y.resolve(d.events.slice(te),d)),Y.resolveTo&&(d.events=Y.resolveTo(d.events,d))}function K(){const Y=T(),te=d.previous,ce=d.currentConstruct,le=d.events.length,ue=Array.from(u);return{from:le,restore:j};function j(){r=Y,d.previous=te,d.currentConstruct=ce,d.events.length=le,u=ue,w()}}function w(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function gk(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Ek(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
380
- `;break}case-3:{a=`\r
381
- `;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Tk(e){const r={constructs:y1([mk,...(e||{}).extensions||[]]),content:i(Rx),defined:[],document:i(Px),flow:i(Z_),lazy:{},string:i(nk),text:i(rk)};return r;function i(s){return a;function a(u){return pk(r,s,u)}}}function yk(e){for(;!S1(e););return e}const Ih=/[\0\t\n\r]/g;function bk(){let e=1,t="",n=!0,r;return i;function i(s,a,u){const l=[];let d,h,f,p,m;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,t="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(Ih.lastIndex=f,d=Ih.exec(s),p=d&&d.index!==void 0?d.index:s.length,m=s.charCodeAt(p),!d){t=s.slice(f);break}if(m===10&&f===p&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<p&&(l.push(s.slice(f,p)),e+=p-f),m){case 0:{l.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,l.push(-2);e++<h;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=p+1}return u&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const xk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _k(e){return e.replace(xk,kk)}function kk(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return b1(n.slice(s?2:1),s?16:10)}return _d(n)||e}const I1={}.hasOwnProperty;function Sk(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Ck(n)(yk(Tk(n).document().write(bk()(e,t,!0))))}function Ck(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(kt),autolinkProtocol:K,autolinkEmail:K,atxHeading:s(Re),blockQuote:s(R),characterEscape:K,characterReference:K,codeFenced:s(W),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(W,a),codeText:s(de,a),codeTextData:K,data:K,codeFlowValue:K,definition:s(Ae),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(be),hardBreakEscape:s(ze),hardBreakTrailing:s(ze),htmlFlow:s(Gn,a),htmlFlowData:K,htmlText:s(Gn,a),htmlTextData:K,image:s(Nr),label:a,link:s(kt),listItem:s(Ve),listItemValue:p,listOrdered:s(Se,f),listUnordered:s(Se),paragraph:s(St),reference:N,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(Re),strong:s(bn),thematicBreak:s(ct)},exit:{atxHeading:l(),atxHeadingSequence:O,autolink:l(),autolinkEmail:He,autolinkProtocol:De,blockQuote:l(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:me,characterReference:ve,codeFenced:l(I),codeFencedFence:x,codeFencedFenceInfo:m,codeFencedFenceMeta:T,codeFlowValue:w,codeIndented:l(g),codeText:l(ue),codeTextData:w,data:w,definition:l(),definitionDestinationString:v,definitionLabelString:E,definitionTitleString:y,emphasis:l(),hardBreakEscape:l(te),hardBreakTrailing:l(te),htmlFlow:l(ce),htmlFlowData:w,htmlText:l(le),htmlTextData:w,image:l(z),label:G,labelText:P,lineEnding:Y,link:l(j),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Ne,resourceDestinationString:_,resourceTitleString:Z,resource:fe,setextHeading:l(H),setextHeadingLineSequence:F,setextHeadingText:A,strong:l(),thematicBreak:l()}};L1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(U){let X={type:"root",children:[]};const he={stack:[X],tokenStack:[],config:t,enter:u,exit:d,buffer:a,resume:h,data:n},ge=[];let Ie=-1;for(;++Ie<U.length;)if(U[Ie][1].type==="listOrdered"||U[Ie][1].type==="listUnordered")if(U[Ie][0]==="enter")ge.push(Ie);else{const st=ge.pop();Ie=i(U,st,Ie)}for(Ie=-1;++Ie<U.length;){const st=t[U[Ie][0]];I1.call(st,U[Ie][1].type)&&st[U[Ie][1].type].call(Object.assign({sliceSerialize:U[Ie][2].sliceSerialize},he),U[Ie][1])}if(he.tokenStack.length>0){const st=he.tokenStack[he.tokenStack.length-1];(st[1]||Lh).call(he,void 0,st[0])}for(X.position={start:Zn(U.length>0?U[0][1].start:{line:1,column:1,offset:0}),end:Zn(U.length>0?U[U.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)X=t.transforms[Ie](X)||X;return X}function i(U,X,he){let ge=X-1,Ie=-1,st=!1,Rn,un,On,Ar;for(;++ge<=he;){const Ct=U[ge];switch(Ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ct[0]==="enter"?Ie++:Ie--,Ar=void 0;break}case"lineEndingBlank":{Ct[0]==="enter"&&(Rn&&!Ar&&!Ie&&!On&&(On=ge),Ar=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ar=void 0}if(!Ie&&Ct[0]==="enter"&&Ct[1].type==="listItemPrefix"||Ie===-1&&Ct[0]==="exit"&&(Ct[1].type==="listUnordered"||Ct[1].type==="listOrdered")){if(Rn){let Kn=ge;for(un=void 0;Kn--;){const ln=U[Kn];if(ln[1].type==="lineEnding"||ln[1].type==="lineEndingBlank"){if(ln[0]==="exit")continue;un&&(U[un][1].type="lineEndingBlank",st=!0),ln[1].type="lineEnding",un=Kn}else if(!(ln[1].type==="linePrefix"||ln[1].type==="blockQuotePrefix"||ln[1].type==="blockQuotePrefixWhitespace"||ln[1].type==="blockQuoteMarker"||ln[1].type==="listItemIndent"))break}On&&(!un||On<un)&&(Rn._spread=!0),Rn.end=Object.assign({},un?U[un][1].start:Ct[1].end),U.splice(un||ge,0,["exit",Rn,Ct[2]]),ge++,he++}if(Ct[1].type==="listItemPrefix"){const Kn={type:"listItem",_spread:!1,start:Object.assign({},Ct[1].start),end:void 0};Rn=Kn,U.splice(ge,0,["enter",Kn,Ct[2]]),ge++,he++,On=void 0,Ar=!0}}}return U[X][1]._spread=st,he}function s(U,X){return he;function he(ge){u.call(this,U(ge),ge),X&&X.call(this,ge)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(U,X,he){this.stack[this.stack.length-1].children.push(U),this.stack.push(U),this.tokenStack.push([X,he||void 0]),U.position={start:Zn(X.start),end:void 0}}function l(U){return X;function X(he){U&&U.call(this,he),d.call(this,he)}}function d(U,X){const he=this.stack.pop(),ge=this.tokenStack.pop();if(ge)ge[0].type!==U.type&&(X?X.call(this,U,ge[0]):(ge[1]||Lh).call(this,U,ge[0]));else throw new Error("Cannot close `"+U.type+"` ("+Ts({start:U.start,end:U.end})+"): it’s not open");he.position.end=Zn(U.end)}function h(){return xd(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(U){if(this.data.expectingFirstListItemValue){const X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(U),10),this.data.expectingFirstListItemValue=void 0}}function m(){const U=this.resume(),X=this.stack[this.stack.length-1];X.lang=U}function T(){const U=this.resume(),X=this.stack[this.stack.length-1];X.meta=U}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U.replace(/(\r?\n|\r)$/g,"")}function E(U){const X=this.resume(),he=this.stack[this.stack.length-1];he.label=X,he.identifier=En(this.sliceSerialize(U)).toLowerCase()}function y(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function v(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function O(U){const X=this.stack[this.stack.length-1];if(!X.depth){const he=this.sliceSerialize(U).length;X.depth=he}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function F(U){const X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(U).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function K(U){const he=this.stack[this.stack.length-1].children;let ge=he[he.length-1];(!ge||ge.type!=="text")&&(ge=Ht(),ge.position={start:Zn(U.start),end:void 0},he.push(ge)),this.stack.push(ge)}function w(U){const X=this.stack.pop();X.value+=this.sliceSerialize(U),X.position.end=Zn(U.end)}function Y(U){const X=this.stack[this.stack.length-1];if(this.data.atHardBreak){const he=X.children[X.children.length-1];he.position.end=Zn(U.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(K.call(this,U),w.call(this,U))}function te(){this.data.atHardBreak=!0}function ce(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function le(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function ue(){const U=this.resume(),X=this.stack[this.stack.length-1];X.value=U}function j(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function z(){const U=this.stack[this.stack.length-1];if(this.data.inReference){const X=this.data.referenceType||"shortcut";U.type+="Reference",U.referenceType=X,delete U.url,delete U.title}else delete U.identifier,delete U.label;this.data.referenceType=void 0}function P(U){const X=this.sliceSerialize(U),he=this.stack[this.stack.length-2];he.label=_k(X),he.identifier=En(X).toLowerCase()}function G(){const U=this.stack[this.stack.length-1],X=this.resume(),he=this.stack[this.stack.length-1];if(this.data.inReference=!0,he.type==="link"){const ge=U.children;he.children=ge}else he.alt=X}function _(){const U=this.resume(),X=this.stack[this.stack.length-1];X.url=U}function Z(){const U=this.resume(),X=this.stack[this.stack.length-1];X.title=U}function fe(){this.data.inReference=void 0}function N(){this.data.referenceType="collapsed"}function Ne(U){const X=this.resume(),he=this.stack[this.stack.length-1];he.label=X,he.identifier=En(this.sliceSerialize(U)).toLowerCase(),this.data.referenceType="full"}function re(U){this.data.characterReferenceType=U.type}function me(U){const X=this.sliceSerialize(U),he=this.data.characterReferenceType;let ge;he?(ge=b1(X,he==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ge=_d(X);const Ie=this.stack[this.stack.length-1];Ie.value+=ge}function ve(U){const X=this.stack.pop();X.position.end=Zn(U.end)}function De(U){w.call(this,U);const X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(U)}function He(U){w.call(this,U);const X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(U)}function R(){return{type:"blockquote",children:[]}}function W(){return{type:"code",lang:null,meta:null,value:""}}function de(){return{type:"inlineCode",value:""}}function Ae(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function be(){return{type:"emphasis",children:[]}}function Re(){return{type:"heading",depth:0,children:[]}}function ze(){return{type:"break"}}function Gn(){return{type:"html",value:""}}function Nr(){return{type:"image",title:null,url:"",alt:null}}function kt(){return{type:"link",title:null,url:"",children:[]}}function Se(U){return{type:"list",ordered:U.type==="listOrdered",start:null,spread:U._spread,children:[]}}function Ve(U){return{type:"listItem",spread:U._spread,checked:null,children:[]}}function St(){return{type:"paragraph",children:[]}}function bn(){return{type:"strong",children:[]}}function Ht(){return{type:"text",value:""}}function ct(){return{type:"thematicBreak"}}}function Zn(e){return{line:e.line,column:e.column,offset:e.offset}}function L1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?L1(e,r):Nk(e,r)}}function Nk(e,t){let n;for(n in t)if(I1.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Lh(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ts({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ts({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ts({start:t.start,end:t.end})+") is still open")}function Ak(e){const t=this;t.parser=n;function n(r){return Sk(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function wk(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function vk(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
382
- `}]}function Ik(e,t){const n=t.value?t.value+`
383
- `:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function Lk(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Dk(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Rk(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=ji(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,u+=1,e.footnoteCounts.set(r,u);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const d={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,d),e.applyData(t,d)}function Ok(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Pk(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function D1(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function Mk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return D1(e,t);const i={src:ji(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function Fk(e,t){const n={src:ji(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Bk(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function jk(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return D1(e,t);const i={href:ji(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function Uk(e,t){const n={href:ji(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Hk(e,t,n){const r=e.all(t),i=n?zk(n):R1(t),s={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
384
- `}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
385
- `});const d={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,d),e.applyData(t,d)}function zk(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=R1(n[r])}return t}function R1(e){const t=e.spread;return t??e.children.length>1}function $k(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function Yk(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Vk(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Wk(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function qk(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=Ln(t.children[1]),l=tl(t.children[t.children.length-1]);u&&l&&(a.position={start:u,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function Qk(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let l=-1;const d=[];for(;++l<u;){const f=t.children[l],p={},m=a?a[l]:void 0;m&&(p.align=m);let T={type:"element",tagName:s,properties:p,children:[]};f&&(T.children=e.all(f),e.patch(f,T),T=e.applyData(f,T)),d.push(T)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(d,!0)};return e.patch(t,h),e.applyData(t,h)}function Gk(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Dh=9,Rh=32;function Kk(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Oh(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Oh(t.slice(i),i>0,!1)),s.join("")}function Oh(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===Dh||s===Rh;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===Dh||s===Rh;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Xk(e,t){const n={type:"text",value:Kk(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Jk(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Zk={blockquote:wk,break:vk,code:Ik,delete:Lk,emphasis:Dk,footnoteReference:Rk,heading:Ok,html:Pk,imageReference:Mk,image:Fk,inlineCode:Bk,linkReference:jk,link:Uk,listItem:Hk,list:$k,paragraph:Yk,root:Vk,strong:Wk,table:qk,tableCell:Gk,tableRow:Qk,text:Xk,thematicBreak:Jk,toml:Ca,yaml:Ca,definition:Ca,footnoteDefinition:Ca};function Ca(){}const O1=-1,il=0,bs=1,Nu=2,Sd=3,Cd=4,Nd=5,Ad=6,P1=7,M1=8,Ph=typeof self=="object"?self:globalThis,eS=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case il:case O1:return n(a,i);case bs:{const u=n([],i);for(const l of a)u.push(r(l));return u}case Nu:{const u=n({},i);for(const[l,d]of a)u[r(l)]=r(d);return u}case Sd:return n(new Date(a),i);case Cd:{const{source:u,flags:l}=a;return n(new RegExp(u,l),i)}case Nd:{const u=n(new Map,i);for(const[l,d]of a)u.set(r(l),r(d));return u}case Ad:{const u=n(new Set,i);for(const l of a)u.add(r(l));return u}case P1:{const{name:u,message:l}=a;return n(new Ph[u](l),i)}case M1:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new Ph[s](a),i)};return r},Mh=e=>eS(new Map,e)(0),Jr="",{toString:tS}={},{keys:nS}=Object,es=e=>{const t=typeof e;if(t!=="object"||!e)return[il,t];const n=tS.call(e).slice(8,-1);switch(n){case"Array":return[bs,Jr];case"Object":return[Nu,Jr];case"Date":return[Sd,Jr];case"RegExp":return[Cd,Jr];case"Map":return[Nd,Jr];case"Set":return[Ad,Jr];case"DataView":return[bs,n]}return n.includes("Array")?[bs,n]:n.includes("Error")?[P1,n]:[Nu,n]},Na=([e,t])=>e===il&&(t==="function"||t==="symbol"),rS=(e,t,n,r)=>{const i=(a,u)=>{const l=r.push(a)-1;return n.set(u,l),l},s=a=>{if(n.has(a))return n.get(a);let[u,l]=es(a);switch(u){case il:{let h=a;switch(l){case"bigint":u=M1,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);h=null;break;case"undefined":return i([O1],a)}return i([u,h],a)}case bs:{if(l){let p=a;return l==="DataView"?p=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(p=new Uint8Array(a)),i([l,[...p]],a)}const h=[],f=i([u,h],a);for(const p of a)h.push(s(p));return f}case Nu:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const h=[],f=i([u,h],a);for(const p of nS(a))(e||!Na(es(a[p])))&&h.push([s(p),s(a[p])]);return f}case Sd:return i([u,a.toISOString()],a);case Cd:{const{source:h,flags:f}=a;return i([u,{source:h,flags:f}],a)}case Nd:{const h=[],f=i([u,h],a);for(const[p,m]of a)(e||!(Na(es(p))||Na(es(m))))&&h.push([s(p),s(m)]);return f}case Ad:{const h=[],f=i([u,h],a);for(const p of a)(e||!Na(es(p)))&&h.push(s(p));return f}}const{message:d}=a;return i([u,{name:l,message:d}],a)};return s},Fh=(e,{json:t,lossy:n}={})=>{const r=[];return rS(!(t||n),!!t,new Map,r)(e),r},Ri=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Mh(Fh(e,t)):structuredClone(e):(e,t)=>Mh(Fh(e,t));function iS(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function sS(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function aS(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||iS,r=e.options.footnoteBackLabel||sS,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let l=-1;for(;++l<e.footnoteOrder.length;){const d=e.footnoteById.get(e.footnoteOrder[l]);if(!d)continue;const h=e.all(d),f=String(d.identifier).toUpperCase(),p=ji(f.toLowerCase());let m=0;const T=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++m<=x;){T.length>0&&T.push({type:"text",value:" "});let E=typeof n=="string"?n:n(l,m);typeof E=="string"&&(E={type:"text",value:E}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+p+(m>1?"-"+m:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,m),className:["data-footnote-backref"]},children:Array.isArray(E)?E:[E]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const E=I.children[I.children.length-1];E&&E.type==="text"?E.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...T)}else h.push(...T);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+p},children:e.wrap(h,!0)};e.patch(d,g),u.push(g)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ri(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
386
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
387
- `}]}}const sl=function(e){if(e==null)return cS;if(typeof e=="function")return al(e);if(typeof e=="object")return Array.isArray(e)?uS(e):lS(e);if(typeof e=="string")return oS(e);throw new Error("Expected function, string, or object as test")};function uS(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=sl(e[n]);return al(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function lS(e){const t=e;return al(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function oS(e){return al(t);function t(n){return n&&n.type===e}}function al(e){return t;function t(n,r,i){return!!(dS(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function cS(){return!0}function dS(e){return e!==null&&typeof e=="object"&&"type"in e}const F1=[],fS=!0,ic=!1,hS="skip";function B1(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=sl(i),a=r?-1:1;u(e,void 0,[])();function u(l,d,h){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const m=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(p,"name",{value:"node ("+(l.type+(m?"<"+m+">":""))+")"})}return p;function p(){let m=F1,T,x,I;if((!t||s(l,d,h[h.length-1]||void 0))&&(m=mS(n(l,h)),m[0]===ic))return m;if("children"in l&&l.children){const g=l;if(g.children&&m[0]!==hS)for(x=(r?g.children.length:-1)+a,I=h.concat(g);x>-1&&x<g.children.length;){const E=g.children[x];if(T=u(E,x,I)(),T[0]===ic)return T;x=typeof T[1]=="number"?T[1]:x+a}}return m}}}function mS(e){return Array.isArray(e)?e:typeof e=="number"?[fS,e]:e==null?F1:[e]}function ul(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),B1(e,s,u,i);function u(l,d){const h=d[d.length-1],f=h?h.children.indexOf(l):void 0;return a(l,f,h)}}const sc={}.hasOwnProperty,pS={};function gS(e,t){const n=t||pS,r=new Map,i=new Map,s=new Map,a={...Zk,...n.handlers},u={all:d,applyData:TS,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:ES,wrap:bS};return ul(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const f=h.type==="definition"?r:i,p=String(h.identifier).toUpperCase();f.has(p)||f.set(p,h)}}),u;function l(h,f){const p=h.type,m=u.handlers[p];if(sc.call(u.handlers,p)&&m)return m(u,h,f);if(u.options.passThrough&&u.options.passThrough.includes(p)){if("children"in h){const{children:x,...I}=h,g=Ri(I);return g.children=u.all(h),g}return Ri(h)}return(u.options.unknownHandler||yS)(u,h,f)}function d(h){const f=[];if("children"in h){const p=h.children;let m=-1;for(;++m<p.length;){const T=u.one(p[m],h);if(T){if(m&&p[m-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=Bh(T.value)),!Array.isArray(T)&&T.type==="element")){const x=T.children[0];x&&x.type==="text"&&(x.value=Bh(x.value))}Array.isArray(T)?f.push(...T):f.push(T)}}}return f}}function ES(e,t){e.position&&(t.position=sx(e))}function TS(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Ri(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function yS(e,t){const n=t.data||{},r="value"in t&&!(sc.call(n,"hProperties")||sc.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function bS(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
388
- `});++r<e.length;)r&&n.push({type:"text",value:`
389
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
390
- `}),n}function Bh(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function jh(e,t){const n=gS(e,t),r=n.one(e,void 0),i=aS(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
391
- `},i),s}function xS(e,t){return e&&"run"in e?async function(n,r){const i=jh(n,{file:r,...t});await e.run(i,r)}:function(n,r){return jh(n,{file:r,...e||t})}}function Uh(e){if(e)throw e}var qa=Object.prototype.hasOwnProperty,j1=Object.prototype.toString,Hh=Object.defineProperty,zh=Object.getOwnPropertyDescriptor,$h=function(t){return typeof Array.isArray=="function"?Array.isArray(t):j1.call(t)==="[object Array]"},Yh=function(t){if(!t||j1.call(t)!=="[object Object]")return!1;var n=qa.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&qa.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||qa.call(t,i)},Vh=function(t,n){Hh&&n.name==="__proto__"?Hh(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Wh=function(t,n){if(n==="__proto__")if(qa.call(t,n)){if(zh)return zh(t,n).value}else return;return t[n]},_S=function e(){var t,n,r,i,s,a,u=arguments[0],l=1,d=arguments.length,h=!1;for(typeof u=="boolean"&&(h=u,u=arguments[1]||{},l=2),(u==null||typeof u!="object"&&typeof u!="function")&&(u={});l<d;++l)if(t=arguments[l],t!=null)for(n in t)r=Wh(u,n),i=Wh(t,n),u!==i&&(h&&i&&(Yh(i)||(s=$h(i)))?(s?(s=!1,a=r&&$h(r)?r:[]):a=r&&Yh(r)?r:{},Vh(u,{name:n,newValue:e(h,a,i)})):typeof i<"u"&&Vh(u,{name:n,newValue:i}));return u};const $l=Ou(_S);function ac(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function kS(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(l,...d){const h=e[++s];let f=-1;if(l){a(l);return}for(;++f<i.length;)(d[f]===null||d[f]===void 0)&&(d[f]=i[f]);i=d,h?SS(h,u)(...d):a(null,...d)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function SS(e,t){let n;return r;function r(...a){const u=e.length>a.length;let l;u&&a.push(i);try{l=e.apply(this,a)}catch(d){const h=d;if(u&&n)throw h;return i(h)}u||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...u){n||(n=!0,t(a,...u))}function s(a){i(null,a)}}const Cn={basename:CS,dirname:NS,extname:AS,join:wS,sep:"/"};function CS(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');sa(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function NS(e){if(sa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function AS(e){sa(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function wS(...e){let t=-1,n;for(;++t<e.length;)sa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vS(n)}function vS(e){sa(e);const t=e.codePointAt(0)===47;let n=IS(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function IS(e,t){let n="",r=0,i=-1,s=0,a=-1,u,l;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else u===46&&s>-1?s++:s=-1}return n}function sa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const LS={cwd:DS};function DS(){return"/"}function uc(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RS(e){if(typeof e=="string")e=new URL(e);else if(!uc(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return OS(e)}function OS(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Yl=["history","path","basename","stem","extname","dirname"];class U1{constructor(t){let n;t?uc(t)?n={path:t}:typeof t=="string"||PS(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":LS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Yl.length;){const s=Yl[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)Yl.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Cn.basename(this.path):void 0}set basename(t){Wl(t,"basename"),Vl(t,"basename"),this.path=Cn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Cn.dirname(this.path):void 0}set dirname(t){qh(this.basename,"dirname"),this.path=Cn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Cn.extname(this.path):void 0}set extname(t){if(Vl(t,"extname"),qh(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Cn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){uc(t)&&(t=RS(t)),Wl(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Cn.basename(this.path,this.extname):void 0}set stem(t){Wl(t,"stem"),Vl(t,"stem"),this.path=Cn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new xt(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vl(e,t){if(e&&e.includes(Cn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Cn.sep+"`")}function Wl(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qh(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function PS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MS=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},FS={}.hasOwnProperty;class wd extends MS{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=kS()}copy(){const t=new wd;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data($l(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Gl("data",this.frozen),this.namespace[t]=n,this):FS.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gl("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Aa(t),r=this.parser||this.Parser;return ql("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),ql("process",this.parser||this.Parser),Ql("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const u=Aa(t),l=r.parse(u);r.run(l,u,function(h,f,p){if(h||!f||!p)return d(h);const m=f,T=r.stringify(m,p);US(T)?p.value=T:p.result=T,d(h,p)});function d(h,f){h||!f?a(h):s?s(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),ql("processSync",this.parser||this.Parser),Ql("processSync",this.compiler||this.Compiler),this.process(t,i),Gh("processSync","process",n),r;function i(s,a){n=!0,Uh(s),r=a}}run(t,n,r){Qh(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,u){const l=Aa(n);i.run(t,l,d);function d(h,f,p){const m=f||t;h?u(h):a?a(m):r(void 0,m,p)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),Gh("runSync","run",r),i;function s(a,u){Uh(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=Aa(n),i=this.compiler||this.Compiler;return Ql("stringify",i),Qh(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Gl("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(d){if(typeof d=="function")l(d,[]);else if(typeof d=="object")if(Array.isArray(d)){const[h,...f]=d;l(h,f)}else a(d);else throw new TypeError("Expected usable value, not `"+d+"`")}function a(d){if(!("plugins"in d)&&!("settings"in d))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");u(d.plugins),d.settings&&(i.settings=$l(!0,i.settings,d.settings))}function u(d){let h=-1;if(d!=null)if(Array.isArray(d))for(;++h<d.length;){const f=d[h];s(f)}else throw new TypeError("Expected a list of plugins, not `"+d+"`")}function l(d,h){let f=-1,p=-1;for(;++f<r.length;)if(r[f][0]===d){p=f;break}if(p===-1)r.push([d,...h]);else if(h.length>0){let[m,...T]=h;const x=r[p][1];ac(x)&&ac(m)&&(m=$l(!0,x,m)),r[p]=[d,m,...T]}}}}const BS=new wd().freeze();function ql(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Ql(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gl(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qh(e){if(!ac(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Gh(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Aa(e){return jS(e)?e:new U1(e)}function jS(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function US(e){return typeof e=="string"||HS(e)}function HS(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const zS="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Kh=[],Xh={allowDangerousHtml:!0},$S=/^(https?|ircs?|mailto|xmpp)$/i,YS=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function VS(e){const t=WS(e),n=qS(e);return QS(t.runSync(t.parse(n),n),e)}function WS(e){const t=e.rehypePlugins||Kh,n=e.remarkPlugins||Kh,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Xh}:Xh;return BS().use(Ak).use(n).use(xS,r).use(t)}function qS(e){const t=e.children||"",n=new U1;return typeof t=="string"&&(n.value=t),n}function QS(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,l=t.urlTransform||GS;for(const h of YS)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+zS+h.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),ul(e,d),cx(e,{Fragment:c.Fragment,components:i,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function d(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in Ul)if(Object.hasOwn(Ul,m)&&Object.hasOwn(h.properties,m)){const T=h.properties[m],x=Ul[m];(x===null||x.includes(h.tagName))&&(h.properties[m]=l(String(T||""),m,h))}}if(h.type==="element"){let m=n?!n.includes(h.tagName):s?s.includes(h.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(h,f,p)),m&&p&&typeof f=="number")return u&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function GS(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||$S.test(e.slice(0,t))?e:""}const Jh=/[#.]/g;function KS(e,t){const n=e||"",r={};let i=0,s,a;for(;i<n.length;){Jh.lastIndex=i;const u=Jh.exec(n),l=n.slice(i,u?u.index:n.length);l&&(s?s==="#"?r.id=l:Array.isArray(r.className)?r.className.push(l):r.className=[l]:a=l,i+=l.length),u&&(s=u[0],i++)}return{type:"element",tagName:a||t||"div",properties:r,children:[]}}function H1(e,t,n){const r=n?e3(n):void 0;function i(s,a,...u){let l;if(s==null){l={type:"root",children:[]};const d=a;u.unshift(d)}else{l=KS(s,t);const d=l.tagName.toLowerCase(),h=r?r.get(d):void 0;if(l.tagName=h||d,XS(a))u.unshift(a);else for(const[f,p]of Object.entries(a))JS(e,l.properties,f,p)}for(const d of u)lc(l.children,d);return l.type==="element"&&l.tagName==="template"&&(l.content={type:"root",children:l.children},l.children=[]),l}return i}function XS(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const a of s)if(typeof a!="number"&&typeof a!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function JS(e,t,n,r){const i=Zu(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=hh(r):i.commaSeparated?s=lh(r):i.commaOrSpaceSeparated?s=hh(lh(r).join(" ")):s=Zh(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?ZS(r):String(r);if(Array.isArray(s)){const a=[];for(const u of s)a.push(Zh(i,i.property,u));s=a}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function lc(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)lc(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?lc(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Zh(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Vs(n)===Vs(t)))return!0}return n}function ZS(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function e3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const t3=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],n3=H1(ra,"div"),r3=H1(Sr,"g",t3);function i3(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let a=0;for(;;){let u=n[a];if(u===void 0){const l=e0(t,n[a-1]);u=l===-1?t.length+1:l+1,n[a]=u}if(u>s)return{line:a+1,column:s-(a>0?n[a-1]:0)+1,offset:s};a++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const u=n[n.length-1],l=e0(t,u),d=l===-1?t.length+1:l+1;if(u===d)break;n.push(d)}const a=(s.line>1?n[s.line-2]:0)+s.column-1;if(a<n[s.line-1])return a}}}function e0(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
392
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Mr={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},z1={}.hasOwnProperty,s3=Object.prototype;function a3(e,t){const n=t||{};return vd({file:n.file||void 0,location:!1,schema:n.space==="svg"?Sr:ra,verbose:n.verbose||!1},e)}function vd(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Qa(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:$1(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),a=i3(s),u=a.toPoint(0),l=a.toPoint(s.length);n.position={start:u,end:l}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Qa(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Qa(e,r,n),n}default:return n=u3(e,t),n}}function $1(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=vd(e,t[n]);r.push(i)}return r}function u3(e,t){const n=e.schema;e.schema=t.namespaceURI===Mr.svg?Sr:ra;let r=-1;const i={};for(;++r<t.attrs.length;){const u=t.attrs[r],l=(u.prefix?u.prefix+":":"")+u.name;z1.call(s3,l)||(i[l]=u.value)}const a=(e.schema.space==="svg"?r3:n3)(t.tagName,i,$1(e,t.childNodes));if(Qa(e,t,a),a.tagName==="template"){const u=t,l=u.sourceCodeLocation,d=l&&l.startTag&&mi(l.startTag),h=l&&l.endTag&&mi(l.endTag),f=vd(e,u.content);d&&h&&e.file&&(f.position={start:d.end,end:h.start}),a.content=f}return e.schema=n,a}function Qa(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=l3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function l3(e,t,n){const r=mi(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let a;if(n.attrs)for(a in n.attrs)z1.call(n.attrs,a)&&(s[Zu(e.schema,a).property]=mi(n.attrs[a]));n.startTag;const u=mi(n.startTag),l=n.endTag?mi(n.endTag):void 0,d={opening:u};l&&(d.closing=l),d.properties=s,t.data={position:d}}}return r}function mi(e){const t=t0({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=t0({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function t0(e){return e.line&&e.column?e:void 0}const n0={}.hasOwnProperty;function Y1(e,t){const n=t||{};function r(i,...s){let a=r.invalid;const u=r.handlers;if(i&&n0.call(i,e)){const l=String(i[e]);a=n0.call(u,l)?u[l]:r.unknown}if(a)return a.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const o3={},c3={}.hasOwnProperty,V1=Y1("type",{handlers:{root:f3,element:E3,text:p3,comment:g3,doctype:m3}});function d3(e,t){const r=(t||o3).space;return V1(e,r==="svg"?Sr:ra)}function f3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Id(e.children,n,t),Ui(e,n),n}function h3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Id(e.children,n,t),Ui(e,n),n}function m3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ui(e,t),t}function p3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ui(e,t),t}function g3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ui(e,t),t}function E3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Sr);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&c3.call(e.properties,s)){const l=T3(r,s,e.properties[s]);l&&i.push(l)}}const a=r.space,u={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Mr[a],childNodes:[],parentNode:null};return u.childNodes=Id(e.children,u,r),Ui(e,u),e.tagName==="template"&&e.content&&(u.content=h3(e.content,r)),u}function T3(e,t,n){const r=Zu(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?i1(n):f1(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Mr[r.space]}return i}function Id(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=V1(e[r],n);s.parentNode=t,i.push(s)}return i}function Ui(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const y3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],b3=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),We="�";var b;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(b||(b={}));const Dt={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function W1(e){return e>=55296&&e<=57343}function x3(e){return e>=56320&&e<=57343}function _3(e,t){return(e-55296)*1024+9216+t}function q1(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Q1(e){return e>=64976&&e<=65007||b3.has(e)}var B;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(B||(B={}));const k3=65536;class S3{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=k3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:i,offset:s}=this,a=i+n,u=s+n;return{code:t,startLine:r,endLine:r,startCol:a,endCol:a,startOffset:u,endOffset:u}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(x3(n))return this.pos++,this._addGap(),_3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,b.EOF;return this._err(B.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;const r=this.html.charCodeAt(n);return r===b.CARRIAGE_RETURN?b.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,b.EOF;let t=this.html.charCodeAt(this.pos);return t===b.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,b.LINE_FEED):t===b.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,W1(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===b.LINE_FEED||t===b.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){q1(t)?this._err(B.controlCharacterInInputStream):Q1(t)&&this._err(B.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ee;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ee||(Ee={}));function G1(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const C3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),N3=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function A3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=N3.get(e))!==null&&t!==void 0?t:e}var lt;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(lt||(lt={}));const w3=32;var or;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(or||(or={}));function oc(e){return e>=lt.ZERO&&e<=lt.NINE}function v3(e){return e>=lt.UPPER_A&&e<=lt.UPPER_F||e>=lt.LOWER_A&&e<=lt.LOWER_F}function I3(e){return e>=lt.UPPER_A&&e<=lt.UPPER_Z||e>=lt.LOWER_A&&e<=lt.LOWER_Z||oc(e)}function L3(e){return e===lt.EQUALS||I3(e)}var at;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(at||(at={}));var Bn;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Bn||(Bn={}));class D3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=at.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Bn.Strict}startEntity(t){this.decodeMode=t,this.state=at.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case at.EntityStart:return t.charCodeAt(n)===lt.NUM?(this.state=at.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=at.NamedEntity,this.stateNamedEntity(t,n));case at.NumericStart:return this.stateNumericStart(t,n);case at.NumericDecimal:return this.stateNumericDecimal(t,n);case at.NumericHex:return this.stateNumericHex(t,n);case at.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|w3)===lt.LOWER_X?(this.state=at.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=at.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(oc(i)||v3(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(oc(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===lt.SEMI)this.consumed+=1;else if(this.decodeMode===Bn.Strict)return 0;return this.emitCodePoint(A3(this.result),this.consumed),this.errors&&(t!==lt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&or.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const a=t.charCodeAt(n);if(this.treeIndex=R3(r,i,this.treeIndex+Math.max(1,s),a),this.treeIndex<0)return this.result===0||this.decodeMode===Bn.Attribute&&(s===0||L3(a))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&or.VALUE_LENGTH)>>14,s!==0){if(a===lt.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==Bn.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&or.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~or.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case at.NamedEntity:return this.result!==0&&(this.decodeMode!==Bn.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case at.NumericDecimal:return this.emitNumericEntity(0,2);case at.NumericHex:return this.emitNumericEntity(0,3);case at.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case at.EntityStart:return 0}}}function R3(e,t,n,r){const i=(t&or.BRANCH_LENGTH)>>7,s=t&or.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const l=r-s;return l<0||l>=i?-1:e[n+l]-1}let a=n,u=a+i-1;for(;a<=u;){const l=a+u>>>1,d=e[l];if(d<r)a=l+1;else if(d>r)u=l-1;else return e[l+i]}return-1}var $;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})($||($={}));var jr;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(jr||(jr={}));var tn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(tn||(tn={}));var L;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(L||(L={}));var o;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(o||(o={}));const O3=new Map([[L.A,o.A],[L.ADDRESS,o.ADDRESS],[L.ANNOTATION_XML,o.ANNOTATION_XML],[L.APPLET,o.APPLET],[L.AREA,o.AREA],[L.ARTICLE,o.ARTICLE],[L.ASIDE,o.ASIDE],[L.B,o.B],[L.BASE,o.BASE],[L.BASEFONT,o.BASEFONT],[L.BGSOUND,o.BGSOUND],[L.BIG,o.BIG],[L.BLOCKQUOTE,o.BLOCKQUOTE],[L.BODY,o.BODY],[L.BR,o.BR],[L.BUTTON,o.BUTTON],[L.CAPTION,o.CAPTION],[L.CENTER,o.CENTER],[L.CODE,o.CODE],[L.COL,o.COL],[L.COLGROUP,o.COLGROUP],[L.DD,o.DD],[L.DESC,o.DESC],[L.DETAILS,o.DETAILS],[L.DIALOG,o.DIALOG],[L.DIR,o.DIR],[L.DIV,o.DIV],[L.DL,o.DL],[L.DT,o.DT],[L.EM,o.EM],[L.EMBED,o.EMBED],[L.FIELDSET,o.FIELDSET],[L.FIGCAPTION,o.FIGCAPTION],[L.FIGURE,o.FIGURE],[L.FONT,o.FONT],[L.FOOTER,o.FOOTER],[L.FOREIGN_OBJECT,o.FOREIGN_OBJECT],[L.FORM,o.FORM],[L.FRAME,o.FRAME],[L.FRAMESET,o.FRAMESET],[L.H1,o.H1],[L.H2,o.H2],[L.H3,o.H3],[L.H4,o.H4],[L.H5,o.H5],[L.H6,o.H6],[L.HEAD,o.HEAD],[L.HEADER,o.HEADER],[L.HGROUP,o.HGROUP],[L.HR,o.HR],[L.HTML,o.HTML],[L.I,o.I],[L.IMG,o.IMG],[L.IMAGE,o.IMAGE],[L.INPUT,o.INPUT],[L.IFRAME,o.IFRAME],[L.KEYGEN,o.KEYGEN],[L.LABEL,o.LABEL],[L.LI,o.LI],[L.LINK,o.LINK],[L.LISTING,o.LISTING],[L.MAIN,o.MAIN],[L.MALIGNMARK,o.MALIGNMARK],[L.MARQUEE,o.MARQUEE],[L.MATH,o.MATH],[L.MENU,o.MENU],[L.META,o.META],[L.MGLYPH,o.MGLYPH],[L.MI,o.MI],[L.MO,o.MO],[L.MN,o.MN],[L.MS,o.MS],[L.MTEXT,o.MTEXT],[L.NAV,o.NAV],[L.NOBR,o.NOBR],[L.NOFRAMES,o.NOFRAMES],[L.NOEMBED,o.NOEMBED],[L.NOSCRIPT,o.NOSCRIPT],[L.OBJECT,o.OBJECT],[L.OL,o.OL],[L.OPTGROUP,o.OPTGROUP],[L.OPTION,o.OPTION],[L.P,o.P],[L.PARAM,o.PARAM],[L.PLAINTEXT,o.PLAINTEXT],[L.PRE,o.PRE],[L.RB,o.RB],[L.RP,o.RP],[L.RT,o.RT],[L.RTC,o.RTC],[L.RUBY,o.RUBY],[L.S,o.S],[L.SCRIPT,o.SCRIPT],[L.SEARCH,o.SEARCH],[L.SECTION,o.SECTION],[L.SELECT,o.SELECT],[L.SOURCE,o.SOURCE],[L.SMALL,o.SMALL],[L.SPAN,o.SPAN],[L.STRIKE,o.STRIKE],[L.STRONG,o.STRONG],[L.STYLE,o.STYLE],[L.SUB,o.SUB],[L.SUMMARY,o.SUMMARY],[L.SUP,o.SUP],[L.TABLE,o.TABLE],[L.TBODY,o.TBODY],[L.TEMPLATE,o.TEMPLATE],[L.TEXTAREA,o.TEXTAREA],[L.TFOOT,o.TFOOT],[L.TD,o.TD],[L.TH,o.TH],[L.THEAD,o.THEAD],[L.TITLE,o.TITLE],[L.TR,o.TR],[L.TRACK,o.TRACK],[L.TT,o.TT],[L.U,o.U],[L.UL,o.UL],[L.SVG,o.SVG],[L.VAR,o.VAR],[L.WBR,o.WBR],[L.XMP,o.XMP]]);function Hi(e){var t;return(t=O3.get(e))!==null&&t!==void 0?t:o.UNKNOWN}const V=o,P3={[$.HTML]:new Set([V.ADDRESS,V.APPLET,V.AREA,V.ARTICLE,V.ASIDE,V.BASE,V.BASEFONT,V.BGSOUND,V.BLOCKQUOTE,V.BODY,V.BR,V.BUTTON,V.CAPTION,V.CENTER,V.COL,V.COLGROUP,V.DD,V.DETAILS,V.DIR,V.DIV,V.DL,V.DT,V.EMBED,V.FIELDSET,V.FIGCAPTION,V.FIGURE,V.FOOTER,V.FORM,V.FRAME,V.FRAMESET,V.H1,V.H2,V.H3,V.H4,V.H5,V.H6,V.HEAD,V.HEADER,V.HGROUP,V.HR,V.HTML,V.IFRAME,V.IMG,V.INPUT,V.LI,V.LINK,V.LISTING,V.MAIN,V.MARQUEE,V.MENU,V.META,V.NAV,V.NOEMBED,V.NOFRAMES,V.NOSCRIPT,V.OBJECT,V.OL,V.P,V.PARAM,V.PLAINTEXT,V.PRE,V.SCRIPT,V.SECTION,V.SELECT,V.SOURCE,V.STYLE,V.SUMMARY,V.TABLE,V.TBODY,V.TD,V.TEMPLATE,V.TEXTAREA,V.TFOOT,V.TH,V.THEAD,V.TITLE,V.TR,V.TRACK,V.UL,V.WBR,V.XMP]),[$.MATHML]:new Set([V.MI,V.MO,V.MN,V.MS,V.MTEXT,V.ANNOTATION_XML]),[$.SVG]:new Set([V.TITLE,V.FOREIGN_OBJECT,V.DESC]),[$.XLINK]:new Set,[$.XML]:new Set,[$.XMLNS]:new Set},cc=new Set([V.H1,V.H2,V.H3,V.H4,V.H5,V.H6]);L.STYLE,L.SCRIPT,L.XMP,L.IFRAME,L.NOEMBED,L.NOFRAMES,L.PLAINTEXT;var k;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(k||(k={}));const et={DATA:k.DATA,RCDATA:k.RCDATA,RAWTEXT:k.RAWTEXT,SCRIPT_DATA:k.SCRIPT_DATA,PLAINTEXT:k.PLAINTEXT,CDATA_SECTION:k.CDATA_SECTION};function M3(e){return e>=b.DIGIT_0&&e<=b.DIGIT_9}function ls(e){return e>=b.LATIN_CAPITAL_A&&e<=b.LATIN_CAPITAL_Z}function F3(e){return e>=b.LATIN_SMALL_A&&e<=b.LATIN_SMALL_Z}function tr(e){return F3(e)||ls(e)}function r0(e){return tr(e)||M3(e)}function wa(e){return e+32}function K1(e){return e===b.SPACE||e===b.LINE_FEED||e===b.TABULATION||e===b.FORM_FEED}function i0(e){return K1(e)||e===b.SOLIDUS||e===b.GREATER_THAN_SIGN}function B3(e){return e===b.NULL?B.nullCharacterReference:e>1114111?B.characterReferenceOutsideUnicodeRange:W1(e)?B.surrogateCharacterReference:Q1(e)?B.noncharacterCharacterReference:q1(e)||e===b.CARRIAGE_RETURN?B.controlCharacterReference:null}class j3{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=k.DATA,this.returnState=k.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new S3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new D3(C3,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(B.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(B.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=B3(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ee.START_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ee.END_TAG,tagName:"",tagID:o.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ee.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ee.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(G1(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(B.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=Hi(t.tagName),t.type===Ee.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(B.endTagWithAttributes),t.selfClosing&&this._err(B.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ee.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ee.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ee.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ee.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=K1(t)?Ee.WHITESPACE_CHARACTER:t===b.NULL?Ee.NULL_CHARACTER:Ee.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ee.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=k.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Bn.Attribute:Bn.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===k.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case k.DATA:{this._stateData(t);break}case k.RCDATA:{this._stateRcdata(t);break}case k.RAWTEXT:{this._stateRawtext(t);break}case k.SCRIPT_DATA:{this._stateScriptData(t);break}case k.PLAINTEXT:{this._statePlaintext(t);break}case k.TAG_OPEN:{this._stateTagOpen(t);break}case k.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case k.TAG_NAME:{this._stateTagName(t);break}case k.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case k.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case k.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case k.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case k.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case k.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case k.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case k.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case k.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case k.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case k.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case k.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case k.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case k.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case k.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case k.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case k.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case k.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case k.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case k.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case k.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case k.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case k.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case k.BOGUS_COMMENT:{this._stateBogusComment(t);break}case k.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case k.COMMENT_START:{this._stateCommentStart(t);break}case k.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case k.COMMENT:{this._stateComment(t);break}case k.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case k.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case k.COMMENT_END:{this._stateCommentEnd(t);break}case k.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case k.DOCTYPE:{this._stateDoctype(t);break}case k.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case k.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case k.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case k.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case k.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case k.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case k.CDATA_SECTION:{this._stateCdataSection(t);break}case k.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case k.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case k.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case k.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=k.TAG_OPEN;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitCodePoint(t);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case b.AMPERSAND:{this._startCharacterReference();break}case b.LESS_THAN_SIGN:{this.state=k.RCDATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case b.LESS_THAN_SIGN:{this.state=k.RAWTEXT_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(tr(t))this._createStartTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case b.EXCLAMATION_MARK:{this.state=k.MARKUP_DECLARATION_OPEN;break}case b.SOLIDUS:{this.state=k.END_TAG_OPEN;break}case b.QUESTION_MARK:{this._err(B.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t);break}case b.EOF:{this._err(B.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(B.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=k.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(tr(t))this._createEndTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case b.GREATER_THAN_SIGN:{this._err(B.missingEndTagName),this.state=k.DATA;break}case b.EOF:{this._err(B.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(B.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.tagName+=We;break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(ls(t)?wa(t):t)}}_stateRcdataLessThanSign(t){t===b.SOLIDUS?this.state=k.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){tr(t)?(this.state=k.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=k.BEFORE_ATTRIBUTE_NAME,!1;case b.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=k.SELF_CLOSING_START_TAG,!1;case b.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=k.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===b.SOLIDUS?this.state=k.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){tr(t)?(this.state=k.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case b.SOLIDUS:{this.state=k.SCRIPT_DATA_END_TAG_OPEN;break}case b.EXCLAMATION_MARK:{this.state=k.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=k.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){tr(t)?(this.state=k.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===b.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===b.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case b.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===b.SOLIDUS?this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:tr(t)?(this._emitChars("<"),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){tr(t)?(this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Dt.SCRIPT,!1)&&i0(this.preprocessor.peek(Dt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case b.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(B.unexpectedNullCharacter),this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case b.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case b.HYPHEN_MINUS:{this._emitChars("-");break}case b.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case b.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(We);break}case b.EOF:{this._err(B.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===b.SOLIDUS?(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Dt.SCRIPT,!1)&&i0(this.preprocessor.peek(Dt.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Dt.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._err(B.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:case b.SOLIDUS:case b.GREATER_THAN_SIGN:case b.EOF:{this._leaveAttrName(),this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case b.EQUALS_SIGN:{this._leaveAttrName(),this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:{this._err(B.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.name+=We;break}default:this.currentAttr.name+=String.fromCodePoint(ls(t)?wa(t):t)}}_stateAfterAttributeName(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case b.EQUALS_SIGN:{this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{this.state=k.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this.state=k.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(B.missingAttributeValue),this.state=k.DATA,this.emitCurrentTagToken();break}default:this.state=k.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case b.QUOTATION_MARK:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=We;break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case b.APOSTROPHE:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=We;break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case b.AMPERSAND:{this._startCharacterReference();break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case b.NULL:{this._err(B.unexpectedNullCharacter),this.currentAttr.value+=We;break}case b.QUOTATION_MARK:case b.APOSTROPHE:case b.LESS_THAN_SIGN:case b.EQUALS_SIGN:case b.GRAVE_ACCENT:{this._err(B.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case b.SOLIDUS:{this._leaveAttrValue(),this.state=k.SELF_CLOSING_START_TAG;break}case b.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._err(B.missingWhitespaceBetweenAttributes),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case b.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=k.DATA,this.emitCurrentTagToken();break}case b.EOF:{this._err(B.eofInTag),this._emitEOFToken();break}default:this._err(B.unexpectedSolidusInTag),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case b.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.data+=We;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Dt.DASH_DASH,!0)?(this._createCommentToken(Dt.DASH_DASH.length+1),this.state=k.COMMENT_START):this._consumeSequenceIfMatch(Dt.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Dt.DOCTYPE.length+1),this.state=k.DOCTYPE):this._consumeSequenceIfMatch(Dt.CDATA_START,!0)?this.inForeignNode?this.state=k.CDATA_SECTION:(this._err(B.cdataInHtmlContent),this._createCommentToken(Dt.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=k.BOGUS_COMMENT):this._ensureHibernation()||(this._err(B.incorrectlyOpenedComment),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case b.HYPHEN_MINUS:{this.state=k.COMMENT_START_DASH;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptClosingOfEmptyComment),this.state=k.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptClosingOfEmptyComment),this.state=k.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=k.COMMENT_END_DASH;break}case b.LESS_THAN_SIGN:{n.data+="<",this.state=k.COMMENT_LESS_THAN_SIGN;break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.data+=We;break}case b.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case b.EXCLAMATION_MARK:{n.data+="!",this.state=k.COMMENT_LESS_THAN_SIGN_BANG;break}case b.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===b.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=k.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===b.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=k.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==b.GREATER_THAN_SIGN&&t!==b.EOF&&this._err(B.nestedComment),this.state=k.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case b.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case b.EXCLAMATION_MARK:{this.state=k.COMMENT_END_BANG;break}case b.HYPHEN_MINUS:{n.data+="-";break}case b.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case b.HYPHEN_MINUS:{n.data+="--!",this.state=k.COMMENT_END_DASH;break}case b.GREATER_THAN_SIGN:{this._err(B.incorrectlyClosedComment),this.state=k.DATA,this.emitCurrentComment(n);break}case b.EOF:{this._err(B.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=k.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case b.EOF:{this._err(B.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingWhitespaceBeforeDoctypeName),this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(ls(t))this._createDoctypeToken(String.fromCharCode(wa(t))),this.state=k.DOCTYPE_NAME;else switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.NULL:{this._err(B.unexpectedNullCharacter),this._createDoctypeToken(We),this.state=k.DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this._err(B.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=k.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.AFTER_DOCTYPE_NAME;break}case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.name+=We;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(ls(t)?wa(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Dt.PUBLIC,!1)?this.state=k.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Dt.SYSTEM,!1)?this.state=k.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(B.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(B.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(B.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(B.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(B.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.publicId+=We;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.publicId+=We;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case b.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.QUOTATION_MARK:{this._err(B.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(B.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.QUOTATION_MARK:{this._err(B.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{this._err(B.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(B.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case b.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case b.GREATER_THAN_SIGN:{this._err(B.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case b.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.systemId+=We;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case b.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case b.NULL:{this._err(B.unexpectedNullCharacter),n.systemId+=We;break}case b.GREATER_THAN_SIGN:{this._err(B.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case b.SPACE:case b.LINE_FEED:case b.TABULATION:case b.FORM_FEED:break;case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.EOF:{this._err(B.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(B.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case b.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case b.NULL:{this._err(B.unexpectedNullCharacter);break}case b.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case b.RIGHT_SQUARE_BRACKET:{this.state=k.CDATA_SECTION_BRACKET;break}case b.EOF:{this._err(B.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===b.RIGHT_SQUARE_BRACKET?this.state=k.CDATA_SECTION_END:(this._emitChars("]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case b.GREATER_THAN_SIGN:{this.state=k.DATA;break}case b.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(b.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&r0(this.preprocessor.peek(1))?k.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){r0(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===b.SEMICOLON&&this._err(B.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const X1=new Set([o.DD,o.DT,o.LI,o.OPTGROUP,o.OPTION,o.P,o.RB,o.RP,o.RT,o.RTC]),s0=new Set([...X1,o.CAPTION,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]),Au=new Set([o.APPLET,o.CAPTION,o.HTML,o.MARQUEE,o.OBJECT,o.TABLE,o.TD,o.TEMPLATE,o.TH]),U3=new Set([...Au,o.OL,o.UL]),H3=new Set([...Au,o.BUTTON]),a0=new Set([o.ANNOTATION_XML,o.MI,o.MN,o.MO,o.MS,o.MTEXT]),u0=new Set([o.DESC,o.FOREIGN_OBJECT,o.TITLE]),z3=new Set([o.TR,o.TEMPLATE,o.HTML]),$3=new Set([o.TBODY,o.TFOOT,o.THEAD,o.TEMPLATE,o.HTML]),Y3=new Set([o.TABLE,o.TEMPLATE,o.HTML]),V3=new Set([o.TD,o.TH]);class W3{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=o.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===o.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===$.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==$.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(cc,$.HTML)}popUntilTableCellPopped(){this.popUntilPopped(V3,$.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(Y3,$.HTML)}clearBackToTableBodyContext(){this.clearBackTo($3,$.HTML)}clearBackToTableRowContext(){this.clearBackTo(z3,$.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===o.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===o.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case $.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case $.SVG:{if(u0.has(i))return!1;break}case $.MATHML:{if(a0.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Au)}hasInListItemScope(t){return this.hasInDynamicScope(t,U3)}hasInButtonScope(t){return this.hasInDynamicScope(t,H3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case $.HTML:{if(cc.has(n))return!0;if(Au.has(n))return!1;break}case $.SVG:{if(u0.has(n))return!1;break}case $.MATHML:{if(a0.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case t:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===$.HTML)switch(this.tagIDs[t]){case o.TBODY:case o.THEAD:case o.TFOOT:return!0;case o.TABLE:case o.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===$.HTML)switch(this.tagIDs[n]){case t:return!0;case o.OPTION:case o.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&X1.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&s0.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&s0.has(this.currentTagId);)this.pop()}}const Kl=3;var Nn;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Nn||(Nn={}));const l0={type:Nn.Marker};class q3{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=this.treeAdapter.getTagName(t),a=this.treeAdapter.getNamespaceURI(t);for(let u=0;u<this.entries.length;u++){const l=this.entries[u];if(l.type===Nn.Marker)break;const{element:d}=l;if(this.treeAdapter.getTagName(d)===s&&this.treeAdapter.getNamespaceURI(d)===a){const h=this.treeAdapter.getAttrList(d);h.length===i&&r.push({idx:u,attrs:h})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Kl)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Kl)return;const i=new Map(n.map(a=>[a.name,a.value]));let s=0;for(let a=0;a<r.length;a++){const u=r[a];u.attrs.every(l=>i.get(l.name)===l.value)&&(s+=1,s>=Kl&&this.entries.splice(u.idx,1))}}insertMarker(){this.entries.unshift(l0)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Nn.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Nn.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(l0);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Nn.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Nn.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Nn.Element&&n.element===t)}}const nr={createDocument(){return{nodeName:"#document",mode:tn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};nr.appendChild(e,s)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(nr.isTextNode(n)){n.value+=t;return}}nr.appendChild(e,nr.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&nr.isTextNode(r)?r.value+=t:nr.insertBefore(e,nr.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation={...e.sourceCodeLocation,...t}}},J1="html",Q3="about:legacy-compat",G3="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Z1=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],K3=[...Z1,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],X3=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),eg=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],J3=[...eg,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function o0(e,t){return t.some(n=>e.startsWith(n))}function Z3(e){return e.name===J1&&e.publicId===null&&(e.systemId===null||e.systemId===Q3)}function eC(e){if(e.name!==J1)return tn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===G3)return tn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),X3.has(n))return tn.QUIRKS;let r=t===null?K3:Z1;if(o0(n,r))return tn.QUIRKS;if(r=t===null?eg:J3,o0(n,r))return tn.LIMITED_QUIRKS}return tn.NO_QUIRKS}const c0={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},tC="definitionurl",nC="definitionURL",rC=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),iC=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:$.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:$.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:$.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:$.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:$.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:$.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:$.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:$.XML}],["xml:space",{prefix:"xml",name:"space",namespace:$.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:$.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:$.XMLNS}]]),sC=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),aC=new Set([o.B,o.BIG,o.BLOCKQUOTE,o.BODY,o.BR,o.CENTER,o.CODE,o.DD,o.DIV,o.DL,o.DT,o.EM,o.EMBED,o.H1,o.H2,o.H3,o.H4,o.H5,o.H6,o.HEAD,o.HR,o.I,o.IMG,o.LI,o.LISTING,o.MENU,o.META,o.NOBR,o.OL,o.P,o.PRE,o.RUBY,o.S,o.SMALL,o.SPAN,o.STRONG,o.STRIKE,o.SUB,o.SUP,o.TABLE,o.TT,o.U,o.UL,o.VAR]);function uC(e){const t=e.tagID;return t===o.FONT&&e.attrs.some(({name:r})=>r===jr.COLOR||r===jr.SIZE||r===jr.FACE)||aC.has(t)}function tg(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===tC){e.attrs[t].name=nC;break}}function ng(e){for(let t=0;t<e.attrs.length;t++){const n=rC.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Ld(e){for(let t=0;t<e.attrs.length;t++){const n=iC.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function lC(e){const t=sC.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Hi(e.tagName))}function oC(e,t){return t===$.MATHML&&(e===o.MI||e===o.MO||e===o.MN||e===o.MS||e===o.MTEXT)}function cC(e,t,n){if(t===$.MATHML&&e===o.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===jr.ENCODING){const i=n[r].value.toLowerCase();return i===c0.TEXT_HTML||i===c0.APPLICATION_XML}}return t===$.SVG&&(e===o.FOREIGN_OBJECT||e===o.DESC||e===o.TITLE)}function dC(e,t,n,r){return(!r||r===$.HTML)&&cC(e,t,n)||(!r||r===$.MATHML)&&oC(e,t)}const fC="hidden",hC=8,mC=3;var C;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(C||(C={}));const pC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},rg=new Set([o.TABLE,o.TBODY,o.TFOOT,o.THEAD,o.TR]),d0={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:nr,onParseError:null};class f0{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=C.INITIAL,this.originalInsertionMode=C.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...d0,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n??this.treeAdapter.createDocument(),this.tokenizer=new j3(this.options,this),this.activeFormattingElements=new q3(this.treeAdapter),this.fragmentContextID=r?Hi(this.treeAdapter.getTagName(r)):o.UNKNOWN,this._setContextModes(r??this.document,this.fragmentContextID),this.openElements=new W3(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r={...d0,...n};t??(t=r.treeAdapter.createElement(L.TEMPLATE,$.HTML,[]));const i=r.treeAdapter.createElement("documentmock",$.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===o.TEMPLATE&&s.tmplInsertionModeStack.unshift(C.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:pC,a={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(a)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,a;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,a=this.fragmentContextID):{current:s,currentTagId:a}=this.openElements,this._setContextModes(s,a)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===$.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,$.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=C.TEXT}switchToPlaintextParsing(){this.insertionMode=C.TEXT,this.originalInsertionMode=C.IN_BODY,this.tokenizer.state=et.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===L.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==$.HTML))switch(this.fragmentContextID){case o.TITLE:case o.TEXTAREA:{this.tokenizer.state=et.RCDATA;break}case o.STYLE:case o.XMP:case o.IFRAME:case o.NOEMBED:case o.NOFRAMES:case o.NOSCRIPT:{this.tokenizer.state=et.RAWTEXT;break}case o.SCRIPT:{this.tokenizer.state=et.SCRIPT_DATA;break}case o.PLAINTEXT:{this.tokenizer.state=et.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),t.location){const a=this.treeAdapter.getChildNodes(this.document).find(u=>this.treeAdapter.isDocumentTypeNode(u));a&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&{...n,startTag:n};this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r??this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,$.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,$.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(L.HTML,$.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,o.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,a=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:l,endCol:d,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:l,endCol:d,endOffset:h})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(a,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,i=this.treeAdapter.getTagName(t),s=n.type===Ee.END_TAG&&i===n.tagName?{endTag:{...r},endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===o.SVG&&this.treeAdapter.getTagName(n)===L.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===$.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===o.MGLYPH||t.tagID===o.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,$.HTML)}_processToken(t){switch(t.type){case Ee.CHARACTER:{this.onCharacter(t);break}case Ee.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ee.COMMENT:{this.onComment(t);break}case Ee.DOCTYPE:{this.onDoctype(t);break}case Ee.START_TAG:{this._processStartTag(t);break}case Ee.END_TAG:{this.onEndTag(t);break}case Ee.EOF:{this.onEof(t);break}case Ee.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return dC(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Nn.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=C.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(o.P),this.openElements.popUntilTagNamePopped(o.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case o.TR:{this.insertionMode=C.IN_ROW;return}case o.TBODY:case o.THEAD:case o.TFOOT:{this.insertionMode=C.IN_TABLE_BODY;return}case o.CAPTION:{this.insertionMode=C.IN_CAPTION;return}case o.COLGROUP:{this.insertionMode=C.IN_COLUMN_GROUP;return}case o.TABLE:{this.insertionMode=C.IN_TABLE;return}case o.BODY:{this.insertionMode=C.IN_BODY;return}case o.FRAMESET:{this.insertionMode=C.IN_FRAMESET;return}case o.SELECT:{this._resetInsertionModeForSelect(t);return}case o.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case o.HTML:{this.insertionMode=this.headElement?C.AFTER_HEAD:C.BEFORE_HEAD;return}case o.TD:case o.TH:{if(t>0){this.insertionMode=C.IN_CELL;return}break}case o.HEAD:{if(t>0){this.insertionMode=C.IN_HEAD;return}break}}this.insertionMode=C.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===o.TEMPLATE)break;if(r===o.TABLE){this.insertionMode=C.IN_SELECT_IN_TABLE;return}}this.insertionMode=C.IN_SELECT}_isElementCausesFosterParenting(t){return rg.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case o.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===$.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case o.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return P3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){VN(this,t);return}switch(this.insertionMode){case C.INITIAL:{ts(this,t);break}case C.BEFORE_HTML:{xs(this,t);break}case C.BEFORE_HEAD:{_s(this,t);break}case C.IN_HEAD:{ks(this,t);break}case C.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case C.AFTER_HEAD:{Cs(this,t);break}case C.IN_BODY:case C.IN_CAPTION:case C.IN_CELL:case C.IN_TEMPLATE:{sg(this,t);break}case C.TEXT:case C.IN_SELECT:case C.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case C.IN_TABLE:case C.IN_TABLE_BODY:case C.IN_ROW:{Xl(this,t);break}case C.IN_TABLE_TEXT:{dg(this,t);break}case C.IN_COLUMN_GROUP:{wu(this,t);break}case C.AFTER_BODY:{vu(this,t);break}case C.AFTER_AFTER_BODY:{Ga(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){YN(this,t);return}switch(this.insertionMode){case C.INITIAL:{ts(this,t);break}case C.BEFORE_HTML:{xs(this,t);break}case C.BEFORE_HEAD:{_s(this,t);break}case C.IN_HEAD:{ks(this,t);break}case C.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case C.AFTER_HEAD:{Cs(this,t);break}case C.TEXT:{this._insertCharacters(t);break}case C.IN_TABLE:case C.IN_TABLE_BODY:case C.IN_ROW:{Xl(this,t);break}case C.IN_COLUMN_GROUP:{wu(this,t);break}case C.AFTER_BODY:{vu(this,t);break}case C.AFTER_AFTER_BODY:{Ga(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){dc(this,t);return}switch(this.insertionMode){case C.INITIAL:case C.BEFORE_HTML:case C.BEFORE_HEAD:case C.IN_HEAD:case C.IN_HEAD_NO_SCRIPT:case C.AFTER_HEAD:case C.IN_BODY:case C.IN_TABLE:case C.IN_CAPTION:case C.IN_COLUMN_GROUP:case C.IN_TABLE_BODY:case C.IN_ROW:case C.IN_CELL:case C.IN_SELECT:case C.IN_SELECT_IN_TABLE:case C.IN_TEMPLATE:case C.IN_FRAMESET:case C.AFTER_FRAMESET:{dc(this,t);break}case C.IN_TABLE_TEXT:{ns(this,t);break}case C.AFTER_BODY:{_C(this,t);break}case C.AFTER_AFTER_BODY:case C.AFTER_AFTER_FRAMESET:{kC(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case C.INITIAL:{SC(this,t);break}case C.BEFORE_HEAD:case C.IN_HEAD:case C.IN_HEAD_NO_SCRIPT:case C.AFTER_HEAD:{this._err(t,B.misplacedDoctype);break}case C.IN_TABLE_TEXT:{ns(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,B.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?WN(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case C.INITIAL:{ts(this,t);break}case C.BEFORE_HTML:{CC(this,t);break}case C.BEFORE_HEAD:{AC(this,t);break}case C.IN_HEAD:{yn(this,t);break}case C.IN_HEAD_NO_SCRIPT:{IC(this,t);break}case C.AFTER_HEAD:{DC(this,t);break}case C.IN_BODY:{_t(this,t);break}case C.IN_TABLE:{Oi(this,t);break}case C.IN_TABLE_TEXT:{ns(this,t);break}case C.IN_CAPTION:{wN(this,t);break}case C.IN_COLUMN_GROUP:{Od(this,t);break}case C.IN_TABLE_BODY:{cl(this,t);break}case C.IN_ROW:{dl(this,t);break}case C.IN_CELL:{LN(this,t);break}case C.IN_SELECT:{mg(this,t);break}case C.IN_SELECT_IN_TABLE:{RN(this,t);break}case C.IN_TEMPLATE:{PN(this,t);break}case C.AFTER_BODY:{FN(this,t);break}case C.IN_FRAMESET:{BN(this,t);break}case C.AFTER_FRAMESET:{UN(this,t);break}case C.AFTER_AFTER_BODY:{zN(this,t);break}case C.AFTER_AFTER_FRAMESET:{$N(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?qN(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case C.INITIAL:{ts(this,t);break}case C.BEFORE_HTML:{NC(this,t);break}case C.BEFORE_HEAD:{wC(this,t);break}case C.IN_HEAD:{vC(this,t);break}case C.IN_HEAD_NO_SCRIPT:{LC(this,t);break}case C.AFTER_HEAD:{RC(this,t);break}case C.IN_BODY:{ol(this,t);break}case C.TEXT:{TN(this,t);break}case C.IN_TABLE:{qs(this,t);break}case C.IN_TABLE_TEXT:{ns(this,t);break}case C.IN_CAPTION:{vN(this,t);break}case C.IN_COLUMN_GROUP:{IN(this,t);break}case C.IN_TABLE_BODY:{fc(this,t);break}case C.IN_ROW:{hg(this,t);break}case C.IN_CELL:{DN(this,t);break}case C.IN_SELECT:{pg(this,t);break}case C.IN_SELECT_IN_TABLE:{ON(this,t);break}case C.IN_TEMPLATE:{MN(this,t);break}case C.AFTER_BODY:{Eg(this,t);break}case C.IN_FRAMESET:{jN(this,t);break}case C.AFTER_FRAMESET:{HN(this,t);break}case C.AFTER_AFTER_BODY:{Ga(this,t);break}}}onEof(t){switch(this.insertionMode){case C.INITIAL:{ts(this,t);break}case C.BEFORE_HTML:{xs(this,t);break}case C.BEFORE_HEAD:{_s(this,t);break}case C.IN_HEAD:{ks(this,t);break}case C.IN_HEAD_NO_SCRIPT:{Ss(this,t);break}case C.AFTER_HEAD:{Cs(this,t);break}case C.IN_BODY:case C.IN_TABLE:case C.IN_CAPTION:case C.IN_COLUMN_GROUP:case C.IN_TABLE_BODY:case C.IN_ROW:case C.IN_CELL:case C.IN_SELECT:case C.IN_SELECT_IN_TABLE:{og(this,t);break}case C.TEXT:{yN(this,t);break}case C.IN_TABLE_TEXT:{ns(this,t);break}case C.IN_TEMPLATE:{gg(this,t);break}case C.AFTER_BODY:case C.IN_FRAMESET:case C.AFTER_FRAMESET:case C.AFTER_AFTER_BODY:case C.AFTER_AFTER_FRAMESET:{Rd(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===b.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case C.IN_HEAD:case C.IN_HEAD_NO_SCRIPT:case C.AFTER_HEAD:case C.TEXT:case C.IN_COLUMN_GROUP:case C.IN_SELECT:case C.IN_SELECT_IN_TABLE:case C.IN_FRAMESET:case C.AFTER_FRAMESET:{this._insertCharacters(t);break}case C.IN_BODY:case C.IN_CAPTION:case C.IN_CELL:case C.IN_TEMPLATE:case C.AFTER_BODY:case C.AFTER_AFTER_BODY:case C.AFTER_AFTER_FRAMESET:{ig(this,t);break}case C.IN_TABLE:case C.IN_TABLE_BODY:case C.IN_ROW:{Xl(this,t);break}case C.IN_TABLE_TEXT:{cg(this,t);break}}}}function gC(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):lg(e,t),n}function EC(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function TC(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,a=i;a!==n;s++,a=i){i=e.openElements.getCommonAncestor(a);const u=e.activeFormattingElements.getElementEntry(a),l=u&&s>=mC;!u||l?(l&&e.activeFormattingElements.removeEntry(u),e.openElements.remove(a)):(a=yC(e,u),r===t&&(e.activeFormattingElements.bookmark=u),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(a,r),r=a)}return r}function yC(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function bC(e,t,n){const r=e.treeAdapter.getTagName(t),i=Hi(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===o.TEMPLATE&&s===$.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function xC(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Dd(e,t){for(let n=0;n<hC;n++){const r=gC(e,t);if(!r)break;const i=EC(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=TC(e,i,r.element),a=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),a&&bC(e,a,s),xC(e,i,r)}}function dc(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function _C(e,t){e._appendCommentNode(t,e.openElements.items[0])}function kC(e,t){e._appendCommentNode(t,e.document)}function Rd(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],a=e.treeAdapter.getNodeSourceCodeLocation(s);a&&!a.endTag&&e._setEndLocation(s,t)}}}}function SC(e,t){e._setDocumentType(t);const n=t.forceQuirks?tn.QUIRKS:eC(t);Z3(t)||e._err(t,B.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=C.BEFORE_HTML}function ts(e,t){e._err(t,B.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,tn.QUIRKS),e.insertionMode=C.BEFORE_HTML,e._processToken(t)}function CC(e,t){t.tagID===o.HTML?(e._insertElement(t,$.HTML),e.insertionMode=C.BEFORE_HEAD):xs(e,t)}function NC(e,t){const n=t.tagID;(n===o.HTML||n===o.HEAD||n===o.BODY||n===o.BR)&&xs(e,t)}function xs(e,t){e._insertFakeRootElement(),e.insertionMode=C.BEFORE_HEAD,e._processToken(t)}function AC(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.HEAD:{e._insertElement(t,$.HTML),e.headElement=e.openElements.current,e.insertionMode=C.IN_HEAD;break}default:_s(e,t)}}function wC(e,t){const n=t.tagID;n===o.HEAD||n===o.BODY||n===o.HTML||n===o.BR?_s(e,t):e._err(t,B.endTagWithoutMatchingOpenElement)}function _s(e,t){e._insertFakeElement(L.HEAD,o.HEAD),e.headElement=e.openElements.current,e.insertionMode=C.IN_HEAD,e._processToken(t)}function yn(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case o.TITLE:{e._switchToTextParsing(t,et.RCDATA);break}case o.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,et.RAWTEXT):(e._insertElement(t,$.HTML),e.insertionMode=C.IN_HEAD_NO_SCRIPT);break}case o.NOFRAMES:case o.STYLE:{e._switchToTextParsing(t,et.RAWTEXT);break}case o.SCRIPT:{e._switchToTextParsing(t,et.SCRIPT_DATA);break}case o.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=C.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(C.IN_TEMPLATE);break}case o.HEAD:{e._err(t,B.misplacedStartTagForHeadElement);break}default:ks(e,t)}}function vC(e,t){switch(t.tagID){case o.HEAD:{e.openElements.pop(),e.insertionMode=C.AFTER_HEAD;break}case o.BODY:case o.BR:case o.HTML:{ks(e,t);break}case o.TEMPLATE:{Gr(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function Gr(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==o.TEMPLATE&&e._err(t,B.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,B.endTagWithoutMatchingOpenElement)}function ks(e,t){e.openElements.pop(),e.insertionMode=C.AFTER_HEAD,e._processToken(t)}function IC(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.BASEFONT:case o.BGSOUND:case o.HEAD:case o.LINK:case o.META:case o.NOFRAMES:case o.STYLE:{yn(e,t);break}case o.NOSCRIPT:{e._err(t,B.nestedNoscriptInHead);break}default:Ss(e,t)}}function LC(e,t){switch(t.tagID){case o.NOSCRIPT:{e.openElements.pop(),e.insertionMode=C.IN_HEAD;break}case o.BR:{Ss(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function Ss(e,t){const n=t.type===Ee.EOF?B.openElementsLeftAfterEof:B.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=C.IN_HEAD,e._processToken(t)}function DC(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.BODY:{e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=C.IN_BODY;break}case o.FRAMESET:{e._insertElement(t,$.HTML),e.insertionMode=C.IN_FRAMESET;break}case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{e._err(t,B.abandonedHeadElementChild),e.openElements.push(e.headElement,o.HEAD),yn(e,t),e.openElements.remove(e.headElement);break}case o.HEAD:{e._err(t,B.misplacedStartTagForHeadElement);break}default:Cs(e,t)}}function RC(e,t){switch(t.tagID){case o.BODY:case o.HTML:case o.BR:{Cs(e,t);break}case o.TEMPLATE:{Gr(e,t);break}default:e._err(t,B.endTagWithoutMatchingOpenElement)}}function Cs(e,t){e._insertFakeElement(L.BODY,o.BODY),e.insertionMode=C.IN_BODY,ll(e,t)}function ll(e,t){switch(t.type){case Ee.CHARACTER:{sg(e,t);break}case Ee.WHITESPACE_CHARACTER:{ig(e,t);break}case Ee.COMMENT:{dc(e,t);break}case Ee.START_TAG:{_t(e,t);break}case Ee.END_TAG:{ol(e,t);break}case Ee.EOF:{og(e,t);break}}}function ig(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sg(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function OC(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function PC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function MC(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_FRAMESET)}function FC(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML)}function BC(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&cc.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,$.HTML)}function jC(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function UC(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML),n||(e.formElement=e.openElements.current))}function HC(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===o.LI&&i===o.LI||(n===o.DD||n===o.DT)&&(i===o.DD||i===o.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==o.ADDRESS&&i!==o.DIV&&i!==o.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML)}function zC(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.tokenizer.state=et.PLAINTEXT}function $C(e,t){e.openElements.hasInScope(o.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.framesetOk=!1}function YC(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(L.A);n&&(Dd(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function VC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function WC(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(o.NOBR)&&(Dd(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,$.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function qC(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function QC(e,t){e.treeAdapter.getDocumentMode(e.document)!==tn.QUIRKS&&e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=C.IN_TABLE}function ag(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,$.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ug(e){const t=G1(e,jr.TYPE);return t!=null&&t.toLowerCase()===fC}function GC(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,$.HTML),ug(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function KC(e,t){e._appendElement(t,$.HTML),t.ackSelfClosing=!0}function XC(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._appendElement(t,$.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function JC(e,t){t.tagName=L.IMG,t.tagID=o.IMG,ag(e,t)}function ZC(e,t){e._insertElement(t,$.HTML),e.skipNextNewLine=!0,e.tokenizer.state=et.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=C.TEXT}function eN(e,t){e.openElements.hasInButtonScope(o.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,et.RAWTEXT)}function tN(e,t){e.framesetOk=!1,e._switchToTextParsing(t,et.RAWTEXT)}function h0(e,t){e._switchToTextParsing(t,et.RAWTEXT)}function nN(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===C.IN_TABLE||e.insertionMode===C.IN_CAPTION||e.insertionMode===C.IN_TABLE_BODY||e.insertionMode===C.IN_ROW||e.insertionMode===C.IN_CELL?C.IN_SELECT_IN_TABLE:C.IN_SELECT}function rN(e,t){e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML)}function iN(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,$.HTML)}function sN(e,t){e.openElements.hasInScope(o.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(o.RTC),e._insertElement(t,$.HTML)}function aN(e,t){e._reconstructActiveFormattingElements(),tg(t),Ld(t),t.selfClosing?e._appendElement(t,$.MATHML):e._insertElement(t,$.MATHML),t.ackSelfClosing=!0}function uN(e,t){e._reconstructActiveFormattingElements(),ng(t),Ld(t),t.selfClosing?e._appendElement(t,$.SVG):e._insertElement(t,$.SVG),t.ackSelfClosing=!0}function m0(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,$.HTML)}function _t(e,t){switch(t.tagID){case o.I:case o.S:case o.B:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.SMALL:case o.STRIKE:case o.STRONG:{VC(e,t);break}case o.A:{YC(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{BC(e,t);break}case o.P:case o.DL:case o.OL:case o.UL:case o.DIV:case o.DIR:case o.NAV:case o.MAIN:case o.MENU:case o.ASIDE:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.DETAILS:case o.ADDRESS:case o.ARTICLE:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{FC(e,t);break}case o.LI:case o.DD:case o.DT:{HC(e,t);break}case o.BR:case o.IMG:case o.WBR:case o.AREA:case o.EMBED:case o.KEYGEN:{ag(e,t);break}case o.HR:{XC(e,t);break}case o.RB:case o.RTC:{iN(e,t);break}case o.RT:case o.RP:{sN(e,t);break}case o.PRE:case o.LISTING:{jC(e,t);break}case o.XMP:{eN(e,t);break}case o.SVG:{uN(e,t);break}case o.HTML:{OC(e,t);break}case o.BASE:case o.LINK:case o.META:case o.STYLE:case o.TITLE:case o.SCRIPT:case o.BGSOUND:case o.BASEFONT:case o.TEMPLATE:{yn(e,t);break}case o.BODY:{PC(e,t);break}case o.FORM:{UC(e,t);break}case o.NOBR:{WC(e,t);break}case o.MATH:{aN(e,t);break}case o.TABLE:{QC(e,t);break}case o.INPUT:{GC(e,t);break}case o.PARAM:case o.TRACK:case o.SOURCE:{KC(e,t);break}case o.IMAGE:{JC(e,t);break}case o.BUTTON:{$C(e,t);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{qC(e,t);break}case o.IFRAME:{tN(e,t);break}case o.SELECT:{nN(e,t);break}case o.OPTION:case o.OPTGROUP:{rN(e,t);break}case o.NOEMBED:case o.NOFRAMES:{h0(e,t);break}case o.FRAMESET:{MC(e,t);break}case o.TEXTAREA:{ZC(e,t);break}case o.NOSCRIPT:{e.options.scriptingEnabled?h0(e,t):m0(e,t);break}case o.PLAINTEXT:{zC(e,t);break}case o.COL:case o.TH:case o.TD:case o.TR:case o.HEAD:case o.FRAME:case o.TBODY:case o.TFOOT:case o.THEAD:case o.CAPTION:case o.COLGROUP:break;default:m0(e,t)}}function lN(e,t){if(e.openElements.hasInScope(o.BODY)&&(e.insertionMode=C.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function oN(e,t){e.openElements.hasInScope(o.BODY)&&(e.insertionMode=C.AFTER_BODY,Eg(e,t))}function cN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function dN(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(o.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(o.FORM):n&&e.openElements.remove(n))}function fN(e){e.openElements.hasInButtonScope(o.P)||e._insertFakeElement(L.P,o.P),e._closePElement()}function hN(e){e.openElements.hasInListItemScope(o.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(o.LI),e.openElements.popUntilTagNamePopped(o.LI))}function mN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function pN(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function gN(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function EN(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(L.BR,o.BR),e.openElements.pop(),e.framesetOk=!1}function lg(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],a=e.openElements.tagIDs[i];if(r===a&&(r!==o.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,a))break}}function ol(e,t){switch(t.tagID){case o.A:case o.B:case o.I:case o.S:case o.U:case o.EM:case o.TT:case o.BIG:case o.CODE:case o.FONT:case o.NOBR:case o.SMALL:case o.STRIKE:case o.STRONG:{Dd(e,t);break}case o.P:{fN(e);break}case o.DL:case o.UL:case o.OL:case o.DIR:case o.DIV:case o.NAV:case o.PRE:case o.MAIN:case o.MENU:case o.ASIDE:case o.BUTTON:case o.CENTER:case o.FIGURE:case o.FOOTER:case o.HEADER:case o.HGROUP:case o.DIALOG:case o.ADDRESS:case o.ARTICLE:case o.DETAILS:case o.SEARCH:case o.SECTION:case o.SUMMARY:case o.LISTING:case o.FIELDSET:case o.BLOCKQUOTE:case o.FIGCAPTION:{cN(e,t);break}case o.LI:{hN(e);break}case o.DD:case o.DT:{mN(e,t);break}case o.H1:case o.H2:case o.H3:case o.H4:case o.H5:case o.H6:{pN(e);break}case o.BR:{EN(e);break}case o.BODY:{lN(e,t);break}case o.HTML:{oN(e,t);break}case o.FORM:{dN(e);break}case o.APPLET:case o.OBJECT:case o.MARQUEE:{gN(e,t);break}case o.TEMPLATE:{Gr(e,t);break}default:lg(e,t)}}function og(e,t){e.tmplInsertionModeStack.length>0?gg(e,t):Rd(e,t)}function TN(e,t){var n;t.tagID===o.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function yN(e,t){e._err(t,B.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Xl(e,t){if(e.openElements.currentTagId!==void 0&&rg.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=C.IN_TABLE_TEXT,t.type){case Ee.CHARACTER:{dg(e,t);break}case Ee.WHITESPACE_CHARACTER:{cg(e,t);break}}else aa(e,t)}function bN(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_CAPTION}function xN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_COLUMN_GROUP}function _N(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.COLGROUP,o.COLGROUP),e.insertionMode=C.IN_COLUMN_GROUP,Od(e,t)}function kN(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_TABLE_BODY}function SN(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(L.TBODY,o.TBODY),e.insertionMode=C.IN_TABLE_BODY,cl(e,t)}function CN(e,t){e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function NN(e,t){ug(t)?e._appendElement(t,$.HTML):aa(e,t),t.ackSelfClosing=!0}function AN(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,$.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Oi(e,t){switch(t.tagID){case o.TD:case o.TH:case o.TR:{SN(e,t);break}case o.STYLE:case o.SCRIPT:case o.TEMPLATE:{yn(e,t);break}case o.COL:{_N(e,t);break}case o.FORM:{AN(e,t);break}case o.TABLE:{CN(e,t);break}case o.TBODY:case o.TFOOT:case o.THEAD:{kN(e,t);break}case o.INPUT:{NN(e,t);break}case o.CAPTION:{bN(e,t);break}case o.COLGROUP:{xN(e,t);break}default:aa(e,t)}}function qs(e,t){switch(t.tagID){case o.TABLE:{e.openElements.hasInTableScope(o.TABLE)&&(e.openElements.popUntilTagNamePopped(o.TABLE),e._resetInsertionMode());break}case o.TEMPLATE:{Gr(e,t);break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:aa(e,t)}}function aa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ll(e,t),e.fosterParentingEnabled=n}function cg(e,t){e.pendingCharacterTokens.push(t)}function dg(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ns(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)aa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const fg=new Set([o.CAPTION,o.COL,o.COLGROUP,o.TBODY,o.TD,o.TFOOT,o.TH,o.THEAD,o.TR]);function wN(e,t){const n=t.tagID;fg.has(n)?e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=C.IN_TABLE,Oi(e,t)):_t(e,t)}function vN(e,t){const n=t.tagID;switch(n){case o.CAPTION:case o.TABLE:{e.openElements.hasInTableScope(o.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(o.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=C.IN_TABLE,n===o.TABLE&&qs(e,t));break}case o.BODY:case o.COL:case o.COLGROUP:case o.HTML:case o.TBODY:case o.TD:case o.TFOOT:case o.TH:case o.THEAD:case o.TR:break;default:ol(e,t)}}function Od(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.COL:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case o.TEMPLATE:{yn(e,t);break}default:wu(e,t)}}function IN(e,t){switch(t.tagID){case o.COLGROUP:{e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=C.IN_TABLE);break}case o.TEMPLATE:{Gr(e,t);break}case o.COL:break;default:wu(e,t)}}function wu(e,t){e.openElements.currentTagId===o.COLGROUP&&(e.openElements.pop(),e.insertionMode=C.IN_TABLE,e._processToken(t))}function cl(e,t){switch(t.tagID){case o.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_ROW;break}case o.TH:case o.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(L.TR,o.TR),e.insertionMode=C.IN_ROW,dl(e,t);break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE,Oi(e,t));break}default:Oi(e,t)}}function fc(e,t){const n=t.tagID;switch(t.tagID){case o.TBODY:case o.TFOOT:case o.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE);break}case o.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE,qs(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:case o.TR:break;default:qs(e,t)}}function dl(e,t){switch(t.tagID){case o.TH:case o.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,$.HTML),e.insertionMode=C.IN_CELL,e.activeFormattingElements.insertMarker();break}case o.CAPTION:case o.COL:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE_BODY,cl(e,t));break}default:Oi(e,t)}}function hg(e,t){switch(t.tagID){case o.TR:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE_BODY);break}case o.TABLE:{e.openElements.hasInTableScope(o.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE_BODY,fc(e,t));break}case o.TBODY:case o.TFOOT:case o.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(o.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=C.IN_TABLE_BODY,fc(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:case o.TD:case o.TH:break;default:qs(e,t)}}function LN(e,t){const n=t.tagID;fg.has(n)?(e.openElements.hasInTableScope(o.TD)||e.openElements.hasInTableScope(o.TH))&&(e._closeTableCell(),dl(e,t)):_t(e,t)}function DN(e,t){const n=t.tagID;switch(n){case o.TD:case o.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=C.IN_ROW);break}case o.TABLE:case o.TBODY:case o.TFOOT:case o.THEAD:case o.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),hg(e,t));break}case o.BODY:case o.CAPTION:case o.COL:case o.COLGROUP:case o.HTML:break;default:ol(e,t)}}function mg(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e._insertElement(t,$.HTML);break}case o.OPTGROUP:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._insertElement(t,$.HTML);break}case o.HR:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop(),e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case o.INPUT:case o.KEYGEN:case o.TEXTAREA:case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),t.tagID!==o.SELECT&&e._processStartTag(t));break}case o.SCRIPT:case o.TEMPLATE:{yn(e,t);break}}}function pg(e,t){switch(t.tagID){case o.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===o.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===o.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===o.OPTGROUP&&e.openElements.pop();break}case o.OPTION:{e.openElements.currentTagId===o.OPTION&&e.openElements.pop();break}case o.SELECT:{e.openElements.hasInSelectScope(o.SELECT)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode());break}case o.TEMPLATE:{Gr(e,t);break}}}function RN(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e._processStartTag(t)):mg(e,t)}function ON(e,t){const n=t.tagID;n===o.CAPTION||n===o.TABLE||n===o.TBODY||n===o.TFOOT||n===o.THEAD||n===o.TR||n===o.TD||n===o.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(o.SELECT),e._resetInsertionMode(),e.onEndTag(t)):pg(e,t)}function PN(e,t){switch(t.tagID){case o.BASE:case o.BASEFONT:case o.BGSOUND:case o.LINK:case o.META:case o.NOFRAMES:case o.SCRIPT:case o.STYLE:case o.TEMPLATE:case o.TITLE:{yn(e,t);break}case o.CAPTION:case o.COLGROUP:case o.TBODY:case o.TFOOT:case o.THEAD:{e.tmplInsertionModeStack[0]=C.IN_TABLE,e.insertionMode=C.IN_TABLE,Oi(e,t);break}case o.COL:{e.tmplInsertionModeStack[0]=C.IN_COLUMN_GROUP,e.insertionMode=C.IN_COLUMN_GROUP,Od(e,t);break}case o.TR:{e.tmplInsertionModeStack[0]=C.IN_TABLE_BODY,e.insertionMode=C.IN_TABLE_BODY,cl(e,t);break}case o.TD:case o.TH:{e.tmplInsertionModeStack[0]=C.IN_ROW,e.insertionMode=C.IN_ROW,dl(e,t);break}default:e.tmplInsertionModeStack[0]=C.IN_BODY,e.insertionMode=C.IN_BODY,_t(e,t)}}function MN(e,t){t.tagID===o.TEMPLATE&&Gr(e,t)}function gg(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(o.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Rd(e,t)}function FN(e,t){t.tagID===o.HTML?_t(e,t):vu(e,t)}function Eg(e,t){var n;if(t.tagID===o.HTML){if(e.fragmentContext||(e.insertionMode=C.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===o.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else vu(e,t)}function vu(e,t){e.insertionMode=C.IN_BODY,ll(e,t)}function BN(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.FRAMESET:{e._insertElement(t,$.HTML);break}case o.FRAME:{e._appendElement(t,$.HTML),t.ackSelfClosing=!0;break}case o.NOFRAMES:{yn(e,t);break}}}function jN(e,t){t.tagID===o.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==o.FRAMESET&&(e.insertionMode=C.AFTER_FRAMESET))}function UN(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.NOFRAMES:{yn(e,t);break}}}function HN(e,t){t.tagID===o.HTML&&(e.insertionMode=C.AFTER_AFTER_FRAMESET)}function zN(e,t){t.tagID===o.HTML?_t(e,t):Ga(e,t)}function Ga(e,t){e.insertionMode=C.IN_BODY,ll(e,t)}function $N(e,t){switch(t.tagID){case o.HTML:{_t(e,t);break}case o.NOFRAMES:{yn(e,t);break}}}function YN(e,t){t.chars=We,e._insertCharacters(t)}function VN(e,t){e._insertCharacters(t),e.framesetOk=!1}function Tg(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==$.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function WN(e,t){if(uC(t))Tg(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===$.MATHML?tg(t):r===$.SVG&&(lC(t),ng(t)),Ld(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function qN(e,t){if(t.tagID===o.P||t.tagID===o.BR){Tg(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===$.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}L.AREA,L.BASE,L.BASEFONT,L.BGSOUND,L.BR,L.COL,L.EMBED,L.FRAME,L.HR,L.IMG,L.INPUT,L.KEYGEN,L.LINK,L.META,L.PARAM,L.SOURCE,L.TRACK,L.WBR;const QN=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,GN=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),p0={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function yg(e,t){const n=sA(e),r=Y1("type",{handlers:{root:KN,element:XN,text:JN,comment:xg,doctype:ZN,raw:tA},unknown:nA}),i={parser:n?new f0(p0):f0.getFragmentParser(void 0,p0),handle(u){r(u,i)},stitches:!1,options:t||{}};r(e,i),zi(i,Ln());const s=n?i.parser.document:i.parser.getFragment(),a=a3(s,{file:i.options.file});return i.stitches&&ul(a,"comment",function(u,l,d){const h=u;if(h.value.stitch&&d&&l!==void 0){const f=d.children;return f[l]=h.value.stitch,l}}),a.type==="root"&&a.children.length===1&&a.children[0].type===e.type?a.children[0]:a}function bg(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function KN(e,t){bg(e.children,t)}function XN(e,t){rA(e,t),bg(e.children,t),iA(e,t)}function JN(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ee.CHARACTER,chars:e.value,location:ua(e)};zi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function ZN(e,t){const n={type:Ee.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:ua(e)};zi(t,Ln(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function eA(e,t){t.stitches=!0;const n=aA(e);if("children"in e&&"children"in n){const r=yg({type:"root",children:e.children},t.options);n.children=r.children}xg({type:"comment",value:{stitch:n}},t)}function xg(e,t){const n=e.value,r={type:Ee.COMMENT,data:n,location:ua(e)};zi(t,Ln(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function tA(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,_g(t,Ln(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(QN,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function nA(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))eA(n,t);else{let r="";throw GN.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function zi(e,t){_g(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=et.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function _g(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function rA(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===et.PLAINTEXT)return;zi(t,Ln(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Mr.html;i===Mr.html&&n==="svg"&&(i=Mr.svg);const s=d3({...e,children:[]},{space:i===Mr.svg?"svg":"html"}),a={type:Ee.START_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:ua(e)};t.parser.currentToken=a,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function iA(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&y3.includes(n)||t.parser.tokenizer.state===et.PLAINTEXT)return;zi(t,tl(e));const r={type:Ee.END_TAG,tagName:n,tagID:Hi(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:ua(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===et.RCDATA||t.parser.tokenizer.state===et.RAWTEXT||t.parser.tokenizer.state===et.SCRIPT_DATA)&&(t.parser.tokenizer.state=et.DATA)}function sA(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function ua(e){const t=Ln(e)||{line:void 0,column:void 0,offset:void 0},n=tl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function aA(e){return"children"in e?Ri({...e,children:[]}):Ri(e)}function uA(e){return function(t,n){return yg(t,{...e,file:n})}}function g0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function lA(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function oA(e,t,n){const i=sl((n||{}).ignore||[]),s=cA(t);let a=-1;for(;++a<s.length;)B1(e,"text",u);function u(d,h){let f=-1,p;for(;++f<h.length;){const m=h[f],T=p?p.children:void 0;if(i(m,T?T.indexOf(m):void 0,p))return;p=m}if(p)return l(d,h)}function l(d,h){const f=h[h.length-1],p=s[a][0],m=s[a][1];let T=0;const I=f.children.indexOf(d);let g=!1,E=[];p.lastIndex=0;let y=p.exec(d.value);for(;y;){const v=y.index,O={index:y.index,input:y.input,stack:[...h,d]};let A=m(...y,O);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?p.lastIndex=v+1:(T!==v&&E.push({type:"text",value:d.value.slice(T,v)}),Array.isArray(A)?E.push(...A):A&&E.push(A),T=v+y[0].length,g=!0),!p.global)break;y=p.exec(d.value)}return g?(T<d.value.length&&E.push({type:"text",value:d.value.slice(T)}),f.children.splice(I,1,...E)):E=[d],I+E.length}}function cA(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([dA(i[0]),fA(i[1])])}return t}function dA(e){return typeof e=="string"?new RegExp(lA(e),"g"):e}function fA(e){return typeof e=="function"?e:function(){return e}}const Jl="phrasing",Zl=["autolink","link","image","label"];function hA(){return{transforms:[bA],enter:{literalAutolink:pA,literalAutolinkEmail:eo,literalAutolinkHttp:eo,literalAutolinkWww:eo},exit:{literalAutolink:yA,literalAutolinkEmail:TA,literalAutolinkHttp:gA,literalAutolinkWww:EA}}}function mA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jl,notInConstruct:Zl},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jl,notInConstruct:Zl},{character:":",before:"[ps]",after:"\\/",inConstruct:Jl,notInConstruct:Zl}]}}function pA(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function eo(e){this.config.enter.autolinkProtocol.call(this,e)}function gA(e){this.config.exit.autolinkProtocol.call(this,e)}function EA(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function TA(e){this.config.exit.autolinkEmail.call(this,e)}function yA(e){this.exit(e)}function bA(e){oA(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_A]],{ignore:["link","linkReference"]})}function xA(e,t,n,r,i){let s="";if(!kg(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!kA(n)))return!1;const a=SA(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function _A(e,t,n,r){return!kg(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function kA(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function SA(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=g0(e,"(");let s=g0(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function kg(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Vr(n)||nl(n))&&(!t||n!==47)}Sg.peek=RA;function CA(){this.buffer()}function NA(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function AA(){this.buffer()}function wA(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function vA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function IA(e){this.exit(e)}function LA(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=En(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DA(e){this.exit(e)}function RA(){return"["}function Sg(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),u(),a(),s+=i.move("]"),s}function OA(){return{enter:{gfmFootnoteCallString:CA,gfmFootnoteCall:NA,gfmFootnoteDefinitionLabelString:AA,gfmFootnoteDefinition:wA},exit:{gfmFootnoteCallString:vA,gfmFootnoteCall:IA,gfmFootnoteDefinitionLabelString:LA,gfmFootnoteDefinition:DA}}}function PA(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Sg},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const u=s.createTracker(a);let l=u.move("[^");const d=s.enter("footnoteDefinition"),h=s.enter("label");return l+=u.move(s.safe(s.associationId(r),{before:l,after:"]"})),h(),l+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),l+=u.move((t?`
393
- `:" ")+s.indentLines(s.containerFlow(r,u.current()),t?Cg:MA))),d(),l}}function MA(e,t,n){return t===0?e:Cg(e,t,n)}function Cg(e,t,n){return(n?"":" ")+e}const FA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ng.peek=zA;function BA(){return{canContainEols:["delete"],enter:{strikethrough:UA},exit:{strikethrough:HA}}}function jA(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:FA}],handlers:{delete:Ng}}}function UA(e){this.enter({type:"delete",children:[]},e)}function HA(e){this.exit(e)}function Ng(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function zA(){return"~"}function $A(e){return e.length}function YA(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||$A,s=[],a=[],u=[],l=[];let d=0,h=-1;for(;++h<e.length;){const x=[],I=[];let g=-1;for(e[h].length>d&&(d=e[h].length);++g<e[h].length;){const E=VA(e[h][g]);if(n.alignDelimiters!==!1){const y=i(E);I[g]=y,(l[g]===void 0||y>l[g])&&(l[g]=y)}x.push(E)}a[h]=x,u[h]=I}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<d;)s[f]=E0(r[f]);else{const x=E0(r);for(;++f<d;)s[f]=x}f=-1;const p=[],m=[];for(;++f<d;){const x=s[f];let I="",g="";x===99?(I=":",g=":"):x===108?I=":":x===114&&(g=":");let E=n.alignDelimiters===!1?1:Math.max(1,l[f]-I.length-g.length);const y=I+"-".repeat(E)+g;n.alignDelimiters!==!1&&(E=I.length+E+g.length,E>l[f]&&(l[f]=E),m[f]=E),p[f]=y}a.splice(1,0,p),u.splice(1,0,m),h=-1;const T=[];for(;++h<a.length;){const x=a[h],I=u[h];f=-1;const g=[];for(;++f<d;){const E=x[f]||"";let y="",v="";if(n.alignDelimiters!==!1){const O=l[f]-(I[f]||0),A=s[f];A===114?y=" ".repeat(O):A===99?O%2?(y=" ".repeat(O/2+.5),v=" ".repeat(O/2-.5)):(y=" ".repeat(O/2),v=y):v=" ".repeat(O)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&E==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(y),g.push(E),n.alignDelimiters!==!1&&g.push(v),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==d-1)&&g.push("|")}T.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return T.join(`
394
- `)}function VA(e){return e==null?"":String(e)}function E0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function WA(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),qA);return i(),a}function qA(e,t,n){return">"+(n?"":" ")+e}function QA(e,t){return T0(e,t.inConstruct,!0)&&!T0(e,t.notInConstruct,!1)}function T0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function y0(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
395
- `&&QA(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
396
- `}function GA(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function KA(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function XA(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function JA(e,t,n,r){const i=XA(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(KA(e,n)){const f=n.enter("codeIndented"),p=n.indentLines(s,ZA);return f(),p}const u=n.createTracker(r),l=i.repeat(Math.max(GA(s,i)+1,3)),d=n.enter("codeFenced");let h=u.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
397
- `,encode:["`"],...u.current()})),f()}return h+=u.move(`
398
- `),s&&(h+=u.move(s+`
399
- `)),h+=u.move(l),d(),h}function ZA(e,t,n){return(n?"":" ")+e}function Pd(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function ew(e,t,n,r){const i=Pd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");return d+=l.move(n.safe(n.associationId(e),{before:d,after:"]",...l.current()})),d+=l.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(u=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":`
400
- `,...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=l.move(" "+i),d+=l.move(n.safe(e.title,{before:d,after:i,...l.current()})),d+=l.move(i),u()),a(),d}function tw(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Qs(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Iu(e,t,n){const r=Di(e),i=Di(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Ag.peek=nw;function Ag(e,t,n,r){const i=tw(n),s=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const d=l.charCodeAt(0),h=Iu(r.before.charCodeAt(r.before.length-1),d,i);h.inside&&(l=Qs(d)+l.slice(1));const f=l.charCodeAt(l.length-1),p=Iu(r.after.charCodeAt(0),f,i);p.inside&&(l=l.slice(0,-1)+Qs(f));const m=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+l+m}function nw(e,t,n){return n.options.emphasis||"*"}function rw(e,t){let n=!1;return ul(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,ic}),!!((!e.depth||e.depth<3)&&xd(e)&&(t.options.setext||n))}function iw(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(rw(e,n)){const h=n.enter("headingSetext"),f=n.enter("phrasing"),p=n.containerPhrasing(e,{...s.current(),before:`
401
- `,after:`
402
- `});return f(),h(),p+`
403
- `+(i===1?"=":"-").repeat(p.length-(Math.max(p.lastIndexOf("\r"),p.lastIndexOf(`
404
- `))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let d=n.containerPhrasing(e,{before:"# ",after:`
405
- `,...s.current()});return/^[\t ]/.test(d)&&(d=Qs(d.charCodeAt(0))+d.slice(1)),d=d?a+" "+d:a,n.options.closeAtx&&(d+=" "+a),l(),u(),d}wg.peek=sw;function wg(e){return e.value||""}function sw(){return"<"}vg.peek=aw;function vg(e,t,n,r){const i=Pd(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");return d+=l.move(n.safe(e.alt,{before:d,after:"]",...l.current()})),d+=l.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),d+=l.move("<"),d+=l.move(n.safe(e.url,{before:d,after:">",...l.current()})),d+=l.move(">")):(u=n.enter("destinationRaw"),d+=l.move(n.safe(e.url,{before:d,after:e.title?" ":")",...l.current()}))),u(),e.title&&(u=n.enter(`title${s}`),d+=l.move(" "+i),d+=l.move(n.safe(e.title,{before:d,after:i,...l.current()})),d+=l.move(i),u()),d+=l.move(")"),a(),d}function aw(){return"!"}Ig.peek=uw;function Ig(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let l=u.move("![");const d=n.safe(e.alt,{before:l,after:"]",...u.current()});l+=u.move(d+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!d||d!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function uw(){return"!"}Lg.peek=lw;function Lg(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],u=n.compilePattern(a);let l;if(a.atBreak)for(;l=u.exec(r);){let d=l.index;r.charCodeAt(d)===10&&r.charCodeAt(d-1)===13&&d--,r=r.slice(0,d)+" "+r.slice(l.index+1)}}return i+r+i}function lw(){return"`"}function Dg(e,t){const n=xd(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Rg.peek=ow;function Rg(e,t,n,r){const i=Pd(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,l;if(Dg(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),u(),n.stack=h,f}u=n.enter("link"),l=n.enter("label");let d=a.move("[");return d+=a.move(n.containerPhrasing(e,{before:d,after:"](",...a.current()})),d+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),d+=a.move("<"),d+=a.move(n.safe(e.url,{before:d,after:">",...a.current()})),d+=a.move(">")):(l=n.enter("destinationRaw"),d+=a.move(n.safe(e.url,{before:d,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),d+=a.move(" "+i),d+=a.move(n.safe(e.title,{before:d,after:i,...a.current()})),d+=a.move(i),l()),d+=a.move(")"),u(),d}function ow(e,t,n){return Dg(e,n)?"<":"["}Og.peek=cw;function Og(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let l=u.move("[");const d=n.containerPhrasing(e,{before:l,after:"]",...u.current()});l+=u.move(d+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...u.current()});return a(),n.stack=h,s(),i==="full"||!d||d!==f?l+=u.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=u.move("]"),l}function cw(){return"["}function Md(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dw(e){const t=Md(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function fw(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Pg(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function hw(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?fw(n):Md(n);const u=e.ordered?a==="."?")":".":dw(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),Pg(n)===a&&h){let f=-1;for(;++f<e.children.length;){const p=e.children[f];if(p&&p.type==="listItem"&&p.children&&p.children[0]&&p.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=u),n.bulletCurrent=a;const d=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),d}function mw(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function pw(e,t,n,r){const i=mw(n);let s=n.bulletCurrent||Md(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(s+" ".repeat(a-s.length)),u.shift(a);const l=n.enter("listItem"),d=n.indentLines(n.containerFlow(e,u.current()),h);return l(),d;function h(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?s:s+" ".repeat(a-s.length))+f}}function gw(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Ew=sl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Tw(e,t,n,r){return(e.children.some(function(a){return Ew(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function yw(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Mg.peek=bw;function Mg(e,t,n,r){const i=yw(n),s=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const d=l.charCodeAt(0),h=Iu(r.before.charCodeAt(r.before.length-1),d,i);h.inside&&(l=Qs(d)+l.slice(1));const f=l.charCodeAt(l.length-1),p=Iu(r.after.charCodeAt(0),f,i);p.inside&&(l=l.slice(0,-1)+Qs(f));const m=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},u+l+m}function bw(e,t,n){return n.options.strong||"*"}function xw(e,t,n,r){return n.safe(e.value,r)}function _w(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kw(e,t,n){const r=(Pg(n)+(n.options.ruleSpaces?" ":"")).repeat(_w(n));return n.options.ruleSpaces?r.slice(0,-1):r}const Fg={blockquote:WA,break:y0,code:JA,definition:ew,emphasis:Ag,hardBreak:y0,heading:iw,html:wg,image:vg,imageReference:Ig,inlineCode:Lg,link:Rg,linkReference:Og,list:hw,listItem:pw,paragraph:gw,root:Tw,strong:Mg,text:xw,thematicBreak:kw};function Sw(){return{enter:{table:Cw,tableData:b0,tableHeader:b0,tableRow:Aw},exit:{codeText:ww,table:Nw,tableData:to,tableHeader:to,tableRow:to}}}function Cw(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Nw(e){this.exit(e),this.data.inTable=void 0}function Aw(e){this.enter({type:"tableRow",children:[]},e)}function to(e){this.exit(e)}function b0(e){this.enter({type:"tableCell",children:[]},e)}function ww(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,vw));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function vw(e,t){return t==="|"?t:e}function Iw(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
406
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:p,table:a,tableCell:l,tableRow:u}};function a(m,T,x,I){return d(h(m,x,I),m.align)}function u(m,T,x,I){const g=f(m,x,I),E=d([g]);return E.slice(0,E.indexOf(`
407
- `))}function l(m,T,x,I){const g=x.enter("tableCell"),E=x.enter("phrasing"),y=x.containerPhrasing(m,{...I,before:s,after:s});return E(),g(),y}function d(m,T){return YA(m,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function h(m,T,x){const I=m.children;let g=-1;const E=[],y=T.enter("table");for(;++g<I.length;)E[g]=f(I[g],T,x);return y(),E}function f(m,T,x){const I=m.children;let g=-1;const E=[],y=T.enter("tableRow");for(;++g<I.length;)E[g]=l(I[g],m,T,x);return y(),E}function p(m,T,x){let I=Fg.inlineCode(m,T,x);return x.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function Lw(){return{exit:{taskListCheckValueChecked:x0,taskListCheckValueUnchecked:x0,paragraph:Rw}}}function Dw(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Ow}}}function x0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Rw(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const u=i[s];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function Ow(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);s&&u.move(a);let l=Fg.listItem(e,t,n,{...r,...u.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,d)),l;function d(h){return h+a}}function Pw(){return[hA(),OA(),BA(),Sw(),Lw()]}function Mw(e){return{extensions:[mA(),PA(e),jA(),Iw(e),Dw()]}}const Fw={tokenize:$w,partial:!0},Bg={tokenize:Yw,partial:!0},jg={tokenize:Vw,partial:!0},Ug={tokenize:Ww,partial:!0},Bw={tokenize:qw,partial:!0},Hg={name:"wwwAutolink",tokenize:Hw,previous:$g},zg={name:"protocolAutolink",tokenize:zw,previous:Yg},Qn={name:"emailAutolink",tokenize:Uw,previous:Vg},Dn={};function jw(){return{text:Dn}}let wr=48;for(;wr<123;)Dn[wr]=Qn,wr++,wr===58?wr=65:wr===91&&(wr=97);Dn[43]=Qn;Dn[45]=Qn;Dn[46]=Qn;Dn[95]=Qn;Dn[72]=[Qn,zg];Dn[104]=[Qn,zg];Dn[87]=[Qn,Hg];Dn[119]=[Qn,Hg];function Uw(e,t,n){const r=this;let i,s;return a;function a(f){return!hc(f)||!Vg.call(r,r.previous)||Fd(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(f))}function u(f){return hc(f)?(e.consume(f),u):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(Bw,h,d)(f):f===45||f===95||yt(f)?(s=!0,e.consume(f),l):h(f)}function d(f){return e.consume(f),i=!0,l}function h(f){return s&&i&&At(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Hw(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!$g.call(r,r.previous)||Fd(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Fw,e.attempt(Bg,e.attempt(jg,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function zw(e,t,n){const r=this;let i="",s=!1;return a;function a(f){return(f===72||f===104)&&Yg.call(r,r.previous)&&!Fd(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),u):n(f)}function u(f){if(At(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),u;if(f===58){const p=i.toLowerCase();if(p==="http"||p==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),s?d:(s=!0,l)):n(f)}function d(f){return f===null||Cu(f)||Be(f)||Vr(f)||nl(f)?n(f):e.attempt(Bg,e.attempt(jg,h),n)(f)}function h(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function $w(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function Yw(e,t,n){let r,i,s;return a;function a(d){return d===46||d===95?e.check(Ug,l,u)(d):d===null||Be(d)||Vr(d)||d!==45&&nl(d)?l(d):(s=!0,e.consume(d),a)}function u(d){return d===95?r=!0:(i=r,r=void 0),e.consume(d),a}function l(d){return i||r||!s?n(d):t(d)}}function Vw(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Ug,t,s)(a):a===null||Be(a)||Vr(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function Ww(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),s):u===93?(e.consume(u),i):u===60||u===null||Be(u)||Vr(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Be(u)||Vr(u)?t(u):r(u)}function s(u){return At(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):At(u)?(e.consume(u),a):n(u)}}function qw(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return yt(s)?n(s):t(s)}}function $g(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Be(e)}function Yg(e){return!At(e)}function Vg(e){return!(e===47||hc(e))}function hc(e){return e===43||e===45||e===46||e===95||yt(e)}function Fd(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const Qw={tokenize:nv,partial:!0};function Gw(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Zw,continuation:{tokenize:ev},exit:tv}},text:{91:{name:"gfmFootnoteCall",tokenize:Jw},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Kw,resolveTo:Xw}}}}function Kw(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return u;function u(l){if(!a||!a._balanced)return n(l);const d=En(r.sliceSerialize({start:a.end,end:r.now()}));return d.codePointAt(0)!==94||!s.includes(d.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function Xw(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Jw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return u;function u(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",d)}function d(f){if(s>999||f===93&&!a||f===null||f===91||Be(f))return n(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return i.includes(En(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return Be(f)||(a=!0),s++,e.consume(f),f===92?h:d}function h(f){return f===91||f===92||f===93?(e.consume(f),s++,d):d(f)}}function Zw(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,u;return l;function l(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),d}function d(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(T)}function h(T){if(a>999||T===93&&!u||T===null||T===91||Be(T))return n(T);if(T===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return s=En(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return Be(T)||(u=!0),a++,e.consume(T),T===92?f:h}function f(T){return T===91||T===92||T===93?(e.consume(T),a++,h):h(T)}function p(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(s)||i.push(s),ke(e,m,"gfmFootnoteDefinitionWhitespace")):n(T)}function m(T){return t(T)}}function ev(e,t,n){return e.check(ia,t,e.attempt(Qw,t,n))}function tv(e){e.exit("gfmFootnoteDefinition")}function nv(e,t,n){const r=this;return ke(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function rv(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let d=l;for(;d--;)if(a[d][0]==="exit"&&a[d][1].type==="strikethroughSequenceTemporary"&&a[d][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[d][1].end.offset-a[d][1].start.offset){a[l][1].type="strikethroughSequence",a[d][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[d][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[d][1].end),end:Object.assign({},a[l][1].start)},p=[["enter",h,u],["enter",a[d][1],u],["exit",a[d][1],u],["enter",f,u]],m=u.parser.constructs.insideSpan.null;m&&qt(p,p.length,0,rl(m,a.slice(d+1,l),u)),qt(p,p.length,0,[["exit",f,u],["enter",a[l][1],u],["exit",a[l][1],u],["exit",h,u]]),qt(a,d-1,l-d+3,p),l=d+p.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,u,l){const d=this.previous,h=this.events;let f=0;return p;function p(T){return d===126&&h[h.length-1][1].type!=="characterEscape"?l(T):(a.enter("strikethroughSequenceTemporary"),m(T))}function m(T){const x=Di(d);if(T===126)return f>1?l(T):(a.consume(T),f++,m);if(f<2&&!n)return l(T);const I=a.exit("strikethroughSequenceTemporary"),g=Di(T);return I._open=!g||g===2&&!!x,I._close=!x||x===2&&!!g,u(T)}}}class iv{constructor(){this.map=[]}add(t,n,r){sv(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function sv(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function av(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function uv(){return{flow:{null:{name:"table",tokenize:lv,resolveAll:ov}}}}function lv(e,t,n){const r=this;let i=0,s=0,a;return u;function u(w){let Y=r.events.length-1;for(;Y>-1;){const le=r.events[Y][1].type;if(le==="lineEnding"||le==="linePrefix")Y--;else break}const te=Y>-1?r.events[Y][1].type:null,ce=te==="tableHead"||te==="tableRow"?A:l;return ce===A&&r.parser.lazy[r.now().line]?n(w):ce(w)}function l(w){return e.enter("tableHead"),e.enter("tableRow"),d(w)}function d(w){return w===124||(a=!0,s+=1),h(w)}function h(w){return w===null?n(w):oe(w)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),m):n(w):Te(w)?ke(e,h,"whitespace")(w):(s+=1,a&&(a=!1,i+=1),w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),f(w)))}function f(w){return w===null||w===124||Be(w)?(e.exit("data"),h(w)):(e.consume(w),w===92?p:f)}function p(w){return w===92||w===124?(e.consume(w),f):f(w)}function m(w){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(w):(e.enter("tableDelimiterRow"),a=!1,Te(w)?ke(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):T(w))}function T(w){return w===45||w===58?I(w):w===124?(a=!0,e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),x):O(w)}function x(w){return Te(w)?ke(e,I,"whitespace")(w):I(w)}function I(w){return w===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),g):w===45?(s+=1,g(w)):w===null||oe(w)?v(w):O(w)}function g(w){return w===45?(e.enter("tableDelimiterFiller"),E(w)):O(w)}function E(w){return w===45?(e.consume(w),E):w===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(w),e.exit("tableDelimiterMarker"),y):(e.exit("tableDelimiterFiller"),y(w))}function y(w){return Te(w)?ke(e,v,"whitespace")(w):v(w)}function v(w){return w===124?T(w):w===null||oe(w)?!a||i!==s?O(w):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(w)):O(w)}function O(w){return n(w)}function A(w){return e.enter("tableRow"),F(w)}function F(w){return w===124?(e.enter("tableCellDivider"),e.consume(w),e.exit("tableCellDivider"),F):w===null||oe(w)?(e.exit("tableRow"),t(w)):Te(w)?ke(e,F,"whitespace")(w):(e.enter("data"),H(w))}function H(w){return w===null||w===124||Be(w)?(e.exit("data"),F(w)):(e.consume(w),w===92?K:H)}function K(w){return w===92||w===124?(e.consume(w),H):H(w)}}function ov(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],u=!1,l=0,d,h,f;const p=new iv;for(;++n<e.length;){const m=e[n],T=m[1];m[0]==="enter"?T.type==="tableHead"?(u=!1,l!==0&&(_0(p,t,l,d,h),h=void 0,l=0),d={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},p.add(n,0,[["enter",d,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,f=void 0,s=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},p.add(n,0,[["enter",h,t]])),i=T.type==="tableDelimiterRow"?2:h?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],f=va(p,t,s,i,void 0,f),s=[0,0,0,0]),a[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],f=va(p,t,s,i,void 0,f)),s=a,a=[s[1],n,0,0])):T.type==="tableHead"?(u=!0,l=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],f=va(p,t,s,i,n,f)):a[1]!==0&&(f=va(p,t,a,i,n,f)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&_0(p,t,l,d,h),p.consume(t.events),n=-1;++n<t.events.length;){const m=t.events[n];m[0]==="enter"&&m[1].type==="table"&&(m[1]._align=av(t.events,n))}return e}function va(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(s.end=Object.assign({},ti(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=ti(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const d=ti(t.events,n[2]),h=ti(t.events,n[3]),f={type:u,start:Object.assign({},d),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",f,t]]),r!==2){const p=t.events[n[2]],m=t.events[n[3]];if(p[1].end=Object.assign({},m[1].end),p[1].type="chunkText",p[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,x=n[3]-n[2]-1;e.add(T,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(s.end=Object.assign({},ti(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function _0(e,t,n,r,i){const s=[],a=ti(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function ti(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const cv={name:"tasklistCheck",tokenize:fv};function dv(){return{text:{91:cv}}}function fv(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return Be(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(l)}function u(l){return oe(l)?t(l):Te(l)?e.check({tokenize:hv},t,n)(l):n(l)}}function hv(e,t,n){return ke(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function mv(e){return y1([jw(),Gw(),rv(e),uv(),dv()])}const pv={};function gv(e){const t=this,n=e||pv,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(mv(n)),s.push(Pw()),a.push(Mw(n))}const Ev={search_file:{label:"Searched files",activeLabel:"Searching files",icon:Pr,color:"#3b82f6"},search_files:{label:"Searched files",activeLabel:"Searching files",icon:Pr,color:"#3b82f6"},search_file_content:{label:"Searched content",activeLabel:"Searching content",icon:Pr,color:"#3b82f6"},search_directory:{label:"Searched directory",activeLabel:"Searching directory",icon:Pr,color:"#3b82f6"},read_file:{label:"Read file",activeLabel:"Reading file",icon:wn,color:"#8b5cf6"},write_file:{label:"Wrote file",activeLabel:"Writing file",icon:WT,color:"#f59e0b"},get_file_info:{label:"Got file info",activeLabel:"Getting file info",icon:wn,color:"#8b5cf6"},browse_directory:{label:"Browsed directory",activeLabel:"Browsing directory",icon:Hn,color:"#a78bfa"},list_directory:{label:"Listed directory",activeLabel:"Listing directory",icon:Hn,color:"#a78bfa"},list_recent_files:{label:"Listed recent files",activeLabel:"Listing recent files",icon:Hn,color:"#a78bfa"},analyze_data_file:{label:"Analyzed data",activeLabel:"Analyzing data",icon:Zf,color:"#ec4899"},run_shell_command:{label:"Ran command",activeLabel:"Running command",icon:xu,color:"#22c55e"},execute_code:{label:"Executed code",activeLabel:"Executing code",icon:zT,color:"#f59e0b"},query_documents:{label:"Queried documents",activeLabel:"Querying documents",icon:Zr,color:"#06b6d4"},query_specific_file:{label:"Queried file",activeLabel:"Querying file",icon:Zr,color:"#06b6d4"},search_indexed_chunks:{label:"Searched chunks",activeLabel:"Searching chunks",icon:Zr,color:"#06b6d4"},semantic_search:{label:"Searched documents",activeLabel:"Searching documents",icon:Zr,color:"#06b6d4"},evaluate_retrieval:{label:"Evaluated retrieval",activeLabel:"Evaluating retrieval",icon:Zr,color:"#06b6d4"},index_document:{label:"Indexed document",activeLabel:"Indexing document",icon:Xi,color:"#f97316"},index_directory:{label:"Indexed directory",activeLabel:"Indexing directory",icon:Xi,color:"#f97316"},index_file:{label:"Indexed file",activeLabel:"Indexing file",icon:Xi,color:"#f97316"},list_indexed_documents:{label:"Listed documents",activeLabel:"Listing documents",icon:Xi,color:"#f97316"},summarize_document:{label:"Summarized",activeLabel:"Summarizing",icon:wn,color:"#8b5cf6"},dump_document:{label:"Extracted text",activeLabel:"Extracting text",icon:wn,color:"#8b5cf6"},rag_status:{label:"Checked RAG status",activeLabel:"Checking RAG",icon:Xi,color:"#f97316"},add_watch_directory:{label:"Added watch dir",activeLabel:"Adding watch dir",icon:Hn,color:"#a78bfa"},web_search:{label:"Searched web",activeLabel:"Searching web",icon:qT,color:"#14b8a6"},analyze_data:{label:"Analyzed data",activeLabel:"Analyzing data",icon:Zf,color:"#ec4899"}},k0={label:"Used tool",activeLabel:"Using tool",icon:Ty,color:"#3b82f6"};function Tv(e){return e&&Ev[e]||k0}function yv({steps:e,isActive:t,variant:n="inline"}){const[r,i]=S.useState(!1),[s,a]=S.useState(new Set),u=S.useRef(0),l=S.useRef(new Map),d=S.useRef(t);S.useEffect(()=>{d.current=t},[t]),S.useEffect(()=>()=>{l.current.forEach(g=>clearTimeout(g)),l.current.clear()},[]);const h=S.useMemo(()=>{const g=[];for(const E of e){const y=g[g.length-1];if(E.type==="thinking"&&y&&y.type==="thinking"){const v=(y.detail||"")+(E.detail||"");g[g.length-1]={...E,detail:v||y.detail};continue}if(E.type==="status"&&y&&y.type==="status"&&E.active!==!1){g[g.length-1]={...E,label:E.label||y.label};continue}if(E.type==="thinking"&&y&&y.type==="status"&&y.active!==!1){g[g.length-1]={...y,type:"thinking",detail:E.detail||y.detail,active:E.active};continue}if(E.type==="status"&&y&&y.type==="thinking"){g[g.length-1]={...y,label:E.label||y.label,active:E.active??y.active};continue}g.push(E)}return g},[e]),f=h.filter(g=>g.type==="tool"),m=h.filter(g=>g.type==="error").length>0;S.useEffect(()=>{u.current=h.length;const g=h.filter(E=>E.type==="tool").map(E=>E.id);g.length>0&&a(E=>{const y=new Set(E);return g.forEach(v=>y.add(v)),y})},[h]);const T=S.useCallback(g=>{const E=l.current.get(g);E&&(clearTimeout(E),l.current.delete(g)),a(y=>{const v=new Set(y);return v.has(g)?v.delete(g):v.add(g),v})},[]);if(h.length===0)return null;const x=h.length,I=`${x} step${x!==1?"s":""}`+(f.length>0?` · ${f.length} tool${f.length!==1?"s":""}`:"");return c.jsxs("div",{className:`agent-activity ${n} ${t?"active":"done"} ${m?"has-errors":""}`,children:[c.jsxs("button",{className:"agent-summary-bar",onClick:()=>i(!r),"aria-expanded":r,"aria-label":r?"Collapse agent activity":"Expand agent activity",children:[c.jsxs("div",{className:"agent-summary-left",children:[m?c.jsx(br,{size:14,className:"agent-icon-error"}):c.jsx(Wp,{size:14,className:"agent-icon-done"}),c.jsx("span",{className:"agent-summary-text",children:I})]}),c.jsx("div",{className:"agent-summary-right",children:r?c.jsx(Up,{size:14}):c.jsx(ta,{size:14})})]}),h.length>0&&c.jsx("div",{className:`agent-flow-wrap ${r?"flow-expanded":"flow-collapsed"}`,children:c.jsx("div",{className:"agent-flow",children:h.map(g=>g.type==="thinking"?c.jsx(bv,{step:g},g.id):g.type==="status"?c.jsx(xv,{step:g},g.id):g.type==="tool"?c.jsx(Sv,{step:g,isExpanded:s.has(g.id),onToggle:()=>T(g.id)},g.id):g.type==="plan"?c.jsx(Cv,{step:g},g.id):g.type==="error"?c.jsx(Nv,{step:g},g.id):null)})})]})}function bv({step:e}){const t=e.detail||e.label||"",n=S.useRef(null);return S.useEffect(()=>{e.active&&n.current&&(n.current.scrollTop=n.current.scrollHeight)},[t,e.active]),t?c.jsxs("div",{ref:n,className:"flow-thought-hacker",children:[c.jsx("span",{children:t}),e.active&&c.jsx("span",{className:"flow-thought-cursor"})]}):null}function xv({step:e}){const t=e.detail||e.label||"";return t?c.jsx("div",{className:`flow-thought ${e.active?"active":""}`,children:c.jsx("span",{className:"flow-thought-text",children:t})}):null}function _v(e){const t=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*/gi,n=[];let r=0,i;for(;(i=t.exec(e))!==null;){i.index>r&&n.push(e.slice(r,i.index));const s=i[0],a=s.replace(/[)}\]]+$/,""),u=()=>{pd(a).catch(l=>D.ui.error("Failed to open path",l))};n.push(c.jsxs("span",{className:"tool-result-path",onClick:u,title:`Open: ${a}`,role:"button",tabIndex:0,onKeyDown:l=>{l.key==="Enter"&&u()},children:[c.jsx(Hn,{size:10,style:{flexShrink:0,opacity:.7}}),a]},i.index)),a.length<s.length&&n.push(s.slice(a.length)),r=i.index+s.length}return n.length===0?e:(r<e.length&&n.push(e.slice(r)),c.jsx(c.Fragment,{children:n}))}function kv({fileList:e}){const[t,n]=S.useState(!1),r=5,i=t?e.files:e.files.slice(0,r),s=e.total-r,a=(l,d)=>{const h=l.name||l.filename||l.file_name;return h?String(h):l.file_path?String(l.file_path).replace(/\\/g,"/").split("/").pop()||`File ${d+1}`:`File ${d+1}`},u=l=>l.directory?String(l.directory):"";return c.jsxs("div",{className:"file-list-view",children:[i.map((l,d)=>c.jsxs("div",{className:"file-list-item",children:[c.jsx(zp,{size:11,className:"file-list-icon"}),c.jsx("span",{className:"file-list-name",children:a(l,d)}),u(l)&&c.jsx("span",{className:"file-list-dir",children:u(l)})]},d)),s>0&&!t&&c.jsxs("button",{className:"file-list-more",onClick:()=>n(!0),children:["+",s," more"]}),t&&e.files.length<e.total&&c.jsxs("span",{className:"file-list-truncated",children:["Showing ",e.files.length," of ",e.total," files"]})]})}function Sv({step:e,isExpanded:t,onToggle:n}){var l,d;const r=Tv(e.tool),i=r.icon,s=r.color,a=e.active?r.activeLabel:r.label,u=!!(e.detail||e.result||e.commandOutput||(d=(l=e.fileList)==null?void 0:l.files)!=null&&d.length);return c.jsxs("div",{className:`flow-tool ${e.active?"active":""} ${e.success===!1?"error":""}`,children:[c.jsxs("button",{className:"flow-tool-header",onClick:u?n:void 0,style:u?void 0:{cursor:"default"},children:[c.jsxs("div",{className:"flow-tool-left",children:[e.active?c.jsx(xi,{size:13,className:"flow-tool-spinner",style:{color:s}}):e.success===!1?c.jsx(br,{size:13,style:{color:"#ef4444"}}):e.success===!0?c.jsx(cd,{size:13,style:{color:"#22c55e"}}):c.jsx(i,{size:13,style:{color:s}}),c.jsx("span",{className:"flow-tool-label",children:a}),c.jsx("span",{className:"flow-tool-badge",style:{"--badge-color":s},children:e.tool})]}),c.jsx("div",{className:"flow-tool-right",children:u&&c.jsx("span",{className:`flow-tool-chevron ${t?"expanded":""}`,children:c.jsx(ta,{size:12})})})]}),t&&u&&c.jsxs("div",{className:"flow-tool-detail",children:[e.detail&&!e.commandOutput&&c.jsxs("div",{className:"step-detail-args",children:[c.jsx("span",{className:"detail-section-label",children:"Arguments"}),c.jsx("div",{className:"detail-args-content",children:vv(e.detail)})]}),e.commandOutput&&c.jsx(wv,{output:e.commandOutput}),e.result&&!e.commandOutput&&c.jsxs("div",{className:`step-detail-result ${e.success===!1?"result-error":"result-success"}`,children:[c.jsx("span",{className:"detail-section-label",children:e.success===!1?"Error":"Result"}),c.jsx("div",{className:"detail-result-content",children:_v(e.result)})]}),e.retrievalChunks&&e.retrievalChunks.length>0&&c.jsx(Av,{chunks:e.retrievalChunks}),e.fileList&&e.fileList.files.length>0&&c.jsx(kv,{fileList:e.fileList})]})]})}function Cv({step:e}){const[t,n]=S.useState(!1);return!e.planSteps||e.planSteps.length===0?null:c.jsxs("div",{className:"flow-plan",children:[c.jsxs("button",{className:"flow-plan-header flow-plan-toggle",onClick:()=>n(r=>!r),"aria-expanded":t,title:t?"Collapse plan":"Expand plan",children:[c.jsx(ZT,{size:12}),c.jsx("span",{children:"Plan"}),c.jsxs("span",{className:"flow-plan-count",children:["(",e.planSteps.length,")"]}),t?c.jsx(Up,{size:11}):c.jsx(ta,{size:11})]}),t&&c.jsx("ol",{className:"flow-plan-list",children:e.planSteps.map((r,i)=>c.jsx("li",{className:"flow-plan-item",children:r},i))})]})}function Nv({step:e}){return c.jsxs("div",{className:"flow-error",children:[c.jsx(br,{size:13}),c.jsx("span",{children:e.detail||e.label||"An error occurred"})]})}function Av({chunks:e}){const[t,n]=S.useState(new Set),r=i=>{n(s=>{const a=new Set(s);return a.has(i)?a.delete(i):a.add(i),a})};return c.jsxs("div",{className:"chunks-view",children:[c.jsxs("span",{className:"detail-section-label",children:["Retrieved Chunks (",e.length,")"]}),c.jsx("div",{className:"chunks-list",children:e.map(i=>{const s=t.has(i.id);return c.jsxs("div",{className:`chunk-card ${s?"expanded":""}`,children:[c.jsxs("button",{className:"chunk-header",onClick:()=>r(i.id),children:[c.jsxs("div",{className:"chunk-header-left",children:[c.jsx(Zr,{size:11,style:{color:"#06b6d4",flexShrink:0}}),i.source&&c.jsx("span",{className:"chunk-source",children:i.source}),i.page!=null&&c.jsxs("span",{className:"chunk-page",children:["p.",i.page]}),i.score!=null&&i.score>0&&c.jsx("span",{className:"chunk-score",children:i.score.toFixed(2)})]}),c.jsx("span",{className:`chunk-chevron ${s?"expanded":""}`,children:c.jsx(ta,{size:11})})]}),c.jsx("div",{className:`chunk-body ${s?"show":""}`,children:s?c.jsx("pre",{className:"chunk-content",children:i.content}):c.jsx("div",{className:"chunk-preview",children:i.preview})})]},i.id)})})]})}function wv({output:e}){const[t,n]=S.useState(!1),r=S.useRef(null);S.useEffect(()=>()=>{r.current&&clearTimeout(r.current)},[]);const i=S.useCallback(()=>{const u=e.stdout||e.stderr||"";navigator.clipboard.writeText(u).catch(()=>{}),n(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>n(!1),2e3)},[e]),s=!!(e.stdout||e.stderr),a=e.returnCode!==0;return c.jsxs("div",{className:`cmd-output ${a?"cmd-error":""}`,children:[c.jsxs("div",{className:"cmd-header",children:[c.jsxs("div",{className:"cmd-header-left",children:[c.jsx(xu,{size:12,className:"cmd-header-icon"}),c.jsx("span",{className:"cmd-header-title",children:"Terminal"}),e.cwd&&c.jsx("span",{className:"cmd-cwd",children:e.cwd})]}),c.jsxs("div",{className:"cmd-header-right",children:[e.durationSeconds!=null&&c.jsxs("span",{className:"cmd-duration",children:[e.durationSeconds.toFixed(1),"s"]}),e.returnCode!==0&&c.jsxs("span",{className:"cmd-exit-code",children:["exit ",e.returnCode]}),s&&c.jsx("button",{className:`cmd-copy ${t?"copied":""}`,onClick:i,title:t?"Copied!":"Copy output",children:t?c.jsx(ea,{size:11}):c.jsx(Xu,{size:11})})]})]}),c.jsxs("div",{className:"cmd-line",children:[c.jsx("span",{className:"cmd-prompt",children:"$"}),c.jsx("span",{className:"cmd-text",children:e.command})]}),e.stdout&&c.jsx("pre",{className:"cmd-stdout",children:e.stdout}),e.stderr&&c.jsx("pre",{className:"cmd-stderr",children:e.stderr}),e.truncated&&c.jsx("div",{className:"cmd-truncated",children:"Output was truncated (exceeded size limit)"}),!s&&c.jsx("div",{className:"cmd-empty",children:"No output"})]})}function vv(e){const t=e.includes(`
408
- `)?e.split(`
409
- `).filter(Boolean):e.split(", ").filter(Boolean);return t.length<=1?c.jsx("span",{className:"arg-value",children:e}):c.jsx("div",{className:"args-grid",children:t.map((n,r)=>{const i=n.indexOf(":");if(i>0&&i<30){const s=n.slice(0,i).trim(),a=n.slice(i+1).trim();return c.jsxs("div",{className:"arg-row",children:[c.jsx("span",{className:"arg-key",children:s}),c.jsx("span",{className:"arg-value",children:a})]},r)}return c.jsx("div",{className:"arg-row",children:c.jsx("span",{className:"arg-value",children:n})},r)})})}function Iv({active:e}){const t="Thinking...",[n,r]=S.useState(0),[i,s]=S.useState("typing"),a=S.useRef(e);return S.useEffect(()=>{if(i!=="typing")return;if(n>=t.length){s("idle");return}const u=setTimeout(()=>r(l=>l+1),30);return()=>clearTimeout(u)},[i,n]),S.useEffect(()=>{a.current&&!e&&s("erasing"),a.current=e},[e]),S.useEffect(()=>{if(i!=="erasing")return;if(n<=0){s("done");return}const u=setTimeout(()=>r(l=>l-1),20);return()=>clearTimeout(u)},[i,n]),S.useEffect(()=>{e&&i==="done"&&(r(0),s("typing"))},[e,i]),i==="done"?null:c.jsxs("span",{className:"thinking-indicator",children:[c.jsx("span",{className:"thinking-indicator-text",children:t.slice(0,n)}),e&&c.jsx("span",{className:"cursor"})]})}function Lv(e){if(!e)return!1;const t=e.toLowerCase();return t.startsWith("error:")||t.startsWith("error -")||t.includes("traceback (most recent")||t.includes("object has no attribute")||t.includes("is lemonade server running")||t.includes("connection refused")||t.includes("failed to fetch")}const Dv=/\s*\{\s*"?tool"?\s*:\s*"[^"]+"\s*,\s*"?tool_args"?\s*:\s*\{[^}]*\}\s*\}/g;function Rv(e){const t=['"thought"','"answer"','"tool"'];let n="",r=0;for(;r<e.length;){const i=e.indexOf("{",r);if(i===-1){n+=e.slice(r);break}const s=e.slice(i,i+50);if(!t.some(h=>s.includes(h))){n+=e.slice(r,i+1),r=i+1;continue}n+=e.slice(r,i);let u=0,l=i;for(;l<e.length;l++)if(e[l]==="{")u++;else if(e[l]==="}"&&(u--,u===0))break;if(u!==0)break;const d=e.slice(i,l+1);try{const h=JSON.parse(d);h.answer&&(n+=h.answer)}catch{const h=d.indexOf('"answer"');if(h!==-1){const f=d.indexOf(":",h+8);if(f!==-1){let p=f+1;for(;p<d.length&&/\s/.test(d[p]);)p++;if(p<d.length&&d[p]==='"'){let m=d.slice(p+1);m.endsWith('"}')?m=m.slice(0,-2):m.endsWith('"')&&(m=m.slice(0,-1)),n+=m.replace(/\\"/g,'"').replace(/\\n/g,`
410
- `).replace(/\\\\/g,"\\")}}}}r=l+1}return n}const Ov=new Set(["python","py","javascript","js","typescript","ts","java","c","cpp","csharp","cs","go","rust","ruby","rb","php","swift","kotlin","scala","r","perl","lua","bash","sh","zsh","powershell","ps1","sql","html","css","scss","sass","less","xml","json","yaml","yml","toml","ini","csv","markdown","md","dockerfile","docker","makefile","cmake","nginx","apache","graphql","proto","protobuf","jsx","tsx","vue","svelte","dart","elixir","ex","erlang","haskell","hs","ocaml","ml","fsharp","fs","clojure","clj","lisp","scheme","racket","zig","nim","crystal","julia","matlab","octave","fortran","cobol","pascal","delphi","ada","assembly","asm","nasm","wasm","solidity","sol","verilog","vhdl","text","txt","plaintext","diff","patch","log"]);function Pv(e){return e.replace(/```(\w*)[ \t]*\n([\s\S]*?)```/g,(t,n,r)=>{const i=n.toLowerCase();return i&&Ov.has(i)?t:r.trim()})}function Mv(e){if(!e)return e;let t=e;t=t.replace(Dv,""),t=Rv(t),t=t.replace(/<think>[\s\S]*?<\/think>/g,"");const n=(t.match(/\\n/g)||[]).length,r=(t.match(/\n/g)||[]).length;return n>2&&n>r*2&&(t=t.replace(/\\n/g,`
411
- `),t=t.replace(/\\"/g,'"')),t=Pv(t).trim(),t}function Fv(e){if(!e)return"";const t=new Date(e),r=new Date().getTime()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const s=Math.floor(i/60);return s<24?`${s}h ago`:t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function Bv(e){return e?new Date(e).toLocaleString(void 0,{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hour12:!0}):""}function jv(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function S0({message:e,isStreaming:t,showTerminalCursor:n,agentSteps:r,agentStepsActive:i,onDelete:s,onResend:a,latencyMs:u}){var y,v,O;const l=e.role==="assistant"&&Lv(e.content),d=S.useMemo(()=>Mv(e.content),[e.content]),[h,f]=S.useState(!1),[p,m]=S.useState(!1),T=S.useRef(null),x=S.useRef(null);S.useEffect(()=>()=>{T.current&&clearTimeout(T.current),x.current&&clearTimeout(x.current)},[]);const I=S.useCallback(()=>{var A;if((A=navigator.clipboard)!=null&&A.writeText)navigator.clipboard.writeText(e.content).catch(()=>{});else{const F=document.createElement("textarea");F.value=e.content,F.style.position="fixed",F.style.opacity="0",document.body.appendChild(F),F.select(),document.execCommand("copy"),document.body.removeChild(F)}f(!0),T.current&&clearTimeout(T.current),T.current=setTimeout(()=>f(!1),2e3)},[e.content]),g=S.useCallback(()=>{if(!p){m(!0),x.current&&clearTimeout(x.current),x.current=setTimeout(()=>m(!1),3e3);return}m(!1),x.current&&clearTimeout(x.current),s==null||s(e.id)},[p,e.id,s]),E=S.useCallback(()=>{a==null||a(e)},[e,a]);return c.jsx("div",{className:`msg msg-${e.role} ${l?"msg-error":""}`,children:c.jsxs("div",{className:"msg-inner",children:[c.jsxs("div",{className:"msg-header",children:[c.jsxs("div",{className:"msg-header-left",children:[e.role==="assistant"&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"msg-avatar msg-avatar-assistant","aria-hidden":"true",children:c.jsx("img",{src:r1,alt:""})}),c.jsx("div",{className:"msg-role role-assistant",children:"GAIA"})]}),e.created_at&&c.jsx("span",{className:"msg-timestamp",children:Fv(e.created_at)}),e.role==="assistant"&&t&&c.jsx(Iv,{active:!!i||!d})]}),!t&&c.jsxs("div",{className:"msg-actions",children:[e.role==="user"&&a&&c.jsx("button",{className:"msg-action-btn",onClick:E,title:"Resend message","aria-label":"Resend message",children:c.jsx(cy,{size:12})}),c.jsx("button",{className:`msg-copy ${h?"copied":""}`,onClick:I,title:h?"Copied!":"Copy message","aria-label":h?"Copied to clipboard":"Copy message",children:h?c.jsx(ea,{size:12}):c.jsx(Xu,{size:12})}),s&&c.jsx("button",{className:`msg-action-btn msg-delete ${p?"confirm":""}`,onClick:g,title:p?"Click again to confirm":"Delete message","aria-label":p?"Confirm delete message":"Delete message",children:c.jsx(_u,{size:12})})]})]}),c.jsxs("div",{className:"msg-body",children:[r&&r.length>0&&c.jsx(yv,{steps:r,isActive:i??!1,variant:i?"inline":"summary"}),l&&c.jsxs("div",{className:"error-banner",children:[c.jsx(Ii,{size:14}),c.jsx("span",{children:"Something went wrong"})]}),c.jsx(Vv,{content:d,showCursor:(t||n)&&!!d&&!i}),e.role==="assistant"&&!t&&(e.stats||u!=null||e.created_at)&&c.jsxs("div",{className:"msg-stats","aria-label":"Message performance stats",children:[e.created_at&&c.jsx("span",{className:"msg-stats-ts",title:"Message timestamp",children:Bv(e.created_at)}),u!=null&&u>0&&c.jsx("span",{title:"Total response time",children:jv(u)}),((y=e.stats)==null?void 0:y.tokens_per_second)!=null&&e.stats.tokens_per_second>0&&c.jsxs("span",{title:"Tokens per second",children:[e.stats.tokens_per_second," tok/s"]}),((v=e.stats)==null?void 0:v.time_to_first_token)!=null&&e.stats.time_to_first_token>0&&c.jsxs("span",{title:"Time to first token",children:[(e.stats.time_to_first_token*1e3).toFixed(0),"ms TTFT"]}),((O=e.stats)==null?void 0:O.output_tokens)!=null&&e.stats.output_tokens>0&&c.jsxs("span",{title:"Input → output tokens",children:[(e.stats.input_tokens??0).toLocaleString()," → ",e.stats.output_tokens.toLocaleString()," tokens"]})]})]})]})})}function Uv({lang:e,code:t}){const[n,r]=S.useState(!1),i=S.useRef(null);S.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const s=S.useCallback(()=>{var a;if((a=navigator.clipboard)!=null&&a.writeText)navigator.clipboard.writeText(t).catch(()=>{});else{const u=document.createElement("textarea");u.value=t,u.style.position="fixed",u.style.opacity="0",document.body.appendChild(u),u.select(),document.execCommand("copy"),document.body.removeChild(u)}r(!0),i.current&&clearTimeout(i.current),i.current=setTimeout(()=>r(!1),2e3)},[t]);return c.jsxs("div",{className:"code-block",children:[c.jsxs("div",{className:"code-header",children:[c.jsx("span",{className:"code-lang",children:e||"code"}),c.jsxs("button",{className:`code-copy ${n?"copied":""}`,onClick:s,title:n?"Copied!":"Copy","aria-label":n?"Copied to clipboard":"Copy code",children:[n?c.jsx(ea,{size:13}):c.jsx(Xu,{size:13}),c.jsx("span",{children:n?"Copied":"Copy"})]})]}),c.jsx("pre",{children:c.jsx("code",{children:t})})]})}const Hv=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])*[^\s*?"<>|,;)}\]]*\.\w{1,5}/gi,zv=/[A-Z]:[\\\/](?:[^\s*?"<>|,;)}\]]+[\\\/])+/gi;function $v({path:e}){const t=n=>{n.preventDefault(),pd(e).catch(r=>{D.ui.error("Failed to open path",r)})};return c.jsxs("span",{className:"file-path-link",onClick:t,title:`Open in file explorer: ${e}`,role:"button",tabIndex:0,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),t(n))},children:[c.jsx(Hn,{size:12,className:"file-path-icon"}),e]})}function Yv(e){const t=new RegExp(`(${Hv.source}|${zv.source})`,"gi"),n=[];let r=0,i;for(;(i=t.exec(e))!==null;)i.index>r&&n.push(e.slice(r,i.index)),n.push(c.jsx($v,{path:i[0]},i.index)),r=t.lastIndex;return n.length===0?e:(r<e.length&&n.push(e.slice(r)),c.jsx(c.Fragment,{children:n}))}function er(e){return As.Children.map(e,t=>typeof t=="string"?Yv(t):t)}function Vv({content:e,showCursor:t}){return!e&&!t?null:!e&&t?c.jsx("span",{className:"cursor"}):c.jsxs("div",{className:"md-content",children:[c.jsx(VS,{remarkPlugins:[gv],rehypePlugins:[uA],components:{code({className:n,children:r,...i}){return c.jsx("code",{className:"inline-code",...i,children:r})},pre({children:n}){var i,s;const r=As.Children.toArray(n)[0];if(As.isValidElement(r)&&(r.type==="code"||((i=r.props)==null?void 0:i.className)!==void 0||typeof((s=r.props)==null?void 0:s.children)=="string")){const a=r.props,u=(a==null?void 0:a.className)||"",l=/language-(\w+)/.exec(u),d=String((a==null?void 0:a.children)||"").replace(/\n$/,"");return c.jsx(Uv,{lang:(l==null?void 0:l[1])||"",code:d})}return c.jsx("pre",{children:n})},table({children:n}){return c.jsx("div",{className:"md-table-wrap",children:c.jsx("table",{className:"md-table",children:n})})},a({href:n,children:r}){return c.jsx("a",{href:n,target:"_blank",rel:"noopener noreferrer",className:"md-link",children:r})},p({children:n}){return c.jsx("p",{className:"md-p",children:er(n)})},h1({children:n}){return c.jsx("h2",{className:"md-h2",children:er(n)})},h2({children:n}){return c.jsx("h3",{className:"md-h3",children:er(n)})},h3({children:n}){return c.jsx("h4",{className:"md-h4",children:er(n)})},ul({children:n}){return c.jsx("ul",{className:"md-ul",children:n})},ol({children:n}){return c.jsx("ol",{className:"md-ol",children:n})},li({children:n}){return c.jsx("li",{className:"md-li",children:er(n)})},blockquote({children:n}){return c.jsx("blockquote",{className:"md-blockquote",children:er(n)})},hr(){return c.jsx("hr",{className:"md-hr"})},td({children:n}){return c.jsx("td",{children:er(n)})},th({children:n}){return c.jsx("th",{children:er(n)})}},children:e}),t&&c.jsx("span",{className:"cursor"})]})}const Wv=500,Lu="gaia_always_allow_tools",Du=Jp((e,t)=>({notifications:[],showPanel:!1,typeFilter:null,addNotification:n=>e(r=>({notifications:[n,...r.notifications].slice(0,Wv)})),dismiss:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,dismissed:!0}:i)})),markRead:n=>e(r=>({notifications:r.notifications.map(i=>i.id===n?{...i,read:!0}:i)})),markAllRead:()=>e(n=>({notifications:n.notifications.map(r=>({...r,read:!0}))})),clearAll:()=>e({notifications:[]}),setShowPanel:n=>e({showPanel:n}),setTypeFilter:n=>e({typeFilter:n}),respondToPermission:async(n,r,i)=>{var l;const s=t().notifications.find(d=>d.id===n),a=s==null?void 0:s.agentId,u=window.gaiaAPI;if((l=u==null?void 0:u.notification)!=null&&l.respondPermission)try{await u.notification.respondPermission(n,r,i)}catch(d){console.error("[notificationStore] Failed to send permission response via IPC:",d);return}else if(a)try{await t1(a,r==="allow")}catch(d){console.error("[notificationStore] Failed to send permission response via REST:",d);return}if(r==="allow"&&i&&s!=null&&s.tool){const d=JSON.parse(localStorage.getItem(Lu)||"[]");d.includes(s.tool)||(d.push(s.tool),localStorage.setItem(Lu,JSON.stringify(d)))}e(d=>({notifications:d.notifications.map(h=>h.id===n?{...h,response:r,respondedAt:Date.now(),read:!0}:h)}))}})),qv=e=>e.notifications.find(t=>t.type==="permission_request"&&!t.response&&!t.dismissed)??null,Wg="https://github.com/amd/gaia/issues/new",Qv=[{label:"Image",extensions:new Set([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".webp",".ico",".heic",".heif"]),message:"Image files cannot be indexed for text search.",alternatives:["Index PDFs that contain images — text is extracted automatically","Paste image descriptions or OCR text directly into the chat","Use GAIA's VLM agent for image analysis: gaia vlm"],featureTitle:"Support image file indexing and OCR"},{label:"Video",extensions:new Set([".mp4",".avi",".mkv",".mov",".wmv",".flv",".webm",".m4v"]),message:"Video files are not supported for indexing.",alternatives:["Extract subtitles or transcripts from videos and index those","Use GAIA's voice/talk mode for audio: gaia talk"],featureTitle:"Support video file indexing"},{label:"Audio",extensions:new Set([".mp3",".wav",".flac",".aac",".ogg",".wma",".m4a",".opus"]),message:"Audio files are not supported for indexing.",alternatives:["Use GAIA's voice mode for speech interaction: gaia talk","Transcribe audio to text first, then index the transcript"],featureTitle:"Support audio file transcription and indexing"},{label:"Archive",extensions:new Set([".zip",".rar",".7z",".tar",".gz",".bz2",".xz",".tgz"]),message:"Archive files must be extracted before indexing.",alternatives:["Extract the archive contents to a folder","Then index the folder or individual files from the Document Library"],featureTitle:"Support automatic archive extraction for indexing"},{label:"Executable",extensions:new Set([".exe",".msi",".dll",".so",".app",".dmg",".bin",".com"]),message:"Executable and binary files cannot be indexed.",alternatives:["Index source code files (.py, .js, .ts, .java, etc.) instead","Index documentation or README files from the project"],featureTitle:"Support binary file analysis"},{label:"Database",extensions:new Set([".sqlite",".db",".mdb",".accdb",".dbf"]),message:"Database files are not supported for direct indexing.",alternatives:["Export data to CSV or JSON format, then index those files","Use SQL queries to extract relevant data to a text file"],featureTitle:"Support database file indexing"}];function Ru(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;for(const n of Qv)if(n.extensions.has(t))return n;return null}const Gv=new Set([".pdf",".txt",".md",".csv",".json",".doc",".docx",".ppt",".pptx",".xls",".xlsx",".html",".htm",".xml",".svg",".yaml",".yml",".py",".js",".ts",".java",".c",".cpp",".h",".rs",".go",".rb",".sh",".bat",".ps1",".log",".cfg",".ini",".toml"]);function mc(e){const t=e.toLowerCase().startsWith(".")?e.toLowerCase():`.${e.toLowerCase()}`;return Gv.has(t)}function qg(){const e="0.17.0",t=navigator.userAgent,n=navigator.platform||"unknown";return`**Environment:**
412
- - GAIA Version: ${e}
413
- - Platform: ${n}
414
- - User Agent: ${t}
415
- - Interface: Agent UI (Web)`}function C0(e,t){const n=["## Feature Description","",`I would like GAIA to support: **${e}**`,"","## Use Case","","_Describe how you would use this feature:_","","## Current Workaround","","_Is there a workaround you are currently using?_","","---",qg(),"","_Submitted from GAIA Agent UI_"].join(`
416
- `),r=new URLSearchParams({title:`[Feature] ${e}`,body:n,labels:"enhancement,agent-ui"});return`${Wg}?${r.toString()}`}function pc(e,t){const n=["## Bug Description","",e,"","## Steps to Reproduce","","1. Open GAIA Agent UI","2. _Describe what you did:_","3. ","","## Expected Behavior","","_What did you expect to happen?_","","## Actual Behavior","","_What happened instead?_","","---",qg(),"","_Submitted from GAIA Agent UI_"].join(`
417
- `),r=new URLSearchParams({title:`[Bug] ${e}`,body:n,labels:"bug,agent-ui"});return`${Wg}?${r.toString()}`}function Qg({filename:e,error:t,onDismiss:n,timeout:r=15e3}){var m;const i=S.useRef(null);S.useEffect(()=>(r>0&&(i.current=setTimeout(n,r)),()=>{i.current&&clearTimeout(i.current)}),[n,r]);const s=e.includes(".")?"."+((m=e.split(".").pop())==null?void 0:m.toLowerCase()):"",a=s?Ru(s):null,u=t.toLowerCase().includes("unsupported file type")||t.toLowerCase().includes("not supported for indexing")||a!==null,l=t.toLowerCase().includes("fetch")||t.toLowerCase().includes("network")||t.toLowerCase().includes("connect");let d,h,f,p=br;return u&&a?(d=`${a.label} files not supported`,h=a.message,f=C0(a.featureTitle),p=Ii):u?(d=`File type not supported: ${s}`,h="This file format cannot be indexed. Supported: PDF, TXT, MD, CSV, JSON, Office docs, code files, and more.",f=C0(`Support ${s} file indexing`),p=Ii):l?(d="Connection error",h="Could not reach the GAIA server. Make sure the backend is running.",f=pc(`Upload connection error for ${e}`),p=br):(d=`Failed to index "${e}"`,h=t||"An unexpected error occurred during indexing.",f=pc(`Indexing error: ${t.slice(0,80)}`),p=HT),c.jsxs("div",{className:"upload-error-toast",role:"alert",children:[c.jsx(p,{size:16}),c.jsxs("div",{className:"upload-error-content",children:[c.jsx("div",{className:"upload-error-title",children:d}),c.jsxs("div",{className:"upload-error-detail",children:[h," ",u?c.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:"Request this feature →"}):c.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",children:"Report this issue →"})]})]}),c.jsx("button",{className:"upload-error-dismiss",onClick:n,"aria-label":"Dismiss",children:c.jsx(Mt,{size:14})})]})}const Kv=["Summarize a document","Find a file on my computer","Analyze a spreadsheet","Show my recent files"],Xv=/\s*\{\s*"?(?:tool|thought|goal)"?\s*:\s*"[^"]*"[^}]*(?:"?tool_args"?\s*:\s*\{[^}]*\})?\s*\}/g;function Jv(e){const t=e.trim();if(!t.startsWith("{")||!t.includes('"thought"')&&!t.includes('"answer"')&&!t.includes('"goal"'))return e;try{const a=JSON.parse(t);if(a.answer!==void 0)return String(a.answer)}catch{}const n=t.indexOf('"answer"');if(n===-1)return"";const r=t.indexOf(":",n+8);if(r===-1)return"";let i=r+1;for(;i<t.length&&/\s/.test(t[i]);)i++;if(i>=t.length||t[i]!=='"')return"";let s=t.slice(i+1);return s.endsWith('"}')?s=s.slice(0,-2):s.endsWith('"')&&(s=s.slice(0,-1)),s.replace(/\\"/g,'"').replace(/\\n/g,`
418
- `).replace(/\\\\/g,"\\")}function no(e,t){const n=++t.current,r=Date.now();switch(e.type){case"thinking":return{id:n,type:"thinking",label:"Thinking",detail:e.content,active:!0,timestamp:r};case"tool_start":return{id:n,type:"tool",label:"Using tool",tool:e.tool,detail:e.detail,active:!0,timestamp:r};case"plan":return{id:n,type:"plan",label:"Created plan",planSteps:e.steps,active:!1,success:!0,timestamp:r};case"step":return{id:n,type:"status",label:`Step ${e.step}${e.total?` of ${e.total}`:""}`,active:!0,timestamp:r};case"status":return{id:n,type:"status",label:e.message||e.status||"Working",active:e.status==="working",timestamp:r};case"agent_error":return{id:n,type:"error",label:"Error",detail:e.content,success:!1,active:!1,timestamp:r};default:return null}}function Zv({sessionId:e}){const{sessions:t,messages:n,setMessages:r,addMessage:i,removeMessage:s,removeMessagesFrom:a,updateSessionInList:u,isStreaming:l,streamingContent:d,setStreaming:h,setStreamContent:f,clearStreamContent:p,agentSteps:m,addAgentStep:T,updateLastAgentStep:x,appendThinkingContent:I,updateLastToolStep:g,clearAgentSteps:E,documents:y,setDocuments:v,setShowDocLibrary:O,setShowFileBrowser:A,isLoadingMessages:F,setLoadingMessages:H,systemStatus:K}=we(),{addNotification:w}=Du(),Y=t.find(M=>M.id===e),te=new Set((Y==null?void 0:Y.document_ids)??[]),ce=y.filter(M=>te.has(M.id)),[le,ue]=S.useState(""),[j,z]=S.useState(!1),[P,G]=S.useState(""),[_,Z]=S.useState(!1),[fe,N]=S.useState(!1),[Ne,re]=S.useState([]),[me,ve]=S.useState([]),[De,He]=S.useState(!1),[R,W]=S.useState(null),[de,Ae]=S.useState(!1),be=S.useRef(""),Re=S.useRef([]),ze=S.useRef(!1);S.useEffect(()=>{d&&(be.current=d)},[d]),S.useEffect(()=>{m.length>0&&(Re.current=m.map(M=>({...M,active:!1})))},[m]),S.useEffect(()=>{if(!l&&ze.current){Ae(!0);const M=setTimeout(()=>{Ae(!1),be.current="",Re.current=[]},350);return()=>clearTimeout(M)}ze.current=l},[l]);const Gn=S.useRef(null),Nr=S.useRef(null),kt=S.useRef(null),Se=S.useRef(null),Ve=S.useRef(0),St=S.useRef(!1),bn=S.useRef(()=>{}),Ht=S.useRef(""),ct=S.useRef(null),U=S.useRef(null),X=S.useRef(0),he=S.useRef(!0),ge=S.useCallback(()=>{ct.current=null,Ht.current&&f(Ht.current)},[f]),Ie=S.useRef(null),st=S.useRef(0);S.useEffect(()=>{D.chat.info(`ChatView mounted for session=${e}, loading messages...`);const M=D.chat.time();H(!0);let ne=!1;const ae=(ee=!1)=>{us(e).then(xe=>{if(ne)return;const Le=(xe.messages||[]).map(pt=>({...pt,agentSteps:pt.agentSteps||pt.agent_steps||void 0,stats:pt.stats||pt.inference_stats||void 0}));ee?(r(Le),st.current=Le.length,D.chat.timed(`Loaded ${Le.length} message(s) for session=${e}`,M)):Le.length!==st.current&&!we.getState().isStreaming&&(D.chat.info(`Messages changed externally: ${st.current} -> ${Le.length}`),r(Le),st.current=Le.length)}).catch(xe=>{ne||ee&&(D.chat.error(`Failed to load messages for session=${e}`,xe),r([]))}).finally(()=>{!ne&&ee&&H(!1)})};return ae(!0),Ie.current=setInterval(()=>ae(!1),3e3),()=>{ne=!0,Ie.current&&clearInterval(Ie.current)}},[e,r,H]),S.useEffect(()=>{ei().then(M=>v(M.documents||[])).catch(()=>{})},[v]),S.useEffect(()=>{const M=we.getState().pendingPrompt;M&&(D.chat.info(`Consuming pending prompt: "${M.slice(0,60)}"`),we.getState().setPendingPrompt(null),ue(M),requestAnimationFrame(()=>bn.current(M)))},[e]),S.useEffect(()=>{if(!he.current)return;const ne=Date.now()-X.current,ae=100,ee=()=>{var xe;X.current=Date.now(),(xe=Gn.current)==null||xe.scrollIntoView({behavior:"smooth"})};ne>=ae&&ee(),U.current&&clearTimeout(U.current),U.current=setTimeout(ee,ae)},[n,d,m]),S.useEffect(()=>{var M;(M=kt.current)==null||M.focus()},[e]),S.useEffect(()=>()=>{Se.current&&(Se.current.abort(),Se.current=null),ct.current!==null&&(cancelAnimationFrame(ct.current),ct.current=null),U.current&&(clearTimeout(U.current),U.current=null),Ht.current="",ve(M=>(M.forEach(ne=>{ne.url&&URL.revokeObjectURL(ne.url)}),[]))},[e]);const Rn=S.useCallback(()=>{const M=Nr.current;if(!M)return;const ne=M.scrollHeight-M.scrollTop-M.clientHeight;he.current=ne<=80,N(ne>200)},[]),un=S.useCallback(()=>{var M;he.current=!0,(M=Gn.current)==null||M.scrollIntoView({behavior:"smooth"})},[]),On=S.useCallback(()=>{D.stream.warn("User stopped generation"),Se.current&&(Se.current.abort(),Se.current=null),ct.current!==null&&(cancelAnimationFrame(ct.current),ct.current=null);const M=we.getState(),ne=Ht.current||M.streamingContent;if(ne){D.stream.info(`Saving partial response (${ne.length} chars)`);const ae=M.agentSteps,ee={id:Date.now()+1,session_id:e,role:"assistant",content:ne,created_at:new Date().toISOString(),rag_sources:null,agentSteps:ae.length>0?[...ae]:void 0};i(ee)}Ht.current="",h(!1),p(),re([]),E()},[e,i,h,p,E]);S.useEffect(()=>{const M=ne=>{ne.key==="Escape"&&l&&(ne.preventDefault(),On()),ne.key==="k"&&(ne.ctrlKey||ne.metaKey)&&(ne.preventDefault(),window.dispatchEvent(new CustomEvent("gaia:focus-search")))};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[l,On]);const Ar=M=>{ue(M.target.value);const ne=M.target;ne.style.height="auto",ne.style.height=Math.min(ne.scrollHeight,200)+"px"},Ct=S.useCallback(async M=>{var ee;const ne=(ee=M.clipboardData)==null?void 0:ee.items;if(!ne)return;const ae=[];for(const xe of Array.from(ne))xe.type.startsWith("image/")&&ae.push(xe);if(ae.length!==0){M.preventDefault();for(const xe of ae){const Le=xe.getAsFile();if(!Le)continue;const pt=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,xn=URL.createObjectURL(Le),Lt={id:pt,file:Le,name:Le.name||`screenshot-${new Date().toISOString().slice(0,19).replace(/[T:]/g,"-")}.png`,url:xn,uploading:!0,uploaded:!1,isImage:!0};ve(Xt=>[...Xt,Lt]),D.chat.info(`Pasted image: ${Lt.name} (${Le.size} bytes)`);try{const Xt=await ah(Le);ve(J=>J.map(_e=>_e.id===pt?{..._e,uploading:!1,uploaded:!0,serverUrl:Xt.url}:_e)),D.chat.info(`Upload complete: ${Lt.name} -> ${Xt.url}`)}catch(Xt){D.chat.error(`Upload failed: ${Lt.name}`,Xt),ve(J=>J.map(_e=>_e.id===pt?{..._e,uploading:!1,error:"Upload failed"}:_e))}}}},[]),Kn=S.useCallback(async M=>{var ae;M.preventDefault(),M.stopPropagation(),Z(!1);const ne=(ae=M.dataTransfer)==null?void 0:ae.files;if(!(!ne||ne.length===0))for(const ee of Array.from(ne)){const xe=ee.type.startsWith("image/"),Le=`attach-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,pt=xe?URL.createObjectURL(ee):"",xn={id:Le,file:ee,name:ee.name,url:pt,uploading:!0,uploaded:!1,isImage:xe};ve(Lt=>[...Lt,xn]),D.chat.info(`Dropped file: ${ee.name} (${ee.size} bytes, image=${xe})`);try{const Lt=await ah(ee);ve(Xt=>Xt.map(J=>J.id===Le?{...J,uploading:!1,uploaded:!0,serverUrl:Lt.url}:J)),D.chat.info(`Upload complete: ${ee.name} -> ${Lt.url}`)}catch(Lt){D.chat.error(`Upload failed: ${ee.name}`,Lt),ve(Xt=>Xt.map(J=>J.id===Le?{...J,uploading:!1,error:"Upload failed"}:J))}}},[]),ln=S.useCallback(M=>{ve(ne=>{const ae=ne.find(ee=>ee.id===M);return ae!=null&&ae.url&&URL.revokeObjectURL(ae.url),ne.filter(ee=>ee.id!==M)})},[]),Kr=S.useCallback(async M=>{const ne=(M||le).trim(),ae=me.length>0&&me.some(J=>J.uploaded);if(he.current=!0,!ne&&!ae||l){!ne&&!ae&&D.chat.debug("Send blocked: empty message"),l&&D.chat.debug("Send blocked: already streaming");return}let ee=ne;const xe=me.filter(J=>J.uploaded&&J.serverUrl);if(xe.length>0){const J=xe.map(_e=>_e.isImage?`![${_e.name}](${_e.serverUrl})`:`[${_e.name}](${_e.serverUrl})`).join(`
419
- `);ee=ee?`${ee}
420
-
421
- ${J}`:J}D.chat.info(`Sending message to session=${e}`,{length:ee.length,preview:ee.slice(0,80)}),ue(""),kt.current&&(kt.current.style.height="auto",kt.current.focus()),ve(J=>(J.forEach(_e=>{_e.url&&URL.revokeObjectURL(_e.url)}),[]));const Le={id:Date.now(),session_id:e,role:"user",content:ee,created_at:new Date().toISOString(),rag_sources:null};i(Le),h(!0),p(),E(),re([]),Ve.current=0,St.current=!1,D.stream.info("Starting agent stream...");const pt=D.stream.time();let xn="",Lt=!1;Ht.current="";const Xt=nb(e,ee,{onChunk:J=>{const _e=J.content||"";if(_e){J.type==="answer"?xn=_e:(St.current&&xn.length>0&&(xn+=`
422
-
423
- `,St.current=!1),xn+=_e);let Me=xn.replace(Xv,"").trim();if(Me=Jv(Me),Me){const Je=Me.lastIndexOf("{");if(Je>-1){const zt=Me.slice(Je);/^\{\s*"(?:thought|answer|goal|tool)"/.test(zt)&&(zt.match(/\{/g)||[]).length>(zt.match(/\}/g)||[]).length&&(Me=Me.slice(0,Je).trim())}}Ht.current=Me,ct.current===null&&(ct.current=requestAnimationFrame(ge))}},onAgentEvent:J=>{var Me,Je,zt;if(J.type==="tool_confirm"){if(!J.confirm_id){console.error("[ChatView] tool_confirm event missing confirm_id, ignoring");return}const Fe=J.tool||"";if(JSON.parse(localStorage.getItem(Lu)||"[]").includes(Fe)){rb(e,J.confirm_id,"allow",!1).catch(_n=>console.error("[ChatView] auto-confirm failed:",_n));return}const Pn={id:J.confirm_id,type:"permission_request",agentId:"chat",agentName:"GAIA",title:`Allow ${Fe}?`,message:`The agent wants to execute: ${Fe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Fe,toolArgs:J.args,timeoutSeconds:J.timeout_seconds??60};w(Pn);return}if(J.type==="permission_request"){const Fe=J.tool||"";if(JSON.parse(localStorage.getItem(Lu)||"[]").includes(Fe)){t1(e,!0).catch(_n=>console.error("[ChatView] auto-confirm failed:",_n));return}const{addNotification:Pn}=Du.getState();Pn({id:J.confirm_id??`perm-${Date.now()}`,type:"permission_request",agentId:e,agentName:"GAIA",title:`Allow ${Fe}?`,message:`The agent wants to execute: ${Fe}`,timestamp:Date.now(),read:!1,dismissed:!1,priority:"high",tool:Fe,toolArgs:J.args,timeoutSeconds:J.timeout_seconds??60});return}if(J.type==="tool_end"){g({active:!1,success:J.success!==!1});return}if(J.type==="tool_result"){const Fe={result:J.summary||J.title||"Done",active:!1,success:J.success!==!1};J.command_output&&(Fe.commandOutput={command:J.command_output.command,stdout:J.command_output.stdout,stderr:J.command_output.stderr,returnCode:J.command_output.return_code,cwd:J.command_output.cwd,durationSeconds:J.command_output.duration_seconds,truncated:J.command_output.truncated}),(Me=J.result_data)!=null&&Me.chunks&&J.result_data.chunks.length>0&&(Fe.retrievalChunks=J.result_data.chunks.map(dt=>({id:dt.id,source:dt.source,sourcePath:dt.sourcePath,page:dt.page,score:dt.score,preview:dt.preview,content:dt.content}))),((Je=J.result_data)==null?void 0:Je.type)==="file_list"&&((zt=J.result_data.files)==null?void 0:zt.length)>0&&(Fe.fileList={files:J.result_data.files,total:J.result_data.total??J.result_data.files.length}),g(Fe);return}if(J.type==="tool_args"){g({detail:J.detail||JSON.stringify(J.args)});return}if(J.type==="thinking"){const Fe=we.getState().agentSteps,dt=Fe[Fe.length-1];if(dt&&dt.type==="thinking"){I(J.content||"");return}const Pn=no(J,Ve);Pn&&T(Pn);return}if(J.type==="status"){const Fe=J.status,dt=(J.message||"").trim();if(dt.toLowerCase().startsWith("executing "))return;if(Fe==="working"||Fe==="warning"||Fe==="info"){const Pn=we.getState().agentSteps,_n=Pn[Pn.length-1];if(_n&&_n.type==="status"&&_n.active){x({label:dt||"Working",detail:dt});return}if(_n&&_n.type==="thinking"&&_n.active){x({label:dt||"Thinking"});return}const zd=no(J,Ve);zd&&T(zd)}return}if(J.type==="step")return;const _e=no(J,Ve);_e&&(T(_e),J.type==="tool_start"&&(St.current=!0))},onDone:J=>{if(Lt)return;Lt=!0,ct.current!==null&&(cancelAnimationFrame(ct.current),ct.current=null),Ht.current="";const _e=J.content||xn;D.chat.timed(`Agent response complete: ${_e.length} chars`,pt);const Me=we.getState().agentSteps.map(Je=>({...Je,active:!1}));if(_e){st.current=we.getState().messages.length+1;const Je={id:J.message_id||Date.now()+1,session_id:e,role:"assistant",content:_e,created_at:new Date().toISOString(),rag_sources:null,agentSteps:Me.length>0?Me:void 0,stats:J.stats||void 0};i(Je)}if(re(Me),h(!1),p(),E(),kt.current&&kt.current.focus(),setTimeout(()=>{us(e).then(Je=>{if(we.getState().currentSessionId!==e)return;const zt=(Je.messages||[]).map(Fe=>({...Fe,agentSteps:Fe.agentSteps||Fe.agent_steps||void 0,stats:Fe.stats||Fe.inference_stats||void 0}));r(zt),st.current=zt.length}).catch(()=>{})},300),Y&&Y.title==="New Task"){const Je=ne.slice(0,50)+(ne.length>50?"...":"");sh(e,{title:Je}).then(()=>u(e,{title:Je})).catch(zt=>D.chat.error("Auto-title failed",zt))}},onError:J=>{ct.current!==null&&(cancelAnimationFrame(ct.current),ct.current=null),Ht.current="",D.chat.error(`Chat error for session=${e}`,J);let _e;const Me=J.message||"",Je=`
424
-
425
- ---
426
- *Unexpected error?* [Report it on GitHub](${pc(Me.slice(0,80))})`;Me.includes("Lemonade")||Me.includes("LLM")||Me.includes("Could not get response")?_e="Could not reach the LLM server. Make sure Lemonade Server is running:\n\n```\nlemonade-server serve\n```\n\nThen try sending your message again."+Je:J instanceof TypeError||Me.includes("fetch")||Me.includes("Failed to fetch")||Me.includes("NetworkError")?_e="Cannot connect to the GAIA Agent UI server. Make sure the backend is running:\n\n```\ngaia chat --ui\n```"+Je:Me.includes("500")?_e="The server encountered an error. This usually means Lemonade Server is not running or the model failed to load.\n\nStart Lemonade Server with:\n```\nlemonade-server serve\n```"+Je:Me.includes("timed out")||Me.includes("timeout")||Me.includes("Timeout")?_e=`The request timed out. The query may be too complex — try breaking it into simpler questions.
427
-
428
- If Lemonade Server is running but responses are slow, the model may need more resources.`+Je:_e=`Error: ${Me}`+Je;const zt={id:Date.now()+2,session_id:e,role:"assistant",content:_e,created_at:new Date().toISOString(),rag_sources:null};i(zt),h(!1),p(),E()}});Se.current=Xt},[le,me,l,e,Y,i,r,h,ge,p,u,T,x,I,g,E]);bn.current=Kr,S.useEffect(()=>{!l&&kt.current&&kt.current.focus()},[l]);const Xg=S.useCallback(async M=>{l||(D.chat.info(`Deleting message ${M} from session=${e}`),W(M),setTimeout(async()=>{s(M),W(null);try{await Zy(e,M)}catch(ne){D.chat.error(`Failed to delete message ${M}`,ne),us(e).then(ae=>{we.getState().currentSessionId===e&&r(ae.messages||[])}).catch(()=>{})}},250))},[e,l,s,r]),Jg=S.useCallback(async M=>{if(l||M.role!=="user")return;const ne=M.content;D.chat.info(`Resending message ${M.id} from session=${e}`,{preview:ne.slice(0,80)}),a(M.id);try{await eb(e,M.id)}catch(ae){D.chat.error(`Failed to delete messages from ${M.id}`,ae),us(e).then(ee=>{we.getState().currentSessionId===e&&r(ee.messages||[])}).catch(()=>{});return}Kr(ne)},[e,l,a,r,Kr]),Zg=M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),Kr())},[jd,Ud]=S.useState(!1),eE=S.useCallback(M=>{M.preventDefault();const ne=mn(e),ae=`${window.location.origin}${window.location.pathname}#${ne}`;navigator.clipboard.writeText(ae).then(()=>{D.ui.info(`Copied session link: ${ae}`),Ud(!0),setTimeout(()=>Ud(!1),1500)}).catch(()=>{D.ui.warn("Clipboard write failed")})},[e]),tE=()=>{G((Y==null?void 0:Y.title)||""),z(!0)},Hd=async()=>{P.trim()&&P!==(Y==null?void 0:Y.title)&&(await sh(e,{title:P.trim()}),u(e,{title:P.trim()})),z(!1)},nE=async()=>{try{const M=await Jy(e),ne=new Blob([M.content],{type:"text/markdown"}),ae=URL.createObjectURL(ne),ee=document.createElement("a");ee.href=ae;const xe=((Y==null?void 0:Y.title)||"chat").replace(/[/\\:*?"<>|]/g,"_").slice(0,100);ee.download=`${xe}.md`,ee.click(),URL.revokeObjectURL(ae)}catch(M){D.chat.error("Export failed",M)}},rE=S.useCallback(async(M,ne)=>{M.stopPropagation();const ae=y.find(ee=>ee.id===ne);D.doc.info(`Detaching document from session: ${(ae==null?void 0:ae.filename)||ne}`);try{await ub(e,ne);const ee=we.getState().sessions.find(Le=>Le.id===e),xe=((ee==null?void 0:ee.document_ids)??[]).filter(Le=>Le!==ne);u(e,{document_ids:xe}),xe.length<=3&&He(!1),D.doc.info(`Detached document from session: ${(ae==null?void 0:ae.filename)||ne}`)}catch(ee){D.doc.error(`Failed to detach document: ${(ae==null?void 0:ae.filename)||ne}`,ee)}},[y,e,u]),iE=S.useCallback(async M=>{if(M.preventDefault(),M.stopPropagation(),Z(!1),M.dataTransfer.files.length>0){O(!0);for(const ne of Array.from(M.dataTransfer.files)){const ae=ne.path||ne.name;try{const ee=await md(ae);if(e&&(ee!=null&&ee.id))try{await Su(e,ee.id);const xe=we.getState().sessions.find(pt=>pt.id===e),Le=(xe==null?void 0:xe.document_ids)??[];Le.includes(ee.id)||u(e,{document_ids:[...Le,ee.id]})}catch(xe){D.doc.warn(`Could not attach dropped document to session: ${xe}`)}}catch(ee){D.doc.error(`Upload failed: ${ae}`,ee)}}}},[e,u,O]),sE=M=>{M.preventDefault(),M.stopPropagation(),Z(!0)},aE=M=>{M.preventDefault(),M.stopPropagation(),Z(!1)},uE=M=>{ue(M),Kr(M)},lE=!F&&n.length===0&&!l,oE=S.useMemo(()=>{const M=new Map;let ne;for(const ae of n)if(ae.role==="user"&&ae.created_at)ne=new Date(ae.created_at).getTime();else if(ae.role==="assistant"&&ae.created_at&&ne!==void 0){const ee=new Date(ae.created_at).getTime();ee>ne&&M.set(ae.id,ee-ne),ne=void 0}return M},[n]);return c.jsxs("main",{className:`chat-view ${_?"drag-active":""}`,onDrop:iE,onDragOver:sE,onDragLeave:aE,children:[c.jsxs("header",{className:"chat-header",children:[c.jsx("div",{className:"chat-header-left",children:j?c.jsx("input",{className:"title-edit",value:P,onChange:M=>G(M.target.value),onBlur:Hd,onKeyDown:M=>M.key==="Enter"&&Hd(),autoFocus:!0,"aria-label":"Edit chat title"}):c.jsxs(c.Fragment,{children:[c.jsx("h3",{className:"chat-title",children:(Y==null?void 0:Y.title)||"Chat"}),c.jsx("button",{className:"btn-icon-sm",onClick:tE,title:"Rename","aria-label":"Rename chat",children:c.jsx(ly,{size:13})})]})}),c.jsxs("div",{className:"chat-header-right",children:[c.jsxs("a",{className:`session-hash-badge ${jd?"copied":""}`,href:`#${mn(e)}`,onClick:eE,title:jd?"Copied!":`Copy session link #${mn(e)}`,"aria-label":`Copy link for session ${mn(e)}`,children:[c.jsx(JT,{size:10}),c.jsxs("span",{children:["#",mn(e)]})]}),c.jsx("span",{className:`model-badge ${K!=null&&K.model_loaded?"":"no-model"}`,children:(K==null?void 0:K.model_loaded)||"No model loaded"}),c.jsx("button",{className:"btn-icon-sm",onClick:()=>O(!0),title:"Documents","aria-label":"Attach documents",children:c.jsx(uy,{size:15})}),c.jsx("button",{className:"btn-icon-sm",onClick:()=>A(!0),title:"Browse files","aria-label":"Browse files",children:c.jsx(eh,{size:15})}),c.jsx("button",{className:"btn-icon-sm",onClick:nE,title:"Export","aria-label":"Export chat",children:c.jsx(dd,{size:15})})]})]}),ce.length>0&&(()=>{const M=[...ce].sort((ee,xe)=>{const Le=ee.last_accessed_at||ee.indexed_at||"";return(xe.last_accessed_at||xe.indexed_at||"").localeCompare(Le)}),ne=De?M:M.slice(0,3),ae=M.length-3;return c.jsxs("div",{className:`doc-context-bar${De?" doc-context-expanded":""}`,"aria-label":`${ce.length} indexed document${ce.length!==1?"s":""}`,children:[c.jsx(cd,{size:12,className:"doc-context-icon"}),c.jsxs("span",{className:"doc-context-label",onClick:()=>O(!0),title:"Click to manage documents",role:"button",tabIndex:0,children:[ce.length," indexed"]}),c.jsxs("div",{className:`doc-context-pills${De?" doc-context-pills-expanded":""}`,children:[ne.map(ee=>c.jsxs("span",{className:"doc-pill",title:ee.filepath||ee.filename,children:[c.jsx(wn,{size:9,className:"doc-pill-icon"}),c.jsx("span",{className:"doc-pill-name",children:ee.filename}),c.jsx("button",{className:"doc-pill-remove",onClick:xe=>rE(xe,ee.id),title:`Remove ${ee.filename} from this session`,"aria-label":`Remove ${ee.filename} from this session`,children:c.jsx(Mt,{size:10})})]},ee.id)),!De&&ae>0&&c.jsxs("button",{className:"doc-pill-more",onClick:ee=>{ee.stopPropagation(),He(!0)},title:"Show all indexed files","aria-label":`Show ${ae} more files`,children:["+",ae," more"]}),De&&ae>0&&c.jsx("button",{className:"doc-pill-collapse",onClick:ee=>{ee.stopPropagation(),He(!1)},title:"Show fewer files","aria-label":"Collapse file list",children:"show less"})]})]})})(),c.jsxs("div",{className:"messages-scroll",ref:Nr,onScroll:Rn,children:[F&&c.jsx("div",{className:"skeleton-messages","aria-label":"Loading messages",children:[0,1,2].map(M=>c.jsxs("div",{className:"skeleton-msg",children:[c.jsxs("div",{className:"skeleton-header",children:[c.jsx("div",{className:"skeleton-avatar"}),c.jsx("div",{className:"skeleton-role"})]}),c.jsxs("div",{className:"skeleton-lines",children:[c.jsx("div",{className:"skeleton-line"}),c.jsx("div",{className:"skeleton-line"}),M!==2&&c.jsx("div",{className:"skeleton-line"})]})]},M))}),lE&&c.jsxs("div",{className:"empty-chat",children:[c.jsx("div",{className:"empty-chat-icon",children:c.jsx(ny,{size:36,strokeWidth:1.2})}),c.jsx("h4",{className:"empty-chat-title",children:"What can I help you with?"}),c.jsx("p",{className:"empty-chat-desc",children:"Ask about your documents, search files, or analyze data — powered by local AI."}),c.jsx("div",{className:"empty-chat-suggestions",children:Kv.map(M=>c.jsx("button",{className:"empty-chat-chip",onClick:()=>uE(M),children:M},M))})]}),n.map((M,ne)=>{const ae=!l&&!de&&M.role==="assistant"&&n.slice(ne+1).every(Le=>Le.role!=="assistant");if(de&&M.role==="assistant"&&ne===n.length-1)return null;const xe=oE.get(M.id);return c.jsx("div",{className:R===M.id?"msg-deleting":void 0,children:c.jsx(S0,{message:M,showTerminalCursor:ae,agentSteps:M.role==="assistant"?M.agentSteps:void 0,onDelete:l?void 0:Xg,onResend:!l&&M.role==="user"?Jg:void 0,latencyMs:xe})},M.id)}),(l||de)&&c.jsx("div",{className:`streaming-bubble ${de?"stream-ending":"stream-active"}`,children:c.jsx(S0,{message:{id:-1,session_id:e,role:"assistant",content:(l?d:be.current)||"",created_at:"",rag_sources:null},isStreaming:l,showTerminalCursor:de,agentSteps:l?m:Re.current,agentStepsActive:l&&m.some(M=>M.active)})}),c.jsx("div",{ref:Gn})]}),fe&&c.jsx("button",{className:"scroll-bottom-btn",onClick:un,title:"Scroll to bottom","aria-label":"Scroll to bottom",children:c.jsx(BT,{size:16})}),_&&c.jsxs("div",{className:"drag-overlay",children:[c.jsx(ku,{size:32,strokeWidth:1.5}),c.jsx("span",{children:"Drop files to index"})]}),c.jsxs("div",{className:"input-area",children:[c.jsxs("div",{className:`input-box ${me.length>0?"has-attachments":""}`,onDrop:Kn,onDragOver:M=>{M.preventDefault(),M.stopPropagation()},children:[c.jsxs("div",{className:"input-content",children:[me.length>0&&c.jsx("div",{className:"attachment-strip",children:me.map(M=>c.jsxs("div",{className:`attachment-preview ${M.error?"attachment-error":""}`,children:[M.isImage&&M.url?c.jsx("img",{src:M.url,alt:M.name,className:"attachment-thumb"}):c.jsx("div",{className:"attachment-file-icon",children:c.jsx(wn,{size:16})}),c.jsx("span",{className:"attachment-name",title:M.name,children:M.name.length>20?M.name.slice(0,17)+"...":M.name}),M.uploading&&c.jsx("span",{className:"attachment-spinner"}),M.error&&c.jsx("span",{className:"attachment-error-text",children:M.error}),c.jsx("button",{className:"attachment-remove",onClick:()=>ln(M.id),title:"Remove","aria-label":`Remove ${M.name}`,children:c.jsx(Mt,{size:12})})]},M.id))}),c.jsx("textarea",{ref:kt,className:"msg-input",value:le,onChange:Ar,onKeyDown:Zg,onPaste:Ct,placeholder:"Type a message or paste an image... (Shift+Enter for new line)",rows:1,disabled:l,"aria-label":"Message input"})]}),!l&&c.jsx("span",{className:"input-cursor","aria-hidden":"true"}),c.jsxs("div",{className:"input-btns",children:[c.jsx("button",{className:"btn-icon-sm",onClick:()=>O(!0),title:"Upload document","aria-label":"Upload document",children:c.jsx(ku,{size:15})}),c.jsx("button",{className:"btn-icon-sm",onClick:()=>A(!0),title:"Browse files","aria-label":"Browse files",children:c.jsx(eh,{size:15})}),l?c.jsx("button",{className:"stop-btn",onClick:On,title:"Stop generating","aria-label":"Stop generating",children:c.jsx(my,{size:14})}):c.jsx("button",{className:"send-btn",onClick:()=>Kr(),disabled:!le.trim()&&!me.some(M=>M.uploaded),title:"Send (Enter)","aria-label":"Send message",children:c.jsx(dy,{size:16})})]})]}),c.jsxs("div",{className:"input-footer",children:[c.jsxs("span",{className:"input-footer-item",children:[c.jsx(Yp,{size:10}),c.jsx("span",{children:"100% local & private"})]}),c.jsx("span",{className:"input-footer-sep"}),c.jsxs("span",{className:"input-footer-item",children:[c.jsx("kbd",{className:"kbd-hint",children:"Enter"}),c.jsx("span",{children:"send"})]}),c.jsxs("span",{className:"input-footer-item",children:[c.jsx("kbd",{className:"kbd-hint",children:"Shift+Enter"}),c.jsx("span",{children:"new line"})]}),l&&c.jsxs("span",{className:"input-footer-item",children:[c.jsx("kbd",{className:"kbd-hint",children:"Esc"}),c.jsx("span",{children:"stop"})]}),c.jsx("span",{className:"input-footer-sep"}),c.jsxs("span",{className:"input-footer-item",children:[c.jsx("kbd",{className:"kbd-hint",children:"Ctrl+K"}),c.jsx("span",{children:"search"})]}),c.jsxs("span",{className:"input-footer-item",children:[c.jsx("kbd",{className:"kbd-hint",children:"Ctrl+V"}),c.jsx("span",{children:"paste image"})]})]})]})]})}const N0="GAIA Agent UI",Ia="Your private AI assistant, running 100% locally on AMD Ryzen AI",e6=65,t6=350;function Gg(e,t){return t===","||t==="."?60+Math.random()*50:t===" "?15+Math.random()*25:Math.random()<.35?8+Math.random()*12:Math.random()<.06?45+Math.random()*35:18+Math.random()*22}const n6=["Scan my Downloads and tell me what I should clean up","Index a folder of documents so I can chat about them","What have I been working on lately? Show my recent files","What hardware is in my PC? Tell me about my CPU and GPU"];function r6({onNewTask:e,onSendPrompt:t}){const{systemStatus:n}=we(),[r,i]=S.useState(""),[s,a]=S.useState(!1),[u,l]=S.useState(""),[d,h]=S.useState(!1),[f,p]=S.useState("title"),[m,T]=S.useState(!1),x=n!==null&&!n.initialized,I=n!==null&&n.lemonade_running&&!n.model_loaded;return S.useEffect(()=>{let g=0;const E=setInterval(()=>{g++,g<=N0.length?i(N0.slice(0,g)):(clearInterval(E),a(!0))},e6);return()=>clearInterval(E)},[]),S.useEffect(()=>{if(!s)return;let g=!1;const E=setTimeout(()=>{if(g)return;p("subtitle");let v=0;const O=()=>{if(!g)if(v++,v<=Ia.length){l(Ia.slice(0,v));const A=Ia[v-1],F=v>1?Ia[v-2]:"",H=Gg(A,F);y.current=setTimeout(O,H)}else h(!0),p("done")};O()},t6),y={current:null};return()=>{g=!0,clearTimeout(E),y.current&&clearTimeout(y.current)}},[s]),S.useEffect(()=>{if(!d)return;const g=setTimeout(()=>T(!0),200);return()=>clearTimeout(g)},[d]),c.jsx("main",{className:"welcome",children:c.jsxs("div",{className:`welcome-inner ${m?"content-revealed":""}`,children:[c.jsxs("h1",{className:`welcome-title${s?" typing-done":""}`,children:[r.length>=4?c.jsxs(c.Fragment,{children:[c.jsx("span",{className:"gaia-glow",children:r.slice(0,4)}),c.jsx("span",{children:r.slice(4)})]}):r,f==="title"&&c.jsx("span",{className:`terminal-cursor${s?" blink":""}`})]}),c.jsx("p",{className:"welcome-sub",children:c.jsxs("span",{className:"typewriter-text",children:[u,(f==="subtitle"||f==="done")&&c.jsx("span",{className:`terminal-cursor terminal-cursor-sub${f==="done"?" blink":""}`})]})}),c.jsxs("span",{className:"welcome-version",children:["v","0.17.0"," ",c.jsx("span",{className:"beta-badge",children:"BETA"})]}),c.jsxs("div",{className:"features",children:[c.jsx(La,{icon:c.jsx(Yp,{size:22}),title:"Private",desc:"Data stays on your device",codeHint:"> encrypt --local",expandedDesc:"All processing happens on-device. No cloud, no tracking, complete data privacy."}),c.jsx(La,{icon:c.jsx(Wp,{size:22}),title:"Fast",desc:"NPU acceleration",codeHint:"> npu.accelerate()",expandedDesc:"Hardware-accelerated with AMD Ryzen AI NPU for real-time local inference."}),c.jsx(La,{icon:c.jsx(wn,{size:22}),title:"Smart",desc:"Document Q&A",codeHint:'> rag.query("...")',expandedDesc:"RAG-powered document Q&A — index files and chat with their contents."}),c.jsx(La,{icon:c.jsx(VT,{size:22}),title:"Free",desc:"No subscriptions",codeHint:"> license: MIT",expandedDesc:"No API keys, no subscriptions, no hidden costs. Fully open-source."})]}),x&&c.jsxs("div",{className:"welcome-setup-hint",children:[c.jsx(xu,{size:14}),c.jsxs("span",{children:[c.jsx("strong",{children:"First time?"})," Run ",c.jsx("code",{children:"gaia init --profile chat"})," in a terminal to install Lemonade Server and download the required AI models (~25 GB)."]})]}),!x&&I&&c.jsxs("div",{className:"welcome-setup-hint",children:[c.jsx(xu,{size:14}),c.jsxs("span",{children:["No model loaded. Run ",c.jsx("code",{children:"gaia init --profile chat"})," to download models (~25 GB)."]})]}),c.jsx("button",{className:"btn-primary start-btn",onClick:e,children:"Start a New Task"}),c.jsxs("div",{className:"suggestions",children:[c.jsx("span",{className:"suggestions-label",children:"Try asking:"}),c.jsx("div",{className:"suggestion-chips",children:n6.map(g=>c.jsx("button",{className:"chip",onClick:()=>t(g),children:g},g))})]}),c.jsx("p",{className:"welcome-copyright",children:"© 2025–2026 Advanced Micro Devices, Inc. All rights reserved."})]})})}function La({icon:e,title:t,desc:n,expandedDesc:r,codeHint:i}){const[s,a]=S.useState("idle"),[u,l]=S.useState(i),[d,h]=S.useState(""),f=S.useRef(null),p=()=>{a("erasing"),h("");let x=i.length;const I=()=>{if(x--,x>=0)l(i.slice(0,x)),f.current=setTimeout(I,15+Math.random()*20);else{a("typing"),l("");let g=0;const E=()=>{if(g++,g<=r.length){h(r.slice(0,g));const y=r[g-1],v=g>1?r[g-2]:"";f.current=setTimeout(E,Gg(y,v))}else a("done")};E()}};I()},m=()=>{f.current&&clearTimeout(f.current),a("idle"),l(i),h("")};S.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]);const T=s!=="idle";return c.jsxs("div",{className:`feature-card ${T?"feature-hovered":""}`,onMouseEnter:p,onMouseLeave:m,children:[c.jsx("div",{className:"feature-icon",children:e}),c.jsx("h3",{children:t}),c.jsx("p",{children:n}),c.jsxs("div",{className:"feature-terminal",children:[s==="idle"&&c.jsx("span",{className:"feature-code-hint",children:i}),s==="erasing"&&c.jsxs("span",{className:"feature-inline",children:[c.jsx("span",{className:"feature-code-hint feature-code-erasing",children:u}),c.jsx("span",{className:"terminal-cursor terminal-cursor-sm"})]}),(s==="typing"||s==="done")&&c.jsxs("span",{className:"feature-inline",children:[c.jsx("span",{className:"feature-expanded-text",children:d}),c.jsx("span",{className:`terminal-cursor terminal-cursor-sm${s==="done"?" blink":""}`})]})]})]})}function i6(e){const t=Math.floor((Date.now()-e)/1e3);if(t<60)return`${t}s`;const n=Math.floor(t/60),r=t%60;return`${n}m ${r}s`}function s6(e){try{const t=new Date(e);if(isNaN(t.getTime()))return"";const r=new Date().getTime()-t.getTime(),i=Math.floor(r/1e3),s=Math.floor(i/60),a=Math.floor(s/60),u=Math.floor(a/24);return i<60?"just now":s<60?`${s}m ago`:a<24?`${a}h ago`:u===1?"yesterday":u<7?`${u}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return""}}function a6(e){try{const t=new Date(e);return isNaN(t.getTime())?"":t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"})}catch{return""}}function u6(){const{documents:e,setDocuments:t,setShowDocLibrary:n,setShowFileBrowser:r,currentSessionId:i,sessions:s,updateSessionInList:a}=we(),u=s.find(j=>j.id===i)??null,[l,d]=S.useState(!1),[h,f]=S.useState(!1),[p,m]=S.useState(""),[T,x]=S.useState(""),[I,g]=S.useState(null),E=S.useRef(new Map),[,y]=S.useState(0);S.useEffect(()=>{D.doc.info("Loading document library...");const j=D.doc.time();ei().then(z=>{const P=z.documents||[];t(P),D.doc.timed(`Loaded ${P.length} document(s), ${z.total_chunks||0} chunks, ${z.total_size_bytes||0} bytes total`,j)}).catch(z=>{D.doc.error("Failed to load documents",z),t([])})},[t]);const v=e.some(j=>j.indexing_status==="indexing"||j.indexing_status==="pending");S.useEffect(()=>{if(!v)return;const j=we.getState().documents;for(const G of j)(G.indexing_status==="indexing"||G.indexing_status==="pending")&&!E.current.has(G.id)&&E.current.set(G.id,Date.now());let z=!1;const P=setInterval(async()=>{if(y(G=>G+1),!z){z=!0;try{const _=we.getState().documents.filter(Z=>Z.indexing_status==="indexing"||Z.indexing_status==="pending");for(const Z of _)try{const fe=await sb(Z.id);if(fe.indexing_status!=="indexing"&&fe.indexing_status!=="pending"){E.current.delete(Z.id);const N=await ei();t(N.documents||[]);break}}catch{}}finally{z=!1}}},2e3);return()=>clearInterval(P)},[v,t]),S.useEffect(()=>{const j=new Set(e.filter(z=>z.indexing_status==="indexing"||z.indexing_status==="pending").map(z=>z.id));for(const z of E.current.keys())j.has(z)||E.current.delete(z)},[e]),S.useEffect(()=>{const j=setInterval(async()=>{try{const P=(await ei()).documents||[],G=we.getState().documents;(P.length!==G.length||P.some((Z,fe)=>{const N=G.find(Ne=>Ne.id===Z.id);return!N||N.indexing_status!==Z.indexing_status||N.indexed_at!==Z.indexed_at||N.chunk_count!==Z.chunk_count}))&&(t(P),D.doc.debug("Document list refreshed (server-side changes detected)"))}catch{}},15e3);return()=>clearInterval(j)},[t]);const O=e.reduce((j,z)=>j+z.file_size,0),A=e.reduce((j,z)=>j+z.chunk_count,0),F=j=>{if(j<=0)return"0 B";const z=1024,P=["B","KB","MB","GB"],G=Math.min(Math.floor(Math.log(j)/Math.log(z)),P.length-1);return parseFloat((j/Math.pow(z,G)).toFixed(1))+" "+P[G]},H=S.useCallback(async(j,z)=>{var _;const P=z.includes(".")?"."+((_=z.split(".").pop())==null?void 0:_.toLowerCase()):"";if(P&&!mc(P)){const Z=Ru(P),fe=Z?Z.message:`The file type "${P}" is not supported for indexing.`;D.doc.warn(`Unsupported file type: ${z} (${P})`),g({filename:z,error:fe});return}D.doc.info(`Indexing document: ${z} (${j})`);const G=D.doc.time();f(!0),m(`Indexing ${z}...`),g(null);try{const Z=await md(j);if(D.doc.timed(`Indexed "${z}": ${(Z==null?void 0:Z.chunk_count)||"?"} chunks`,G),i&&(Z!=null&&Z.id))try{await Su(i,Z.id);const N=we.getState().sessions.find(re=>re.id===i),Ne=(N==null?void 0:N.document_ids)??[];Ne.includes(Z.id)||a(i,{document_ids:[...Ne,Z.id]}),D.doc.info(`Auto-attached "${z}" to session ${i}`)}catch(N){D.doc.warn(`Could not attach document to session: ${N}`)}const fe=await ei();t(fe.documents||[]),m("")}catch(Z){D.doc.error(`Failed to index "${z}"`,Z);const fe=Z instanceof Error?Z.message:"Upload failed";g({filename:z,error:fe}),m("")}finally{f(!1)}},[i,a,t]),K=S.useCallback(async j=>{j.preventDefault(),d(!1);const z=Array.from(j.dataTransfer.files);D.doc.info(`Dropped ${z.length} file(s) into Document Library`);for(const P of z){const G=P.path||P.name;await H(G,P.name)}},[H]),w=S.useCallback(async j=>{const z=e.find(P=>P.id===j);D.doc.info(`Deleting document: ${(z==null?void 0:z.filename)||j}`);try{await ib(j),E.current.delete(j),t(e.filter(P=>P.id!==j)),D.doc.info(`Deleted document: ${(z==null?void 0:z.filename)||j}`)}catch(P){D.doc.error(`Failed to delete document: ${(z==null?void 0:z.filename)||j}`,P)}},[e,t]),Y=S.useCallback(async(j,z)=>{D.doc.info(`Opening folder for: ${j}`);try{await pd(j,!0)}catch(P){D.doc.error(`Failed to open folder for: ${z}`,P)}},[]),te=S.useCallback(async j=>{const z=e.find(P=>P.id===j);D.doc.info(`Cancelling indexing for: ${(z==null?void 0:z.filename)||j}`);try{await ab(j),E.current.delete(j);const P=await ei();t(P.documents||[]),D.doc.info(`Cancelled indexing for: ${(z==null?void 0:z.filename)||j}`)}catch(P){D.doc.error(`Failed to cancel indexing: ${(z==null?void 0:z.filename)||j}`,P)}},[e,t]),ce=S.useCallback(async j=>{if(!i)return;const z=e.find(P=>P.id===j);D.doc.info(`Attaching document to session: ${(z==null?void 0:z.filename)||j}`);try{await Su(i,j);const P=we.getState().sessions.find(_=>_.id===i),G=(P==null?void 0:P.document_ids)??[];G.includes(j)||a(i,{document_ids:[...G,j]}),D.doc.info(`Attached "${(z==null?void 0:z.filename)||j}" to session ${i}`)}catch(P){D.doc.error(`Failed to attach document to session: ${(z==null?void 0:z.filename)||j}`,P)}},[i,e,a]),le=S.useCallback(async j=>{j.preventDefault(),T.trim()&&(D.doc.info(`Indexing from path input: ${T.trim()}`),await H(T.trim(),T.trim().split(/[\\/]/).pop()||"file"),x(""))},[T,H]),ue=j=>{const z=j.indexing_status||"complete",P=E.current.get(j.id),G=j.indexed_at?s6(j.indexed_at):"",_=j.indexed_at?a6(j.indexed_at):"";switch(z){case"indexing":case"pending":return c.jsxs("div",{className:"doc-indexing-status",children:[c.jsxs("div",{className:"doc-indexing-bar",children:[c.jsx("div",{className:"doc-indexing-bar-track",children:c.jsx("div",{className:"doc-indexing-bar-fill"})}),c.jsxs("span",{className:"doc-indexing-label",children:[c.jsx(ey,{size:12,className:"doc-spin"}),"Indexing",P?` (${i6(P)})`:"..."]})]}),c.jsxs("button",{className:"btn-cancel",onClick:Z=>{Z.stopPropagation(),te(j.id)},title:"Cancel indexing","aria-label":`Cancel indexing ${j.filename}`,children:[c.jsx(th,{size:14}),"Cancel"]})]});case"failed":return c.jsxs("span",{className:"doc-status-badge doc-status-failed",children:[c.jsx(br,{size:12})," Failed"]});case"cancelled":return c.jsxs("span",{className:"doc-status-badge doc-status-cancelled",children:[c.jsx(th,{size:12})," Cancelled"]});case"missing":return c.jsxs("span",{className:"doc-status-badge doc-status-missing",children:[c.jsx(br,{size:12})," File missing"]});default:return c.jsxs("span",{className:"doc-meta",children:[F(j.file_size)," · ",j.chunk_count," chunks",G&&c.jsxs("span",{className:"doc-timestamp",title:`Indexed: ${_}`,children:[c.jsx(Hp,{size:10}),G]})]})}};return c.jsx("div",{className:"modal-overlay",onClick:()=>n(!1),role:"dialog","aria-modal":"true","aria-label":"Document Library",children:c.jsxs("div",{className:"modal-panel doc-modal",onClick:j=>j.stopPropagation(),children:[c.jsxs("div",{className:"modal-header",children:[c.jsx("h3",{children:"Document Library"}),c.jsx("button",{className:"btn-icon",onClick:()=>n(!1),"aria-label":"Close document library",children:c.jsx(Mt,{size:18})})]}),c.jsxs("div",{className:"modal-body",children:[c.jsx("div",{className:`drop-zone ${l?"drag-over":""} ${h?"uploading":""}`,onDragOver:j=>{j.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:K,children:h?c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"upload-spinner"}),c.jsx("p",{children:p})]}):c.jsxs(c.Fragment,{children:[c.jsx(ku,{size:32,strokeWidth:1.5}),c.jsx("p",{children:"Drop files here to index"}),c.jsx("span",{className:"drop-hint",children:"PDF, TXT, MD, code files, and 50+ formats"})]})}),c.jsxs("form",{className:"path-input-form",onSubmit:le,children:[c.jsx(Hn,{size:16,className:"path-icon"}),c.jsx("input",{type:"text",className:"path-input",value:T,onChange:j=>x(j.target.value),placeholder:"Or enter file path: C:\\docs\\manual.pdf","aria-label":"File path to index"}),c.jsx("button",{type:"submit",className:"btn-secondary",disabled:!T.trim()||h,children:"Index"}),c.jsxs("button",{type:"button",className:"btn-secondary",onClick:()=>{n(!1),r(!0)},title:"Browse files on this computer",children:[c.jsx(Pr,{size:14}),"Browse Files"]})]}),I&&c.jsx(Qg,{filename:I.filename,error:I.error,onDismiss:()=>g(null)}),e.length>0&&c.jsxs("div",{className:"doc-stats",children:[c.jsxs("span",{children:[e.length," document",e.length!==1?"s":""]}),c.jsx("span",{children:"·"}),c.jsxs("span",{children:[A," chunks"]}),c.jsx("span",{children:"·"}),c.jsx("span",{children:F(O)})]}),c.jsxs("div",{className:"doc-list",children:[e.length===0&&!h&&c.jsxs("div",{className:"empty-docs",children:[c.jsx(wn,{size:32,strokeWidth:1}),c.jsx("p",{children:"No documents indexed yet"}),c.jsx("span",{children:"Drop files above or enter a file path"})]}),e.map(j=>{var z;return c.jsxs("div",{className:`doc-row ${j.indexing_status==="indexing"?"doc-row-indexing":""}`,children:[c.jsxs("div",{className:"doc-info",children:[c.jsx("span",{className:"doc-name",children:j.filename}),ue(j)]}),c.jsxs("div",{className:"doc-row-actions",children:[j.filepath&&c.jsx("button",{className:"btn-icon-sm doc-open-folder",onClick:()=>Y(j.filepath,j.filename),title:`Open folder: ${j.filepath}`,"aria-label":`Open containing folder for ${j.filename}`,children:c.jsx(Hn,{size:14})}),i&&j.indexing_status==="complete"&&!((z=u==null?void 0:u.document_ids)!=null&&z.includes(j.id))&&c.jsx("button",{className:"btn-icon-sm doc-attach",onClick:()=>ce(j.id),title:"Use in current session","aria-label":`Attach ${j.filename} to current session`,children:c.jsx(XT,{size:14})}),j.indexing_status!=="indexing"&&j.indexing_status!=="pending"&&c.jsx("button",{className:"btn-icon-sm doc-delete",onClick:()=>w(j.id),title:"Remove","aria-label":`Remove ${j.filename}`,children:c.jsx(_u,{size:14})})]})]},j.id)})]})]})]})})}function l6(e){if(e.type==="folder")return c.jsx($p,{size:16});const t=(e.extension||"").toLowerCase();return[".csv",".xlsx",".xls",".tsv"].includes(t)?c.jsx(gy,{size:16}):[".py",".js",".ts",".java",".c",".cpp",".go",".rs"].includes(t)?c.jsx($T,{size:16}):[".pdf",".doc",".docx",".txt",".md"].includes(t)?c.jsx(wn,{size:16}):c.jsx(zp,{size:16})}function o6(e){if(e<=0)return"";const t=1024,n=["B","KB","MB","GB"],r=Math.min(Math.floor(Math.log(e)/Math.log(t)),n.length-1);return parseFloat((e/Math.pow(t,r)).toFixed(1))+" "+n[r]}function c6(e){if(!e)return"";const t=new Date(e),n=new Date,r=n.getTime()-t.getTime(),i=Math.floor(r/36e5);if(i<1)return"Just now";if(i<24)return`${i}h ago`;const s=Math.floor(i/24);return s<7?`${s}d ago`:t.toLocaleDateString(void 0,{month:"short",day:"numeric",year:t.getFullYear()!==n.getFullYear()?"numeric":void 0})}function d6(e){switch(e){case"home":return c.jsx(GT,{size:14});case"desktop":return c.jsx(ry,{size:14});case"documents":return c.jsx(wn,{size:14});case"download":return c.jsx(dd,{size:14});default:return c.jsx($p,{size:14})}}const f6=[{label:"All Files",value:""},{label:"Documents",value:"pdf,doc,docx,txt,md"},{label:"Spreadsheets",value:"csv,xlsx,xls,tsv"},{label:"Code",value:"py,js,ts,java,c,cpp,go,rs,rb,sh"},{label:"Data",value:"json,xml,yaml,yml,csv,tsv"}];function h6(){const{setShowFileBrowser:e,currentSessionId:t,updateSessionInList:n}=we(),[r,i]=S.useState(""),[s,a]=S.useState(null),[u,l]=S.useState([]),[d,h]=S.useState([]),[f,p]=S.useState(!1),[m,T]=S.useState(null),[x,I]=S.useState(""),[g,E]=S.useState(null),[y,v]=S.useState(!1),[O,A]=S.useState(""),[F,H]=S.useState(new Set),[K,w]=S.useState(null),[Y,te]=S.useState(!1),[ce,le]=S.useState(new Set),[ue,j]=S.useState(null),z=S.useRef(null),[P,G]=S.useState(null),_=S.useCallback(async R=>{p(!0),T(null),E(null),I("");try{const W=await lb(R);i(W.current_path),a(W.parent_path),l(W.entries),W.quick_links.length>0&&h(W.quick_links),D.ui.info(`Browsing: ${W.current_path} (${W.entries.length} items)`)}catch(W){const de=W instanceof Error?W.message:"Failed to load directory";T(de),D.ui.error("Browse failed",W)}finally{p(!1)}},[]);S.useEffect(()=>{_()},[_]),S.useEffect(()=>()=>{z.current&&clearTimeout(z.current)},[]);const Z=S.useCallback(async()=>{if(!x.trim()){E(null);return}v(!0),T(null);try{const R=await cb(x.trim(),O||void 0,30);E(R.results),D.ui.info(`Search "${x}": ${R.total} results`)}catch(R){const W=R instanceof Error?R.message:"Search failed";T(W),D.ui.error("Search failed",R)}finally{v(!1)}},[x,O]),fe=R=>{R.key==="Enter"&&Z()},N=S.useCallback(R=>{R.type==="folder"&&(_(R.path),H(new Set),w(null))},[_]),Ne=S.useCallback(async R=>{te(!0);try{const W=await db(R);w(W)}catch(W){D.ui.error("Preview failed",W)}finally{te(!1)}},[]),re=S.useCallback(async()=>{var Nr,kt;if(F.size===0)return;const R=Array.from(F);G(null);const W=[],de=[];for(const Se of R){const Ve=Se.includes(".")?"."+((Nr=Se.split(".").pop())==null?void 0:Nr.toLowerCase()):"";Ve&&!mc(Ve)?de.push(Se):W.push(Se)}if(de.length>0&&W.length===0){const Se=de[0],Ve="."+((kt=Se.split(".").pop())==null?void 0:kt.toLowerCase()),St=Ru(Ve);G({filename:de.length===1?Se.split(/[\\/]/).pop()||Se:`${de.length} files`,error:St?St.message:`File type "${Ve}" is not supported for indexing.`});return}if(de.length>0&&(D.doc.warn(`Skipping ${de.length} unsupported file(s)`),j(`Skipping ${de.length} unsupported file(s)...`)),W.length===0)return;le(new Set(W)),j(`Indexing ${W.length} file(s)...`);let Ae=0,be=0,Re="";const ze=[],Gn=new Set(u.filter(Se=>Se.type==="folder").map(Se=>Se.path));for(const Se of W)try{if(Gn.has(Se))(await ob(Se)).documents.forEach(St=>{St.id&&ze.push(St.id)});else{const Ve=await md(Se);Ve!=null&&Ve.id&&ze.push(Ve.id)}Ae++,j(`Indexed ${Ae}/${W.length}...`)}catch(Ve){be++,Re=Ve instanceof Error?Ve.message:"Unknown error"}if(t&&ze.length>0){for(const bn of ze)try{await Su(t,bn)}catch(Ht){D.doc.warn(`Could not attach document to session: ${Ht}`)}const Se=we.getState().sessions.find(bn=>bn.id===t),Ve=(Se==null?void 0:Se.document_ids)??[],St=ze.filter(bn=>!Ve.includes(bn));St.length>0&&n(t,{document_ids:[...Ve,...St]})}if(le(new Set),be>0)j(`Done: ${Ae} indexed, ${be} failed`),G({filename:`${be} file(s)`,error:Re||"Indexing failed for some files"});else{const Se=de.length>0?` (${de.length} skipped — unsupported type)`:"";j(`Successfully indexed ${Ae} file(s)${Se}`)}z.current&&clearTimeout(z.current),z.current=setTimeout(()=>j(null),5e3),H(new Set)},[F,t,n]),me=S.useCallback(()=>{if(F.size===0)return;const R=Array.from(F);e(!1);const W=R.length===1?`Analyze this file for me: ${R[0]}`:`Analyze these files for me:
429
- ${R.map(de=>`- ${de}`).join(`
430
- `)}`;setTimeout(()=>{window.dispatchEvent(new CustomEvent("gaia:send-prompt",{detail:{prompt:W}}))},100)},[F,e]),ve=r?r.replace(/\\/g,"/").split("/").filter(Boolean):[],De=ve.map((R,W)=>({label:R,path:ve.slice(0,W+1).join("/")+(W===0&&R.includes(":")?"/":"")})),He=g?g.map(R=>({name:R.name,path:R.path,type:"file",size:R.size,extension:R.extension||"",modified:R.modified||""})):u;return c.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"File Browser",children:c.jsxs("div",{className:`modal-panel file-browser-modal ${K?"has-preview":""}`,onClick:R=>R.stopPropagation(),children:[c.jsxs("div",{className:"modal-header",children:[c.jsxs("h3",{children:[c.jsx(Hn,{size:18})," File Browser"]}),c.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close",children:c.jsx(Mt,{size:18})})]}),c.jsxs("div",{className:"file-browser-body",children:[c.jsx("div",{className:"fb-quick-links",children:d.map(R=>c.jsxs("button",{className:"fb-quick-link",onClick:()=>_(R.path),title:R.path,children:[d6(R.icon),c.jsx("span",{children:R.name})]},R.path))}),c.jsxs("div",{className:"fb-search-bar",children:[c.jsxs("div",{className:"fb-search-input-wrap",children:[c.jsx(Pr,{size:14,className:"fb-search-icon"}),c.jsx("input",{type:"text",className:"fb-search-input",placeholder:"Search files on your PC...",value:x,onChange:R=>I(R.target.value),onKeyDown:fe,"aria-label":"Search files"}),x&&c.jsx("button",{className:"fb-search-clear",onClick:()=>{I(""),E(null)},"aria-label":"Clear search",children:c.jsx(Mt,{size:12})})]}),c.jsx("select",{className:"fb-type-filter",value:O,onChange:R=>A(R.target.value),"aria-label":"File type filter",children:f6.map(R=>c.jsx("option",{value:R.value,children:R.label},R.value))}),c.jsx("button",{className:"fb-search-btn",onClick:Z,disabled:!x.trim()||y,children:y?"Searching...":"Search"})]}),!g&&c.jsxs("div",{className:"fb-breadcrumb",children:[c.jsx("button",{className:"fb-crumb",onClick:()=>_("/"),children:c.jsx(QT,{size:12})}),De.map((R,W)=>c.jsxs("span",{className:"fb-crumb-item",children:[c.jsx(ta,{size:12,className:"fb-crumb-sep"}),c.jsx("button",{className:"fb-crumb",onClick:()=>_(R.path),children:R.label})]},W)),s&&c.jsx("button",{className:"fb-up-btn",onClick:()=>_(s),title:"Go up",children:c.jsx(jT,{size:14})})]}),g&&c.jsxs("div",{className:"fb-search-header",children:[c.jsxs("span",{children:["Found ",g.length,' result(s) for "',x,'"']}),c.jsx("button",{className:"fb-back-btn",onClick:()=>{E(null),I("")},children:"Back to browsing"})]}),m&&c.jsx("div",{className:"fb-error",children:m}),c.jsxs("div",{className:"fb-content",children:[c.jsxs("div",{className:"fb-file-list",children:[f&&c.jsx("div",{className:"fb-loading",children:"Loading..."}),!f&&He.length===0&&c.jsx("div",{className:"fb-empty",children:g?"No files found":"This folder is empty"}),!f&&He.map(R=>{var be;const W=R.extension||(R.name.includes(".")?"."+((be=R.name.split(".").pop())==null?void 0:be.toLowerCase()):""),de=R.type==="file"&&W&&!mc(W),Ae=de?Ru(W):null;return c.jsxs("div",{className:`fb-entry ${R.type} ${F.has(R.path)?"selected":""} ${de?"unsupported":""}`,onClick:()=>R.type==="folder"?N(R):Ne(R.path),onDoubleClick:()=>R.type==="folder"?N(R):void 0,title:de?`${(Ae==null?void 0:Ae.label)||"This"} file type cannot be indexed`:R.path,children:[c.jsx("input",{type:"checkbox",className:"fb-entry-checkbox",checked:F.has(R.path),onChange:()=>{H(Re=>{const ze=new Set(Re);return ze.has(R.path)?ze.delete(R.path):ze.add(R.path),ze})},onClick:Re=>Re.stopPropagation(),"aria-label":`Select ${R.name}`}),c.jsx("span",{className:"fb-entry-icon",children:l6(R)}),c.jsx("span",{className:"fb-entry-name",title:R.path,children:R.name}),de&&c.jsx("span",{className:"fb-unsupported-badge",children:"Not indexable"}),c.jsx("span",{className:"fb-entry-size",children:R.type==="file"?o6(R.size):""}),c.jsx("span",{className:"fb-entry-date",children:c6(R.modified)})]},R.path)})]}),K&&c.jsxs("div",{className:"fb-preview",children:[c.jsxs("div",{className:"fb-preview-header",children:[c.jsx("span",{className:"fb-preview-name",children:K.name}),c.jsx("button",{className:"btn-icon-sm",onClick:()=>w(null),"aria-label":"Close preview",children:c.jsx(Mt,{size:14})})]}),c.jsxs("div",{className:"fb-preview-meta",children:[c.jsx("span",{children:K.size_display}),K.total_lines&&c.jsxs("span",{children:[K.total_lines," lines"]}),K.columns&&c.jsxs("span",{children:[K.columns.length," columns"]}),K.row_count!==null&&c.jsxs("span",{children:[K.row_count," rows"]})]}),K.columns&&c.jsxs("div",{className:"fb-preview-columns",children:[c.jsx("strong",{children:"Columns:"})," ",K.columns.join(", ")]}),Y?c.jsx("div",{className:"fb-preview-loading",children:"Loading preview..."}):K.is_text&&K.preview_lines.length>0?c.jsx("pre",{className:"fb-preview-content",children:K.preview_lines.slice(0,30).join(`
431
- `)}):c.jsx("div",{className:"fb-preview-binary",children:"Binary file - no preview available"})]})]}),P&&c.jsx(Qg,{filename:P.filename,error:P.error,onDismiss:()=>G(null)}),c.jsxs("div",{className:"fb-actions",children:[c.jsx("div",{className:"fb-selection-info",children:F.size>0?`${F.size} item(s) selected`:"Select files to index or analyze"}),ue&&c.jsx("span",{className:"fb-index-status",children:ue}),c.jsxs("div",{className:"fb-action-btns",children:[c.jsxs("button",{className:"fb-action-btn secondary",onClick:re,disabled:F.size===0||ce.size>0,title:"Index selected files for RAG search",children:[c.jsx(ku,{size:14}),"Index Selected"]}),c.jsxs("button",{className:"fb-action-btn primary",onClick:me,disabled:F.size===0,title:"Send selected files to the chat agent for analysis",children:[c.jsx(UT,{size:14}),"Ask Agent"]})]})]})]})]})})}const Ns=32768,Bd="Qwen3.5-35B-A3B-GGUF",m6=3e5,p6=18e5,g6=1e4;function Kg(e){const[t,n]=S.useState(!1),[r,i]=S.useState(!1),s=S.useRef(null),a=S.useRef(null),u=S.useRef(null),l=S.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null)},[]);S.useEffect(()=>l,[l]);const d=S.useCallback((m,T)=>{u.current&&clearInterval(u.current),u.current=setInterval(async()=>{var x,I;try{const g=await hd();T==="load"?((x=g.model_loaded)==null?void 0:x.toLowerCase())===m.toLowerCase()&&(n(!1),s.current&&(clearTimeout(s.current),s.current=null),u.current&&(clearInterval(u.current),u.current=null)):(g.model_downloaded===!0||((I=g.model_loaded)==null?void 0:I.toLowerCase())===m.toLowerCase())&&(i(!1),a.current&&(clearTimeout(a.current),a.current=null),u.current&&(clearInterval(u.current),u.current=null))}catch{}},g6)},[]),h=e??Bd,f=S.useCallback(async m=>{const T=m??h;n(!0);try{await Gy(T,Ns),D.system.info(`Load model triggered: ${T}`),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>n(!1),m6),d(T,"load")}catch(x){D.system.error("Failed to trigger model load",x),n(!1)}},[h,d]),p=S.useCallback(async(m=!1,T)=>{const x=T??h;i(!0);try{await Ky(x,m),D.system.info(`Download model triggered: ${x} (force=${m})`),a.current&&clearTimeout(a.current),a.current=setTimeout(()=>i(!1),p6),d(x,"download")}catch(I){D.system.error("Failed to trigger model download",I),i(!1)}},[h,d]);return{isLoadingModel:t,isDownloadingModel:r,loadModel:f,downloadModel:p}}function E6(){const{setShowSettings:e,sessions:t,removeSession:n}=we(),[r,i]=S.useState(null),[s,a]=S.useState(!0),[u,l]=S.useState([]);S.useEffect(()=>{D.system.info("Checking system status...");const F=D.system.time();hd().then(H=>{i(H),D.system.timed("System status received",F,{lemonade:H.lemonade_running?"running":"stopped",model:H.model_loaded||"none",embedding:H.embedding_model_loaded?"yes":"no",disk:`${H.disk_space_gb}GB free`,memory:`${H.memory_available_gb}GB available`}),H.lemonade_running||D.system.warn("Lemonade Server is NOT running.")}).catch(H=>{D.system.error("Failed to get system status",H),i(null)}).finally(()=>a(!1)),mb().then(H=>l(H.servers)).catch(()=>{})},[]);const d=(r==null?void 0:r.default_model_name)??Bd,{isLoadingModel:h,isDownloadingModel:f,loadModel:p,downloadModel:m}=Kg(d),[T,x]=S.useState(!1),I=S.useRef(null);S.useEffect(()=>()=>{I.current&&clearTimeout(I.current)},[]);const g=S.useCallback(async()=>{if(!T){x(!0),I.current&&clearTimeout(I.current),I.current=setTimeout(()=>x(!1),4e3);return}x(!1),I.current&&clearTimeout(I.current),D.system.warn(`Clearing ALL data: ${t.length} session(s)`);const F=D.system.time();let H=0;for(const K of t)try{await e1(K.id),n(K.id),H++}catch(w){D.system.error(`Failed to delete session ${K.id}`,w)}D.system.timed(`Cleared ${H}/${t.length} session(s)`,F),e(!1)},[T,t,n,e]),E="0.17.0",y=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.expected_model_loaded===!1),v=!!(r!=null&&r.lemonade_running&&r.model_loaded&&r.context_size_sufficient===!1),O=!!(r!=null&&r.lemonade_running&&!r.model_loaded&&r.model_downloaded===!1),A=y||v;return c.jsx("div",{className:"modal-overlay",onClick:()=>e(!1),role:"dialog","aria-modal":"true","aria-label":"Settings",children:c.jsxs("div",{className:"modal-panel settings-modal",onClick:F=>F.stopPropagation(),children:[c.jsxs("div",{className:"modal-header",children:[c.jsx("h3",{children:"Settings"}),c.jsx("button",{className:"btn-icon",onClick:()=>e(!1),"aria-label":"Close settings",children:c.jsx(Mt,{size:18})})]}),c.jsxs("div",{className:"modal-body",children:[c.jsxs("section",{className:"settings-section",children:[c.jsx("h4",{children:"System Status"}),s?c.jsx("p",{className:"loading-text",children:"Checking system..."}):r?c.jsxs(c.Fragment,{children:[c.jsxs("div",{className:"status-grid",children:[c.jsx(cn,{label:"Lemonade Server",value:r.lemonade_running?`Running${r.lemonade_version?` v${r.lemonade_version}`:""}`:"Not Running",ok:r.lemonade_running,hint:r.lemonade_running?void 0:r.initialized?"Run: lemonade-server serve":"Run: gaia init --profile chat"}),c.jsx(cn,{label:"Model",value:r.model_loaded||"None loaded",ok:!!r.model_loaded&&r.expected_model_loaded!==!1,hint:r.model_loaded?r.expected_model_loaded===!1?`Expected: ${d}`:void 0:"Run: gaia init --profile chat"}),r.model_size_gb!=null&&c.jsx(cn,{label:"Model Size",value:`${r.model_size_gb} GB`,ok:!0}),r.model_device&&c.jsx(cn,{label:"Device",value:r.model_device.toUpperCase(),ok:r.model_device!=="cpu"}),r.model_context_size!=null&&c.jsx(cn,{label:"Context Window",value:`${(r.model_context_size/1024).toFixed(0)}K tokens`,ok:r.context_size_sufficient}),r.model_labels&&r.model_labels.length>0&&c.jsx(cn,{label:"Capabilities",value:r.model_labels.join(", "),ok:!0}),c.jsx(cn,{label:"Embedding Model",value:r.embedding_model_loaded?"Available":"Not loaded",ok:r.embedding_model_loaded}),r.gpu_name&&c.jsx(cn,{label:"GPU",value:`${r.gpu_name}${r.gpu_vram_gb?` (${r.gpu_vram_gb} GB)`:""}`,ok:!0}),c.jsx(cn,{label:"Disk Space",value:`${r.disk_space_gb} GB free`,ok:r.disk_space_gb>5,hint:!r.model_loaded&&r.disk_space_gb<30?`Models require ~25 GB — only ${r.disk_space_gb} GB available`:void 0}),c.jsx(cn,{label:"Memory",value:`${r.memory_available_gb} GB available`,ok:r.memory_available_gb>2}),r.processor_name&&c.jsx(cn,{label:"Processor",value:r.processor_name,ok:r.device_supported!==!1})]}),O&&c.jsxs("div",{className:"model-action-row model-action-row--download",children:[c.jsxs("div",{className:"model-action-info",children:[c.jsx("span",{className:"model-action-label",children:"Model not downloaded."}),c.jsxs("span",{className:"model-action-desc",children:[c.jsx("strong",{children:d})," is required for GAIA Chat (~25 GB)."]})]}),c.jsx("button",{className:"btn-model-action btn-model-action--download",onClick:()=>m(!1),disabled:f,children:f?c.jsxs(c.Fragment,{children:[c.jsx(xi,{size:13,className:"btn-spinner"})," Downloading…"]}):"Download"})]}),A&&c.jsxs("div",{className:"model-action-row model-action-row--load",children:[c.jsxs("div",{className:"model-action-info",children:[c.jsx("span",{className:"model-action-label",children:y?"Wrong model loaded.":"Context window too small."}),c.jsxs("span",{className:"model-action-desc",children:["Load ",c.jsx("strong",{children:d})," with ",(Ns/1024).toFixed(0),"K token context."]})]}),c.jsx("button",{className:"btn-model-action btn-model-action--load",onClick:()=>p(),disabled:h,children:h?c.jsxs(c.Fragment,{children:[c.jsx(xi,{size:13,className:"btn-spinner"})," Loading…"]}):"Load Model"})]}),r.lemonade_running&&c.jsxs("div",{className:"force-redownload-row",children:[c.jsx("span",{className:"force-redownload-label",children:"If the model file is corrupted:"}),c.jsx("button",{className:"btn-force-redownload",onClick:()=>m(!0),disabled:f,children:f?c.jsxs(c.Fragment,{children:[c.jsx(xi,{size:12,className:"btn-spinner"})," Downloading…"]}):"Force Re-download"})]})]}):c.jsxs("div",{className:"status-error",children:[c.jsx("p",{children:"Could not connect to server"}),c.jsx("code",{children:"gaia chat --ui"})]})]}),u.length>0&&c.jsxs("section",{className:"settings-section",children:[c.jsx("h4",{children:"MCP Servers"}),c.jsx("div",{className:"status-grid",children:u.map(F=>c.jsxs("div",{className:"status-row",children:[c.jsx("span",{className:"status-label",children:F.name}),c.jsx("div",{className:"status-value-wrap",children:F.connected?c.jsxs("span",{className:"status-value ok mcp-status-connected",children:[c.jsx(cd,{size:12}),F.tool_count," tool",F.tool_count!==1?"s":""]}):c.jsxs("span",{className:"status-value warn mcp-status-failed",title:F.error??void 0,children:[c.jsx(br,{size:12}),"Failed"]})})]},F.name))})]}),c.jsxs("section",{className:"settings-section",children:[c.jsx("h4",{children:"About"}),c.jsxs("div",{className:"about-info",children:[c.jsxs("p",{children:["GAIA Agent UI v",E," ",c.jsx("span",{className:"beta-badge",children:"BETA"})]}),c.jsx("p",{className:"about-sub",children:"Privacy-first AI chat for AMD Ryzen AI PCs."})]})]}),c.jsxs("section",{className:"settings-section danger-zone",children:[c.jsx("h4",{children:"Privacy & Data"}),c.jsxs("div",{className:"setting-row",children:[c.jsx("span",{children:"Data location"}),c.jsx("code",{className:"setting-path",children:"~/.gaia/chat/"})]}),c.jsx("div",{className:"danger-divider"}),c.jsxs("div",{className:"setting-actions",children:[c.jsx("p",{className:"danger-warning",children:"This will permanently delete all sessions, messages, and documents."}),c.jsx("button",{className:"btn-danger",onClick:g,children:T?"Click again to confirm":"Clear All Data"})]})]})]})]})})}function cn({label:e,value:t,ok:n,hint:r}){return c.jsxs("div",{className:`status-row${r?" status-row--has-hint":""}`,children:[c.jsx("span",{className:"status-label",children:e}),c.jsxs("div",{className:"status-value-wrap",children:[c.jsx("span",{className:`status-value ${n?"ok":"warn"}`,children:t}),r&&c.jsx("span",{className:"status-hint",children:c.jsx("code",{children:r})})]})]})}const T6="modulepreload",y6=function(e,t){return new URL(e,t).href},A0={},b6=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){const a=document.getElementsByTagName("link"),u=document.querySelector("meta[property=csp-nonce]"),l=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=Promise.allSettled(n.map(d=>{if(d=y6(d,r),d in A0)return;A0[d]=!0;const h=d.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(!!r)for(let T=a.length-1;T>=0;T--){const x=a[T];if(x.href===d&&(!h||x.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${d}"]${f}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":T6,h||(m.as="script"),m.crossOrigin="",m.href=d,l&&m.setAttribute("nonce",l),document.head.appendChild(m),h)return new Promise((T,x)=>{m.addEventListener("load",T),m.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${d}`)))})}))}function s(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&s(u.reason);return t().catch(s)})};let ro=null;function x6({isOpen:e,onClose:t,error:n}){const[r,i]=S.useState(null),[s,a]=S.useState(!1),u=S.useRef(null),l=S.useCallback(async()=>{try{const p=await n1();return i(p),p}catch(p){return D.system.error("Failed to fetch tunnel status",p),null}},[]);S.useEffect(()=>{if(!e||n)return;l();const p=setInterval(async()=>{const m=await l();m!=null&&m.active&&(m!=null&&m.url)&&clearInterval(p)},2e3);return()=>clearInterval(p)},[e,n,l]),S.useEffect(()=>{if(!(r!=null&&r.active)||!r.url||!r.token||!u.current)return;const p=`${r.url}/?token=${r.token}`;D.system.info(`Generating QR code for: ${p}`),(async()=>{if(!ro)try{const x=await b6(()=>import("./browser-CTB2jwNe.js").then(I=>I.b),[],import.meta.url);ro=x.default||x}catch{D.system.error("QR code library not available - install with: npm install qrcode");return}const T=document.documentElement.getAttribute("data-theme")==="dark";try{await ro.toCanvas(u.current,p,{width:200,margin:2,color:{dark:T?"#e6edf3":"#111827",light:T?"#0d0d0d":"#ffffff"}})}catch(x){D.system.error("QR code generation failed",x)}})()},[r==null?void 0:r.active,r==null?void 0:r.url,r==null?void 0:r.token]);const d=S.useRef(null),h=S.useCallback(()=>{if(!(r!=null&&r.url)||!(r!=null&&r.token))return;const p=`${r.url}/?token=${r.token}`;navigator.clipboard.writeText(p).then(()=>{a(!0),d.current&&clearTimeout(d.current),d.current=setTimeout(()=>a(!1),2e3)})},[r]);if(S.useEffect(()=>()=>{d.current&&clearTimeout(d.current)},[]),!e)return null;const f=r!=null&&r.active&&(r!=null&&r.url)&&(r!=null&&r.token)?`${r.url}/?token=${r.token}`:"";return c.jsx("div",{className:"modal-overlay",onClick:t,role:"dialog","aria-modal":"true","aria-label":"Mobile Access",children:c.jsxs("div",{className:"modal-panel mobile-modal",onClick:p=>p.stopPropagation(),children:[c.jsxs("div",{className:"modal-header",children:[c.jsxs("h3",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[c.jsx(Vp,{size:18}),"Mobile Access"]}),c.jsx("button",{className:"btn-icon",onClick:t,"aria-label":"Close",children:c.jsx(Mt,{size:18})})]}),c.jsxs("div",{className:"modal-body mobile-modal-body",children:[c.jsxs("div",{className:"tunnel-status",children:[c.jsx("span",{className:`status-dot ${r!=null&&r.active?"active":n?"error":"starting"}`}),c.jsx("span",{children:r!=null&&r.active?"Tunnel active":n?"Connection failed":"Starting tunnel..."}),!(r!=null&&r.active)&&!n&&c.jsx("span",{className:"tunnel-spinner"})]}),n&&c.jsx("div",{className:"tunnel-error",children:n}),c.jsx("div",{className:"qr-code-area",children:r!=null&&r.active?c.jsx("canvas",{ref:u}):n?c.jsx("div",{className:"qr-placeholder error",children:"Failed to connect"}):c.jsxs("div",{className:"qr-placeholder",children:[c.jsx("div",{className:"placeholder-spinner"}),c.jsx("span",{children:"Connecting..."})]})}),(r==null?void 0:r.active)&&f&&c.jsxs("div",{className:"tunnel-url-area",children:[c.jsx("label",{children:"Mobile URL"}),c.jsxs("div",{className:"tunnel-url-row",children:[c.jsx("input",{type:"text",readOnly:!0,value:f}),c.jsxs("button",{className:`copy-url-btn ${s?"copied":""}`,onClick:h,title:"Copy URL",children:[s?c.jsx(ea,{size:13}):c.jsx(Xu,{size:13}),s?"Copied":"Copy"]})]})]}),(r==null?void 0:r.active)&&(r==null?void 0:r.publicIp)&&(r==null?void 0:r.url)&&!r.url.includes("ngrok-free.app")&&c.jsxs("div",{className:"tunnel-password-hint",children:[c.jsx("label",{children:"Tunnel Password"}),c.jsx("div",{className:"tunnel-password-value",children:r.publicIp}),c.jsx("span",{className:"tunnel-password-note",children:"Enter this when the tunnel page asks for a password"})]}),c.jsx("div",{className:"mobile-instructions",children:c.jsxs("ol",{children:[c.jsx("li",{children:"Scan the QR code with your phone's camera"}),(r==null?void 0:r.url)&&!r.url.includes("ngrok-free.app")&&c.jsx("li",{children:"Enter the tunnel password shown above when prompted"}),c.jsx("li",{children:"Chat with GAIA from your mobile device"}),c.jsx("li",{children:"Your data stays secure via encrypted tunnel"})]})}),c.jsx("div",{className:"mobile-access-actions",children:c.jsx("button",{className:"btn-secondary",onClick:t,children:"Close"})})]})]})})}function _6({onRetry:e}){const{backendConnected:t,systemStatus:n,currentSessionId:r,messages:i}=we(),[s,a]=S.useState(!1),u=!!r&&i.length>0,l=(n==null?void 0:n.default_model_name)??Bd,{isLoadingModel:d,isDownloadingModel:h,loadModel:f,downloadModel:p}=Kg(l),m=S.useRef(n==null?void 0:n.lemonade_running),T=S.useRef(n==null?void 0:n.model_downloaded),x=S.useRef(n==null?void 0:n.context_size_sufficient),I=S.useRef(n==null?void 0:n.expected_model_loaded);if(S.useEffect(()=>{if(u)return;const g=n==null?void 0:n.lemonade_running,E=n==null?void 0:n.model_downloaded,y=n==null?void 0:n.context_size_sufficient,v=n==null?void 0:n.expected_model_loaded;let O=!1;m.current!==g&&(m.current=g,g===!1&&(O=!0)),T.current!==E&&(T.current=E,E===!1&&(O=!0)),x.current!==y&&(x.current=y,y===!1&&(O=!0)),I.current!==v&&(I.current=v,v===!1&&(O=!0)),O&&a(!1)},[n,u]),s||u)return null;if(!t)return c.jsxs("div",{className:"connection-banner connection-banner--error",role:"alert",children:[c.jsx("div",{className:"connection-banner__icon",children:c.jsx(Ey,{size:16})}),c.jsxs("div",{className:"connection-banner__text",children:["Cannot connect to GAIA Agent UI server."," ",c.jsxs("span",{className:"connection-banner__hint",children:["Start it with: ",c.jsx("code",{children:"gaia chat --ui"})]})]}),e&&c.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Retry"})]});if(n&&!n.lemonade_running)return c.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[c.jsx("div",{className:"connection-banner__icon",children:c.jsx(Ii,{size:16})}),c.jsxs("div",{className:"connection-banner__text",children:["LLM server is not responding — it may be busy or not running."," ",c.jsxs("span",{className:"connection-banner__hint",children:["If not started, run: ",c.jsx("code",{children:"lemonade-server serve"})]})]}),e&&c.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),c.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:c.jsx(Mt,{size:14})})]});if(n&&n.lemonade_running&&!n.model_loaded&&n.model_downloaded===!1)return c.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[c.jsx("div",{className:"connection-banner__icon",children:c.jsx(dd,{size:16})}),c.jsxs("div",{className:"connection-banner__text",children:["Required model ",c.jsx("strong",{children:l})," is not downloaded (~25 GB)."]}),h?c.jsxs("span",{className:"connection-banner__loading",children:[c.jsx(xi,{size:13,className:"connection-banner__spinner"}),"Downloading…"]}):c.jsx("button",{className:"connection-banner__retry",onClick:()=>p(!1),children:"Download"}),e&&!h&&c.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),c.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:c.jsx(Mt,{size:14})})]});if(n&&n.lemonade_running&&n.model_loaded&&n.expected_model_loaded===!1&&!n.embedding_model_loaded){const g=n.model_loaded,E=n.context_size_sufficient===!1;return c.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[c.jsx("div",{className:"connection-banner__icon",children:c.jsx(YT,{size:16})}),c.jsxs("div",{className:"connection-banner__text",children:["Wrong model loaded: ",c.jsx("strong",{children:g}),"."," ","GAIA Chat requires ",c.jsx("strong",{children:l}),".",E&&c.jsxs(c.Fragment,{children:[" ","Context window is also too small."]})]}),d?c.jsxs("span",{className:"connection-banner__loading",children:[c.jsx(xi,{size:13,className:"connection-banner__spinner"}),"Loading…"]}):c.jsx("button",{className:"connection-banner__retry",onClick:()=>f(),children:"Load Now"}),e&&!d&&c.jsx("button",{className:"connection-banner__retry connection-banner__retry--secondary",onClick:e,children:"Recheck"}),c.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:c.jsx(Mt,{size:14})})]})}if(n&&n.lemonade_running&&n.model_loaded&&n.context_size_sufficient===!1){const g=n.model_context_size??0,E=n.lemonade_url??"http://localhost:8000";return c.jsxs("div",{className:"connection-banner connection-banner--warning",role:"status",children:[c.jsx("div",{className:"connection-banner__icon",children:c.jsx(KT,{size:16})}),c.jsxs("div",{className:"connection-banner__text",children:["LLM context window is too small (",g.toLocaleString()," tokens;"," ",Ns.toLocaleString()," required)."," ",c.jsxs("span",{className:"connection-banner__hint",children:["In"," ",c.jsx("a",{className:"connection-banner__link",href:E,target:"_blank",rel:"noreferrer",children:"Lemonade"}),", set ctx‑size to ",Ns.toLocaleString(),", or restart with:"," ",c.jsxs("code",{children:["lemonade-server serve --ctx-size ",Ns]})]})]}),e&&c.jsx("button",{className:"connection-banner__retry",onClick:e,children:"Check again"}),c.jsx("button",{className:"connection-banner__dismiss",onClick:()=>a(!0),"aria-label":"Dismiss",children:c.jsx(Mt,{size:14})})]})}return null}function k6(){const e=Du(qv),t=Du(n=>n.respondToPermission);return e?c.jsx("div",{className:"permission-overlay",role:"dialog","aria-modal":"true","aria-label":"Permission Request",children:c.jsx(S6,{notification:e,onRespond:t},e.id)}):null}function S6({notification:e,onRespond:t}){const n=e.timeoutSeconds!=null&&e.timeoutSeconds>0,[r,i]=S.useState(n?e.timeoutSeconds:null),s=S.useRef(null),[a,u]=S.useState(!1),[l,d]=S.useState(!1),h=S.useRef(!1),f=S.useRef(t);f.current=t,S.useEffect(()=>{if(n)return s.current=setInterval(()=>{i(I=>I===null||I<=1?(s.current&&clearInterval(s.current),0):I-1)},1e3),()=>{s.current&&clearInterval(s.current)}},[n]),S.useEffect(()=>{if(r===0){if(h.current)return;h.current=!0,u(!0),f.current(e.id,"deny",!1)}},[r,e.id]);const p=S.useCallback(async()=>{if(!h.current){h.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"allow",l)}finally{h.current=!1,u(!1)}}},[e.id,t,l]),m=S.useCallback(async()=>{if(!h.current){h.current=!0,u(!0),s.current&&clearInterval(s.current);try{await t(e.id,"deny",!1)}finally{h.current=!1,u(!1)}}},[e.id,t]);S.useEffect(()=>{const I=g=>{g.key==="Enter"&&!g.shiftKey?(g.preventDefault(),p()):g.key==="Escape"&&(g.preventDefault(),m())};return window.addEventListener("keydown",I),()=>window.removeEventListener("keydown",I)},[p,m]);const T=e.toolArgs,x=T&&Object.keys(T).length>0;return c.jsxs("div",{className:"permission-prompt",children:[c.jsxs("div",{className:"permission-header",children:[c.jsx("div",{className:"permission-header-icon",children:c.jsx(hy,{size:24})}),c.jsxs("div",{className:"permission-header-text",children:[c.jsx("h2",{className:"permission-title",children:"Permission Request"}),c.jsx("span",{className:"permission-agent",children:e.agentName})]}),r!==null&&r>0&&c.jsxs("div",{className:"permission-countdown",title:"Auto-deny on timeout",children:[c.jsx(Hp,{size:14}),c.jsxs("span",{children:[r,"s"]})]})]}),c.jsxs("div",{className:"permission-body",children:[c.jsx("p",{className:"permission-message",children:e.message}),e.tool&&c.jsxs("div",{className:"permission-tool-info",children:[c.jsxs("div",{className:"permission-tool-header",children:[c.jsx(Ii,{size:14}),c.jsx("span",{children:"Tool Invocation"})]}),c.jsx("div",{className:"permission-tool-name",children:c.jsx("code",{children:e.tool})}),x&&c.jsx("div",{className:"permission-tool-args",children:c.jsx("pre",{children:JSON.stringify(T,null,2)})})]}),e.priority==="critical"&&c.jsxs("div",{className:"permission-critical-banner",children:[c.jsx(Ii,{size:14}),c.jsx("span",{children:"This is a critical-tier operation"})]}),c.jsxs("label",{className:"permission-remember",children:[c.jsx("input",{type:"checkbox",checked:l,onChange:I=>d(I.target.checked),disabled:a}),c.jsx("span",{children:"Always allow this tool"})]})]}),c.jsxs("div",{className:"permission-actions",children:[c.jsxs("button",{className:"permission-btn permission-btn-deny",onClick:m,disabled:a,title:"Deny (Esc)",children:[c.jsx(Mt,{size:16}),"Deny"]}),c.jsxs("button",{className:"permission-btn permission-btn-allow",onClick:p,disabled:a,title:"Allow (Enter)",children:[c.jsx(ea,{size:16}),"Allow"]})]}),c.jsxs("div",{className:"permission-hints",children:[c.jsxs("span",{children:[c.jsx("kbd",{children:"Enter"})," Allow"]}),c.jsxs("span",{children:[c.jsx("kbd",{children:"Esc"})," Deny"]})]})]})}function Da({show:e,children:t,duration:n=250}){const[r,i]=S.useState(!1),[s,a]=S.useState("idle");return S.useEffect(()=>{if(e)i(!0),requestAnimationFrame(()=>a("entering"));else if(r){a("exiting");const u=setTimeout(()=>{i(!1),a("idle")},n);return()=>clearTimeout(u)}},[e,r,n]),r?c.jsx("div",{className:`animated-presence ${s}`,"data-duration":n,children:t}):null}function C6(){const{currentSessionId:e,setSessions:t,setCurrentSession:n,addSession:r,removeSession:i,updateSessionInList:s,setMessages:a,showDocLibrary:u,showFileBrowser:l,showSettings:d,sidebarOpen:h,toggleSidebar:f,setSidebarOpen:p,setSystemStatus:m,setBackendConnected:T}=we(),[x,I]=S.useState(!1),[g,E]=S.useState(!1),[y,v]=S.useState(!1),[O,A]=S.useState(null),F=S.useRef(null),H=S.useRef(0),K=3,w=S.useCallback(async()=>{try{const re=await hd();if(T(!0),re.lemonade_running)H.current=0,m(re);else if(H.current+=1,D.system.warn(`Lemonade health check failed (${H.current}/${K})`),H.current>=K)m(re);else{const me=we.getState().systemStatus;me&&me.lemonade_running?m({...me,disk_space_gb:re.disk_space_gb,memory_available_gb:re.memory_available_gb}):m(re)}D.system.info("System status:",{lemonade:re.lemonade_running,model:re.model_loaded,failCount:H.current})}catch(re){D.system.warn("System status check failed",re),T(!1),m(null)}},[m,T]);S.useEffect(()=>(w(),F.current=setInterval(w,15e3),()=>{F.current&&clearInterval(F.current)}),[w]);const Y=S.useRef(null),te=S.useRef("");S.useEffect(()=>{qy("0.17.0"),D.system.info("App mounting, loading sessions...");const re=D.system.time(),me=De=>De.map(He=>`${He.id}|${He.updated_at}|${He.title}`).join(`
432
- `),ve=(De=!1)=>{Xy().then(He=>{const R=He.sessions||[];if(De){t(R),T(!0),te.current=me(R),D.system.timed(`Loaded ${R.length} session(s)`,re);return}const W=we.getState().sessions;if(R.length===0&&W.length>0){D.system.warn(`Session poll returned 0 sessions but sidebar has ${W.length} — skipping update to prevent data loss`);return}const de=me(R);de!==te.current&&(D.system.info(`Session list changed (${W.length} → ${R.length} sessions)`),t(R),te.current=de)}).catch(He=>{De&&(D.system.error("Failed to load sessions from backend",He),D.system.warn("Is the Python backend running? Start it with: gaia chat --ui"))})};return ve(!0),Y.current=setInterval(()=>ve(!1),5e3),()=>{Y.current&&clearInterval(Y.current)}},[t,r,i,s,T]),S.useEffect(()=>{if(e)return;const me=new URLSearchParams(window.location.search).get("session"),ve=window.location.hash.replace(/^#/,""),De=me||ve;if(!De)return;D.nav.info(`URL session parameter: ${De}`);const He=setTimeout(()=>{const{sessions:R}=we.getState();let W=R.some(de=>de.id===De)?De:pb(R,De);W?(n(W),a([])):D.nav.warn(`Session ${De} not found in loaded sessions`)},500);return()=>clearTimeout(He)},[e,n,a]),S.useEffect(()=>{if(e){const re=mn(e);window.location.hash!==`#${re}`&&window.history.replaceState(null,"",`#${re}`)}else window.location.hash&&window.history.replaceState(null,"",window.location.pathname+window.location.search)},[e]),S.useEffect(()=>{n1().then(re=>{E(re.active===!0)}).catch(()=>{})},[]),S.useEffect(()=>{const re=()=>{window.innerWidth>768&&p(!0)};return window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)},[p]);const[ce,le]=S.useState(null),ue=S.useCallback(async()=>{D.chat.info("Creating new task session..."),le(null);try{const re=await Zp({title:"New Task"});D.chat.info(`Session created: id=${re.id}, title="${re.title}"`),r(re),n(re.id),a([]),window.innerWidth<=768&&p(!1)}catch(re){D.chat.error("Failed to create session",re),w(),le("Failed to create task. Is the server running?"),setTimeout(()=>le(null),6e3)}},[r,n,a,p,w]),{setPendingPrompt:j}=we(),z=S.useCallback(async re=>{D.chat.info(`New task with prompt: "${re.slice(0,60)}..."`),j(re),await ue()},[ue,j]),P=S.useCallback(async()=>{if(g){D.system.info("Stopping mobile access tunnel...");try{await hb()}catch{}E(!1),I(!1)}else{D.system.info("Starting mobile access tunnel..."),I(!0),v(!0),A(null);try{const re=await fb();re.error?(D.system.error("Tunnel failed to start:",re.error),E(!1),A(re.error)):(E(!0),D.system.info("Tunnel started successfully"))}catch(re){D.system.error("Tunnel start error:",re),E(!1),A(re instanceof Error?re.message:"Failed to connect")}finally{v(!1)}}},[g]);S.useEffect(()=>{e?D.nav.info(`Viewing session: ${e}`):D.nav.info("Viewing welcome screen (no session selected)")},[e]),S.useEffect(()=>{u&&D.ui.info("Document Library opened")},[u]),S.useEffect(()=>{d&&D.ui.info("Settings modal opened")},[d]);const[G,_]=S.useState(typeof window<"u"&&window.innerWidth<=768);S.useEffect(()=>{const re=()=>_(window.innerWidth<=768);return window.addEventListener("resize",re),()=>window.removeEventListener("resize",re)},[]);const[Z,fe]=S.useState(!1),[N,Ne]=S.useState(null);return S.useEffect(()=>{if(e!==N){fe(!0);const re=setTimeout(()=>{Ne(e),requestAnimationFrame(()=>{requestAnimationFrame(()=>{fe(!1)})})},220);return()=>clearTimeout(re)}},[e,N]),c.jsxs("div",{className:"app",children:[c.jsx("button",{className:"sidebar-toggle",onClick:f,"aria-label":h?"Close sidebar":"Open sidebar",children:c.jsx(ty,{size:18})}),c.jsx("div",{className:`sidebar-overlay ${h?"visible":""}`,onClick:()=>p(!1),"aria-hidden":"true"}),c.jsx(Eb,{onNewTask:ue,tunnelActive:g,tunnelLoading:y,onMobileToggle:P}),c.jsxs("div",{className:"main-content",children:[c.jsx(_6,{onRetry:w}),c.jsx("div",{className:`view-container ${Z?"view-transitioning":""}`,children:N?c.jsx(Zv,{sessionId:N},N):c.jsx(r6,{onNewTask:ue,onSendPrompt:z})})]}),c.jsx(Da,{show:u,children:c.jsx(u6,{})}),c.jsx(Da,{show:l,children:c.jsx(h6,{})}),c.jsx(Da,{show:d,children:c.jsx(E6,{})}),!G&&c.jsx(Da,{show:x,children:c.jsx(x6,{isOpen:x,onClose:()=>I(!1),error:O})}),c.jsx(k6,{}),ce&&c.jsx("div",{className:"toast",role:"alert",children:ce})]})}const N6=localStorage.getItem("gaia-chat-theme");N6!=="light"&&document.documentElement.setAttribute("data-theme","dark");io.createRoot(document.getElementById("root")).render(c.jsx(As.StrictMode,{children:c.jsx(C6,{})}));