@taico/taico 0.3.0 → 0.3.1

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,4 +1,4 @@
1
- var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in e?x0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ll=(e,t,n)=>v0(e,typeof t!="symbol"?t+"":t,n),$d=(e,t,n)=>t.has(e)||Kd("Cannot "+n);var fe=(e,t,n)=>($d(e,t,"read from private field"),n?n.call(e):t.get(e)),Yn=(e,t,n)=>t.has(e)?Kd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,i)=>($d(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(l){if(l.ep)return;l.ep=!0;const a=n(l);fetch(l.href,a)}})();var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function hg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var pg={exports:{}},io={};/**
1
+ var b0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var S0=(e,t,n)=>t in e?b0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ll=(e,t,n)=>S0(e,typeof t!="symbol"?t+"":t,n),$d=(e,t,n)=>t.has(e)||Kd("Cannot "+n);var fe=(e,t,n)=>($d(e,t,"read from private field"),n?n.call(e):t.get(e)),Yn=(e,t,n)=>t.has(e)?Kd("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,i)=>($d(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const r of a.addedNodes)r.tagName==="LINK"&&r.rel==="modulepreload"&&i(r)}).observe(document,{childList:!0,subtree:!0});function n(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(l){if(l.ep)return;l.ep=!0;const a=n(l);fetch(l.href,a)}})();var Es=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var gg={exports:{}},io={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@ var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var b0=Symbol.for("react.transitional.element"),S0=Symbol.for("react.fragment");function mg(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var l in t)l!=="key"&&(n[l]=t[l])}else n=t;return t=n.ref,{$$typeof:b0,type:e,key:i,ref:t!==void 0?t:null,props:n}}io.Fragment=S0;io.jsx=mg;io.jsxs=mg;pg.exports=io;var o=pg.exports,gg={exports:{}},$={};/**
9
+ */var E0=Symbol.for("react.transitional.element"),C0=Symbol.for("react.fragment");function yg(e,t,n){var i=null;if(n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),"key"in t){n={};for(var l in t)l!=="key"&&(n[l]=t[l])}else n=t;return t=n.ref,{$$typeof:E0,type:e,key:i,ref:t!==void 0?t:null,props:n}}io.Fragment=C0;io.jsx=yg;io.jsxs=yg;gg.exports=io;var o=gg.exports,xg={exports:{}},$={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@ var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var cf=Symbol.for("react.transitional.element"),E0=Symbol.for("react.portal"),C0=Symbol.for("react.fragment"),T0=Symbol.for("react.strict_mode"),k0=Symbol.for("react.profiler"),N0=Symbol.for("react.consumer"),w0=Symbol.for("react.context"),A0=Symbol.for("react.forward_ref"),j0=Symbol.for("react.suspense"),_0=Symbol.for("react.memo"),yg=Symbol.for("react.lazy"),R0=Symbol.for("react.activity"),Jd=Symbol.iterator;function O0(e){return e===null||typeof e!="object"?null:(e=Jd&&e[Jd]||e["@@iterator"],typeof e=="function"?e:null)}var xg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},vg=Object.assign,bg={};function Yl(e,t,n){this.props=e,this.context=t,this.refs=bg,this.updater=n||xg}Yl.prototype.isReactComponent={};Yl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Sg(){}Sg.prototype=Yl.prototype;function ff(e,t,n){this.props=e,this.context=t,this.refs=bg,this.updater=n||xg}var df=ff.prototype=new Sg;df.constructor=ff;vg(df,Yl.prototype);df.isPureReactComponent=!0;var Wd=Array.isArray;function Gu(){}var Ce={H:null,A:null,T:null,S:null},Eg=Object.prototype.hasOwnProperty;function hf(e,t,n){var i=n.ref;return{$$typeof:cf,type:e,key:t,ref:i!==void 0?i:null,props:n}}function D0(e,t){return hf(e.type,t,e.props)}function pf(e){return typeof e=="object"&&e!==null&&e.$$typeof===cf}function z0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var eh=/\/+/g;function Bo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?z0(""+e.key):t.toString(36)}function L0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Gu,Gu):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ol(e,t,n,i,l){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(a){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case cf:case E0:r=!0;break;case yg:return r=e._init,ol(r(e._payload),t,n,i,l)}}if(r)return l=l(e),r=i===""?"."+Bo(e,0):i,Wd(l)?(n="",r!=null&&(n=r.replace(eh,"$&/")+"/"),ol(l,t,n,"",function(c){return c})):l!=null&&(pf(l)&&(l=D0(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(eh,"$&/")+"/")+r)),t.push(l)),1;r=0;var s=i===""?".":i+":";if(Wd(e))for(var u=0;u<e.length;u++)i=e[u],a=s+Bo(i,u),r+=ol(i,t,n,a,l);else if(u=O0(e),typeof u=="function")for(e=u.call(e),u=0;!(i=e.next()).done;)i=i.value,a=s+Bo(i,u++),r+=ol(i,t,n,a,l);else if(a==="object"){if(typeof e.then=="function")return ol(L0(e),t,n,i,l);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 r}function jr(e,t,n){if(e==null)return e;var i=[],l=0;return ol(e,i,"","",function(a){return t.call(n,a,l++)}),i}function M0(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 th=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},B0={map:jr,forEach:function(e,t,n){jr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return jr(e,function(){t++}),t},toArray:function(e){return jr(e,function(t){return t})||[]},only:function(e){if(!pf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Activity=R0;$.Children=B0;$.Component=Yl;$.Fragment=C0;$.Profiler=k0;$.PureComponent=ff;$.StrictMode=T0;$.Suspense=j0;$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ce;$.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ce.H.useMemoCache(e)}};$.cache=function(e){return function(){return e.apply(null,arguments)}};$.cacheSignal=function(){return null};$.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=vg({},e.props),l=e.key;if(t!=null)for(a in t.key!==void 0&&(l=""+t.key),t)!Eg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(i[a]=t[a]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var r=Array(a),s=0;s<a;s++)r[s]=arguments[s+2];i.children=r}return hf(e.type,l,i)};$.createContext=function(e){return e={$$typeof:w0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:N0,_context:e},e};$.createElement=function(e,t,n){var i,l={},a=null;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)Eg.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(l[i]=t[i]);var r=arguments.length-2;if(r===1)l.children=n;else if(1<r){for(var s=Array(r),u=0;u<r;u++)s[u]=arguments[u+2];l.children=s}if(e&&e.defaultProps)for(i in r=e.defaultProps,r)l[i]===void 0&&(l[i]=r[i]);return hf(e,a,l)};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:A0,render:e}};$.isValidElement=pf;$.lazy=function(e){return{$$typeof:yg,_payload:{_status:-1,_result:e},_init:M0}};$.memo=function(e,t){return{$$typeof:_0,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=Ce.T,n={};Ce.T=n;try{var i=e(),l=Ce.S;l!==null&&l(n,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(Gu,th)}catch(a){th(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ce.T=t}};$.unstable_useCacheRefresh=function(){return Ce.H.useCacheRefresh()};$.use=function(e){return Ce.H.use(e)};$.useActionState=function(e,t,n){return Ce.H.useActionState(e,t,n)};$.useCallback=function(e,t){return Ce.H.useCallback(e,t)};$.useContext=function(e){return Ce.H.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e,t){return Ce.H.useDeferredValue(e,t)};$.useEffect=function(e,t){return Ce.H.useEffect(e,t)};$.useEffectEvent=function(e){return Ce.H.useEffectEvent(e)};$.useId=function(){return Ce.H.useId()};$.useImperativeHandle=function(e,t,n){return Ce.H.useImperativeHandle(e,t,n)};$.useInsertionEffect=function(e,t){return Ce.H.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return Ce.H.useLayoutEffect(e,t)};$.useMemo=function(e,t){return Ce.H.useMemo(e,t)};$.useOptimistic=function(e,t){return Ce.H.useOptimistic(e,t)};$.useReducer=function(e,t,n){return Ce.H.useReducer(e,t,n)};$.useRef=function(e){return Ce.H.useRef(e)};$.useState=function(e){return Ce.H.useState(e)};$.useSyncExternalStore=function(e,t,n){return Ce.H.useSyncExternalStore(e,t,n)};$.useTransition=function(){return Ce.H.useTransition()};$.version="19.2.5";gg.exports=$;var b=gg.exports,Cg={exports:{}},lo={},Tg={exports:{}},kg={};/**
17
+ */var cf=Symbol.for("react.transitional.element"),T0=Symbol.for("react.portal"),k0=Symbol.for("react.fragment"),N0=Symbol.for("react.strict_mode"),w0=Symbol.for("react.profiler"),A0=Symbol.for("react.consumer"),j0=Symbol.for("react.context"),_0=Symbol.for("react.forward_ref"),R0=Symbol.for("react.suspense"),O0=Symbol.for("react.memo"),vg=Symbol.for("react.lazy"),D0=Symbol.for("react.activity"),Jd=Symbol.iterator;function z0(e){return e===null||typeof e!="object"?null:(e=Jd&&e[Jd]||e["@@iterator"],typeof e=="function"?e:null)}var bg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Sg=Object.assign,Eg={};function Yl(e,t,n){this.props=e,this.context=t,this.refs=Eg,this.updater=n||bg}Yl.prototype.isReactComponent={};Yl.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Yl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Cg(){}Cg.prototype=Yl.prototype;function ff(e,t,n){this.props=e,this.context=t,this.refs=Eg,this.updater=n||bg}var df=ff.prototype=new Cg;df.constructor=ff;Sg(df,Yl.prototype);df.isPureReactComponent=!0;var Wd=Array.isArray;function Gu(){}var Ce={H:null,A:null,T:null,S:null},Tg=Object.prototype.hasOwnProperty;function hf(e,t,n){var i=n.ref;return{$$typeof:cf,type:e,key:t,ref:i!==void 0?i:null,props:n}}function L0(e,t){return hf(e.type,t,e.props)}function pf(e){return typeof e=="object"&&e!==null&&e.$$typeof===cf}function M0(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var eh=/\/+/g;function Bo(e,t){return typeof e=="object"&&e!==null&&e.key!=null?M0(""+e.key):t.toString(36)}function B0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Gu,Gu):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function ol(e,t,n,i,l){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var r=!1;if(e===null)r=!0;else switch(a){case"bigint":case"string":case"number":r=!0;break;case"object":switch(e.$$typeof){case cf:case T0:r=!0;break;case vg:return r=e._init,ol(r(e._payload),t,n,i,l)}}if(r)return l=l(e),r=i===""?"."+Bo(e,0):i,Wd(l)?(n="",r!=null&&(n=r.replace(eh,"$&/")+"/"),ol(l,t,n,"",function(c){return c})):l!=null&&(pf(l)&&(l=L0(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(eh,"$&/")+"/")+r)),t.push(l)),1;r=0;var s=i===""?".":i+":";if(Wd(e))for(var u=0;u<e.length;u++)i=e[u],a=s+Bo(i,u),r+=ol(i,t,n,a,l);else if(u=z0(e),typeof u=="function")for(e=u.call(e),u=0;!(i=e.next()).done;)i=i.value,a=s+Bo(i,u++),r+=ol(i,t,n,a,l);else if(a==="object"){if(typeof e.then=="function")return ol(B0(e),t,n,i,l);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 r}function jr(e,t,n){if(e==null)return e;var i=[],l=0;return ol(e,i,"","",function(a){return t.call(n,a,l++)}),i}function U0(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 th=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},I0={map:jr,forEach:function(e,t,n){jr(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return jr(e,function(){t++}),t},toArray:function(e){return jr(e,function(t){return t})||[]},only:function(e){if(!pf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};$.Activity=D0;$.Children=I0;$.Component=Yl;$.Fragment=k0;$.Profiler=w0;$.PureComponent=ff;$.StrictMode=N0;$.Suspense=R0;$.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ce;$.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ce.H.useMemoCache(e)}};$.cache=function(e){return function(){return e.apply(null,arguments)}};$.cacheSignal=function(){return null};$.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=Sg({},e.props),l=e.key;if(t!=null)for(a in t.key!==void 0&&(l=""+t.key),t)!Tg.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(i[a]=t[a]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var r=Array(a),s=0;s<a;s++)r[s]=arguments[s+2];i.children=r}return hf(e.type,l,i)};$.createContext=function(e){return e={$$typeof:j0,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:A0,_context:e},e};$.createElement=function(e,t,n){var i,l={},a=null;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)Tg.call(t,i)&&i!=="key"&&i!=="__self"&&i!=="__source"&&(l[i]=t[i]);var r=arguments.length-2;if(r===1)l.children=n;else if(1<r){for(var s=Array(r),u=0;u<r;u++)s[u]=arguments[u+2];l.children=s}if(e&&e.defaultProps)for(i in r=e.defaultProps,r)l[i]===void 0&&(l[i]=r[i]);return hf(e,a,l)};$.createRef=function(){return{current:null}};$.forwardRef=function(e){return{$$typeof:_0,render:e}};$.isValidElement=pf;$.lazy=function(e){return{$$typeof:vg,_payload:{_status:-1,_result:e},_init:U0}};$.memo=function(e,t){return{$$typeof:O0,type:e,compare:t===void 0?null:t}};$.startTransition=function(e){var t=Ce.T,n={};Ce.T=n;try{var i=e(),l=Ce.S;l!==null&&l(n,i),typeof i=="object"&&i!==null&&typeof i.then=="function"&&i.then(Gu,th)}catch(a){th(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ce.T=t}};$.unstable_useCacheRefresh=function(){return Ce.H.useCacheRefresh()};$.use=function(e){return Ce.H.use(e)};$.useActionState=function(e,t,n){return Ce.H.useActionState(e,t,n)};$.useCallback=function(e,t){return Ce.H.useCallback(e,t)};$.useContext=function(e){return Ce.H.useContext(e)};$.useDebugValue=function(){};$.useDeferredValue=function(e,t){return Ce.H.useDeferredValue(e,t)};$.useEffect=function(e,t){return Ce.H.useEffect(e,t)};$.useEffectEvent=function(e){return Ce.H.useEffectEvent(e)};$.useId=function(){return Ce.H.useId()};$.useImperativeHandle=function(e,t,n){return Ce.H.useImperativeHandle(e,t,n)};$.useInsertionEffect=function(e,t){return Ce.H.useInsertionEffect(e,t)};$.useLayoutEffect=function(e,t){return Ce.H.useLayoutEffect(e,t)};$.useMemo=function(e,t){return Ce.H.useMemo(e,t)};$.useOptimistic=function(e,t){return Ce.H.useOptimistic(e,t)};$.useReducer=function(e,t,n){return Ce.H.useReducer(e,t,n)};$.useRef=function(e){return Ce.H.useRef(e)};$.useState=function(e){return Ce.H.useState(e)};$.useSyncExternalStore=function(e,t,n){return Ce.H.useSyncExternalStore(e,t,n)};$.useTransition=function(){return Ce.H.useTransition()};$.version="19.2.5";xg.exports=$;var b=xg.exports,kg={exports:{}},lo={},Ng={exports:{}},wg={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@ var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */(function(e){function t(j,O){var w=j.length;j.push(O);e:for(;0<w;){var X=w-1>>>1,S=j[X];if(0<l(S,O))j[X]=O,j[w]=S,w=X;else break e}}function n(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var O=j[0],w=j.pop();if(w!==O){j[0]=w;e:for(var X=0,S=j.length,we=S>>>1;X<we;){var We=2*(X+1)-1,k=j[We],_e=We+1,st=j[_e];if(0>l(k,w))_e<S&&0>l(st,k)?(j[X]=st,j[_e]=w,X=_e):(j[X]=k,j[We]=w,X=We);else if(_e<S&&0>l(st,w))j[X]=st,j[_e]=w,X=_e;else break e}}return O}function l(j,O){var w=j.sortIndex-O.sortIndex;return w!==0?w:j.id-O.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var r=Date,s=r.now();e.unstable_now=function(){return r.now()-s}}var u=[],c=[],d=1,f=null,h=3,p=!1,y=!1,x=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function C(j){for(var O=n(c);O!==null;){if(O.callback===null)i(c);else if(O.startTime<=j)i(c),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(c)}}function A(j){if(x=!1,C(j),!y)if(n(u)!==null)y=!0,N||(N=!0,q());else{var O=n(c);O!==null&&V(A,O.startTime-j)}}var N=!1,_=-1,U=5,D=-1;function T(){return E?!0:!(e.unstable_now()-D<U)}function M(){if(E=!1,N){var j=e.unstable_now();D=j;var O=!0;try{e:{y=!1,x&&(x=!1,m(_),_=-1),p=!0;var w=h;try{t:{for(C(j),f=n(u);f!==null&&!(f.expirationTime>j&&T());){var X=f.callback;if(typeof X=="function"){f.callback=null,h=f.priorityLevel;var S=X(f.expirationTime<=j);if(j=e.unstable_now(),typeof S=="function"){f.callback=S,C(j),O=!0;break t}f===n(u)&&i(u),C(j)}else i(u);f=n(u)}if(f!==null)O=!0;else{var we=n(c);we!==null&&V(A,we.startTime-j),O=!1}}break e}finally{f=null,h=w,p=!1}O=void 0}}finally{O?q():N=!1}}}var q;if(typeof v=="function")q=function(){v(M)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,F=P.port2;P.port1.onmessage=M,q=function(){F.postMessage(null)}}else q=function(){g(M,0)};function V(j,O){_=g(function(){j(e.unstable_now())},O)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):U=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(j){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var w=h;h=O;try{return j()}finally{h=w}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(j,O){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var w=h;h=j;try{return O()}finally{h=w}},e.unstable_scheduleCallback=function(j,O,w){var X=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?X+w:X):w=X,j){case 1:var S=-1;break;case 2:S=250;break;case 5:S=1073741823;break;case 4:S=1e4;break;default:S=5e3}return S=w+S,j={id:d++,callback:O,priorityLevel:j,startTime:w,expirationTime:S,sortIndex:-1},w>X?(j.sortIndex=w,t(c,j),n(u)===null&&j===n(c)&&(x?(m(_),_=-1):x=!0,V(A,w-X))):(j.sortIndex=S,t(u,j),y||p||(y=!0,N||(N=!0,q()))),j},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(j){var O=h;return function(){var w=h;h=O;try{return j.apply(this,arguments)}finally{h=w}}}})(kg);Tg.exports=kg;var U0=Tg.exports,Ng={exports:{}},at={};/**
25
+ */(function(e){function t(j,O){var w=j.length;j.push(O);e:for(;0<w;){var X=w-1>>>1,S=j[X];if(0<l(S,O))j[X]=O,j[w]=S,w=X;else break e}}function n(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var O=j[0],w=j.pop();if(w!==O){j[0]=w;e:for(var X=0,S=j.length,we=S>>>1;X<we;){var We=2*(X+1)-1,k=j[We],_e=We+1,st=j[_e];if(0>l(k,w))_e<S&&0>l(st,k)?(j[X]=st,j[_e]=w,X=_e):(j[X]=k,j[We]=w,X=We);else if(_e<S&&0>l(st,w))j[X]=st,j[_e]=w,X=_e;else break e}}return O}function l(j,O){var w=j.sortIndex-O.sortIndex;return w!==0?w:j.id-O.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var r=Date,s=r.now();e.unstable_now=function(){return r.now()-s}}var u=[],c=[],d=1,f=null,h=3,p=!1,y=!1,x=!1,E=!1,g=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function C(j){for(var O=n(c);O!==null;){if(O.callback===null)i(c);else if(O.startTime<=j)i(c),O.sortIndex=O.expirationTime,t(u,O);else break;O=n(c)}}function A(j){if(x=!1,C(j),!y)if(n(u)!==null)y=!0,N||(N=!0,q());else{var O=n(c);O!==null&&V(A,O.startTime-j)}}var N=!1,_=-1,I=5,D=-1;function T(){return E?!0:!(e.unstable_now()-D<I)}function M(){if(E=!1,N){var j=e.unstable_now();D=j;var O=!0;try{e:{y=!1,x&&(x=!1,m(_),_=-1),p=!0;var w=h;try{t:{for(C(j),f=n(u);f!==null&&!(f.expirationTime>j&&T());){var X=f.callback;if(typeof X=="function"){f.callback=null,h=f.priorityLevel;var S=X(f.expirationTime<=j);if(j=e.unstable_now(),typeof S=="function"){f.callback=S,C(j),O=!0;break t}f===n(u)&&i(u),C(j)}else i(u);f=n(u)}if(f!==null)O=!0;else{var we=n(c);we!==null&&V(A,we.startTime-j),O=!1}}break e}finally{f=null,h=w,p=!1}O=void 0}}finally{O?q():N=!1}}}var q;if(typeof v=="function")q=function(){v(M)};else if(typeof MessageChannel<"u"){var P=new MessageChannel,F=P.port2;P.port1.onmessage=M,q=function(){F.postMessage(null)}}else q=function(){g(M,0)};function V(j,O){_=g(function(){j(e.unstable_now())},O)}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(j){j.callback=null},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(j){switch(h){case 1:case 2:case 3:var O=3;break;default:O=h}var w=h;h=O;try{return j()}finally{h=w}},e.unstable_requestPaint=function(){E=!0},e.unstable_runWithPriority=function(j,O){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var w=h;h=j;try{return O()}finally{h=w}},e.unstable_scheduleCallback=function(j,O,w){var X=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?X+w:X):w=X,j){case 1:var S=-1;break;case 2:S=250;break;case 5:S=1073741823;break;case 4:S=1e4;break;default:S=5e3}return S=w+S,j={id:d++,callback:O,priorityLevel:j,startTime:w,expirationTime:S,sortIndex:-1},w>X?(j.sortIndex=w,t(c,j),n(u)===null&&j===n(c)&&(x?(m(_),_=-1):x=!0,V(A,w-X))):(j.sortIndex=S,t(u,j),y||p||(y=!0,N||(N=!0,q()))),j},e.unstable_shouldYield=T,e.unstable_wrapCallback=function(j){var O=h;return function(){var w=h;h=O;try{return j.apply(this,arguments)}finally{h=w}}}})(wg);Ng.exports=wg;var H0=Ng.exports,Ag={exports:{}},at={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -30,7 +30,7 @@ var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in
30
30
  *
31
31
  * This source code is licensed under the MIT license found in the
32
32
  * LICENSE file in the root directory of this source tree.
33
- */var I0=b;function wg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function Pn(){}var lt={d:{f:Pn,r:function(){throw Error(wg(522))},D:Pn,C:Pn,L:Pn,m:Pn,X:Pn,S:Pn,M:Pn},p:0,findDOMNode:null},H0=Symbol.for("react.portal");function q0(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:H0,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var ka=I0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ao(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=lt;at.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(wg(299));return q0(e,t,null,n)};at.flushSync=function(e){var t=ka.T,n=lt.p;try{if(ka.T=null,lt.p=2,e)return e()}finally{ka.T=t,lt.p=n,lt.d.f()}};at.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,lt.d.C(e,t))};at.prefetchDNS=function(e){typeof e=="string"&&lt.d.D(e)};at.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,i=ao(n,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?lt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:i,integrity:l,fetchPriority:a}):n==="script"&&lt.d.X(e,{crossOrigin:i,integrity:l,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};at.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ao(t.as,t.crossOrigin);lt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&lt.d.M(e)};at.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,i=ao(n,t.crossOrigin);lt.d.L(e,n,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};at.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ao(t.as,t.crossOrigin);lt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else lt.d.m(e)};at.requestFormReset=function(e){lt.d.r(e)};at.unstable_batchedUpdates=function(e,t){return e(t)};at.useFormState=function(e,t,n){return ka.H.useFormState(e,t,n)};at.useFormStatus=function(){return ka.H.useHostTransitionStatus()};at.version="19.2.5";function Ag(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ag)}catch(e){console.error(e)}}Ag(),Ng.exports=at;var F0=Ng.exports;/**
33
+ */var q0=b;function jg(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function Pn(){}var lt={d:{f:Pn,r:function(){throw Error(jg(522))},D:Pn,C:Pn,L:Pn,m:Pn,X:Pn,S:Pn,M:Pn},p:0,findDOMNode:null},F0=Symbol.for("react.portal");function G0(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F0,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var ka=q0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function ao(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}at.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=lt;at.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(jg(299));return G0(e,t,null,n)};at.flushSync=function(e){var t=ka.T,n=lt.p;try{if(ka.T=null,lt.p=2,e)return e()}finally{ka.T=t,lt.p=n,lt.d.f()}};at.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,lt.d.C(e,t))};at.prefetchDNS=function(e){typeof e=="string"&&lt.d.D(e)};at.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,i=ao(n,t.crossOrigin),l=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?lt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:i,integrity:l,fetchPriority:a}):n==="script"&&lt.d.X(e,{crossOrigin:i,integrity:l,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};at.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=ao(t.as,t.crossOrigin);lt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&lt.d.M(e)};at.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,i=ao(n,t.crossOrigin);lt.d.L(e,n,{crossOrigin:i,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};at.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=ao(t.as,t.crossOrigin);lt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else lt.d.m(e)};at.requestFormReset=function(e){lt.d.r(e)};at.unstable_batchedUpdates=function(e,t){return e(t)};at.useFormState=function(e,t,n){return ka.H.useFormState(e,t,n)};at.useFormStatus=function(){return ka.H.useHostTransitionStatus()};at.version="19.2.5";function _g(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_g)}catch(e){console.error(e)}}_g(),Ag.exports=at;var V0=Ag.exports;/**
34
34
  * @license React
35
35
  * react-dom-client.production.js
36
36
  *
@@ -38,15 +38,15 @@ var x0=Object.defineProperty;var Kd=e=>{throw TypeError(e)};var v0=(e,t,n)=>t in
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var Ge=U0,jg=b,G0=F0;function L(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function _g(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Rg(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 Og(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function nh(e){if(ur(e)!==e)throw Error(L(188))}function V0(e){var t=e.alternate;if(!t){if(t=ur(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,i=t;;){var l=n.return;if(l===null)break;var a=l.alternate;if(a===null){if(i=l.return,i!==null){n=i;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return nh(l),e;if(a===i)return nh(l),t;a=a.sibling}throw Error(L(188))}if(n.return!==i.return)n=l,i=a;else{for(var r=!1,s=l.child;s;){if(s===n){r=!0,n=l,i=a;break}if(s===i){r=!0,i=l,n=a;break}s=s.sibling}if(!r){for(s=a.child;s;){if(s===n){r=!0,n=a,i=l;break}if(s===i){r=!0,i=a,n=l;break}s=s.sibling}if(!r)throw Error(L(189))}}if(n.alternate!==i)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function Dg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Dg(e),t!==null)return t;e=e.sibling}return null}var Te=Object.assign,Y0=Symbol.for("react.element"),_r=Symbol.for("react.transitional.element"),va=Symbol.for("react.portal"),dl=Symbol.for("react.fragment"),zg=Symbol.for("react.strict_mode"),Vu=Symbol.for("react.profiler"),Lg=Symbol.for("react.consumer"),jn=Symbol.for("react.context"),mf=Symbol.for("react.forward_ref"),Yu=Symbol.for("react.suspense"),Pu=Symbol.for("react.suspense_list"),gf=Symbol.for("react.memo"),Qn=Symbol.for("react.lazy"),Xu=Symbol.for("react.activity"),P0=Symbol.for("react.memo_cache_sentinel"),ih=Symbol.iterator;function sa(e){return e===null||typeof e!="object"?null:(e=ih&&e[ih]||e["@@iterator"],typeof e=="function"?e:null)}var X0=Symbol.for("react.client.reference");function Qu(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===X0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case dl:return"Fragment";case Vu:return"Profiler";case zg:return"StrictMode";case Yu:return"Suspense";case Pu:return"SuspenseList";case Xu:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case va:return"Portal";case jn:return e.displayName||"Context";case Lg:return(e._context.displayName||"Context")+".Consumer";case mf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gf:return t=e.displayName||null,t!==null?t:Qu(e.type)||"Memo";case Qn:t=e._payload,e=e._init;try{return Qu(e(t))}catch{}}return null}var ba=Array.isArray,Z=jg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=G0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mi={pending:!1,data:null,method:null,action:null},Zu=[],hl=-1;function yn(e){return{current:e}}function Pe(e){0>hl||(e.current=Zu[hl],Zu[hl]=null,hl--)}function be(e,t){hl++,Zu[hl]=e.current,e.current=t}var hn=yn(null),Va=yn(null),oi=yn(null),Cs=yn(null);function Ts(e,t){switch(be(oi,t),be(Va,e),be(hn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=tv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Pe(hn),be(hn,e)}function Dl(){Pe(hn),Pe(Va),Pe(oi)}function Ku(e){e.memoizedState!==null&&be(Cs,e);var t=hn.current,n=tv(t,e.type);t!==n&&(be(Va,e),be(hn,n))}function ks(e){Va.current===e&&(Pe(hn),Pe(Va)),Cs.current===e&&(Pe(Cs),tr._currentValue=Mi)}var Uo,lh;function _i(e){if(Uo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Uo=t&&t[1]||"",lh=-1<n.stack.indexOf(`
41
+ */var Ge=H0,Rg=b,Y0=V0;function L(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function Og(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ur(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Dg(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 zg(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function nh(e){if(ur(e)!==e)throw Error(L(188))}function P0(e){var t=e.alternate;if(!t){if(t=ur(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,i=t;;){var l=n.return;if(l===null)break;var a=l.alternate;if(a===null){if(i=l.return,i!==null){n=i;continue}break}if(l.child===a.child){for(a=l.child;a;){if(a===n)return nh(l),e;if(a===i)return nh(l),t;a=a.sibling}throw Error(L(188))}if(n.return!==i.return)n=l,i=a;else{for(var r=!1,s=l.child;s;){if(s===n){r=!0,n=l,i=a;break}if(s===i){r=!0,i=l,n=a;break}s=s.sibling}if(!r){for(s=a.child;s;){if(s===n){r=!0,n=a,i=l;break}if(s===i){r=!0,i=a,n=l;break}s=s.sibling}if(!r)throw Error(L(189))}}if(n.alternate!==i)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function Lg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Lg(e),t!==null)return t;e=e.sibling}return null}var Te=Object.assign,X0=Symbol.for("react.element"),_r=Symbol.for("react.transitional.element"),va=Symbol.for("react.portal"),dl=Symbol.for("react.fragment"),Mg=Symbol.for("react.strict_mode"),Vu=Symbol.for("react.profiler"),Bg=Symbol.for("react.consumer"),jn=Symbol.for("react.context"),mf=Symbol.for("react.forward_ref"),Yu=Symbol.for("react.suspense"),Pu=Symbol.for("react.suspense_list"),gf=Symbol.for("react.memo"),Qn=Symbol.for("react.lazy"),Xu=Symbol.for("react.activity"),Q0=Symbol.for("react.memo_cache_sentinel"),ih=Symbol.iterator;function sa(e){return e===null||typeof e!="object"?null:(e=ih&&e[ih]||e["@@iterator"],typeof e=="function"?e:null)}var Z0=Symbol.for("react.client.reference");function Qu(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Z0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case dl:return"Fragment";case Vu:return"Profiler";case Mg:return"StrictMode";case Yu:return"Suspense";case Pu:return"SuspenseList";case Xu:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case va:return"Portal";case jn:return e.displayName||"Context";case Bg:return(e._context.displayName||"Context")+".Consumer";case mf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case gf:return t=e.displayName||null,t!==null?t:Qu(e.type)||"Memo";case Qn:t=e._payload,e=e._init;try{return Qu(e(t))}catch{}}return null}var ba=Array.isArray,Z=Rg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=Y0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Mi={pending:!1,data:null,method:null,action:null},Zu=[],hl=-1;function yn(e){return{current:e}}function Pe(e){0>hl||(e.current=Zu[hl],Zu[hl]=null,hl--)}function be(e,t){hl++,Zu[hl]=e.current,e.current=t}var hn=yn(null),Va=yn(null),oi=yn(null),Cs=yn(null);function Ts(e,t){switch(be(oi,t),be(Va,e),be(hn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=iv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Pe(hn),be(hn,e)}function Dl(){Pe(hn),Pe(Va),Pe(oi)}function Ku(e){e.memoizedState!==null&&be(Cs,e);var t=hn.current,n=iv(t,e.type);t!==n&&(be(Va,e),be(hn,n))}function ks(e){Va.current===e&&(Pe(hn),Pe(Va)),Cs.current===e&&(Pe(Cs),tr._currentValue=Mi)}var Uo,lh;function _i(e){if(Uo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Uo=t&&t[1]||"",lh=-1<n.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
43
43
  `+Uo+e+lh}var Io=!1;function Ho(e,t){if(!e||Io)return"";Io=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(p){var h=p}Reflect.construct(e,[],f)}else{try{f.call()}catch(p){h=p}e.call(f.prototype)}}else{try{throw Error()}catch(p){h=p}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(p){if(p&&h&&typeof p.stack=="string")return[p.stack,h.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=i.DetermineComponentFrameRoot(),r=a[0],s=a[1];if(r&&s){var u=r.split(`
44
44
  `),c=s.split(`
45
45
  `);for(l=i=0;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;for(;l<c.length&&!c[l].includes("DetermineComponentFrameRoot");)l++;if(i===u.length||l===c.length)for(i=u.length-1,l=c.length-1;1<=i&&0<=l&&u[i]!==c[l];)l--;for(;1<=i&&0<=l;i--,l--)if(u[i]!==c[l]){if(i!==1||l!==1)do if(i--,l--,0>l||u[i]!==c[l]){var d=`
46
- `+u[i].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=i&&0<=l);break}}}finally{Io=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?_i(n):""}function Q0(e,t){switch(e.tag){case 26:case 27:case 5:return _i(e.type);case 16:return _i("Lazy");case 13:return e.child!==t&&t!==null?_i("Suspense Fallback"):_i("Suspense");case 19:return _i("SuspenseList");case 0:case 15:return Ho(e.type,!1);case 11:return Ho(e.type.render,!1);case 1:return Ho(e.type,!0);case 31:return _i("Activity");default:return""}}function ah(e){try{var t="",n=null;do t+=Q0(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
46
+ `+u[i].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=i&&0<=l);break}}}finally{Io=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?_i(n):""}function K0(e,t){switch(e.tag){case 26:case 27:case 5:return _i(e.type);case 16:return _i("Lazy");case 13:return e.child!==t&&t!==null?_i("Suspense Fallback"):_i("Suspense");case 19:return _i("SuspenseList");case 0:case 15:return Ho(e.type,!1);case 11:return Ho(e.type.render,!1);case 1:return Ho(e.type,!0);case 31:return _i("Activity");default:return""}}function ah(e){try{var t="",n=null;do t+=K0(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
47
47
  Error generating stack: `+i.message+`
48
- `+i.stack}}var $u=Object.prototype.hasOwnProperty,yf=Ge.unstable_scheduleCallback,qo=Ge.unstable_cancelCallback,Z0=Ge.unstable_shouldYield,K0=Ge.unstable_requestPaint,Tt=Ge.unstable_now,$0=Ge.unstable_getCurrentPriorityLevel,Mg=Ge.unstable_ImmediatePriority,Bg=Ge.unstable_UserBlockingPriority,Ns=Ge.unstable_NormalPriority,J0=Ge.unstable_LowPriority,Ug=Ge.unstable_IdlePriority,W0=Ge.log,e1=Ge.unstable_setDisableYieldValue,cr=null,kt=null;function ii(e){if(typeof W0=="function"&&e1(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(cr,e)}catch{}}var Nt=Math.clz32?Math.clz32:i1,t1=Math.log,n1=Math.LN2;function i1(e){return e>>>=0,e===0?32:31-(t1(e)/n1|0)|0}var Rr=256,Or=262144,Dr=4194304;function Ri(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ro(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,a=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var s=i&134217727;return s!==0?(i=s&~a,i!==0?l=Ri(i):(r&=s,r!==0?l=Ri(r):n||(n=s&~e,n!==0&&(l=Ri(n))))):(s=i&~a,s!==0?l=Ri(s):r!==0?l=Ri(r):n||(n=i&~e,n!==0&&(l=Ri(n)))),l===0?0:t!==0&&t!==l&&(t&a)===0&&(a=l&-l,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:l}function fr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function l1(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ig(){var e=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function a1(e,t,n,i,l,a){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,u=e.expirationTimes,c=e.hiddenUpdates;for(n=r&~n;0<n;){var d=31-Nt(n),f=1<<d;s[d]=0,u[d]=-1;var h=c[d];if(h!==null)for(c[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}i!==0&&Hg(e,i,0),a!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=a&~(r&~t))}function Hg(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Nt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function qg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Nt(n),l=1<<i;l&t|e[i]&t&&(e[i]|=t),n&=~l}}function Fg(e,t){var n=t&-t;return n=(n&42)!==0?1:xf(n),(n&(e.suspendedLanes|t))!==0?0:n}function xf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vf(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gg(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:dv(e.type))}function rh(e,t){var n=ce.p;try{return ce.p=e,t()}finally{ce.p=n}}var Ei=Math.random().toString(36).slice(2),Qe="__reactFiber$"+Ei,mt="__reactProps$"+Ei,Pl="__reactContainer$"+Ei,Ju="__reactEvents$"+Ei,r1="__reactListeners$"+Ei,s1="__reactHandles$"+Ei,sh="__reactResources$"+Ei,hr="__reactMarker$"+Ei;function bf(e){delete e[Qe],delete e[mt],delete e[Ju],delete e[r1],delete e[s1]}function pl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pl]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pp(e);e!==null;){if(n=e[Qe])return n;e=pp(e)}return t}e=n,n=e.parentNode}return null}function Xl(e){if(e=e[Qe]||e[Pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(L(33))}function Tl(e){var t=e[sh];return t||(t=e[sh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[hr]=!0}var Vg=new Set,Yg={};function Qi(e,t){zl(e,t),zl(e+"Capture",t)}function zl(e,t){for(Yg[e]=t,e=0;e<t.length;e++)Vg.add(t[e])}var o1=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),oh={},uh={};function u1(e){return $u.call(uh,e)?!0:$u.call(oh,e)?!1:o1.test(e)?uh[e]=!0:(oh[e]=!0,!1)}function es(e,t,n){if(u1(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function zr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function En(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function c1(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var l=i.get,a=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(r){n=""+r,a.call(this,r)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wu(e){if(!e._valueTracker){var t=Pg(e)?"checked":"value";e._valueTracker=c1(e,t,""+e[t])}}function Xg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Pg(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ws(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}}var f1=/[\n"\\]/g;function It(e){return e.replace(f1,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ec(e,t,n,i,l,a,r,s){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?tc(e,r,zt(t)):n!=null?tc(e,r,zt(n)):i!=null&&e.removeAttribute("value"),l==null&&a!=null&&(e.defaultChecked=!!a),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+zt(s):e.removeAttribute("name")}function Qg(e,t,n,i,l,a,r,s){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Wu(e);return}n=n!=null?""+zt(n):"",t=t!=null?""+zt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}i=i??l,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=s?e.checked:!!i,e.defaultChecked=!!i,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Wu(e)}function tc(e,t,n){t==="number"&&ws(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function kl(e,t,n,i){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&i&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,i&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function Zg(e,t,n){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zt(n):""}function Kg(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(L(92));if(ba(i)){if(1<i.length)throw Error(L(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=zt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),Wu(e)}function Ll(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var d1=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ch(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||d1.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function $g(e,t,n){if(t!=null&&typeof t!="object")throw Error(L(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var l in t)i=t[l],t.hasOwnProperty(l)&&n[l]!==i&&ch(e,l,i)}else for(var a in t)t.hasOwnProperty(a)&&ch(e,a,t[a])}function Sf(e){if(e.indexOf("-")===-1)return!1;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 h1=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),p1=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ts(e){return p1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _n(){}var nc=null;function Ef(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,Nl=null;function fh(e){var t=Xl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ec(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+It(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var l=i[mt]||null;if(!l)throw Error(L(90));ec(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&Xg(i)}break e;case"textarea":Zg(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&kl(e,!!n.multiple,t,!1)}}}var Go=!1;function Jg(e,t,n){if(Go)return e(t,n);Go=!0;try{var i=e(t);return i}finally{if(Go=!1,(ml!==null||Nl!==null)&&(vo(),ml&&(t=ml,e=Nl,Nl=ml=null,fh(t),e)))for(t=0;t<e.length;t++)fh(e[t])}}function Ya(e,t){var n=e.stateNode;if(n===null)return null;var i=n[mt]||null;if(i===null)return null;n=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ic=!1;if(Ln)try{var oa={};Object.defineProperty(oa,"passive",{get:function(){ic=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{ic=!1}var li=null,Cf=null,ns=null;function Wg(){if(ns)return ns;var e,t=Cf,n=t.length,i,l="value"in li?li.value:li.textContent,a=l.length;for(e=0;e<n&&t[e]===l[e];e++);var r=n-e;for(i=1;i<=r&&t[n-i]===l[a-i];i++);return ns=l.slice(e,1<i?1-i:void 0)}function is(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 Lr(){return!0}function dh(){return!1}function gt(e){function t(n,i,l,a,r){this._reactName=n,this._targetInst=l,this.type=i,this.nativeEvent=a,this.target=r,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Lr:dh,this.isPropagationStopped=dh,this}return Te(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=Lr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},so=gt(Zi),pr=Te({},Zi,{view:0,detail:0}),m1=gt(pr),Vo,Yo,ua,oo=Te({},pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,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!==ua&&(ua&&e.type==="mousemove"?(Vo=e.screenX-ua.screenX,Yo=e.screenY-ua.screenY):Yo=Vo=0,ua=e),Vo)},movementY:function(e){return"movementY"in e?e.movementY:Yo}}),hh=gt(oo),g1=Te({},oo,{dataTransfer:0}),y1=gt(g1),x1=Te({},pr,{relatedTarget:0}),Po=gt(x1),v1=Te({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),b1=gt(v1),S1=Te({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),E1=gt(S1),C1=Te({},Zi,{data:0}),ph=gt(C1),T1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w1(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=N1[e])?!!t[e]:!1}function Tf(){return w1}var A1=Te({},pr,{key:function(e){if(e.key){var t=T1[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?k1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),j1=gt(A1),_1=Te({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mh=gt(_1),R1=Te({},pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),O1=gt(R1),D1=Te({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),z1=gt(D1),L1=Te({},oo,{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}),M1=gt(L1),B1=Te({},Zi,{newState:0,oldState:0}),U1=gt(B1),I1=[9,13,27,32],kf=Ln&&"CompositionEvent"in window,Na=null;Ln&&"documentMode"in document&&(Na=document.documentMode);var H1=Ln&&"TextEvent"in window&&!Na,ey=Ln&&(!kf||Na&&8<Na&&11>=Na),gh=" ",yh=!1;function ty(e,t){switch(e){case"keyup":return I1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ny(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function q1(e,t){switch(e){case"compositionend":return ny(t);case"keypress":return t.which!==32?null:(yh=!0,gh);case"textInput":return e=t.data,e===gh&&yh?null:e;default:return null}}function F1(e,t){if(gl)return e==="compositionend"||!kf&&ty(e,t)?(e=Wg(),ns=Cf=li=null,gl=!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 ey&&t.locale!=="ko"?null:t.data;default:return null}}var G1={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 xh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!G1[e.type]:t==="textarea"}function iy(e,t,n,i){ml?Nl?Nl.push(i):Nl=[i]:ml=i,t=Ys(t,"onChange"),0<t.length&&(n=new so("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var wa=null,Pa=null;function V1(e){Jx(e,0)}function uo(e){var t=Sa(e);if(Xg(t))return e}function vh(e,t){if(e==="change")return t}var ly=!1;if(Ln){var Xo;if(Ln){var Qo="oninput"in document;if(!Qo){var bh=document.createElement("div");bh.setAttribute("oninput","return;"),Qo=typeof bh.oninput=="function"}Xo=Qo}else Xo=!1;ly=Xo&&(!document.documentMode||9<document.documentMode)}function Sh(){wa&&(wa.detachEvent("onpropertychange",ay),Pa=wa=null)}function ay(e){if(e.propertyName==="value"&&uo(Pa)){var t=[];iy(t,Pa,e,Ef(e)),Jg(V1,t)}}function Y1(e,t,n){e==="focusin"?(Sh(),wa=t,Pa=n,wa.attachEvent("onpropertychange",ay)):e==="focusout"&&Sh()}function P1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Pa)}function X1(e,t){if(e==="click")return uo(t)}function Q1(e,t){if(e==="input"||e==="change")return uo(t)}function Z1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:Z1;function Xa(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var l=n[i];if(!$u.call(t,l)||!jt(e[l],t[l]))return!1}return!0}function Eh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ch(e,t){var n=Eh(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Eh(n)}}function ry(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ry(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function sy(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ws(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ws(e.document)}return t}function Nf(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")}var K1=Ln&&"documentMode"in document&&11>=document.documentMode,yl=null,lc=null,Aa=null,ac=!1;function Th(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ac||yl==null||yl!==ws(i)||(i=yl,"selectionStart"in i&&Nf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Aa&&Xa(Aa,i)||(Aa=i,i=Ys(lc,"onSelect"),0<i.length&&(t=new so("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=yl)))}function Ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xl={animationend:Ai("Animation","AnimationEnd"),animationiteration:Ai("Animation","AnimationIteration"),animationstart:Ai("Animation","AnimationStart"),transitionrun:Ai("Transition","TransitionRun"),transitionstart:Ai("Transition","TransitionStart"),transitioncancel:Ai("Transition","TransitionCancel"),transitionend:Ai("Transition","TransitionEnd")},Zo={},oy={};Ln&&(oy=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Ki(e){if(Zo[e])return Zo[e];if(!xl[e])return e;var t=xl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in oy)return Zo[e]=t[n];return e}var uy=Ki("animationend"),cy=Ki("animationiteration"),fy=Ki("animationstart"),$1=Ki("transitionrun"),J1=Ki("transitionstart"),W1=Ki("transitioncancel"),dy=Ki("transitionend"),hy=new Map,rc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rc.push("scrollEnd");function nn(e,t){hy.set(e,t),Qi(t,[e])}var As=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dt=[],vl=0,wf=0;function co(){for(var e=vl,t=wf=vl=0;t<e;){var n=Dt[t];Dt[t++]=null;var i=Dt[t];Dt[t++]=null;var l=Dt[t];Dt[t++]=null;var a=Dt[t];if(Dt[t++]=null,i!==null&&l!==null){var r=i.pending;r===null?l.next=l:(l.next=r.next,r.next=l),i.pending=l}a!==0&&py(n,l,a)}}function fo(e,t,n,i){Dt[vl++]=e,Dt[vl++]=t,Dt[vl++]=n,Dt[vl++]=i,wf|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Af(e,t,n,i){return fo(e,t,n,i),js(e)}function $i(e,t){return fo(e,null,null,t),js(e)}function py(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var l=!1,a=e.return;a!==null;)a.childLanes|=n,i=a.alternate,i!==null&&(i.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(l=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,l&&t!==null&&(l=31-Nt(n),e=a.hiddenUpdates,i=e[l],i===null?e[l]=[t]:i.push(t),t.lane=n|536870912),a):null}function js(e){if(50<Ba)throw Ba=0,wc=null,Error(L(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bl={};function eS(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,n,i){return new eS(e,t,n,i)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function On(e,t){var n=e.alternate;return n===null?(n=Et(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&65011712,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.refCleanup=e.refCleanup,n}function my(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ls(e,t,n,i,l,a){var r=0;if(i=e,typeof e=="function")jf(e)&&(r=1);else if(typeof e=="string")r=aE(e,n,hn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Xu:return e=Et(31,n,t,l),e.elementType=Xu,e.lanes=a,e;case dl:return Bi(n.children,l,a,t);case zg:r=8,l|=24;break;case Vu:return e=Et(12,n,t,l|2),e.elementType=Vu,e.lanes=a,e;case Yu:return e=Et(13,n,t,l),e.elementType=Yu,e.lanes=a,e;case Pu:return e=Et(19,n,t,l),e.elementType=Pu,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jn:r=10;break e;case Lg:r=9;break e;case mf:r=11;break e;case gf:r=14;break e;case Qn:r=16,i=null;break e}r=29,n=Error(L(130,e===null?"null":typeof e,"")),i=null}return t=Et(r,n,t,l),t.elementType=e,t.type=i,t.lanes=a,t}function Bi(e,t,n,i){return e=Et(7,e,i,t),e.lanes=n,e}function Ko(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function gy(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function $o(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kh=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var n=kh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ah(t)},kh.set(e,t),t)}return{value:e,source:t,stack:ah(t)}}var Sl=[],El=0,_s=null,Qa=0,Lt=[],Mt=0,xi=null,cn=1,fn="";function wn(e,t){Sl[El++]=Qa,Sl[El++]=_s,_s=e,Qa=t}function yy(e,t,n){Lt[Mt++]=cn,Lt[Mt++]=fn,Lt[Mt++]=xi,xi=e;var i=cn;e=fn;var l=32-Nt(i)-1;i&=~(1<<l),n+=1;var a=32-Nt(t)+l;if(30<a){var r=l-l%5;a=(i&(1<<r)-1).toString(32),i>>=r,l-=r,cn=1<<32-Nt(t)+l|n<<l|i,fn=a+e}else cn=1<<a|n<<l|i,fn=e}function _f(e){e.return!==null&&(wn(e,1),yy(e,1,0))}function Rf(e){for(;e===_s;)_s=Sl[--El],Sl[El]=null,Qa=Sl[--El],Sl[El]=null;for(;e===xi;)xi=Lt[--Mt],Lt[Mt]=null,fn=Lt[--Mt],Lt[Mt]=null,cn=Lt[--Mt],Lt[Mt]=null}function xy(e,t){Lt[Mt++]=cn,Lt[Mt++]=fn,Lt[Mt++]=xi,cn=t.id,fn=t.overflow,xi=e}var Ze=null,Ee=null,se=!1,ui=null,qt=!1,sc=Error(L(519));function vi(e){var t=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Za(Ht(t,e)),sc}function Nh(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Qe]=e,t[mt]=i,n){case"dialog":ee("cancel",t),ee("close",t);break;case"iframe":case"object":case"embed":ee("load",t);break;case"video":case"audio":for(n=0;n<Wa.length;n++)ee(Wa[n],t);break;case"source":ee("error",t);break;case"img":case"image":case"link":ee("error",t),ee("load",t);break;case"details":ee("toggle",t);break;case"input":ee("invalid",t),Qg(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":ee("invalid",t);break;case"textarea":ee("invalid",t),Kg(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||ev(t.textContent,n)?(i.popover!=null&&(ee("beforetoggle",t),ee("toggle",t)),i.onScroll!=null&&ee("scroll",t),i.onScrollEnd!=null&&ee("scrollend",t),i.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||vi(e,!0)}function wh(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:qt=!1;return;case 27:case 3:qt=!0;return;default:Ze=Ze.return}}function al(e){if(e!==Ze)return!1;if(!se)return wh(e),se=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Oc(e.type,e.memoizedProps)),n=!n),n&&Ee&&vi(e),wh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=hp(e)}else t===27?(t=Ee,Ci(e.type)?(e=Mc,Mc=null,Ee=e):Ee=t):Ee=Ze?Gt(e.stateNode.nextSibling):null;return!0}function qi(){Ee=Ze=null,se=!1}function Jo(){var e=ui;return e!==null&&(ht===null?ht=e:ht.push.apply(ht,e),ui=null),e}function Za(e){ui===null?ui=[e]:ui.push(e)}var oc=yn(null),Ji=null,Rn=null;function $n(e,t,n){be(oc,t._currentValue),t._currentValue=n}function Dn(e){e._currentValue=oc.current,Pe(oc)}function uc(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function cc(e,t,n,i){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var a=l.dependencies;if(a!==null){var r=l.child;a=a.firstContext;e:for(;a!==null;){var s=a;a=l;for(var u=0;u<t.length;u++)if(s.context===t[u]){a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uc(a.return,n,e),i||(r=null);break e}a=s.next}}else if(l.tag===18){if(r=l.return,r===null)throw Error(L(341));r.lanes|=n,a=r.alternate,a!==null&&(a.lanes|=n),uc(r,n,e),r=null}else r=l.child;if(r!==null)r.return=l;else for(r=l;r!==null;){if(r===e){r=null;break}if(l=r.sibling,l!==null){l.return=r.return,r=l;break}r=r.return}l=r}}function Ql(e,t,n,i){e=null;for(var l=t,a=!1;l!==null;){if(!a){if((l.flags&524288)!==0)a=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var r=l.alternate;if(r===null)throw Error(L(387));if(r=r.memoizedProps,r!==null){var s=l.type;jt(l.pendingProps.value,r.value)||(e!==null?e.push(s):e=[s])}}else if(l===Cs.current){if(r=l.alternate,r===null)throw Error(L(387));r.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(tr):e=[tr])}l=l.return}e!==null&&cc(t,e,n,i),t.flags|=262144}function Rs(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fi(e){Ji=e,Rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return vy(Ji,e)}function Mr(e,t){return Ji===null&&Fi(e),vy(e,t)}function vy(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Rn===null){if(e===null)throw Error(L(308));Rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Rn=Rn.next=t;return n}var tS=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},nS=Ge.unstable_scheduleCallback,iS=Ge.unstable_NormalPriority,Me={$$typeof:jn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Of(){return{controller:new tS,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&nS(iS,function(){e.controller.abort()})}var ja=null,fc=0,Ml=0,wl=null;function lS(e,t){if(ja===null){var n=ja=[];fc=0,Ml=id(),wl={status:"pending",value:void 0,then:function(i){n.push(i)}}}return fc++,t.then(Ah,Ah),t}function Ah(){if(--fc===0&&ja!==null){wl!==null&&(wl.status="fulfilled");var e=ja;ja=null,Ml=0,wl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function aS(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(i.status="rejected",i.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),i}var jh=Z.S;Z.S=function(e,t){Dx=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&lS(e,t),jh!==null&&jh(e,t)};var Ui=yn(null);function Df(){var e=Ui.current;return e!==null?e:ye.pooledCache}function as(e,t){t===null?be(Ui,Ui.current):be(Ui,t.pool)}function by(){var e=Df();return e===null?null:{parent:Me._currentValue,pool:e}}var Zl=Error(L(460)),zf=Error(L(474)),ho=Error(L(542)),Os={then:function(){}};function _h(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sy(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e;default:if(typeof t.status=="string")t.then(_n,_n);else{if(e=ye,e!==null&&100<e.shellSuspendCounter)throw Error(L(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=i}},function(i){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e}throw Ii=t,Zl}}function Oi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ii=n,Zl):n}}var Ii=null;function Rh(){if(Ii===null)throw Error(L(459));var e=Ii;return Ii=null,e}function Oh(e){if(e===Zl||e===ho)throw Error(L(483))}var Al=null,Ka=0;function Br(e){var t=Ka;return Ka+=1,Al===null&&(Al=[]),Sy(Al,e,t)}function ca(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ur(e,t){throw t.$$typeof===Y0?Error(L(525)):(e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ey(e){function t(g,m){if(e){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function i(g){for(var m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function l(g,m){return g=On(g,m),g.index=0,g.sibling=null,g}function a(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=67108866,m):v):(g.flags|=67108866,m)):(g.flags|=1048576,m)}function r(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function s(g,m,v,C){return m===null||m.tag!==6?(m=Ko(v,g.mode,C),m.return=g,m):(m=l(m,v),m.return=g,m)}function u(g,m,v,C){var A=v.type;return A===dl?d(g,m,v.props.children,C,v.key):m!==null&&(m.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qn&&Oi(A)===m.type)?(m=l(m,v.props),ca(m,v),m.return=g,m):(m=ls(v.type,v.key,v.props,null,g.mode,C),ca(m,v),m.return=g,m)}function c(g,m,v,C){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=$o(v,g.mode,C),m.return=g,m):(m=l(m,v.children||[]),m.return=g,m)}function d(g,m,v,C,A){return m===null||m.tag!==7?(m=Bi(v,g.mode,C,A),m.return=g,m):(m=l(m,v),m.return=g,m)}function f(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=Ko(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _r:return v=ls(m.type,m.key,m.props,null,g.mode,v),ca(v,m),v.return=g,v;case va:return m=$o(m,g.mode,v),m.return=g,m;case Qn:return m=Oi(m),f(g,m,v)}if(ba(m)||sa(m))return m=Bi(m,g.mode,v,null),m.return=g,m;if(typeof m.then=="function")return f(g,Br(m),v);if(m.$$typeof===jn)return f(g,Mr(g,m),v);Ur(g,m)}return null}function h(g,m,v,C){var A=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return A!==null?null:s(g,m,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _r:return v.key===A?u(g,m,v,C):null;case va:return v.key===A?c(g,m,v,C):null;case Qn:return v=Oi(v),h(g,m,v,C)}if(ba(v)||sa(v))return A!==null?null:d(g,m,v,C,null);if(typeof v.then=="function")return h(g,m,Br(v),C);if(v.$$typeof===jn)return h(g,m,Mr(g,v),C);Ur(g,v)}return null}function p(g,m,v,C,A){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return g=g.get(v)||null,s(m,g,""+C,A);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _r:return g=g.get(C.key===null?v:C.key)||null,u(m,g,C,A);case va:return g=g.get(C.key===null?v:C.key)||null,c(m,g,C,A);case Qn:return C=Oi(C),p(g,m,v,C,A)}if(ba(C)||sa(C))return g=g.get(v)||null,d(m,g,C,A,null);if(typeof C.then=="function")return p(g,m,v,Br(C),A);if(C.$$typeof===jn)return p(g,m,v,Mr(m,C),A);Ur(m,C)}return null}function y(g,m,v,C){for(var A=null,N=null,_=m,U=m=0,D=null;_!==null&&U<v.length;U++){_.index>U?(D=_,_=null):D=_.sibling;var T=h(g,_,v[U],C);if(T===null){_===null&&(_=D);break}e&&_&&T.alternate===null&&t(g,_),m=a(T,m,U),N===null?A=T:N.sibling=T,N=T,_=D}if(U===v.length)return n(g,_),se&&wn(g,U),A;if(_===null){for(;U<v.length;U++)_=f(g,v[U],C),_!==null&&(m=a(_,m,U),N===null?A=_:N.sibling=_,N=_);return se&&wn(g,U),A}for(_=i(_);U<v.length;U++)D=p(_,g,U,v[U],C),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?U:D.key),m=a(D,m,U),N===null?A=D:N.sibling=D,N=D);return e&&_.forEach(function(M){return t(g,M)}),se&&wn(g,U),A}function x(g,m,v,C){if(v==null)throw Error(L(151));for(var A=null,N=null,_=m,U=m=0,D=null,T=v.next();_!==null&&!T.done;U++,T=v.next()){_.index>U?(D=_,_=null):D=_.sibling;var M=h(g,_,T.value,C);if(M===null){_===null&&(_=D);break}e&&_&&M.alternate===null&&t(g,_),m=a(M,m,U),N===null?A=M:N.sibling=M,N=M,_=D}if(T.done)return n(g,_),se&&wn(g,U),A;if(_===null){for(;!T.done;U++,T=v.next())T=f(g,T.value,C),T!==null&&(m=a(T,m,U),N===null?A=T:N.sibling=T,N=T);return se&&wn(g,U),A}for(_=i(_);!T.done;U++,T=v.next())T=p(_,g,U,T.value,C),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?U:T.key),m=a(T,m,U),N===null?A=T:N.sibling=T,N=T);return e&&_.forEach(function(q){return t(g,q)}),se&&wn(g,U),A}function E(g,m,v,C){if(typeof v=="object"&&v!==null&&v.type===dl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case _r:e:{for(var A=v.key;m!==null;){if(m.key===A){if(A=v.type,A===dl){if(m.tag===7){n(g,m.sibling),C=l(m,v.props.children),C.return=g,g=C;break e}}else if(m.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qn&&Oi(A)===m.type){n(g,m.sibling),C=l(m,v.props),ca(C,v),C.return=g,g=C;break e}n(g,m);break}else t(g,m);m=m.sibling}v.type===dl?(C=Bi(v.props.children,g.mode,C,v.key),C.return=g,g=C):(C=ls(v.type,v.key,v.props,null,g.mode,C),ca(C,v),C.return=g,g=C)}return r(g);case va:e:{for(A=v.key;m!==null;){if(m.key===A)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(g,m.sibling),C=l(m,v.children||[]),C.return=g,g=C;break e}else{n(g,m);break}else t(g,m);m=m.sibling}C=$o(v,g.mode,C),C.return=g,g=C}return r(g);case Qn:return v=Oi(v),E(g,m,v,C)}if(ba(v))return y(g,m,v,C);if(sa(v)){if(A=sa(v),typeof A!="function")throw Error(L(150));return v=A.call(v),x(g,m,v,C)}if(typeof v.then=="function")return E(g,m,Br(v),C);if(v.$$typeof===jn)return E(g,m,Mr(g,v),C);Ur(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,m!==null&&m.tag===6?(n(g,m.sibling),C=l(m,v),C.return=g,g=C):(n(g,m),C=Ko(v,g.mode,C),C.return=g,g=C),r(g)):n(g,m)}return function(g,m,v,C){try{Ka=0;var A=E(g,m,v,C);return Al=null,A}catch(_){if(_===Zl||_===ho)throw _;var N=Et(29,_,null,g.mode);return N.lanes=C,N.return=g,N}finally{}}}var Gi=Ey(!0),Cy=Ey(!1),Zn=!1;function Lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ci(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fi(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ue&2)!==0){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,t=js(e),py(e,null,n),t}return fo(e,i,t,n),js(e)}function _a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qg(e,n)}}function Wo(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var l=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?l=a=r:a=a.next=r,n=n.next}while(n!==null);a===null?l=a=t:a=a.next=t}else l=a=t;n={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var hc=!1;function Ra(){if(hc){var e=wl;if(e!==null)throw e}}function Oa(e,t,n,i){hc=!1;var l=e.updateQueue;Zn=!1;var a=l.firstBaseUpdate,r=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,c=u.next;u.next=null,r===null?a=c:r.next=c,r=u;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==r&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=u))}if(a!==null){var f=l.baseState;r=0,d=c=u=null,s=a;do{var h=s.lane&-536870913,p=h!==s.lane;if(p?(ie&h)===h:(i&h)===h){h!==0&&h===Ml&&(hc=!0),d!==null&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var y=e,x=s;h=t;var E=n;switch(x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(E,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(E,f,h):y,h==null)break e;f=Te({},f,h);break e;case 2:Zn=!0}}h=s.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=l.callbacks,p===null?l.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=p,u=f):d=d.next=p,r|=h;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;p=s,s=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=d,a===null&&(l.shared.lanes=0),Si|=r,e.lanes=r,e.memoizedState=f}}function Ty(e,t){if(typeof e!="function")throw Error(L(191,e));e.call(t)}function ky(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ty(n[e],t)}var Bl=yn(null),Ds=yn(0);function Dh(e,t){e=In,be(Ds,e),be(Bl,t),In=e|t.baseLanes}function pc(){be(Ds,In),be(Bl,Bl.current)}function Mf(){In=Ds.current,Pe(Bl),Pe(Ds)}var _t=yn(null),Ft=null;function Jn(e){var t=e.alternate;be(Re,Re.current&1),be(_t,e),Ft===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(Ft=e)}function mc(e){be(Re,Re.current),be(_t,e),Ft===null&&(Ft=e)}function Ny(e){e.tag===22?(be(Re,Re.current),be(_t,e),Ft===null&&(Ft=e)):Wn()}function Wn(){be(Re,Re.current),be(_t,_t.current)}function St(e){Pe(_t),Ft===e&&(Ft=null),Pe(Re)}var Re=yn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||zc(n)||Lc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Mn=0,J=null,me=null,ze=null,Ls=!1,jl=!1,Vi=!1,Ms=0,$a=0,_l=null,rS=0;function Ae(){throw Error(L(321))}function Bf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function Uf(e,t,n,i,l,a){return Mn=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?ix:Zf,Vi=!1,a=n(i,l),Vi=!1,jl&&(a=Ay(t,n,i,l)),wy(e),a}function wy(e){Z.H=Ja;var t=me!==null&&me.next!==null;if(Mn=0,ze=me=J=null,Ls=!1,$a=0,_l=null,t)throw Error(L(300));e===null||Be||(e=e.dependencies,e!==null&&Rs(e)&&(Be=!0))}function Ay(e,t,n,i){J=e;var l=0;do{if(jl&&(_l=null),$a=0,jl=!1,25<=l)throw Error(L(301));if(l+=1,ze=me=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}Z.H=lx,a=t(n,i)}while(jl);return a}function sS(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?gr(t):t,e=e.useState()[0],(me!==null?me.memoizedState:null)!==e&&(J.flags|=1024),t}function If(){var e=Ms!==0;return Ms=0,e}function Hf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function qf(e){if(Ls){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ls=!1}Mn=0,ze=me=J=null,jl=!1,$a=Ms=0,_l=null}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?J.memoizedState=ze=e:ze=ze.next=e,ze}function Oe(){if(me===null){var e=J.alternate;e=e!==null?e.memoizedState:null}else e=me.next;var t=ze===null?J.memoizedState:ze.next;if(t!==null)ze=t,me=e;else{if(e===null)throw J.alternate===null?Error(L(467)):Error(L(310));me=e,e={memoizedState:me.memoizedState,baseState:me.baseState,baseQueue:me.baseQueue,queue:me.queue,next:null},ze===null?J.memoizedState=ze=e:ze=ze.next=e}return ze}function po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gr(e){var t=$a;return $a+=1,_l===null&&(_l=[]),e=Sy(_l,e,t),t=J,(ze===null?t.memoizedState:ze.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?ix:Zf),e}function mo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gr(e);if(e.$$typeof===jn)return Ke(e)}throw Error(L(438,String(e)))}function Ff(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=J.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=po(),J.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=P0;return t.index++,n}function Bn(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=Oe();return Gf(t,me,e)}function Gf(e,t,n){var i=e.queue;if(i===null)throw Error(L(311));i.lastRenderedReducer=n;var l=e.baseQueue,a=i.pending;if(a!==null){if(l!==null){var r=l.next;l.next=a.next,a.next=r}t.baseQueue=l=a,i.pending=null}if(a=e.baseState,l===null)e.memoizedState=a;else{t=l.next;var s=r=null,u=null,c=t,d=!1;do{var f=c.lane&-536870913;if(f!==c.lane?(ie&f)===f:(Mn&f)===f){var h=c.revertLane;if(h===0)u!==null&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===Ml&&(d=!0);else if((Mn&h)===h){c=c.next,h===Ml&&(d=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(s=u=f,r=a):u=u.next=f,J.lanes|=h,Si|=h;f=c.action,Vi&&n(a,f),a=c.hasEagerState?c.eagerState:n(a,f)}else h={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(s=u=h,r=a):u=u.next=h,J.lanes|=f,Si|=f;c=c.next}while(c!==null&&c!==t);if(u===null?r=a:u.next=s,!jt(a,e.memoizedState)&&(Be=!0,d&&(n=wl,n!==null)))throw n;e.memoizedState=a,e.baseState=r,e.baseQueue=u,i.lastRenderedState=a}return l===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function eu(e){var t=Oe(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var i=n.dispatch,l=n.pending,a=t.memoizedState;if(l!==null){n.pending=null;var r=l=l.next;do a=e(a,r.action),r=r.next;while(r!==l);jt(a,t.memoizedState)||(Be=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function jy(e,t,n){var i=J,l=Oe(),a=se;if(a){if(n===void 0)throw Error(L(407));n=n()}else n=t();var r=!jt((me||l).memoizedState,n);if(r&&(l.memoizedState=n,Be=!0),l=l.queue,Vf(Oy.bind(null,i,l,e),[e]),l.getSnapshot!==t||r||ze!==null&&ze.memoizedState.tag&1){if(i.flags|=2048,Ul(9,{destroy:void 0},Ry.bind(null,i,l,n,t),null),ye===null)throw Error(L(349));a||(Mn&127)!==0||_y(i,t,n)}return n}function _y(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=po(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ry(e,t,n,i){t.value=n,t.getSnapshot=i,Dy(t)&&zy(e)}function Oy(e,t,n){return n(function(){Dy(t)&&zy(e)})}function Dy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jt(e,n)}catch{return!0}}function zy(e){var t=$i(e,2);t!==null&&pt(t,e,2)}function gc(e){var t=nt();if(typeof e=="function"){var n=e;if(e=n(),Vi){ii(!0);try{n()}finally{ii(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function Ly(e,t,n,i){return e.baseState=n,Gf(e,me,typeof i=="function"?i:Bn)}function oS(e,t,n,i,l){if(yo(e))throw Error(L(485));if(e=t.action,e!==null){var a={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){a.listeners.push(r)}};Z.T!==null?n(!0):a.isTransition=!1,i(a),n=t.pending,n===null?(a.next=t.pending=a,My(t,a)):(a.next=n.next,t.pending=n.next=a)}}function My(e,t){var n=t.action,i=t.payload,l=e.state;if(t.isTransition){var a=Z.T,r={};Z.T=r;try{var s=n(l,i),u=Z.S;u!==null&&u(r,s),zh(e,t,s)}catch(c){yc(e,t,c)}finally{a!==null&&r.types!==null&&(a.types=r.types),Z.T=a}}else try{a=n(l,i),zh(e,t,a)}catch(c){yc(e,t,c)}}function zh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Lh(e,t,i)},function(i){return yc(e,t,i)}):Lh(e,t,n)}function Lh(e,t,n){t.status="fulfilled",t.value=n,By(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,My(e,n)))}function yc(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,By(t),t=t.next;while(t!==i)}e.action=null}function By(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Uy(e,t){return t}function Mh(e,t){if(se){var n=ye.formState;if(n!==null){e:{var i=J;if(se){if(Ee){t:{for(var l=Ee,a=qt;l.nodeType!==8;){if(!a){l=null;break t}if(l=Gt(l.nextSibling),l===null){l=null;break t}}a=l.data,l=a==="F!"||a==="F"?l:null}if(l){Ee=Gt(l.nextSibling),i=l.data==="F!";break e}}vi(i)}i=!1}i&&(t=n[0])}}return n=nt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uy,lastRenderedState:t},n.queue=i,n=ex.bind(null,J,i),i.dispatch=n,i=gc(!1),a=Qf.bind(null,J,!1,i.queue),i=nt(),l={state:t,dispatch:null,action:e,pending:null},i.queue=l,n=oS.bind(null,J,l,a,n),l.dispatch=n,i.memoizedState=e,[t,n,!1]}function Bh(e){var t=Oe();return Iy(t,me,e)}function Iy(e,t,n){if(t=Gf(e,t,Uy)[0],e=rs(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=gr(t)}catch(r){throw r===Zl?ho:r}else i=t;t=Oe();var l=t.queue,a=l.dispatch;return n!==t.memoizedState&&(J.flags|=2048,Ul(9,{destroy:void 0},uS.bind(null,l,n),null)),[i,a,e]}function uS(e,t){e.action=t}function Uh(e){var t=Oe(),n=me;if(n!==null)return Iy(t,n,e);Oe(),t=t.memoizedState,n=Oe();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Ul(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=J.updateQueue,t===null&&(t=po(),J.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Hy(){return Oe().memoizedState}function ss(e,t,n,i){var l=nt();J.flags|=e,l.memoizedState=Ul(1|t,{destroy:void 0},n,i===void 0?null:i)}function go(e,t,n,i){var l=Oe();i=i===void 0?null:i;var a=l.memoizedState.inst;me!==null&&i!==null&&Bf(i,me.memoizedState.deps)?l.memoizedState=Ul(t,a,n,i):(J.flags|=e,l.memoizedState=Ul(1|t,a,n,i))}function Ih(e,t){ss(8390656,8,e,t)}function Vf(e,t){go(2048,8,e,t)}function cS(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=po(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qy(e){var t=Oe().memoizedState;return cS({ref:t,nextImpl:e}),function(){if((ue&2)!==0)throw Error(L(440));return t.impl.apply(void 0,arguments)}}function Fy(e,t){return go(4,2,e,t)}function Gy(e,t){return go(4,4,e,t)}function Vy(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Yy(e,t,n){n=n!=null?n.concat([e]):null,go(4,4,Vy.bind(null,t,e),n)}function Yf(){}function Py(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&Bf(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Xy(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&Bf(t,i[1]))return i[0];if(i=e(),Vi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[i,t],i}function Pf(e,t,n){return n===void 0||(Mn&1073741824)!==0&&(ie&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Lx(),J.lanes|=e,Si|=e,n)}function Qy(e,t,n,i){return jt(n,t)?n:Bl.current!==null?(e=Pf(e,n,i),jt(e,t)||(Be=!0),e):(Mn&42)===0||(Mn&1073741824)!==0&&(ie&261930)===0?(Be=!0,e.memoizedState=n):(e=Lx(),J.lanes|=e,Si|=e,t)}function Zy(e,t,n,i,l){var a=ce.p;ce.p=a!==0&&8>a?a:8;var r=Z.T,s={};Z.T=s,Qf(e,!1,t,n);try{var u=l(),c=Z.S;if(c!==null&&c(s,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=aS(u,i);Da(e,t,d,wt(e))}else Da(e,t,i,wt(e))}catch(f){Da(e,t,{then:function(){},status:"rejected",reason:f},wt())}finally{ce.p=a,r!==null&&s.types!==null&&(r.types=s.types),Z.T=r}}function fS(){}function xc(e,t,n,i){if(e.tag!==5)throw Error(L(476));var l=Ky(e).queue;Zy(e,l,t,Mi,n===null?fS:function(){return $y(e),n(i)})}function Ky(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mi,baseState:Mi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:Mi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $y(e){var t=Ky(e);t.next===null&&(t=e.alternate.memoizedState),Da(e,t.next.queue,{},wt())}function Xf(){return Ke(tr)}function Jy(){return Oe().memoizedState}function Wy(){return Oe().memoizedState}function dS(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wt();e=ci(n);var i=fi(t,e,n);i!==null&&(pt(i,t,n),_a(i,t,n)),t={cache:Of()},e.payload=t;return}t=t.return}}function hS(e,t,n){var i=wt();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},yo(e)?tx(t,n):(n=Af(e,t,n,i),n!==null&&(pt(n,e,i),nx(n,t,i)))}function ex(e,t,n){var i=wt();Da(e,t,n,i)}function Da(e,t,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(yo(e))tx(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var r=t.lastRenderedState,s=a(r,n);if(l.hasEagerState=!0,l.eagerState=s,jt(s,r))return fo(e,t,l,0),ye===null&&co(),!1}catch{}finally{}if(n=Af(e,t,l,i),n!==null)return pt(n,e,i),nx(n,t,i),!0}return!1}function Qf(e,t,n,i){if(i={lane:2,revertLane:id(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yo(e)){if(t)throw Error(L(479))}else t=Af(e,n,i,2),t!==null&&pt(t,e,2)}function yo(e){var t=e.alternate;return e===J||t!==null&&t===J}function tx(e,t){jl=Ls=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nx(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,qg(e,n)}}var Ja={readContext:Ke,use:mo,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useLayoutEffect:Ae,useInsertionEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useSyncExternalStore:Ae,useId:Ae,useHostTransitionStatus:Ae,useFormState:Ae,useActionState:Ae,useOptimistic:Ae,useMemoCache:Ae,useCacheRefresh:Ae};Ja.useEffectEvent=Ae;var ix={readContext:Ke,use:mo,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Ih,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ss(4194308,4,Vy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=nt();t=t===void 0?null:t;var i=e();if(Vi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=nt();if(n!==void 0){var l=n(t);if(Vi){ii(!0);try{n(t)}finally{ii(!1)}}}else l=t;return i.memoizedState=i.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},i.queue=e,e=e.dispatch=hS.bind(null,J,e),[i.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:function(e){e=gc(e);var t=e.queue,n=ex.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yf,useDeferredValue:function(e,t){var n=nt();return Pf(n,e,t)},useTransition:function(){var e=gc(!1);return e=Zy.bind(null,J,e.queue,!0,!1),nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=J,l=nt();if(se){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ye===null)throw Error(L(349));(ie&127)!==0||_y(i,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,Ih(Oy.bind(null,i,a,e),[e]),i.flags|=2048,Ul(9,{destroy:void 0},Ry.bind(null,i,a,n,t),null),n},useId:function(){var e=nt(),t=ye.identifierPrefix;if(se){var n=fn,i=cn;n=(i&~(1<<32-Nt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ms++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=rS++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xf,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=nt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qf.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ff,useCacheRefresh:function(){return nt().memoizedState=dS.bind(null,J)},useEffectEvent:function(e){var t=nt(),n={impl:e};return t.memoizedState=n,function(){if((ue&2)!==0)throw Error(L(440));return n.impl.apply(void 0,arguments)}}},Zf={readContext:Ke,use:mo,useCallback:Py,useContext:Ke,useEffect:Vf,useImperativeHandle:Yy,useInsertionEffect:Fy,useLayoutEffect:Gy,useMemo:Xy,useReducer:rs,useRef:Hy,useState:function(){return rs(Bn)},useDebugValue:Yf,useDeferredValue:function(e,t){var n=Oe();return Qy(n,me.memoizedState,e,t)},useTransition:function(){var e=rs(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:gr(e),t]},useSyncExternalStore:jy,useId:Jy,useHostTransitionStatus:Xf,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var n=Oe();return Ly(n,me,e,t)},useMemoCache:Ff,useCacheRefresh:Wy};Zf.useEffectEvent=qy;var lx={readContext:Ke,use:mo,useCallback:Py,useContext:Ke,useEffect:Vf,useImperativeHandle:Yy,useInsertionEffect:Fy,useLayoutEffect:Gy,useMemo:Xy,useReducer:eu,useRef:Hy,useState:function(){return eu(Bn)},useDebugValue:Yf,useDeferredValue:function(e,t){var n=Oe();return me===null?Pf(n,e,t):Qy(n,me.memoizedState,e,t)},useTransition:function(){var e=eu(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:gr(e),t]},useSyncExternalStore:jy,useId:Jy,useHostTransitionStatus:Xf,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var n=Oe();return me!==null?Ly(n,me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ff,useCacheRefresh:Wy};lx.useEffectEvent=qy;function tu(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vc={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=wt(),l=ci(i);l.payload=t,n!=null&&(l.callback=n),t=fi(e,l,i),t!==null&&(pt(t,e,i),_a(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=wt(),l=ci(i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=fi(e,l,i),t!==null&&(pt(t,e,i),_a(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),i=ci(n);i.tag=2,t!=null&&(i.callback=t),t=fi(e,i,n),t!==null&&(pt(t,e,n),_a(t,e,n))}};function Hh(e,t,n,i,l,a,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,a,r):t.prototype&&t.prototype.isPureReactComponent?!Xa(n,i)||!Xa(l,a):!0}function qh(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&vc.enqueueReplaceState(t,t.state,null)}function Yi(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=Te({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function ax(e){As(e)}function rx(e){console.error(e)}function sx(e){As(e)}function Bs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Fh(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function bc(e,t,n){return n=ci(n),n.tag=3,n.payload={element:null},n.callback=function(){Bs(e,t)},n}function ox(e){return e=ci(e),e.tag=3,e}function ux(e,t,n,i){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var a=i.value;e.payload=function(){return l(a)},e.callback=function(){Fh(t,n,i)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Fh(t,n,i),typeof l!="function"&&(di===null?di=new Set([this]):di.add(this));var s=i.stack;this.componentDidCatch(i.value,{componentStack:s!==null?s:""})})}function pS(e,t,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Ql(t,n,l,!0),n=_t.current,n!==null){switch(n.tag){case 31:case 13:return Ft===null?Fs():n.alternate===null&&je===0&&(je=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===Os?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),du(e,i,l)),!1;case 22:return n.flags|=65536,i===Os?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),du(e,i,l)),!1}throw Error(L(435,n.tag))}return du(e,i,l),Fs(),!1}if(se)return t=_t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,i!==sc&&(e=Error(L(422),{cause:i}),Za(Ht(e,n)))):(i!==sc&&(t=Error(L(423),{cause:i}),Za(Ht(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,i=Ht(i,n),l=bc(e.stateNode,i,l),Wo(e,l),je!==4&&(je=2)),!1;var a=Error(L(520),{cause:i});if(a=Ht(a,n),Ma===null?Ma=[a]:Ma.push(a),je!==4&&(je=2),t===null)return!0;i=Ht(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=bc(n.stateNode,i,e),Wo(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(di===null||!di.has(a))))return n.flags|=65536,l&=-l,n.lanes|=l,l=ox(l),ux(l,e,n,i),Wo(n,l),!1}n=n.return}while(n!==null);return!1}var Kf=Error(L(461)),Be=!1;function Xe(e,t,n,i){t.child=e===null?Cy(t,null,n,i):Gi(t,e.child,n,i)}function Gh(e,t,n,i,l){n=n.render;var a=t.ref;if("ref"in i){var r={};for(var s in i)s!=="ref"&&(r[s]=i[s])}else r=i;return Fi(t),i=Uf(e,t,n,r,a,l),s=If(),e!==null&&!Be?(Hf(e,t,l),Un(e,t,l)):(se&&s&&_f(t),t.flags|=1,Xe(e,t,i,l),t.child)}function Vh(e,t,n,i,l){if(e===null){var a=n.type;return typeof a=="function"&&!jf(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,cx(e,t,a,i,l)):(e=ls(n.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!$f(e,l)){var r=a.memoizedProps;if(n=n.compare,n=n!==null?n:Xa,n(r,i)&&e.ref===t.ref)return Un(e,t,l)}return t.flags|=1,e=On(a,i),e.ref=t.ref,e.return=t,t.child=e}function cx(e,t,n,i,l){if(e!==null){var a=e.memoizedProps;if(Xa(a,i)&&e.ref===t.ref)if(Be=!1,t.pendingProps=i=a,$f(e,l))(e.flags&131072)!==0&&(Be=!0);else return t.lanes=e.lanes,Un(e,t,l)}return Sc(e,t,n,i,l)}function fx(e,t,n,i){var l=i.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(i=t.child=e.child,l=0;i!==null;)l=l|i.lanes|i.childLanes,i=i.sibling;i=l&~a}else i=0,t.child=null;return Yh(e,t,a,n,i)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&as(t,a!==null?a.cachePool:null),a!==null?Dh(t,a):pc(),Ny(t);else return i=t.lanes=536870912,Yh(e,t,a!==null?a.baseLanes|n:n,n,i)}else a!==null?(as(t,a.cachePool),Dh(t,a),Wn(),t.memoizedState=null):(e!==null&&as(t,null),pc(),Wn());return Xe(e,t,l,n),t.child}function Ea(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yh(e,t,n,i,l){var a=Df();return a=a===null?null:{parent:Me._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&as(t,null),pc(),Ny(t),e!==null&&Ql(e,t,i,!0),t.childLanes=l,null}function os(e,t){return t=Us({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ph(e,t,n){return Gi(t,e.child,null,n),e=os(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function mS(e,t,n){var i=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(se){if(i.mode==="hidden")return e=os(t,i),t.lanes=536870912,Ea(null,e);if(mc(t),(e=Ee)?(e=iv(e,qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi!==null?{id:cn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},n=gy(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw vi(t);return t.lanes=536870912,null}return os(t,i)}var a=e.memoizedState;if(a!==null){var r=a.dehydrated;if(mc(t),l)if(t.flags&256)t.flags&=-257,t=Ph(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(L(558));else if(Be||Ql(e,t,n,!1),l=(n&e.childLanes)!==0,Be||l){if(i=ye,i!==null&&(r=Fg(i,n),r!==0&&r!==a.retryLane))throw a.retryLane=r,$i(e,r),pt(i,e,r),Kf;Fs(),t=Ph(e,t,n)}else e=a.treeContext,Ee=Gt(r.nextSibling),Ze=t,se=!0,ui=null,qt=!1,e!==null&&xy(t,e),t=os(t,i),t.flags|=4096;return t}return e=On(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function us(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(L(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,i,l){return Fi(t),n=Uf(e,t,n,i,void 0,l),i=If(),e!==null&&!Be?(Hf(e,t,l),Un(e,t,l)):(se&&i&&_f(t),t.flags|=1,Xe(e,t,n,l),t.child)}function Xh(e,t,n,i,l,a){return Fi(t),t.updateQueue=null,n=Ay(t,i,n,l),wy(e),i=If(),e!==null&&!Be?(Hf(e,t,a),Un(e,t,a)):(se&&i&&_f(t),t.flags|=1,Xe(e,t,n,a),t.child)}function Qh(e,t,n,i,l){if(Fi(t),t.stateNode===null){var a=bl,r=n.contextType;typeof r=="object"&&r!==null&&(a=Ke(r)),a=new n(i,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=i,a.state=t.memoizedState,a.refs={},Lf(t),r=n.contextType,a.context=typeof r=="object"&&r!==null?Ke(r):bl,a.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(tu(t,n,r,i),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(r=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),r!==a.state&&vc.enqueueReplaceState(a,a.state,null),Oa(t,i,a,l),Ra(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,u=Yi(n,s);a.props=u;var c=a.context,d=n.contextType;r=bl,typeof d=="object"&&d!==null&&(r=Ke(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s||c!==r)&&qh(t,a,i,r),Zn=!1;var h=t.memoizedState;a.state=h,Oa(t,i,a,l),Ra(),c=t.memoizedState,s||h!==c||Zn?(typeof f=="function"&&(tu(t,n,f,i),c=t.memoizedState),(u=Zn||Hh(t,n,u,i,h,c,r))?(d||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=i,t.memoizedState=c),a.props=i,a.state=c,a.context=r,i=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,dc(e,t),r=t.memoizedProps,d=Yi(n,r),a.props=d,f=t.pendingProps,h=a.context,c=n.contextType,u=bl,typeof c=="object"&&c!==null&&(u=Ke(c)),s=n.getDerivedStateFromProps,(c=typeof s=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r!==f||h!==u)&&qh(t,a,i,u),Zn=!1,h=t.memoizedState,a.state=h,Oa(t,i,a,l),Ra();var p=t.memoizedState;r!==f||h!==p||Zn||e!==null&&e.dependencies!==null&&Rs(e.dependencies)?(typeof s=="function"&&(tu(t,n,s,i),p=t.memoizedState),(d=Zn||Hh(t,n,d,i,h,p,u)||e!==null&&e.dependencies!==null&&Rs(e.dependencies))?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(i,p,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(i,p,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),a.props=i,a.state=p,a.context=u,i=d):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return a=i,us(e,t),i=(t.flags&128)!==0,a||i?(a=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&i?(t.child=Gi(t,e.child,null,l),t.child=Gi(t,null,n,l)):Xe(e,t,n,l),t.memoizedState=a.state,e=t.child):e=Un(e,t,l),e}function Zh(e,t,n,i){return qi(),t.flags|=256,Xe(e,t,n,i),t.child}var nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function iu(e){return{baseLanes:e,cachePool:by()}}function lu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ct),e}function dx(e,t,n){var i=t.pendingProps,l=!1,a=(t.flags&128)!==0,r;if((r=a)||(r=e!==null&&e.memoizedState===null?!1:(Re.current&2)!==0),r&&(l=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(se){if(l?Jn(t):Wn(),(e=Ee)?(e=iv(e,qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi!==null?{id:cn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},n=gy(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw vi(t);return Lc(e)?t.lanes=32:t.lanes=536870912,null}var s=i.children;return i=i.fallback,l?(Wn(),l=t.mode,s=Us({mode:"hidden",children:s},l),i=Bi(i,l,n,null),s.return=t,i.return=t,s.sibling=i,t.child=s,i=t.child,i.memoizedState=iu(n),i.childLanes=lu(e,r,n),t.memoizedState=nu,Ea(null,i)):(Jn(t),Ec(t,s))}var u=e.memoizedState;if(u!==null&&(s=u.dehydrated,s!==null)){if(a)t.flags&256?(Jn(t),t.flags&=-257,t=au(e,t,n)):t.memoizedState!==null?(Wn(),t.child=e.child,t.flags|=128,t=null):(Wn(),s=i.fallback,l=t.mode,i=Us({mode:"visible",children:i.children},l),s=Bi(s,l,n,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,Gi(t,e.child,null,n),i=t.child,i.memoizedState=iu(n),i.childLanes=lu(e,r,n),t.memoizedState=nu,t=Ea(null,i));else if(Jn(t),Lc(s)){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;r=c,i=Error(L(419)),i.stack="",i.digest=r,Za({value:i,source:null,stack:null}),t=au(e,t,n)}else if(Be||Ql(e,t,n,!1),r=(n&e.childLanes)!==0,Be||r){if(r=ye,r!==null&&(i=Fg(r,n),i!==0&&i!==u.retryLane))throw u.retryLane=i,$i(e,i),pt(r,e,i),Kf;zc(s)||Fs(),t=au(e,t,n)}else zc(s)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,Ee=Gt(s.nextSibling),Ze=t,se=!0,ui=null,qt=!1,e!==null&&xy(t,e),t=Ec(t,i.children),t.flags|=4096);return t}return l?(Wn(),s=i.fallback,l=t.mode,u=e.child,c=u.sibling,i=On(u,{mode:"hidden",children:i.children}),i.subtreeFlags=u.subtreeFlags&65011712,c!==null?s=On(c,s):(s=Bi(s,l,n,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,Ea(null,i),i=t.child,s=e.child.memoizedState,s===null?s=iu(n):(l=s.cachePool,l!==null?(u=Me._currentValue,l=l.parent!==u?{parent:u,pool:u}:l):l=by(),s={baseLanes:s.baseLanes|n,cachePool:l}),i.memoizedState=s,i.childLanes=lu(e,r,n),t.memoizedState=nu,Ea(e.child,i)):(Jn(t),n=e.child,e=n.sibling,n=On(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Ec(e,t){return t=Us({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Us(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function au(e,t,n){return Gi(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kh(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),uc(e.return,t,n)}function ru(e,t,n,i,l,a){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:l,treeForkCount:a}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=l,r.treeForkCount=a)}function hx(e,t,n){var i=t.pendingProps,l=i.revealOrder,a=i.tail;i=i.children;var r=Re.current,s=(r&2)!==0;if(s?(r=r&1|2,t.flags|=128):r&=1,be(Re,r),Xe(e,t,i,n),i=se?Qa:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kh(e,n,t);else if(e.tag===19)Kh(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}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&zs(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ru(t,!1,l,n,a,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&zs(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ru(t,!0,n,null,a,i);break;case"together":ru(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Un(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Si|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ql(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=On(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=On(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $f(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Rs(e)))}function gS(e,t,n){switch(t.tag){case 3:Ts(t,t.stateNode.containerInfo),$n(t,Me,e.memoizedState.cache),qi();break;case 27:case 5:Ku(t);break;case 4:Ts(t,t.stateNode.containerInfo);break;case 10:$n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Jn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?dx(e,t,n):(Jn(t),e=Un(e,t,n),e!==null?e.sibling:null);Jn(t);break;case 19:var l=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Ql(e,t,n,!1),i=(n&t.childLanes)!==0),l){if(i)return hx(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),be(Re,Re.current),i)break;return null;case 22:return t.lanes=0,fx(e,t,n,t.pendingProps);case 24:$n(t,Me,e.memoizedState.cache)}return Un(e,t,n)}function px(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!$f(e,n)&&(t.flags&128)===0)return Be=!1,gS(e,t,n);Be=(e.flags&131072)!==0}else Be=!1,se&&(t.flags&1048576)!==0&&yy(t,Qa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Oi(t.elementType),t.type=e,typeof e=="function")jf(e)?(i=Yi(e,i),t.tag=1,t=Qh(null,t,e,i,n)):(t.tag=0,t=Sc(null,t,e,i,n));else{if(e!=null){var l=e.$$typeof;if(l===mf){t.tag=11,t=Gh(null,t,e,i,n);break e}else if(l===gf){t.tag=14,t=Vh(null,t,e,i,n);break e}}throw t=Qu(e)||e,Error(L(306,t,""))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,l=Yi(i,t.pendingProps),Qh(e,t,i,l,n);case 3:e:{if(Ts(t,t.stateNode.containerInfo),e===null)throw Error(L(387));i=t.pendingProps;var a=t.memoizedState;l=a.element,dc(e,t),Oa(t,i,null,n);var r=t.memoizedState;if(i=r.cache,$n(t,Me,i),i!==a.cache&&cc(t,[Me],n,!0),Ra(),i=r.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Zh(e,t,i,n);break e}else if(i!==l){l=Ht(Error(L(424)),t),Za(l),t=Zh(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ee=Gt(e.firstChild),Ze=t,se=!0,ui=null,qt=!0,n=Cy(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),i===l){t=Un(e,t,n);break e}Xe(e,t,i,n)}t=t.child}return t;case 26:return us(e,t),e===null?(n=gp(t.type,null,t.pendingProps,null))?t.memoizedState=n:se||(n=t.type,e=t.pendingProps,i=Ps(oi.current).createElement(n),i[Qe]=t,i[mt]=e,$e(i,n,e),Ye(i),t.stateNode=i):t.memoizedState=gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ku(t),e===null&&se&&(i=t.stateNode=lv(t.type,t.pendingProps,oi.current),Ze=t,qt=!0,l=Ee,Ci(t.type)?(Mc=l,Ee=Gt(i.firstChild)):Ee=l),Xe(e,t,t.pendingProps.children,n),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&se&&((l=i=Ee)&&(i=PS(i,t.type,t.pendingProps,qt),i!==null?(t.stateNode=i,Ze=t,Ee=Gt(i.firstChild),qt=!1,l=!0):l=!1),l||vi(t)),Ku(t),l=t.type,a=t.pendingProps,r=e!==null?e.memoizedProps:null,i=a.children,Oc(l,a)?i=null:r!==null&&Oc(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=Uf(e,t,sS,null,null,n),tr._currentValue=l),us(e,t),Xe(e,t,i,n),t.child;case 6:return e===null&&se&&((e=n=Ee)&&(n=XS(n,t.pendingProps,qt),n!==null?(t.stateNode=n,Ze=t,Ee=null,e=!0):e=!1),e||vi(t)),null;case 13:return dx(e,t,n);case 4:return Ts(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Gi(t,null,i,n):Xe(e,t,i,n),t.child;case 11:return Gh(e,t,t.type,t.pendingProps,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,$n(t,t.type,i.value),Xe(e,t,i.children,n),t.child;case 9:return l=t.type._context,i=t.pendingProps.children,Fi(t),l=Ke(l),i=i(l),t.flags|=1,Xe(e,t,i,n),t.child;case 14:return Vh(e,t,t.type,t.pendingProps,n);case 15:return cx(e,t,t.type,t.pendingProps,n);case 19:return hx(e,t,n);case 31:return mS(e,t,n);case 22:return fx(e,t,n,t.pendingProps);case 24:return Fi(t),i=Ke(Me),e===null?(l=Df(),l===null&&(l=ye,a=Of(),l.pooledCache=a,a.refCount++,a!==null&&(l.pooledCacheLanes|=n),l=a),t.memoizedState={parent:i,cache:l},Lf(t),$n(t,Me,l)):((e.lanes&n)!==0&&(dc(e,t),Oa(t,null,null,n),Ra()),l=e.memoizedState,a=t.memoizedState,l.parent!==i?(l={parent:i,cache:i},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),$n(t,Me,i)):(i=a.cache,$n(t,Me,i),i!==l.cache&&cc(t,[Me],n,!0))),Xe(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(L(156,t.tag))}function Cn(e){e.flags|=4}function su(e,t,n,i,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Ux())e.flags|=8192;else throw Ii=Os,zf}else e.flags&=-16777217}function $h(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!sv(t))if(Ux())e.flags|=8192;else throw Ii=Os,zf}function Ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ig():536870912,e.lanes|=t,Il|=t)}function fa(e,t){if(!se)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Se(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags&65011712,i|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function yS(e,t,n){var i=t.pendingProps;switch(Rf(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(t),null;case 1:return Se(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Dn(Me),Dl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(al(t)?Cn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jo())),Se(t),null;case 26:var l=t.type,a=t.memoizedState;return e===null?(Cn(t),a!==null?(Se(t),$h(t,a)):(Se(t),su(t,l,null,i,n))):a?a!==e.memoizedState?(Cn(t),Se(t),$h(t,a)):(Se(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Cn(t),Se(t),su(t,l,e,i,n)),null;case 27:if(ks(t),n=oi.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(!i){if(t.stateNode===null)throw Error(L(166));return Se(t),null}e=hn.current,al(t)?Nh(t):(e=lv(l,i,n),t.stateNode=e,Cn(t))}return Se(t),null;case 5:if(ks(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(!i){if(t.stateNode===null)throw Error(L(166));return Se(t),null}if(a=hn.current,al(t))Nh(t);else{var r=Ps(oi.current);switch(a){case 1:a=r.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:a=r.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":a=r.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":a=r.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":a=r.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof i.is=="string"?r.createElement("select",{is:i.is}):r.createElement("select"),i.multiple?a.multiple=!0:i.size&&(a.size=i.size);break;default:a=typeof i.is=="string"?r.createElement(l,{is:i.is}):r.createElement(l)}}a[Qe]=t,a[mt]=i;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)a.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=a;e:switch($e(a,l,i),l){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Cn(t)}}return Se(t),su(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(L(166));if(e=oi.current,al(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,l=Ze,l!==null)switch(l.tag){case 27:case 5:i=l.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||ev(e.nodeValue,n)),e||vi(t,!0)}else e=Ps(e).createTextNode(i),e[Qe]=t,t.stateNode=e}return Se(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=al(t),n!==null){if(e===null){if(!i)throw Error(L(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(557));e[Qe]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Se(t),e=!1}else n=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(L(558))}return Se(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=al(t),i!==null&&i.dehydrated!==null){if(e===null){if(!l)throw Error(L(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(L(317));l[Qe]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Se(t),l=!1}else l=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,l=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(l=i.alternate.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==l&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ir(t,t.updateQueue),Se(t),null);case 4:return Dl(),e===null&&ld(t.stateNode.containerInfo),Se(t),null;case 10:return Dn(t.type),Se(t),null;case 19:if(Pe(Re),i=t.memoizedState,i===null)return Se(t),null;if(l=(t.flags&128)!==0,a=i.rendering,a===null)if(l)fa(i,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=zs(e),a!==null){for(t.flags|=128,fa(i,!1),e=a.updateQueue,t.updateQueue=e,Ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)my(n,e),n=n.sibling;return be(Re,Re.current&1|2),se&&wn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Tt()>Hs&&(t.flags|=128,l=!0,fa(i,!1),t.lanes=4194304)}else{if(!l)if(e=zs(a),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Ir(t,e),fa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!se)return Se(t),null}else 2*Tt()-i.renderingStartTime>Hs&&n!==536870912&&(t.flags|=128,l=!0,fa(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(e=i.last,e!==null?e.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Tt(),e.sibling=null,n=Re.current,be(Re,l?n&1|2:n&1),se&&wn(t,i.treeForkCount),e):(Se(t),null);case 22:case 23:return St(t),Mf(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),n=t.updateQueue,n!==null&&Ir(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Pe(Ui),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Dn(Me),Se(t),null;case 25:return null;case 30:return null}throw Error(L(156,t.tag))}function xS(e,t){switch(Rf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(Me),Dl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ks(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(L(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Re),null;case 4:return Dl(),null;case 10:return Dn(t.type),null;case 22:case 23:return St(t),Mf(),e!==null&&Pe(Ui),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Dn(Me),null;case 25:return null;default:return null}}function mx(e,t){switch(Rf(t),t.tag){case 3:Dn(Me),Dl();break;case 26:case 27:case 5:ks(t);break;case 4:Dl();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:Pe(Re);break;case 10:Dn(t.type);break;case 22:case 23:St(t),Mf(),e!==null&&Pe(Ui);break;case 24:Dn(Me)}}function yr(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var l=i.next;n=l;do{if((n.tag&e)===e){i=void 0;var a=n.create,r=n.inst;i=a(),r.destroy=i}n=n.next}while(n!==l)}}catch(s){he(t,t.return,s)}}function bi(e,t,n){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var a=l.next;i=a;do{if((i.tag&e)===e){var r=i.inst,s=r.destroy;if(s!==void 0){r.destroy=void 0,l=t;var u=n,c=s;try{c()}catch(d){he(l,u,d)}}}i=i.next}while(i!==a)}}catch(d){he(t,t.return,d)}}function gx(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ky(t,n)}catch(i){he(e,e.return,i)}}}function yx(e,t,n){n.props=Yi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){he(e,t,i)}}function za(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(l){he(e,t,l)}}function dn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(l){he(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){he(e,t,l)}else n.current=null}function xx(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(l){he(e,e.return,l)}}function ou(e,t,n){try{var i=e.stateNode;HS(i,e.type,n,t),i[mt]=t}catch(l){he(e,e.return,l)}}function vx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ci(e.type)||e.tag===4}function uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vx(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.tag===27&&Ci(e.type)||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 Cc(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n));else if(i!==4&&(i===27&&Ci(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Cc(e,t,n),e=e.sibling;e!==null;)Cc(e,t,n),e=e.sibling}function Is(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Ci(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Is(e,t,n),e=e.sibling;e!==null;)Is(e,t,n),e=e.sibling}function bx(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);$e(t,i,n),t[Qe]=e,t[mt]=n}catch(a){he(e,e.return,a)}}var An=!1,Le=!1,cu=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function vS(e,t){if(e=e.containerInfo,_c=Ks,e=sy(e),Nf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var l=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var r=0,s=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||l!==0&&f.nodeType!==3||(s=r+l),f!==a||i!==0&&f.nodeType!==3||(u=r+i),f.nodeType===3&&(r+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===l&&(s=r),h===a&&++d===i&&(u=r),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rc={focusedElem:e,selectionRange:n},Ks=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,l=a.memoizedProps,a=a.memoizedState,i=n.stateNode;try{var y=Yi(n.type,l);e=i.getSnapshotBeforeUpdate(y,a),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){he(n,n.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Dc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(L(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function Sx(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:kn(e,n),i&4&&yr(5,n);break;case 1:if(kn(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){he(n,n.return,r)}else{var l=Yi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){he(n,n.return,r)}}i&64&&gx(n),i&512&&za(n,n.return);break;case 3:if(kn(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{ky(e,t)}catch(r){he(n,n.return,r)}}break;case 27:t===null&&i&4&&bx(n);case 26:case 5:kn(e,n),t===null&&i&4&&xx(n),i&512&&za(n,n.return);break;case 12:kn(e,n);break;case 31:kn(e,n),i&4&&Tx(e,n);break;case 13:kn(e,n),i&4&&kx(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=AS.bind(null,n),QS(e,n))));break;case 22:if(i=n.memoizedState!==null||An,!i){t=t!==null&&t.memoizedState!==null||Le,l=An;var a=Le;An=i,(Le=t)&&!a?Nn(e,n,(n.subtreeFlags&8772)!==0):kn(e,n),An=l,Le=a}break;case 30:break;default:kn(e,n)}}function Ex(e){var t=e.alternate;t!==null&&(e.alternate=null,Ex(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ke=null,dt=!1;function Tn(e,t,n){for(n=n.child;n!==null;)Cx(e,t,n),n=n.sibling}function Cx(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(cr,n)}catch{}switch(n.tag){case 26:Le||dn(n,t),Tn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Le||dn(n,t);var i=ke,l=dt;Ci(n.type)&&(ke=n.stateNode,dt=!1),Tn(e,t,n),Ua(n.stateNode),ke=i,dt=l;break;case 5:Le||dn(n,t);case 6:if(i=ke,l=dt,ke=null,Tn(e,t,n),ke=i,dt=l,ke!==null)if(dt)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(n.stateNode)}catch(a){he(n,t,a)}else try{ke.removeChild(n.stateNode)}catch(a){he(n,t,a)}break;case 18:ke!==null&&(dt?(e=ke,fp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Gl(e)):fp(ke,n.stateNode));break;case 4:i=ke,l=dt,ke=n.stateNode.containerInfo,dt=!0,Tn(e,t,n),ke=i,dt=l;break;case 0:case 11:case 14:case 15:bi(2,n,t),Le||bi(4,n,t),Tn(e,t,n);break;case 1:Le||(dn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&yx(n,t,i)),Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:Le=(i=Le)||n.memoizedState!==null,Tn(e,t,n),Le=i;break;default:Tn(e,t,n)}}function Tx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(n){he(t,t.return,n)}}}function kx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(n){he(t,t.return,n)}}function bS(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jh),t;default:throw Error(L(435,e.tag))}}function Hr(e,t){var n=bS(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var l=jS.bind(null,e,i);i.then(l,l)}})}function ot(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var l=n[i],a=e,r=t,s=r;e:for(;s!==null;){switch(s.tag){case 27:if(Ci(s.type)){ke=s.stateNode,dt=!1;break e}break;case 5:ke=s.stateNode,dt=!1;break e;case 3:case 4:ke=s.stateNode.containerInfo,dt=!0;break e}s=s.return}if(ke===null)throw Error(L(160));Cx(a,r,l),ke=null,dt=!1,a=l.alternate,a!==null&&(a.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Nx(t,e),t=t.sibling}var Jt=null;function Nx(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),ut(e),i&4&&(bi(3,e,e.return),yr(3,e),bi(5,e,e.return));break;case 1:ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),i&64&&An&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var l=Jt;if(ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),i&4){var a=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(i){case"title":a=l.getElementsByTagName("title")[0],(!a||a[hr]||a[Qe]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=l.createElement(i),l.head.insertBefore(a,l.querySelector("head > title"))),$e(a,i,n),a[Qe]=e,Ye(a),i=a;break e;case"link":var r=xp("link","href",l).get(i+(n.href||""));if(r){for(var s=0;s<r.length;s++)if(a=r[s],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(s,1);break t}}a=l.createElement(i),$e(a,i,n),l.head.appendChild(a);break;case"meta":if(r=xp("meta","content",l).get(i+(n.content||""))){for(s=0;s<r.length;s++)if(a=r[s],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(s,1);break t}}a=l.createElement(i),$e(a,i,n),l.head.appendChild(a);break;default:throw Error(L(468,i))}a[Qe]=e,Ye(a),i=a}e.stateNode=i}else vp(l,e.type,e.stateNode);else e.stateNode=yp(l,i,e.memoizedProps);else a!==i?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,i===null?vp(l,e.type,e.stateNode):yp(l,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ou(e,e.memoizedProps,n.memoizedProps)}break;case 27:ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),n!==null&&i&4&&ou(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),e.flags&32){l=e.stateNode;try{Ll(l,"")}catch(y){he(e,e.return,y)}}i&4&&e.stateNode!=null&&(l=e.memoizedProps,ou(e,l,n!==null?n.memoizedProps:l)),i&1024&&(cu=!0);break;case 6:if(ot(t,e),ut(e),i&4){if(e.stateNode===null)throw Error(L(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(y){he(e,e.return,y)}}break;case 3:if(ds=null,l=Jt,Jt=Xs(t.containerInfo),ot(t,e),Jt=l,ut(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(y){he(e,e.return,y)}cu&&(cu=!1,wx(e));break;case 4:i=Jt,Jt=Xs(e.stateNode.containerInfo),ot(t,e),ut(e),Jt=i;break;case 12:ot(t,e),ut(e);break;case 31:ot(t,e),ut(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 13:ot(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(xo=Tt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 22:l=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,c=An,d=Le;if(An=c||l,Le=d||u,ot(t,e),Le=d,An=c,ut(e),i&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||u||An||Le||Di(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){u=n=t;try{if(a=u.stateNode,l)r=a.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{s=u.stateNode;var f=u.memoizedProps.style,h=f!=null&&f.hasOwnProperty("display")?f.display:null;s.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(y){he(u,u.return,y)}}}else if(t.tag===6){if(n===null){u=t;try{u.stateNode.nodeValue=l?"":u.memoizedProps}catch(y){he(u,u.return,y)}}}else if(t.tag===18){if(n===null){u=t;try{var p=u.stateNode;l?dp(p,!0):dp(u.stateNode,!1)}catch(y){he(u,u.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Hr(e,n))));break;case 19:ot(t,e),ut(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 30:break;case 21:break;default:ot(t,e),ut(e)}}function ut(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(vx(i)){n=i;break}i=i.return}if(n==null)throw Error(L(160));switch(n.tag){case 27:var l=n.stateNode,a=uu(e);Is(e,a,l);break;case 5:var r=n.stateNode;n.flags&32&&(Ll(r,""),n.flags&=-33);var s=uu(e);Is(e,s,r);break;case 3:case 4:var u=n.stateNode.containerInfo,c=uu(e);Cc(e,c,u);break;default:throw Error(L(161))}}catch(d){he(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function wx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;wx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sx(e,t.alternate,t),t=t.sibling}function Di(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bi(4,t,t.return),Di(t);break;case 1:dn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&yx(t,t.return,n),Di(t);break;case 27:Ua(t.stateNode);case 26:case 5:dn(t,t.return),Di(t);break;case 22:t.memoizedState===null&&Di(t);break;case 30:Di(t);break;default:Di(t)}e=e.sibling}}function Nn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,l=e,a=t,r=a.flags;switch(a.tag){case 0:case 11:case 15:Nn(l,a,n),yr(4,a);break;case 1:if(Nn(l,a,n),i=a,l=i.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(c){he(i,i.return,c)}if(i=a,l=i.updateQueue,l!==null){var s=i.stateNode;try{var u=l.shared.hiddenCallbacks;if(u!==null)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)Ty(u[l],s)}catch(c){he(i,i.return,c)}}n&&r&64&&gx(a),za(a,a.return);break;case 27:bx(a);case 26:case 5:Nn(l,a,n),n&&i===null&&r&4&&xx(a),za(a,a.return);break;case 12:Nn(l,a,n);break;case 31:Nn(l,a,n),n&&r&4&&Tx(l,a);break;case 13:Nn(l,a,n),n&&r&4&&kx(l,a);break;case 22:a.memoizedState===null&&Nn(l,a,n),za(a,a.return);break;case 30:break;default:Nn(l,a,n)}t=t.sibling}}function Jf(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&mr(n))}function Wf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function Zt(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ax(e,t,n,i),t=t.sibling}function Ax(e,t,n,i){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,n,i),l&2048&&yr(9,t);break;case 1:Zt(e,t,n,i);break;case 3:Zt(e,t,n,i),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(l&2048){Zt(e,t,n,i),e=t.stateNode;try{var a=t.memoizedProps,r=a.id,s=a.onPostCommit;typeof s=="function"&&s(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){he(t,t.return,u)}}else Zt(e,t,n,i);break;case 31:Zt(e,t,n,i);break;case 13:Zt(e,t,n,i);break;case 23:break;case 22:a=t.stateNode,r=t.alternate,t.memoizedState!==null?a._visibility&2?Zt(e,t,n,i):La(e,t):a._visibility&2?Zt(e,t,n,i):(a._visibility|=2,ul(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),l&2048&&Jf(r,t);break;case 24:Zt(e,t,n,i),l&2048&&Wf(t.alternate,t);break;default:Zt(e,t,n,i)}}function ul(e,t,n,i,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,r=t,s=n,u=i,c=r.flags;switch(r.tag){case 0:case 11:case 15:ul(a,r,s,u,l),yr(8,r);break;case 23:break;case 22:var d=r.stateNode;r.memoizedState!==null?d._visibility&2?ul(a,r,s,u,l):La(a,r):(d._visibility|=2,ul(a,r,s,u,l)),l&&c&2048&&Jf(r.alternate,r);break;case 24:ul(a,r,s,u,l),l&&c&2048&&Wf(r.alternate,r);break;default:ul(a,r,s,u,l)}t=t.sibling}}function La(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,l=i.flags;switch(i.tag){case 22:La(n,i),l&2048&&Jf(i.alternate,i);break;case 24:La(n,i),l&2048&&Wf(i.alternate,i);break;default:La(n,i)}t=t.sibling}}var Ca=8192;function rl(e,t,n){if(e.subtreeFlags&Ca)for(e=e.child;e!==null;)jx(e,t,n),e=e.sibling}function jx(e,t,n){switch(e.tag){case 26:rl(e,t,n),e.flags&Ca&&e.memoizedState!==null&&rE(n,Jt,e.memoizedState,e.memoizedProps);break;case 5:rl(e,t,n);break;case 3:case 4:var i=Jt;Jt=Xs(e.stateNode.containerInfo),rl(e,t,n),Jt=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ca,Ca=16777216,rl(e,t,n),Ca=i):rl(e,t,n));break;default:rl(e,t,n)}}function _x(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function da(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,Ox(i,e)}_x(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rx(e),e=e.sibling}function Rx(e){switch(e.tag){case 0:case 11:case 15:da(e),e.flags&2048&&bi(9,e,e.return);break;case 3:da(e);break;case 12:da(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cs(e)):da(e);break;default:da(e)}}function cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,Ox(i,e)}_x(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bi(8,t,t.return),cs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cs(t));break;default:cs(t)}e=e.sibling}}function Ox(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:bi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:mr(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Ve=i;else e:for(n=e;Ve!==null;){i=Ve;var l=i.sibling,a=i.return;if(Ex(i),i===n){Ve=null;break e}if(l!==null){l.return=a,Ve=l;break e}Ve=a}}}var SS={getCacheForType:function(e){var t=Ke(Me),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Me).controller.signal}},ES=typeof WeakMap=="function"?WeakMap:Map,ue=0,ye=null,te=null,ie=0,de=0,bt=null,ai=!1,Kl=!1,ed=!1,In=0,je=0,Si=0,Hi=0,td=0,Ct=0,Il=0,Ma=null,ht=null,Tc=!1,xo=0,Dx=0,Hs=1/0,qs=null,di=null,Fe=0,hi=null,Hl=null,zn=0,kc=0,Nc=null,zx=null,Ba=0,wc=null;function wt(){return(ue&2)!==0&&ie!==0?ie&-ie:Z.T!==null?id():Gg()}function Lx(){if(Ct===0)if((ie&536870912)===0||se){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),Ct=e}else Ct=536870912;return e=_t.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,n){(e===ye&&(de===2||de===9)||e.cancelPendingCommit!==null)&&(ql(e,0),ri(e,ie,Ct,!1)),dr(e,n),((ue&2)===0||e!==ye)&&(e===ye&&((ue&2)===0&&(Hi|=n),je===4&&ri(e,ie,Ct,!1)),xn(e))}function Mx(e,t,n){if((ue&6)!==0)throw Error(L(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fr(e,t),l=i?kS(e,t):fu(e,t,!0),a=i;do{if(l===0){Kl&&!i&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!CS(n)){l=fu(e,t,!1),a=!1;continue}if(l===2){if(a=t,e.errorRecoveryDisabledLanes&a)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var s=e;l=Ma;var u=s.current.memoizedState.isDehydrated;if(u&&(ql(s,r).flags|=256),r=fu(s,r,!1),r!==2){if(ed&&!u){s.errorRecoveryDisabledLanes|=a,Hi|=a,l=4;break e}a=ht,ht=l,a!==null&&(ht===null?ht=a:ht.push.apply(ht,a))}l=r}if(a=!1,l!==2)continue}}if(l===1){ql(e,0),ri(e,t,0,!0);break}e:{switch(i=e,a=l,a){case 0:case 1:throw Error(L(345));case 4:if((t&4194048)!==t)break;case 6:ri(i,t,Ct,!ai);break e;case 2:ht=null;break;case 3:case 5:break;default:throw Error(L(329))}if((t&62914560)===t&&(l=xo+300-Tt(),10<l)){if(ri(i,t,Ct,!ai),ro(i,0,!0)!==0)break e;zn=t,i.timeoutHandle=nv(Wh.bind(null,i,n,ht,qs,Tc,t,Ct,Hi,Il,ai,a,"Throttled",-0,0),l);break e}Wh(i,n,ht,qs,Tc,t,Ct,Hi,Il,ai,a,null,-0,0)}}break}while(!0);xn(e)}function Wh(e,t,n,i,l,a,r,s,u,c,d,f,h,p){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},jx(t,a,f);var y=(a&62914560)===a?xo-Tt():(a&4194048)===a?Dx-Tt():0;if(y=sE(f,y),y!==null){zn=a,e.cancelPendingCommit=y(tp.bind(null,e,t,a,n,i,l,r,s,u,d,f,null,h,p)),ri(e,a,r,!c);return}}tp(e,t,a,n,i,l,r,s,u)}function CS(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var l=n[i],a=l.getSnapshot;l=l.value;try{if(!jt(a(),l))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 ri(e,t,n,i){t&=~td,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var l=t;0<l;){var a=31-Nt(l),r=1<<a;i[a]=-1,l&=~r}n!==0&&Hg(e,n,t)}function vo(){return(ue&6)===0?(xr(0),!1):!0}function nd(){if(te!==null){if(de===0)var e=te.return;else e=te,Rn=Ji=null,qf(e),Al=null,Ka=0,e=te;for(;e!==null;)mx(e.alternate,e),e=e.return;te=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,GS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zn=0,nd(),ye=e,te=n=On(e.current,null),ie=t,de=0,bt=null,ai=!1,Kl=fr(e,t),ed=!1,Il=Ct=td=Hi=Si=je=0,ht=Ma=null,Tc=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var l=31-Nt(i),a=1<<l;t|=e[l],i&=~a}return In=t,co(),n}function Bx(e,t){J=null,Z.H=Ja,t===Zl||t===ho?(t=Rh(),de=3):t===zf?(t=Rh(),de=4):de=t===Kf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,te===null&&(je=1,Bs(e,Ht(t,e.current)))}function Ux(){var e=_t.current;return e===null?!0:(ie&4194048)===ie?Ft===null:(ie&62914560)===ie||(ie&536870912)!==0?e===Ft:!1}function Ix(){var e=Z.H;return Z.H=Ja,e===null?Ja:e}function Hx(){var e=Z.A;return Z.A=SS,e}function Fs(){je=4,ai||(ie&4194048)!==ie&&_t.current!==null||(Kl=!0),(Si&134217727)===0&&(Hi&134217727)===0||ye===null||ri(ye,ie,Ct,!1)}function fu(e,t,n){var i=ue;ue|=2;var l=Ix(),a=Hx();(ye!==e||ie!==t)&&(qs=null,ql(e,t)),t=!1;var r=je;e:do try{if(de!==0&&te!==null){var s=te,u=bt;switch(de){case 8:nd(),r=6;break e;case 3:case 2:case 9:case 6:_t.current===null&&(t=!0);var c=de;if(de=0,bt=null,Cl(e,s,u,c),n&&Kl){r=0;break e}break;default:c=de,de=0,bt=null,Cl(e,s,u,c)}}TS(),r=je;break}catch(d){Bx(e,d)}while(!0);return t&&e.shellSuspendCounter++,Rn=Ji=null,ue=i,Z.H=l,Z.A=a,te===null&&(ye=null,ie=0,co()),r}function TS(){for(;te!==null;)qx(te)}function kS(e,t){var n=ue;ue|=2;var i=Ix(),l=Hx();ye!==e||ie!==t?(qs=null,Hs=Tt()+500,ql(e,t)):Kl=fr(e,t);e:do try{if(de!==0&&te!==null){t=te;var a=bt;t:switch(de){case 1:de=0,bt=null,Cl(e,t,a,1);break;case 2:case 9:if(_h(a)){de=0,bt=null,ep(t);break}t=function(){de!==2&&de!==9||ye!==e||(de=7),xn(e)},a.then(t,t);break e;case 3:de=7;break e;case 4:de=5;break e;case 7:_h(a)?(de=0,bt=null,ep(t)):(de=0,bt=null,Cl(e,t,a,7));break;case 5:var r=null;switch(te.tag){case 26:r=te.memoizedState;case 5:case 27:var s=te;if(r?sv(r):s.stateNode.complete){de=0,bt=null;var u=s.sibling;if(u!==null)te=u;else{var c=s.return;c!==null?(te=c,bo(c)):te=null}break t}}de=0,bt=null,Cl(e,t,a,5);break;case 6:de=0,bt=null,Cl(e,t,a,6);break;case 8:nd(),je=6;break e;default:throw Error(L(462))}}NS();break}catch(d){Bx(e,d)}while(!0);return Rn=Ji=null,Z.H=i,Z.A=l,ue=n,te!==null?0:(ye=null,ie=0,co(),je)}function NS(){for(;te!==null&&!Z0();)qx(te)}function qx(e){var t=px(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?bo(e):te=t}function ep(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xh(n,t,t.pendingProps,t.type,void 0,ie);break;case 11:t=Xh(n,t,t.pendingProps,t.type.render,t.ref,ie);break;case 5:qf(t);default:mx(n,t),t=te=my(t,In),t=px(n,t,In)}e.memoizedProps=e.pendingProps,t===null?bo(e):te=t}function Cl(e,t,n,i){Rn=Ji=null,qf(t),Al=null,Ka=0;var l=t.return;try{if(pS(e,l,t,n,ie)){je=1,Bs(e,Ht(n,e.current)),te=null;return}}catch(a){if(l!==null)throw te=l,a;je=1,Bs(e,Ht(n,e.current)),te=null;return}t.flags&32768?(se||i===1?e=!0:Kl||(ie&536870912)!==0?e=!1:(ai=e=!0,(i===2||i===9||i===3||i===6)&&(i=_t.current,i!==null&&i.tag===13&&(i.flags|=16384))),Fx(t,e)):bo(t)}function bo(e){var t=e;do{if((t.flags&32768)!==0){Fx(t,ai);return}e=t.return;var n=yS(t.alternate,t,In);if(n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);je===0&&(je=5)}function Fx(e,t){do{var n=xS(e.alternate,e);if(n!==null){n.flags&=32767,te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){te=e;return}te=e=n}while(e!==null);je=6,te=null}function tp(e,t,n,i,l,a,r,s,u){e.cancelPendingCommit=null;do So();while(Fe!==0);if((ue&6)!==0)throw Error(L(327));if(t!==null){if(t===e.current)throw Error(L(177));if(a=t.lanes|t.childLanes,a|=wf,a1(e,n,a,r,s,u),e===ye&&(te=ye=null,ie=0),Hl=t,hi=e,zn=n,kc=a,Nc=l,zx=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_S(Ns,function(){return Xx(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=Z.T,Z.T=null,l=ce.p,ce.p=2,r=ue,ue|=4;try{vS(e,t,n)}finally{ue=r,ce.p=l,Z.T=i}}Fe=1,Gx(),Vx(),Yx()}}function Gx(){if(Fe===1){Fe=0;var e=hi,t=Hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{Nx(t,e);var a=Rc,r=sy(e.containerInfo),s=a.focusedElem,u=a.selectionRange;if(r!==s&&s&&s.ownerDocument&&ry(s.ownerDocument.documentElement,s)){if(u!==null&&Nf(s)){var c=u.start,d=u.end;if(d===void 0&&(d=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(d,s.value.length);else{var f=s.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),y=s.textContent.length,x=Math.min(u.start,y),E=u.end===void 0?x:Math.min(u.end,y);!p.extend&&x>E&&(r=E,E=x,x=r);var g=Ch(s,x),m=Ch(s,E);if(g&&m&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==m.node||p.focusOffset!==m.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),x>E?(p.addRange(v),p.extend(m.node,m.offset)):(v.setEnd(m.node,m.offset),p.addRange(v))}}}}for(f=[],p=s;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<f.length;s++){var C=f[s];C.element.scrollLeft=C.left,C.element.scrollTop=C.top}}Ks=!!_c,Rc=_c=null}finally{ue=l,ce.p=i,Z.T=n}}e.current=t,Fe=2}}function Vx(){if(Fe===2){Fe=0;var e=hi,t=Hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{Sx(e,t.alternate,t)}finally{ue=l,ce.p=i,Z.T=n}}Fe=3}}function Yx(){if(Fe===4||Fe===3){Fe=0,K0();var e=hi,t=Hl,n=zn,i=zx;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Fe=5:(Fe=0,Hl=hi=null,Px(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(di=null),vf(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(cr,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=Z.T,l=ce.p,ce.p=2,Z.T=null;try{for(var a=e.onRecoverableError,r=0;r<i.length;r++){var s=i[r];a(s.value,{componentStack:s.stack})}}finally{Z.T=t,ce.p=l}}(zn&3)!==0&&So(),xn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===wc?Ba++:(Ba=0,wc=e):Ba=0,xr(0)}}function Px(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function So(){return Gx(),Vx(),Yx(),Xx()}function Xx(){if(Fe!==5)return!1;var e=hi,t=kc;kc=0;var n=vf(zn),i=Z.T,l=ce.p;try{ce.p=32>n?32:n,Z.T=null,n=Nc,Nc=null;var a=hi,r=zn;if(Fe=0,Hl=hi=null,zn=0,(ue&6)!==0)throw Error(L(331));var s=ue;if(ue|=4,Rx(a.current),Ax(a,a.current,r,n),ue=s,xr(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(cr,a)}catch{}return!0}finally{ce.p=l,Z.T=i,Px(e,t)}}function np(e,t,n){t=Ht(n,t),t=bc(e.stateNode,t,2),e=fi(e,t,2),e!==null&&(dr(e,2),xn(e))}function he(e,t,n){if(e.tag===3)np(e,e,n);else for(;t!==null;){if(t.tag===3){np(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(di===null||!di.has(i))){e=Ht(n,e),n=ox(2),i=fi(t,n,2),i!==null&&(ux(n,i,t,e),dr(i,2),xn(i));break}}t=t.return}}function du(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new ES;var l=new Set;i.set(t,l)}else l=i.get(t),l===void 0&&(l=new Set,i.set(t,l));l.has(n)||(ed=!0,l.add(n),e=wS.bind(null,e,t,n),t.then(e,e))}function wS(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ye===e&&(ie&n)===n&&(je===4||je===3&&(ie&62914560)===ie&&300>Tt()-xo?(ue&2)===0&&ql(e,0):td|=n,Il===ie&&(Il=0)),xn(e)}function Qx(e,t){t===0&&(t=Ig()),e=$i(e,t),e!==null&&(dr(e,t),xn(e))}function AS(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Qx(e,n)}function jS(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(L(314))}i!==null&&i.delete(t),Qx(e,n)}function _S(e,t){return yf(e,t)}var Gs=null,cl=null,Ac=!1,Vs=!1,hu=!1,si=0;function xn(e){e!==cl&&e.next===null&&(cl===null?Gs=cl=e:cl=cl.next=e),Vs=!0,Ac||(Ac=!0,OS())}function xr(e,t){if(!hu&&Vs){hu=!0;do for(var n=!1,i=Gs;i!==null;){if(e!==0){var l=i.pendingLanes;if(l===0)var a=0;else{var r=i.suspendedLanes,s=i.pingedLanes;a=(1<<31-Nt(42|e)+1)-1,a&=l&~(r&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ip(i,a))}else a=ie,a=ro(i,i===ye?a:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(a&3)===0||fr(i,a)||(n=!0,ip(i,a));i=i.next}while(n);hu=!1}}function RS(){Zx()}function Zx(){Vs=Ac=!1;var e=0;si!==0&&FS()&&(e=si);for(var t=Tt(),n=null,i=Gs;i!==null;){var l=i.next,a=Kx(i,t);a===0?(i.next=null,n===null?Gs=l:n.next=l,l===null&&(cl=n)):(n=i,(e!==0||(a&3)!==0)&&(Vs=!0)),i=l}Fe!==0&&Fe!==5||xr(e),si!==0&&(si=0)}function Kx(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var r=31-Nt(a),s=1<<r,u=l[r];u===-1?((s&n)===0||(s&i)!==0)&&(l[r]=l1(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}if(t=ye,n=ie,n=ro(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(de===2||de===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&qo(i),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&qo(i),vf(n)){case 2:case 8:n=Bg;break;case 32:n=Ns;break;case 268435456:n=Ug;break;default:n=Ns}return i=$x.bind(null,e),n=yf(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&qo(i),e.callbackPriority=2,e.callbackNode=null,2}function $x(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(So()&&e.callbackNode!==n)return null;var i=ie;return i=ro(e,e===ye?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Mx(e,i,t),Kx(e,Tt()),e.callbackNode!=null&&e.callbackNode===n?$x.bind(null,e):null)}function ip(e,t){if(So())return null;Mx(e,t,!0)}function OS(){VS(function(){(ue&6)!==0?yf(Mg,RS):Zx()})}function id(){if(si===0){var e=Ml;e===0&&(e=Rr,Rr<<=1,(Rr&261888)===0&&(Rr=256)),si=e}return si}function lp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ts(""+e)}function ap(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function DS(e,t,n,i,l){if(t==="submit"&&n&&n.stateNode===l){var a=lp((l[mt]||null).action),r=i.submitter;r&&(t=(t=r[mt]||null)?lp(t.formAction):r.getAttribute("formAction"),t!==null&&(a=t,r=null));var s=new so("action","action",null,i,l);e.push({event:s,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(si!==0){var u=r?ap(l,r):new FormData(l);xc(n,{pending:!0,data:u,method:l.method,action:a},null,u)}}else typeof a=="function"&&(s.preventDefault(),u=r?ap(l,r):new FormData(l),xc(n,{pending:!0,data:u,method:l.method,action:a},a,u))},currentTarget:l}]})}}for(var pu=0;pu<rc.length;pu++){var mu=rc[pu],zS=mu.toLowerCase(),LS=mu[0].toUpperCase()+mu.slice(1);nn(zS,"on"+LS)}nn(uy,"onAnimationEnd");nn(cy,"onAnimationIteration");nn(fy,"onAnimationStart");nn("dblclick","onDoubleClick");nn("focusin","onFocus");nn("focusout","onBlur");nn($1,"onTransitionRun");nn(J1,"onTransitionStart");nn(W1,"onTransitionCancel");nn(dy,"onTransitionEnd");zl("onMouseEnter",["mouseout","mouseover"]);zl("onMouseLeave",["mouseout","mouseover"]);zl("onPointerEnter",["pointerout","pointerover"]);zl("onPointerLeave",["pointerout","pointerover"]);Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wa="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(" "),MS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wa));function Jx(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],l=i.event;i=i.listeners;e:{var a=void 0;if(t)for(var r=i.length-1;0<=r;r--){var s=i[r],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==a&&l.isPropagationStopped())break e;a=s,l.currentTarget=c;try{a(l)}catch(d){As(d)}l.currentTarget=null,a=u}else for(r=0;r<i.length;r++){if(s=i[r],u=s.instance,c=s.currentTarget,s=s.listener,u!==a&&l.isPropagationStopped())break e;a=s,l.currentTarget=c;try{a(l)}catch(d){As(d)}l.currentTarget=null,a=u}}}}function ee(e,t){var n=t[Ju];n===void 0&&(n=t[Ju]=new Set);var i=e+"__bubble";n.has(i)||(Wx(t,e,2,!1),n.add(i))}function gu(e,t,n){var i=0;t&&(i|=4),Wx(n,e,i,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function ld(e){if(!e[qr]){e[qr]=!0,Vg.forEach(function(n){n!=="selectionchange"&&(MS.has(n)||gu(n,!1,e),gu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,gu("selectionchange",!1,t))}}function Wx(e,t,n,i){switch(dv(t)){case 2:var l=cE;break;case 8:l=fE;break;default:l=od}n=l.bind(null,t,n,e),l=void 0,!ic||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),i?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function yu(e,t,n,i,l){var a=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var r=i.tag;if(r===3||r===4){var s=i.stateNode.containerInfo;if(s===l)break;if(r===4)for(r=i.return;r!==null;){var u=r.tag;if((u===3||u===4)&&r.stateNode.containerInfo===l)return;r=r.return}for(;s!==null;){if(r=pl(s),r===null)return;if(u=r.tag,u===5||u===6||u===26||u===27){i=a=r;continue e}s=s.parentNode}}i=i.return}Jg(function(){var c=a,d=Ef(n),f=[];e:{var h=hy.get(e);if(h!==void 0){var p=so,y=e;switch(e){case"keypress":if(is(n)===0)break e;case"keydown":case"keyup":p=j1;break;case"focusin":y="focus",p=Po;break;case"focusout":y="blur",p=Po;break;case"beforeblur":case"afterblur":p=Po;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":p=hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=y1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=O1;break;case uy:case cy:case fy:p=b1;break;case dy:p=z1;break;case"scroll":case"scrollend":p=m1;break;case"wheel":p=M1;break;case"copy":case"cut":case"paste":p=E1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=mh;break;case"toggle":case"beforetoggle":p=U1}var x=(t&4)!==0,E=!x&&(e==="scroll"||e==="scrollend"),g=x?h!==null?h+"Capture":null:h;x=[];for(var m=c,v;m!==null;){var C=m;if(v=C.stateNode,C=C.tag,C!==5&&C!==26&&C!==27||v===null||g===null||(C=Ya(m,g),C!=null&&x.push(er(m,C,v))),E)break;m=m.return}0<x.length&&(h=new p(h,y,null,n,d),f.push({event:h,listeners:x}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==nc&&(y=n.relatedTarget||n.fromElement)&&(pl(y)||y[Pl]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=c,y=y?pl(y):null,y!==null&&(E=ur(y),x=y.tag,y!==E||x!==5&&x!==27&&x!==6)&&(y=null)):(p=null,y=c),p!==y)){if(x=hh,C="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=mh,C="onPointerLeave",g="onPointerEnter",m="pointer"),E=p==null?h:Sa(p),v=y==null?h:Sa(y),h=new x(C,m+"leave",p,n,d),h.target=E,h.relatedTarget=v,C=null,pl(d)===c&&(x=new x(g,m+"enter",y,n,d),x.target=v,x.relatedTarget=E,C=x),E=C,p&&y)t:{for(x=BS,g=p,m=y,v=0,C=g;C;C=x(C))v++;C=0;for(var A=m;A;A=x(A))C++;for(;0<v-C;)g=x(g),v--;for(;0<C-v;)m=x(m),C--;for(;v--;){if(g===m||m!==null&&g===m.alternate){x=g;break t}g=x(g),m=x(m)}x=null}else x=null;p!==null&&rp(f,h,p,x,!1),y!==null&&E!==null&&rp(f,E,y,x,!0)}}e:{if(h=c?Sa(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var N=vh;else if(xh(h))if(ly)N=Q1;else{N=P1;var _=Y1}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&Sf(c.elementType)&&(N=vh):N=X1;if(N&&(N=N(e,c))){iy(f,N,n,d);break e}_&&_(e,h,c),e==="focusout"&&c&&h.type==="number"&&c.memoizedProps.value!=null&&tc(h,"number",h.value)}switch(_=c?Sa(c):window,e){case"focusin":(xh(_)||_.contentEditable==="true")&&(yl=_,lc=c,Aa=null);break;case"focusout":Aa=lc=yl=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Th(f,n,d);break;case"selectionchange":if(K1)break;case"keydown":case"keyup":Th(f,n,d)}var U;if(kf)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else gl?ty(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(ey&&n.locale!=="ko"&&(gl||D!=="onCompositionStart"?D==="onCompositionEnd"&&gl&&(U=Wg()):(li=d,Cf="value"in li?li.value:li.textContent,gl=!0)),_=Ys(c,D),0<_.length&&(D=new ph(D,e,null,n,d),f.push({event:D,listeners:_}),U?D.data=U:(U=ny(n),U!==null&&(D.data=U)))),(U=H1?q1(e,n):F1(e,n))&&(D=Ys(c,"onBeforeInput"),0<D.length&&(_=new ph("onBeforeInput","beforeinput",null,n,d),f.push({event:_,listeners:D}),_.data=U)),DS(f,e,c,n,d)}Jx(f,t)})}function er(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ys(e,t){for(var n=t+"Capture",i=[];e!==null;){var l=e,a=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||a===null||(l=Ya(e,n),l!=null&&i.unshift(er(e,l,a)),l=Ya(e,t),l!=null&&i.push(er(e,l,a))),e.tag===3)return i;e=e.return}return[]}function BS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rp(e,t,n,i,l){for(var a=t._reactName,r=[];n!==null&&n!==i;){var s=n,u=s.alternate,c=s.stateNode;if(s=s.tag,u!==null&&u===i)break;s!==5&&s!==26&&s!==27||c===null||(u=c,l?(c=Ya(n,a),c!=null&&r.unshift(er(n,c,u))):l||(c=Ya(n,a),c!=null&&r.push(er(n,c,u)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var US=/\r\n?/g,IS=/\u0000|\uFFFD/g;function sp(e){return(typeof e=="string"?e:""+e).replace(US,`
49
- `).replace(IS,"")}function ev(e,t){return t=sp(t),sp(e)===t}function pe(e,t,n,i,l,a){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ll(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ll(e,""+i);break;case"className":zr(e,"class",i);break;case"tabIndex":zr(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":zr(e,n,i);break;case"style":$g(e,i,a);break;case"data":if(t!=="object"){zr(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=ts(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&pe(e,t,"name",l.name,l,null),pe(e,t,"formEncType",l.formEncType,l,null),pe(e,t,"formMethod",l.formMethod,l,null),pe(e,t,"formTarget",l.formTarget,l,null)):(pe(e,t,"encType",l.encType,l,null),pe(e,t,"method",l.method,l,null),pe(e,t,"target",l.target,l,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=ts(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=_n);break;case"onScroll":i!=null&&ee("scroll",e);break;case"onScrollEnd":i!=null&&ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(L(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=ts(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":ee("beforetoggle",e),ee("toggle",e),es(e,"popover",i);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":es(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=h1.get(n)||n,es(e,n,i))}}function jc(e,t,n,i,l,a){switch(n){case"style":$g(e,i,a);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(L(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"children":typeof i=="string"?Ll(e,i):(typeof i=="number"||typeof i=="bigint")&&Ll(e,""+i);break;case"onScroll":i!=null&&ee("scroll",e);break;case"onScrollEnd":i!=null&&ee("scrollend",e);break;case"onClick":i!=null&&(e.onclick=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yg.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),a=e[mt]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,l),typeof i=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,l);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):es(e,n,i)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var i=!1,l=!1,a;for(a in n)if(n.hasOwnProperty(a)){var r=n[a];if(r!=null)switch(a){case"src":i=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:pe(e,t,a,r,n,null)}}l&&pe(e,t,"srcSet",n.srcSet,n,null),i&&pe(e,t,"src",n.src,n,null);return;case"input":ee("invalid",e);var s=a=r=l=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(d!=null)switch(i){case"name":l=d;break;case"type":r=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":a=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(L(137,t));break;default:pe(e,t,i,d,n,null)}}Qg(e,a,s,u,c,r,l,!1);return;case"select":ee("invalid",e),i=r=a=null;for(l in n)if(n.hasOwnProperty(l)&&(s=n[l],s!=null))switch(l){case"value":a=s;break;case"defaultValue":r=s;break;case"multiple":i=s;default:pe(e,t,l,s,n,null)}t=a,n=r,e.multiple=!!i,t!=null?kl(e,!!i,t,!1):n!=null&&kl(e,!!i,n,!0);return;case"textarea":ee("invalid",e),a=l=i=null;for(r in n)if(n.hasOwnProperty(r)&&(s=n[r],s!=null))switch(r){case"value":i=s;break;case"defaultValue":l=s;break;case"children":a=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(L(91));break;default:pe(e,t,r,s,n,null)}Kg(e,i,l,a);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(i=n[u],i!=null))switch(u){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:pe(e,t,u,i,n,null)}return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(i=0;i<Wa.length;i++)ee(Wa[i],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:pe(e,t,c,i,n,null)}return;default:if(Sf(t)){for(d in n)n.hasOwnProperty(d)&&(i=n[d],i!==void 0&&jc(e,t,d,i,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(i=n[s],i!=null&&pe(e,t,s,i,n,null))}function HS(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,a=null,r=null,s=null,u=null,c=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":u=f;default:i.hasOwnProperty(p)||pe(e,t,p,null,i,f)}}for(var h in i){var p=i[h];if(f=n[h],i.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":a=p;break;case"name":l=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":r=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(L(137,t));break;default:p!==f&&pe(e,t,h,p,i,f)}}ec(e,r,s,u,c,d,a,l);return;case"select":p=r=s=h=null;for(a in n)if(u=n[a],n.hasOwnProperty(a)&&u!=null)switch(a){case"value":break;case"multiple":p=u;default:i.hasOwnProperty(a)||pe(e,t,a,null,i,u)}for(l in i)if(a=i[l],u=n[l],i.hasOwnProperty(l)&&(a!=null||u!=null))switch(l){case"value":h=a;break;case"defaultValue":s=a;break;case"multiple":r=a;default:a!==u&&pe(e,t,l,a,i,u)}t=s,n=r,i=p,h!=null?kl(e,!!n,h,!1):!!i!=!!n&&(t!=null?kl(e,!!n,t,!0):kl(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null&&!i.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:pe(e,t,s,null,i,l)}for(r in i)if(l=i[r],a=n[r],i.hasOwnProperty(r)&&(l!=null||a!=null))switch(r){case"value":h=l;break;case"defaultValue":p=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(L(91));break;default:l!==a&&pe(e,t,r,l,i,a)}Zg(e,h,p);return;case"option":for(var y in n)if(h=n[y],n.hasOwnProperty(y)&&h!=null&&!i.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:pe(e,t,y,null,i,h)}for(u in i)if(h=i[u],p=n[u],i.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:pe(e,t,u,h,i,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)h=n[x],n.hasOwnProperty(x)&&h!=null&&!i.hasOwnProperty(x)&&pe(e,t,x,null,i,h);for(c in i)if(h=i[c],p=n[c],i.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(L(137,t));break;default:pe(e,t,c,h,i,p)}return;default:if(Sf(t)){for(var E in n)h=n[E],n.hasOwnProperty(E)&&h!==void 0&&!i.hasOwnProperty(E)&&jc(e,t,E,void 0,i,h);for(d in i)h=i[d],p=n[d],!i.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||jc(e,t,d,h,i,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!i.hasOwnProperty(g)&&pe(e,t,g,null,i,h);for(f in i)h=i[f],p=n[f],!i.hasOwnProperty(f)||h===p||h==null&&p==null||pe(e,t,f,h,i,p)}function op(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function qS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var l=n[i],a=l.transferSize,r=l.initiatorType,s=l.duration;if(a&&s&&op(r)){for(r=0,s=l.responseEnd,i+=1;i<n.length;i++){var u=n[i],c=u.startTime;if(c>s)break;var d=u.transferSize,f=u.initiatorType;d&&op(f)&&(u=u.responseEnd,r+=d*(u<s?1:(s-c)/(u-c)))}if(--i,t+=8*(a+r)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Rc=null;function Ps(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function tv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Oc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xu=null;function FS(){var e=window.event;return e&&e.type==="popstate"?e===xu?!1:(xu=e,!0):(xu=null,!1)}var nv=typeof setTimeout=="function"?setTimeout:void 0,GS=typeof clearTimeout=="function"?clearTimeout:void 0,cp=typeof Promise=="function"?Promise:void 0,VS=typeof queueMicrotask=="function"?queueMicrotask:typeof cp<"u"?function(e){return cp.resolve(null).then(e).catch(YS)}:nv;function YS(e){setTimeout(function(){throw e})}function Ci(e){return e==="head"}function fp(e,t){var n=t,i=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(l),Gl(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Ua(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ua(n);for(var a=n.firstChild;a;){var r=a.nextSibling,s=a.nodeName;a[hr]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=r}}else n==="body"&&Ua(e.ownerDocument.body);n=l}while(n);Gl(t)}function dp(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function Dc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Dc(n),bf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function PS(e,t,n,i){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[hr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Gt(e.nextSibling),e===null)break}return null}function XS(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Gt(e.nextSibling),e===null))return null;return e}function iv(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gt(e.nextSibling),e===null))return null;return e}function zc(e){return e.data==="$?"||e.data==="$~"}function Lc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function QS(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Gt(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Mc=null;function hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Gt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function pp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function lv(e,t,n){switch(t=Ps(n),e){case"html":if(e=t.documentElement,!e)throw Error(L(452));return e;case"head":if(e=t.head,!e)throw Error(L(453));return e;case"body":if(e=t.body,!e)throw Error(L(454));return e;default:throw Error(L(451))}}function Ua(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bf(e)}var Vt=new Map,mp=new Set;function Xs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=ce.d;ce.d={f:ZS,r:KS,D:$S,C:JS,L:WS,m:eE,X:nE,S:tE,M:iE};function ZS(){var e=qn.f(),t=vo();return e||t}function KS(e){var t=Xl(e);t!==null&&t.tag===5&&t.type==="form"?$y(t):qn.r(e)}var $l=typeof document>"u"?null:document;function av(e,t,n){var i=$l;if(i&&typeof t=="string"&&t){var l=It(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),mp.has(l)||(mp.add(l),e={rel:e,crossOrigin:n,href:t},i.querySelector(l)===null&&(t=i.createElement("link"),$e(t,"link",e),Ye(t),i.head.appendChild(t)))}}function $S(e){qn.D(e),av("dns-prefetch",e,null)}function JS(e,t){qn.C(e,t),av("preconnect",e,t)}function WS(e,t,n){qn.L(e,t,n);var i=$l;if(i&&e&&t){var l='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+It(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+It(n.imageSizes)+'"]')):l+='[href="'+It(e)+'"]';var a=l;switch(t){case"style":a=Fl(e);break;case"script":a=Jl(e)}Vt.has(a)||(e=Te({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Vt.set(a,e),i.querySelector(l)!==null||t==="style"&&i.querySelector(vr(a))||t==="script"&&i.querySelector(br(a))||(t=i.createElement("link"),$e(t,"link",e),Ye(t),i.head.appendChild(t)))}}function eE(e,t){qn.m(e,t);var n=$l;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+It(i)+'"][href="'+It(e)+'"]',a=l;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Jl(e)}if(!Vt.has(a)&&(e=Te({rel:"modulepreload",href:e},t),Vt.set(a,e),n.querySelector(l)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(br(a)))return}i=n.createElement("link"),$e(i,"link",e),Ye(i),n.head.appendChild(i)}}}function tE(e,t,n){qn.S(e,t,n);var i=$l;if(i&&e){var l=Tl(i).hoistableStyles,a=Fl(e);t=t||"default";var r=l.get(a);if(!r){var s={loading:0,preload:null};if(r=i.querySelector(vr(a)))s.loading=5;else{e=Te({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vt.get(a))&&ad(e,n);var u=r=i.createElement("link");Ye(u),$e(u,"link",e),u._p=new Promise(function(c,d){u.onload=c,u.onerror=d}),u.addEventListener("load",function(){s.loading|=1}),u.addEventListener("error",function(){s.loading|=2}),s.loading|=4,fs(r,t,i)}r={type:"stylesheet",instance:r,count:1,state:s},l.set(a,r)}}}function nE(e,t){qn.X(e,t);var n=$l;if(n&&e){var i=Tl(n).hoistableScripts,l=Jl(e),a=i.get(l);a||(a=n.querySelector(br(l)),a||(e=Te({src:e,async:!0},t),(t=Vt.get(l))&&rd(e,t),a=n.createElement("script"),Ye(a),$e(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function iE(e,t){qn.M(e,t);var n=$l;if(n&&e){var i=Tl(n).hoistableScripts,l=Jl(e),a=i.get(l);a||(a=n.querySelector(br(l)),a||(e=Te({src:e,async:!0,type:"module"},t),(t=Vt.get(l))&&rd(e,t),a=n.createElement("script"),Ye(a),$e(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function gp(e,t,n,i){var l=(l=oi.current)?Xs(l):null;if(!l)throw Error(L(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Fl(n.href),n=Tl(l).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Fl(n.href);var a=Tl(l).hoistableStyles,r=a.get(e);if(r||(l=l.ownerDocument||l,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,r),(a=l.querySelector(vr(e)))&&!a._p&&(r.instance=a,r.state.loading=5),Vt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Vt.set(e,n),a||lE(l,e,n,r.state))),t&&i===null)throw Error(L(528,""));return r}if(t&&i!==null)throw Error(L(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Jl(n),n=Tl(l).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,e))}}function Fl(e){return'href="'+It(e)+'"'}function vr(e){return'link[rel="stylesheet"]['+e+"]"}function rv(e){return Te({},e,{"data-precedence":e.precedence,precedence:null})}function lE(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),$e(t,"link",n),Ye(t),e.head.appendChild(t))}function Jl(e){return'[src="'+It(e)+'"]'}function br(e){return"script[async]"+e}function yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+It(n.href)+'"]');if(i)return t.instance=i,Ye(i),i;var l=Te({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ye(i),$e(i,"style",l),fs(i,n.precedence,e),t.instance=i;case"stylesheet":l=Fl(n.href);var a=e.querySelector(vr(l));if(a)return t.state.loading|=4,t.instance=a,Ye(a),a;i=rv(n),(l=Vt.get(l))&&ad(i,l),a=(e.ownerDocument||e).createElement("link"),Ye(a);var r=a;return r._p=new Promise(function(s,u){r.onload=s,r.onerror=u}),$e(a,"link",i),t.state.loading|=4,fs(a,n.precedence,e),t.instance=a;case"script":return a=Jl(n.src),(l=e.querySelector(br(a)))?(t.instance=l,Ye(l),l):(i=n,(l=Vt.get(a))&&(i=Te({},n),rd(i,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ye(l),$e(l,"link",i),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(L(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,fs(i,n.precedence,e));return t.instance}function fs(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=i.length?i[i.length-1]:null,a=l,r=0;r<i.length;r++){var s=i[r];if(s.dataset.precedence===t)a=s;else if(a!==l)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ad(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function rd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ds=null;function xp(e,t,n){if(ds===null){var i=new Map,l=ds=new Map;l.set(n,i)}else l=ds,i=l.get(n),i||(i=new Map,l.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var a=n[l];if(!(a[hr]||a[Qe]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var r=a.getAttribute(t)||"";r=e+r;var s=i.get(r);s?s.push(a):i.set(r,[a])}}return i}function vp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function aE(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function sv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function rE(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Fl(i.href),a=t.querySelector(vr(l));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ye(a);return}a=t.ownerDocument||t,i=rv(i),(l=Vt.get(l))&&ad(i,l),a=a.createElement("link"),Ye(a);var r=a;r._p=new Promise(function(s,u){r.onload=s,r.onerror=u}),$e(a,"link",i),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Qs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vu=0;function sE(e,t){return e.stylesheets&&e.count===0&&hs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&vu===0&&(vu=62500*qS());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>vu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function Qs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zs=null;function hs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zs=new Map,t.forEach(oE,e),Zs=null,Qs.call(e))}function oE(e,t){if(!(t.state.loading&4)){var n=Zs.get(e);if(n)var i=n.get(null);else{n=new Map,Zs.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<l.length;a++){var r=l[a];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),i=r)}i&&n.set(null,i)}l=t.instance,r=l.getAttribute("data-precedence"),a=n.get(r)||i,a===i&&n.set(null,l),n.set(r,l),this.count++,i=Qs.bind(this),l.addEventListener("load",i),l.addEventListener("error",i),a?a.parentNode.insertBefore(l,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var tr={$$typeof:jn,Provider:null,Consumer:null,_currentValue:Mi,_currentValue2:Mi,_threadCount:0};function uE(e,t,n,i,l,a,r,s,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.hiddenUpdates=Fo(null),this.identifierPrefix=i,this.onUncaughtError=l,this.onCaughtError=a,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function ov(e,t,n,i,l,a,r,s,u,c,d,f){return e=new uE(e,t,n,r,u,c,d,f,s),t=1,a===!0&&(t|=24),a=Et(3,null,null,t),e.current=a,a.stateNode=e,t=Of(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:i,isDehydrated:n,cache:t},Lf(a),e}function uv(e){return e?(e=bl,e):bl}function cv(e,t,n,i,l,a){l=uv(l),i.context===null?i.context=l:i.pendingContext=l,i=ci(t),i.payload={element:n},a=a===void 0?null:a,a!==null&&(i.callback=a),n=fi(e,i,t),n!==null&&(pt(n,e,t),_a(n,e,t))}function bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sd(e,t){bp(e,t),(e=e.alternate)&&bp(e,t)}function fv(e){if(e.tag===13||e.tag===31){var t=$i(e,67108864);t!==null&&pt(t,e,67108864),sd(e,67108864)}}function Sp(e){if(e.tag===13||e.tag===31){var t=wt();t=xf(t);var n=$i(e,t);n!==null&&pt(n,e,t),sd(e,t)}}var Ks=!0;function cE(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=2,od(e,t,n,i)}finally{ce.p=a,Z.T=l}}function fE(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=8,od(e,t,n,i)}finally{ce.p=a,Z.T=l}}function od(e,t,n,i){if(Ks){var l=Bc(i);if(l===null)yu(e,t,i,$s,n),Ep(e,i);else if(hE(l,e,t,n,i))i.stopPropagation();else if(Ep(e,i),t&4&&-1<dE.indexOf(e)){for(;l!==null;){var a=Xl(l);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var r=Ri(a.pendingLanes);if(r!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;r;){var u=1<<31-Nt(r);s.entanglements[1]|=u,r&=~u}xn(a),(ue&6)===0&&(Hs=Tt()+500,xr(0))}}break;case 31:case 13:s=$i(a,2),s!==null&&pt(s,a,2),vo(),sd(a,2)}if(a=Bc(i),a===null&&yu(e,t,i,$s,n),a===l)break;l=a}l!==null&&i.stopPropagation()}else yu(e,t,i,null,n)}}function Bc(e){return e=Ef(e),ud(e)}var $s=null;function ud(e){if($s=null,e=pl(e),e!==null){var t=ur(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Rg(t),e!==null)return e;e=null}else if(n===31){if(e=Og(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 $s=e,null}function dv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch($0()){case Mg:return 2;case Bg:return 8;case Ns:case J0:return 32;case Ug:return 268435456;default:return 32}default:return 32}}var Uc=!1,pi=null,mi=null,gi=null,nr=new Map,ir=new Map,ei=[],dE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ep(e,t){switch(e){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":mi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(t.pointerId)}}function ha(e,t,n,i,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:a,targetContainers:[l]},t!==null&&(t=Xl(t),t!==null&&fv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function hE(e,t,n,i,l){switch(t){case"focusin":return pi=ha(pi,e,t,n,i,l),!0;case"dragenter":return mi=ha(mi,e,t,n,i,l),!0;case"mouseover":return gi=ha(gi,e,t,n,i,l),!0;case"pointerover":var a=l.pointerId;return nr.set(a,ha(nr.get(a)||null,e,t,n,i,l)),!0;case"gotpointercapture":return a=l.pointerId,ir.set(a,ha(ir.get(a)||null,e,t,n,i,l)),!0}return!1}function hv(e){var t=pl(e.target);if(t!==null){var n=ur(t);if(n!==null){if(t=n.tag,t===13){if(t=Rg(n),t!==null){e.blockedOn=t,rh(e.priority,function(){Sp(n)});return}}else if(t===31){if(t=Og(n),t!==null){e.blockedOn=t,rh(e.priority,function(){Sp(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 ps(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bc(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);nc=i,n.target.dispatchEvent(i),nc=null}else return t=Xl(n),t!==null&&fv(t),e.blockedOn=n,!1;t.shift()}return!0}function Cp(e,t,n){ps(e)&&n.delete(t)}function pE(){Uc=!1,pi!==null&&ps(pi)&&(pi=null),mi!==null&&ps(mi)&&(mi=null),gi!==null&&ps(gi)&&(gi=null),nr.forEach(Cp),ir.forEach(Cp)}function Fr(e,t){e.blockedOn===t&&(e.blockedOn=null,Uc||(Uc=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,pE)))}var Gr=null;function Tp(e){Gr!==e&&(Gr=e,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,function(){Gr===e&&(Gr=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],l=e[t+2];if(typeof i!="function"){if(ud(i||n)===null)continue;break}var a=Xl(n);a!==null&&(e.splice(t,3),t-=3,xc(a,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Gl(e){function t(u){return Fr(u,e)}pi!==null&&Fr(pi,e),mi!==null&&Fr(mi,e),gi!==null&&Fr(gi,e),nr.forEach(t),ir.forEach(t);for(var n=0;n<ei.length;n++){var i=ei[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ei.length&&(n=ei[0],n.blockedOn===null);)hv(n),n.blockedOn===null&&ei.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var l=n[i],a=n[i+1],r=l[mt]||null;if(typeof a=="function")r||Tp(n);else if(r){var s=null;if(a&&a.hasAttribute("formAction")){if(l=a,r=a[mt]||null)s=r.formAction;else if(ud(l)!==null)continue}else s=r.action;typeof s=="function"?n[i+1]=s:(n.splice(i,3),i-=3),Tp(n)}}}function pv(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(r){return l=r})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function cd(e){this._internalRoot=e}Eo.prototype.render=cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));var n=t.current,i=wt();cv(n,i,e,t,null,null)};Eo.prototype.unmount=cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cv(e.current,2,null,e,null,null),vo(),t[Pl]=null}};function Eo(e){this._internalRoot=e}Eo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ei.length&&t!==0&&t<ei[n].priority;n++);ei.splice(n,0,e),n===0&&hv(e)}};var kp=jg.version;if(kp!=="19.2.5")throw Error(L(527,kp,"19.2.5"));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=V0(t),e=e!==null?Dg(e):null,e=e===null?null:e.stateNode,e};var mE={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vr.isDisabled&&Vr.supportsFiber)try{cr=Vr.inject(mE),kt=Vr}catch{}}lo.createRoot=function(e,t){if(!_g(e))throw Error(L(299));var n=!1,i="",l=ax,a=rx,r=sx;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=ov(e,1,!1,null,null,n,i,null,l,a,r,pv),e[Pl]=t.current,ld(e),new cd(t)};lo.hydrateRoot=function(e,t,n){if(!_g(e))throw Error(L(299));var i=!1,l="",a=ax,r=rx,s=sx,u=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=ov(e,1,!0,t,n??null,i,l,u,a,r,s,pv),t.context=uv(null),n=t.current,i=wt(),i=xf(i),l=ci(i),l.callback=null,fi(n,l,i),n=i,t.current.lanes=n,dr(t,n),xn(t),e[Pl]=t.current,ld(e),new Eo(t)};lo.version="19.2.5";function mv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(mv)}catch(e){console.error(e)}}mv(),Cg.exports=lo;var gE=Cg.exports;/**
48
+ `+i.stack}}var $u=Object.prototype.hasOwnProperty,yf=Ge.unstable_scheduleCallback,qo=Ge.unstable_cancelCallback,$0=Ge.unstable_shouldYield,J0=Ge.unstable_requestPaint,Tt=Ge.unstable_now,W0=Ge.unstable_getCurrentPriorityLevel,Ug=Ge.unstable_ImmediatePriority,Ig=Ge.unstable_UserBlockingPriority,Ns=Ge.unstable_NormalPriority,eS=Ge.unstable_LowPriority,Hg=Ge.unstable_IdlePriority,tS=Ge.log,nS=Ge.unstable_setDisableYieldValue,cr=null,kt=null;function ii(e){if(typeof tS=="function"&&nS(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(cr,e)}catch{}}var Nt=Math.clz32?Math.clz32:aS,iS=Math.log,lS=Math.LN2;function aS(e){return e>>>=0,e===0?32:31-(iS(e)/lS|0)|0}var Rr=256,Or=262144,Dr=4194304;function Ri(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ro(e,t,n){var i=e.pendingLanes;if(i===0)return 0;var l=0,a=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var s=i&134217727;return s!==0?(i=s&~a,i!==0?l=Ri(i):(r&=s,r!==0?l=Ri(r):n||(n=s&~e,n!==0&&(l=Ri(n))))):(s=i&~a,s!==0?l=Ri(s):r!==0?l=Ri(r):n||(n=i&~e,n!==0&&(l=Ri(n)))),l===0?0:t!==0&&t!==l&&(t&a)===0&&(a=l&-l,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:l}function fr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function rS(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function qg(){var e=Dr;return Dr<<=1,(Dr&62914560)===0&&(Dr=4194304),e}function Fo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function dr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sS(e,t,n,i,l,a){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,u=e.expirationTimes,c=e.hiddenUpdates;for(n=r&~n;0<n;){var d=31-Nt(n),f=1<<d;s[d]=0,u[d]=-1;var h=c[d];if(h!==null)for(c[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}i!==0&&Fg(e,i,0),a!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=a&~(r&~t))}function Fg(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-Nt(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|n&261930}function Gg(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var i=31-Nt(n),l=1<<i;l&t|e[i]&t&&(e[i]|=t),n&=~l}}function Vg(e,t){var n=t&-t;return n=(n&42)!==0?1:xf(n),(n&(e.suspendedLanes|t))!==0?0:n}function xf(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vf(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yg(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:pv(e.type))}function rh(e,t){var n=ce.p;try{return ce.p=e,t()}finally{ce.p=n}}var Ei=Math.random().toString(36).slice(2),Qe="__reactFiber$"+Ei,mt="__reactProps$"+Ei,Pl="__reactContainer$"+Ei,Ju="__reactEvents$"+Ei,oS="__reactListeners$"+Ei,uS="__reactHandles$"+Ei,sh="__reactResources$"+Ei,hr="__reactMarker$"+Ei;function bf(e){delete e[Qe],delete e[mt],delete e[Ju],delete e[oS],delete e[uS]}function pl(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pl]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pp(e);e!==null;){if(n=e[Qe])return n;e=pp(e)}return t}e=n,n=e.parentNode}return null}function Xl(e){if(e=e[Qe]||e[Pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Sa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(L(33))}function Tl(e){var t=e[sh];return t||(t=e[sh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[hr]=!0}var Pg=new Set,Xg={};function Qi(e,t){zl(e,t),zl(e+"Capture",t)}function zl(e,t){for(Xg[e]=t,e=0;e<t.length;e++)Pg.add(t[e])}var cS=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),oh={},uh={};function fS(e){return $u.call(uh,e)?!0:$u.call(oh,e)?!1:cS.test(e)?uh[e]=!0:(oh[e]=!0,!1)}function es(e,t,n){if(fS(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function zr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function En(e,t,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+i)}}function zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Qg(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dS(e,t,n){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var l=i.get,a=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(r){n=""+r,a.call(this,r)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Wu(e){if(!e._valueTracker){var t=Qg(e)?"checked":"value";e._valueTracker=dS(e,t,""+e[t])}}function Zg(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=Qg(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function ws(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}}var hS=/[\n"\\]/g;function It(e){return e.replace(hS,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ec(e,t,n,i,l,a,r,s){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+zt(t)):e.value!==""+zt(t)&&(e.value=""+zt(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?tc(e,r,zt(t)):n!=null?tc(e,r,zt(n)):i!=null&&e.removeAttribute("value"),l==null&&a!=null&&(e.defaultChecked=!!a),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+zt(s):e.removeAttribute("name")}function Kg(e,t,n,i,l,a,r,s){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Wu(e);return}n=n!=null?""+zt(n):"",t=t!=null?""+zt(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}i=i??l,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=s?e.checked:!!i,e.defaultChecked=!!i,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Wu(e)}function tc(e,t,n){t==="number"&&ws(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function kl(e,t,n,i){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&i&&(e[n].defaultSelected=!0)}else{for(n=""+zt(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,i&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function $g(e,t,n){if(t!=null&&(t=""+zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+zt(n):""}function Jg(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(L(92));if(ba(i)){if(1<i.length)throw Error(L(93));i=i[0]}n=i}n==null&&(n=""),t=n}n=zt(t),e.defaultValue=n,i=e.textContent,i===n&&i!==""&&i!==null&&(e.value=i),Wu(e)}function Ll(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var pS=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ch(e,t,n){var i=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,n):typeof n!="number"||n===0||pS.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Wg(e,t,n){if(t!=null&&typeof t!="object")throw Error(L(62));if(e=e.style,n!=null){for(var i in n)!n.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var l in t)i=t[l],t.hasOwnProperty(l)&&n[l]!==i&&ch(e,l,i)}else for(var a in t)t.hasOwnProperty(a)&&ch(e,a,t[a])}function Sf(e){if(e.indexOf("-")===-1)return!1;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 mS=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),gS=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ts(e){return gS.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _n(){}var nc=null;function Ef(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ml=null,Nl=null;function fh(e){var t=Xl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ec(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+It(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var l=i[mt]||null;if(!l)throw Error(L(90));ec(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)i=n[t],i.form===e.form&&Zg(i)}break e;case"textarea":$g(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&kl(e,!!n.multiple,t,!1)}}}var Go=!1;function ey(e,t,n){if(Go)return e(t,n);Go=!0;try{var i=e(t);return i}finally{if(Go=!1,(ml!==null||Nl!==null)&&(vo(),ml&&(t=ml,e=Nl,Nl=ml=null,fh(t),e)))for(t=0;t<e.length;t++)fh(e[t])}}function Ya(e,t){var n=e.stateNode;if(n===null)return null;var i=n[mt]||null;if(i===null)return null;n=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ic=!1;if(Ln)try{var oa={};Object.defineProperty(oa,"passive",{get:function(){ic=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{ic=!1}var li=null,Cf=null,ns=null;function ty(){if(ns)return ns;var e,t=Cf,n=t.length,i,l="value"in li?li.value:li.textContent,a=l.length;for(e=0;e<n&&t[e]===l[e];e++);var r=n-e;for(i=1;i<=r&&t[n-i]===l[a-i];i++);return ns=l.slice(e,1<i?1-i:void 0)}function is(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 Lr(){return!0}function dh(){return!1}function gt(e){function t(n,i,l,a,r){this._reactName=n,this._targetInst=l,this.type=i,this.nativeEvent=a,this.target=r,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?Lr:dh,this.isPropagationStopped=dh,this}return Te(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=Lr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Lr)},persist:function(){},isPersistent:Lr}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},so=gt(Zi),pr=Te({},Zi,{view:0,detail:0}),yS=gt(pr),Vo,Yo,ua,oo=Te({},pr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Tf,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!==ua&&(ua&&e.type==="mousemove"?(Vo=e.screenX-ua.screenX,Yo=e.screenY-ua.screenY):Yo=Vo=0,ua=e),Vo)},movementY:function(e){return"movementY"in e?e.movementY:Yo}}),hh=gt(oo),xS=Te({},oo,{dataTransfer:0}),vS=gt(xS),bS=Te({},pr,{relatedTarget:0}),Po=gt(bS),SS=Te({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),ES=gt(SS),CS=Te({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TS=gt(CS),kS=Te({},Zi,{data:0}),ph=gt(kS),NS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wS={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"},AS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function jS(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=AS[e])?!!t[e]:!1}function Tf(){return jS}var _S=Te({},pr,{key:function(e){if(e.key){var t=NS[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=is(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?wS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Tf,charCode:function(e){return e.type==="keypress"?is(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?is(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),RS=gt(_S),OS=Te({},oo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mh=gt(OS),DS=Te({},pr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Tf}),zS=gt(DS),LS=Te({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),MS=gt(LS),BS=Te({},oo,{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}),US=gt(BS),IS=Te({},Zi,{newState:0,oldState:0}),HS=gt(IS),qS=[9,13,27,32],kf=Ln&&"CompositionEvent"in window,Na=null;Ln&&"documentMode"in document&&(Na=document.documentMode);var FS=Ln&&"TextEvent"in window&&!Na,ny=Ln&&(!kf||Na&&8<Na&&11>=Na),gh=" ",yh=!1;function iy(e,t){switch(e){case"keyup":return qS.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ly(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function GS(e,t){switch(e){case"compositionend":return ly(t);case"keypress":return t.which!==32?null:(yh=!0,gh);case"textInput":return e=t.data,e===gh&&yh?null:e;default:return null}}function VS(e,t){if(gl)return e==="compositionend"||!kf&&iy(e,t)?(e=ty(),ns=Cf=li=null,gl=!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 ny&&t.locale!=="ko"?null:t.data;default:return null}}var YS={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 xh(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YS[e.type]:t==="textarea"}function ay(e,t,n,i){ml?Nl?Nl.push(i):Nl=[i]:ml=i,t=Ys(t,"onChange"),0<t.length&&(n=new so("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var wa=null,Pa=null;function PS(e){ev(e,0)}function uo(e){var t=Sa(e);if(Zg(t))return e}function vh(e,t){if(e==="change")return t}var ry=!1;if(Ln){var Xo;if(Ln){var Qo="oninput"in document;if(!Qo){var bh=document.createElement("div");bh.setAttribute("oninput","return;"),Qo=typeof bh.oninput=="function"}Xo=Qo}else Xo=!1;ry=Xo&&(!document.documentMode||9<document.documentMode)}function Sh(){wa&&(wa.detachEvent("onpropertychange",sy),Pa=wa=null)}function sy(e){if(e.propertyName==="value"&&uo(Pa)){var t=[];ay(t,Pa,e,Ef(e)),ey(PS,t)}}function XS(e,t,n){e==="focusin"?(Sh(),wa=t,Pa=n,wa.attachEvent("onpropertychange",sy)):e==="focusout"&&Sh()}function QS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return uo(Pa)}function ZS(e,t){if(e==="click")return uo(t)}function KS(e,t){if(e==="input"||e==="change")return uo(t)}function $S(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:$S;function Xa(e,t){if(jt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(i=0;i<n.length;i++){var l=n[i];if(!$u.call(t,l)||!jt(e[l],t[l]))return!1}return!0}function Eh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ch(e,t){var n=Eh(e);e=0;for(var i;n;){if(n.nodeType===3){if(i=e+n.textContent.length,e<=t&&i>=t)return{node:n,offset:t-e};e=i}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Eh(n)}}function oy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uy(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ws(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=ws(e.document)}return t}function Nf(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")}var JS=Ln&&"documentMode"in document&&11>=document.documentMode,yl=null,lc=null,Aa=null,ac=!1;function Th(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ac||yl==null||yl!==ws(i)||(i=yl,"selectionStart"in i&&Nf(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Aa&&Xa(Aa,i)||(Aa=i,i=Ys(lc,"onSelect"),0<i.length&&(t=new so("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=yl)))}function Ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xl={animationend:Ai("Animation","AnimationEnd"),animationiteration:Ai("Animation","AnimationIteration"),animationstart:Ai("Animation","AnimationStart"),transitionrun:Ai("Transition","TransitionRun"),transitionstart:Ai("Transition","TransitionStart"),transitioncancel:Ai("Transition","TransitionCancel"),transitionend:Ai("Transition","TransitionEnd")},Zo={},cy={};Ln&&(cy=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Ki(e){if(Zo[e])return Zo[e];if(!xl[e])return e;var t=xl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cy)return Zo[e]=t[n];return e}var fy=Ki("animationend"),dy=Ki("animationiteration"),hy=Ki("animationstart"),WS=Ki("transitionrun"),e1=Ki("transitionstart"),t1=Ki("transitioncancel"),py=Ki("transitionend"),my=new Map,rc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");rc.push("scrollEnd");function nn(e,t){my.set(e,t),Qi(t,[e])}var As=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Dt=[],vl=0,wf=0;function co(){for(var e=vl,t=wf=vl=0;t<e;){var n=Dt[t];Dt[t++]=null;var i=Dt[t];Dt[t++]=null;var l=Dt[t];Dt[t++]=null;var a=Dt[t];if(Dt[t++]=null,i!==null&&l!==null){var r=i.pending;r===null?l.next=l:(l.next=r.next,r.next=l),i.pending=l}a!==0&&gy(n,l,a)}}function fo(e,t,n,i){Dt[vl++]=e,Dt[vl++]=t,Dt[vl++]=n,Dt[vl++]=i,wf|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Af(e,t,n,i){return fo(e,t,n,i),js(e)}function $i(e,t){return fo(e,null,null,t),js(e)}function gy(e,t,n){e.lanes|=n;var i=e.alternate;i!==null&&(i.lanes|=n);for(var l=!1,a=e.return;a!==null;)a.childLanes|=n,i=a.alternate,i!==null&&(i.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(l=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,l&&t!==null&&(l=31-Nt(n),e=a.hiddenUpdates,i=e[l],i===null?e[l]=[t]:i.push(t),t.lane=n|536870912),a):null}function js(e){if(50<Ba)throw Ba=0,wc=null,Error(L(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var bl={};function n1(e,t,n,i){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,n,i){return new n1(e,t,n,i)}function jf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function On(e,t){var n=e.alternate;return n===null?(n=Et(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&65011712,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.refCleanup=e.refCleanup,n}function yy(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ls(e,t,n,i,l,a){var r=0;if(i=e,typeof e=="function")jf(e)&&(r=1);else if(typeof e=="string")r=sE(e,n,hn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Xu:return e=Et(31,n,t,l),e.elementType=Xu,e.lanes=a,e;case dl:return Bi(n.children,l,a,t);case Mg:r=8,l|=24;break;case Vu:return e=Et(12,n,t,l|2),e.elementType=Vu,e.lanes=a,e;case Yu:return e=Et(13,n,t,l),e.elementType=Yu,e.lanes=a,e;case Pu:return e=Et(19,n,t,l),e.elementType=Pu,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jn:r=10;break e;case Bg:r=9;break e;case mf:r=11;break e;case gf:r=14;break e;case Qn:r=16,i=null;break e}r=29,n=Error(L(130,e===null?"null":typeof e,"")),i=null}return t=Et(r,n,t,l),t.elementType=e,t.type=i,t.lanes=a,t}function Bi(e,t,n,i){return e=Et(7,e,i,t),e.lanes=n,e}function Ko(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function xy(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function $o(e,t,n){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kh=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var n=kh.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ah(t)},kh.set(e,t),t)}return{value:e,source:t,stack:ah(t)}}var Sl=[],El=0,_s=null,Qa=0,Lt=[],Mt=0,xi=null,cn=1,fn="";function wn(e,t){Sl[El++]=Qa,Sl[El++]=_s,_s=e,Qa=t}function vy(e,t,n){Lt[Mt++]=cn,Lt[Mt++]=fn,Lt[Mt++]=xi,xi=e;var i=cn;e=fn;var l=32-Nt(i)-1;i&=~(1<<l),n+=1;var a=32-Nt(t)+l;if(30<a){var r=l-l%5;a=(i&(1<<r)-1).toString(32),i>>=r,l-=r,cn=1<<32-Nt(t)+l|n<<l|i,fn=a+e}else cn=1<<a|n<<l|i,fn=e}function _f(e){e.return!==null&&(wn(e,1),vy(e,1,0))}function Rf(e){for(;e===_s;)_s=Sl[--El],Sl[El]=null,Qa=Sl[--El],Sl[El]=null;for(;e===xi;)xi=Lt[--Mt],Lt[Mt]=null,fn=Lt[--Mt],Lt[Mt]=null,cn=Lt[--Mt],Lt[Mt]=null}function by(e,t){Lt[Mt++]=cn,Lt[Mt++]=fn,Lt[Mt++]=xi,cn=t.id,fn=t.overflow,xi=e}var Ze=null,Ee=null,se=!1,ui=null,qt=!1,sc=Error(L(519));function vi(e){var t=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Za(Ht(t,e)),sc}function Nh(e){var t=e.stateNode,n=e.type,i=e.memoizedProps;switch(t[Qe]=e,t[mt]=i,n){case"dialog":ee("cancel",t),ee("close",t);break;case"iframe":case"object":case"embed":ee("load",t);break;case"video":case"audio":for(n=0;n<Wa.length;n++)ee(Wa[n],t);break;case"source":ee("error",t);break;case"img":case"image":case"link":ee("error",t),ee("load",t);break;case"details":ee("toggle",t);break;case"input":ee("invalid",t),Kg(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":ee("invalid",t);break;case"textarea":ee("invalid",t),Jg(t,i.value,i.defaultValue,i.children)}n=i.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||i.suppressHydrationWarning===!0||nv(t.textContent,n)?(i.popover!=null&&(ee("beforetoggle",t),ee("toggle",t)),i.onScroll!=null&&ee("scroll",t),i.onScrollEnd!=null&&ee("scrollend",t),i.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||vi(e,!0)}function wh(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:qt=!1;return;case 27:case 3:qt=!0;return;default:Ze=Ze.return}}function al(e){if(e!==Ze)return!1;if(!se)return wh(e),se=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Oc(e.type,e.memoizedProps)),n=!n),n&&Ee&&vi(e),wh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=hp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=hp(e)}else t===27?(t=Ee,Ci(e.type)?(e=Mc,Mc=null,Ee=e):Ee=t):Ee=Ze?Gt(e.stateNode.nextSibling):null;return!0}function qi(){Ee=Ze=null,se=!1}function Jo(){var e=ui;return e!==null&&(ht===null?ht=e:ht.push.apply(ht,e),ui=null),e}function Za(e){ui===null?ui=[e]:ui.push(e)}var oc=yn(null),Ji=null,Rn=null;function $n(e,t,n){be(oc,t._currentValue),t._currentValue=n}function Dn(e){e._currentValue=oc.current,Pe(oc)}function uc(e,t,n){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===n)break;e=e.return}}function cc(e,t,n,i){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var a=l.dependencies;if(a!==null){var r=l.child;a=a.firstContext;e:for(;a!==null;){var s=a;a=l;for(var u=0;u<t.length;u++)if(s.context===t[u]){a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),uc(a.return,n,e),i||(r=null);break e}a=s.next}}else if(l.tag===18){if(r=l.return,r===null)throw Error(L(341));r.lanes|=n,a=r.alternate,a!==null&&(a.lanes|=n),uc(r,n,e),r=null}else r=l.child;if(r!==null)r.return=l;else for(r=l;r!==null;){if(r===e){r=null;break}if(l=r.sibling,l!==null){l.return=r.return,r=l;break}r=r.return}l=r}}function Ql(e,t,n,i){e=null;for(var l=t,a=!1;l!==null;){if(!a){if((l.flags&524288)!==0)a=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var r=l.alternate;if(r===null)throw Error(L(387));if(r=r.memoizedProps,r!==null){var s=l.type;jt(l.pendingProps.value,r.value)||(e!==null?e.push(s):e=[s])}}else if(l===Cs.current){if(r=l.alternate,r===null)throw Error(L(387));r.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(tr):e=[tr])}l=l.return}e!==null&&cc(t,e,n,i),t.flags|=262144}function Rs(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fi(e){Ji=e,Rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return Sy(Ji,e)}function Mr(e,t){return Ji===null&&Fi(e),Sy(e,t)}function Sy(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Rn===null){if(e===null)throw Error(L(308));Rn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Rn=Rn.next=t;return n}var i1=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},l1=Ge.unstable_scheduleCallback,a1=Ge.unstable_NormalPriority,Me={$$typeof:jn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Of(){return{controller:new i1,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&l1(a1,function(){e.controller.abort()})}var ja=null,fc=0,Ml=0,wl=null;function r1(e,t){if(ja===null){var n=ja=[];fc=0,Ml=id(),wl={status:"pending",value:void 0,then:function(i){n.push(i)}}}return fc++,t.then(Ah,Ah),t}function Ah(){if(--fc===0&&ja!==null){wl!==null&&(wl.status="fulfilled");var e=ja;ja=null,Ml=0,wl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function s1(e,t){var n=[],i={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(i.status="rejected",i.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),i}var jh=Z.S;Z.S=function(e,t){Lx=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&r1(e,t),jh!==null&&jh(e,t)};var Ui=yn(null);function Df(){var e=Ui.current;return e!==null?e:ye.pooledCache}function as(e,t){t===null?be(Ui,Ui.current):be(Ui,t.pool)}function Ey(){var e=Df();return e===null?null:{parent:Me._currentValue,pool:e}}var Zl=Error(L(460)),zf=Error(L(474)),ho=Error(L(542)),Os={then:function(){}};function _h(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Cy(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e;default:if(typeof t.status=="string")t.then(_n,_n);else{if(e=ye,e!==null&&100<e.shellSuspendCounter)throw Error(L(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=i}},function(i){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Oh(e),e}throw Ii=t,Zl}}function Oi(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ii=n,Zl):n}}var Ii=null;function Rh(){if(Ii===null)throw Error(L(459));var e=Ii;return Ii=null,e}function Oh(e){if(e===Zl||e===ho)throw Error(L(483))}var Al=null,Ka=0;function Br(e){var t=Ka;return Ka+=1,Al===null&&(Al=[]),Cy(Al,e,t)}function ca(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ur(e,t){throw t.$$typeof===X0?Error(L(525)):(e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ty(e){function t(g,m){if(e){var v=g.deletions;v===null?(g.deletions=[m],g.flags|=16):v.push(m)}}function n(g,m){if(!e)return null;for(;m!==null;)t(g,m),m=m.sibling;return null}function i(g){for(var m=new Map;g!==null;)g.key!==null?m.set(g.key,g):m.set(g.index,g),g=g.sibling;return m}function l(g,m){return g=On(g,m),g.index=0,g.sibling=null,g}function a(g,m,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<m?(g.flags|=67108866,m):v):(g.flags|=67108866,m)):(g.flags|=1048576,m)}function r(g){return e&&g.alternate===null&&(g.flags|=67108866),g}function s(g,m,v,C){return m===null||m.tag!==6?(m=Ko(v,g.mode,C),m.return=g,m):(m=l(m,v),m.return=g,m)}function u(g,m,v,C){var A=v.type;return A===dl?d(g,m,v.props.children,C,v.key):m!==null&&(m.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qn&&Oi(A)===m.type)?(m=l(m,v.props),ca(m,v),m.return=g,m):(m=ls(v.type,v.key,v.props,null,g.mode,C),ca(m,v),m.return=g,m)}function c(g,m,v,C){return m===null||m.tag!==4||m.stateNode.containerInfo!==v.containerInfo||m.stateNode.implementation!==v.implementation?(m=$o(v,g.mode,C),m.return=g,m):(m=l(m,v.children||[]),m.return=g,m)}function d(g,m,v,C,A){return m===null||m.tag!==7?(m=Bi(v,g.mode,C,A),m.return=g,m):(m=l(m,v),m.return=g,m)}function f(g,m,v){if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return m=Ko(""+m,g.mode,v),m.return=g,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case _r:return v=ls(m.type,m.key,m.props,null,g.mode,v),ca(v,m),v.return=g,v;case va:return m=$o(m,g.mode,v),m.return=g,m;case Qn:return m=Oi(m),f(g,m,v)}if(ba(m)||sa(m))return m=Bi(m,g.mode,v,null),m.return=g,m;if(typeof m.then=="function")return f(g,Br(m),v);if(m.$$typeof===jn)return f(g,Mr(g,m),v);Ur(g,m)}return null}function h(g,m,v,C){var A=m!==null?m.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return A!==null?null:s(g,m,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case _r:return v.key===A?u(g,m,v,C):null;case va:return v.key===A?c(g,m,v,C):null;case Qn:return v=Oi(v),h(g,m,v,C)}if(ba(v)||sa(v))return A!==null?null:d(g,m,v,C,null);if(typeof v.then=="function")return h(g,m,Br(v),C);if(v.$$typeof===jn)return h(g,m,Mr(g,v),C);Ur(g,v)}return null}function p(g,m,v,C,A){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return g=g.get(v)||null,s(m,g,""+C,A);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case _r:return g=g.get(C.key===null?v:C.key)||null,u(m,g,C,A);case va:return g=g.get(C.key===null?v:C.key)||null,c(m,g,C,A);case Qn:return C=Oi(C),p(g,m,v,C,A)}if(ba(C)||sa(C))return g=g.get(v)||null,d(m,g,C,A,null);if(typeof C.then=="function")return p(g,m,v,Br(C),A);if(C.$$typeof===jn)return p(g,m,v,Mr(m,C),A);Ur(m,C)}return null}function y(g,m,v,C){for(var A=null,N=null,_=m,I=m=0,D=null;_!==null&&I<v.length;I++){_.index>I?(D=_,_=null):D=_.sibling;var T=h(g,_,v[I],C);if(T===null){_===null&&(_=D);break}e&&_&&T.alternate===null&&t(g,_),m=a(T,m,I),N===null?A=T:N.sibling=T,N=T,_=D}if(I===v.length)return n(g,_),se&&wn(g,I),A;if(_===null){for(;I<v.length;I++)_=f(g,v[I],C),_!==null&&(m=a(_,m,I),N===null?A=_:N.sibling=_,N=_);return se&&wn(g,I),A}for(_=i(_);I<v.length;I++)D=p(_,g,I,v[I],C),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?I:D.key),m=a(D,m,I),N===null?A=D:N.sibling=D,N=D);return e&&_.forEach(function(M){return t(g,M)}),se&&wn(g,I),A}function x(g,m,v,C){if(v==null)throw Error(L(151));for(var A=null,N=null,_=m,I=m=0,D=null,T=v.next();_!==null&&!T.done;I++,T=v.next()){_.index>I?(D=_,_=null):D=_.sibling;var M=h(g,_,T.value,C);if(M===null){_===null&&(_=D);break}e&&_&&M.alternate===null&&t(g,_),m=a(M,m,I),N===null?A=M:N.sibling=M,N=M,_=D}if(T.done)return n(g,_),se&&wn(g,I),A;if(_===null){for(;!T.done;I++,T=v.next())T=f(g,T.value,C),T!==null&&(m=a(T,m,I),N===null?A=T:N.sibling=T,N=T);return se&&wn(g,I),A}for(_=i(_);!T.done;I++,T=v.next())T=p(_,g,I,T.value,C),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?I:T.key),m=a(T,m,I),N===null?A=T:N.sibling=T,N=T);return e&&_.forEach(function(q){return t(g,q)}),se&&wn(g,I),A}function E(g,m,v,C){if(typeof v=="object"&&v!==null&&v.type===dl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case _r:e:{for(var A=v.key;m!==null;){if(m.key===A){if(A=v.type,A===dl){if(m.tag===7){n(g,m.sibling),C=l(m,v.props.children),C.return=g,g=C;break e}}else if(m.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Qn&&Oi(A)===m.type){n(g,m.sibling),C=l(m,v.props),ca(C,v),C.return=g,g=C;break e}n(g,m);break}else t(g,m);m=m.sibling}v.type===dl?(C=Bi(v.props.children,g.mode,C,v.key),C.return=g,g=C):(C=ls(v.type,v.key,v.props,null,g.mode,C),ca(C,v),C.return=g,g=C)}return r(g);case va:e:{for(A=v.key;m!==null;){if(m.key===A)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(g,m.sibling),C=l(m,v.children||[]),C.return=g,g=C;break e}else{n(g,m);break}else t(g,m);m=m.sibling}C=$o(v,g.mode,C),C.return=g,g=C}return r(g);case Qn:return v=Oi(v),E(g,m,v,C)}if(ba(v))return y(g,m,v,C);if(sa(v)){if(A=sa(v),typeof A!="function")throw Error(L(150));return v=A.call(v),x(g,m,v,C)}if(typeof v.then=="function")return E(g,m,Br(v),C);if(v.$$typeof===jn)return E(g,m,Mr(g,v),C);Ur(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,m!==null&&m.tag===6?(n(g,m.sibling),C=l(m,v),C.return=g,g=C):(n(g,m),C=Ko(v,g.mode,C),C.return=g,g=C),r(g)):n(g,m)}return function(g,m,v,C){try{Ka=0;var A=E(g,m,v,C);return Al=null,A}catch(_){if(_===Zl||_===ho)throw _;var N=Et(29,_,null,g.mode);return N.lanes=C,N.return=g,N}finally{}}}var Gi=Ty(!0),ky=Ty(!1),Zn=!1;function Lf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function dc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ci(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function fi(e,t,n){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(ue&2)!==0){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,t=js(e),gy(e,null,n),t}return fo(e,i,t,n),js(e)}function _a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Gg(e,n)}}function Wo(e,t){var n=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,n===i)){var l=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?l=a=r:a=a.next=r,n=n.next}while(n!==null);a===null?l=a=t:a=a.next=t}else l=a=t;n={baseState:i.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:i.shared,callbacks:i.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var hc=!1;function Ra(){if(hc){var e=wl;if(e!==null)throw e}}function Oa(e,t,n,i){hc=!1;var l=e.updateQueue;Zn=!1;var a=l.firstBaseUpdate,r=l.lastBaseUpdate,s=l.shared.pending;if(s!==null){l.shared.pending=null;var u=s,c=u.next;u.next=null,r===null?a=c:r.next=c,r=u;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==r&&(s===null?d.firstBaseUpdate=c:s.next=c,d.lastBaseUpdate=u))}if(a!==null){var f=l.baseState;r=0,d=c=u=null,s=a;do{var h=s.lane&-536870913,p=h!==s.lane;if(p?(ie&h)===h:(i&h)===h){h!==0&&h===Ml&&(hc=!0),d!==null&&(d=d.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var y=e,x=s;h=t;var E=n;switch(x.tag){case 1:if(y=x.payload,typeof y=="function"){f=y.call(E,f,h);break e}f=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=x.payload,h=typeof y=="function"?y.call(E,f,h):y,h==null)break e;f=Te({},f,h);break e;case 2:Zn=!0}}h=s.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=l.callbacks,p===null?l.callbacks=[h]:p.push(h))}else p={lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(c=d=p,u=f):d=d.next=p,r|=h;if(s=s.next,s===null){if(s=l.shared.pending,s===null)break;p=s,s=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);d===null&&(u=f),l.baseState=u,l.firstBaseUpdate=c,l.lastBaseUpdate=d,a===null&&(l.shared.lanes=0),Si|=r,e.lanes=r,e.memoizedState=f}}function Ny(e,t){if(typeof e!="function")throw Error(L(191,e));e.call(t)}function wy(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ny(n[e],t)}var Bl=yn(null),Ds=yn(0);function Dh(e,t){e=In,be(Ds,e),be(Bl,t),In=e|t.baseLanes}function pc(){be(Ds,In),be(Bl,Bl.current)}function Mf(){In=Ds.current,Pe(Bl),Pe(Ds)}var _t=yn(null),Ft=null;function Jn(e){var t=e.alternate;be(Re,Re.current&1),be(_t,e),Ft===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(Ft=e)}function mc(e){be(Re,Re.current),be(_t,e),Ft===null&&(Ft=e)}function Ay(e){e.tag===22?(be(Re,Re.current),be(_t,e),Ft===null&&(Ft=e)):Wn()}function Wn(){be(Re,Re.current),be(_t,_t.current)}function St(e){Pe(_t),Ft===e&&(Ft=null),Pe(Re)}var Re=yn(0);function zs(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||zc(n)||Lc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)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 Mn=0,J=null,me=null,ze=null,Ls=!1,jl=!1,Vi=!1,Ms=0,$a=0,_l=null,o1=0;function Ae(){throw Error(L(321))}function Bf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function Uf(e,t,n,i,l,a){return Mn=a,J=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?ax:Zf,Vi=!1,a=n(i,l),Vi=!1,jl&&(a=_y(t,n,i,l)),jy(e),a}function jy(e){Z.H=Ja;var t=me!==null&&me.next!==null;if(Mn=0,ze=me=J=null,Ls=!1,$a=0,_l=null,t)throw Error(L(300));e===null||Be||(e=e.dependencies,e!==null&&Rs(e)&&(Be=!0))}function _y(e,t,n,i){J=e;var l=0;do{if(jl&&(_l=null),$a=0,jl=!1,25<=l)throw Error(L(301));if(l+=1,ze=me=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}Z.H=rx,a=t(n,i)}while(jl);return a}function u1(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?gr(t):t,e=e.useState()[0],(me!==null?me.memoizedState:null)!==e&&(J.flags|=1024),t}function If(){var e=Ms!==0;return Ms=0,e}function Hf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function qf(e){if(Ls){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ls=!1}Mn=0,ze=me=J=null,jl=!1,$a=Ms=0,_l=null}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?J.memoizedState=ze=e:ze=ze.next=e,ze}function Oe(){if(me===null){var e=J.alternate;e=e!==null?e.memoizedState:null}else e=me.next;var t=ze===null?J.memoizedState:ze.next;if(t!==null)ze=t,me=e;else{if(e===null)throw J.alternate===null?Error(L(467)):Error(L(310));me=e,e={memoizedState:me.memoizedState,baseState:me.baseState,baseQueue:me.baseQueue,queue:me.queue,next:null},ze===null?J.memoizedState=ze=e:ze=ze.next=e}return ze}function po(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gr(e){var t=$a;return $a+=1,_l===null&&(_l=[]),e=Cy(_l,e,t),t=J,(ze===null?t.memoizedState:ze.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?ax:Zf),e}function mo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gr(e);if(e.$$typeof===jn)return Ke(e)}throw Error(L(438,String(e)))}function Ff(e){var t=null,n=J.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=J.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=po(),J.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),i=0;i<e;i++)n[i]=Q0;return t.index++,n}function Bn(e,t){return typeof t=="function"?t(e):t}function rs(e){var t=Oe();return Gf(t,me,e)}function Gf(e,t,n){var i=e.queue;if(i===null)throw Error(L(311));i.lastRenderedReducer=n;var l=e.baseQueue,a=i.pending;if(a!==null){if(l!==null){var r=l.next;l.next=a.next,a.next=r}t.baseQueue=l=a,i.pending=null}if(a=e.baseState,l===null)e.memoizedState=a;else{t=l.next;var s=r=null,u=null,c=t,d=!1;do{var f=c.lane&-536870913;if(f!==c.lane?(ie&f)===f:(Mn&f)===f){var h=c.revertLane;if(h===0)u!==null&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===Ml&&(d=!0);else if((Mn&h)===h){c=c.next,h===Ml&&(d=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(s=u=f,r=a):u=u.next=f,J.lanes|=h,Si|=h;f=c.action,Vi&&n(a,f),a=c.hasEagerState?c.eagerState:n(a,f)}else h={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(s=u=h,r=a):u=u.next=h,J.lanes|=f,Si|=f;c=c.next}while(c!==null&&c!==t);if(u===null?r=a:u.next=s,!jt(a,e.memoizedState)&&(Be=!0,d&&(n=wl,n!==null)))throw n;e.memoizedState=a,e.baseState=r,e.baseQueue=u,i.lastRenderedState=a}return l===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function eu(e){var t=Oe(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var i=n.dispatch,l=n.pending,a=t.memoizedState;if(l!==null){n.pending=null;var r=l=l.next;do a=e(a,r.action),r=r.next;while(r!==l);jt(a,t.memoizedState)||(Be=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,i]}function Ry(e,t,n){var i=J,l=Oe(),a=se;if(a){if(n===void 0)throw Error(L(407));n=n()}else n=t();var r=!jt((me||l).memoizedState,n);if(r&&(l.memoizedState=n,Be=!0),l=l.queue,Vf(zy.bind(null,i,l,e),[e]),l.getSnapshot!==t||r||ze!==null&&ze.memoizedState.tag&1){if(i.flags|=2048,Ul(9,{destroy:void 0},Dy.bind(null,i,l,n,t),null),ye===null)throw Error(L(349));a||(Mn&127)!==0||Oy(i,t,n)}return n}function Oy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=J.updateQueue,t===null?(t=po(),J.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Dy(e,t,n,i){t.value=n,t.getSnapshot=i,Ly(t)&&My(e)}function zy(e,t,n){return n(function(){Ly(t)&&My(e)})}function Ly(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jt(e,n)}catch{return!0}}function My(e){var t=$i(e,2);t!==null&&pt(t,e,2)}function gc(e){var t=nt();if(typeof e=="function"){var n=e;if(e=n(),Vi){ii(!0);try{n()}finally{ii(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:e},t}function By(e,t,n,i){return e.baseState=n,Gf(e,me,typeof i=="function"?i:Bn)}function c1(e,t,n,i,l){if(yo(e))throw Error(L(485));if(e=t.action,e!==null){var a={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){a.listeners.push(r)}};Z.T!==null?n(!0):a.isTransition=!1,i(a),n=t.pending,n===null?(a.next=t.pending=a,Uy(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Uy(e,t){var n=t.action,i=t.payload,l=e.state;if(t.isTransition){var a=Z.T,r={};Z.T=r;try{var s=n(l,i),u=Z.S;u!==null&&u(r,s),zh(e,t,s)}catch(c){yc(e,t,c)}finally{a!==null&&r.types!==null&&(a.types=r.types),Z.T=a}}else try{a=n(l,i),zh(e,t,a)}catch(c){yc(e,t,c)}}function zh(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Lh(e,t,i)},function(i){return yc(e,t,i)}):Lh(e,t,n)}function Lh(e,t,n){t.status="fulfilled",t.value=n,Iy(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Uy(e,n)))}function yc(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,Iy(t),t=t.next;while(t!==i)}e.action=null}function Iy(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Hy(e,t){return t}function Mh(e,t){if(se){var n=ye.formState;if(n!==null){e:{var i=J;if(se){if(Ee){t:{for(var l=Ee,a=qt;l.nodeType!==8;){if(!a){l=null;break t}if(l=Gt(l.nextSibling),l===null){l=null;break t}}a=l.data,l=a==="F!"||a==="F"?l:null}if(l){Ee=Gt(l.nextSibling),i=l.data==="F!";break e}}vi(i)}i=!1}i&&(t=n[0])}}return n=nt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hy,lastRenderedState:t},n.queue=i,n=nx.bind(null,J,i),i.dispatch=n,i=gc(!1),a=Qf.bind(null,J,!1,i.queue),i=nt(),l={state:t,dispatch:null,action:e,pending:null},i.queue=l,n=c1.bind(null,J,l,a,n),l.dispatch=n,i.memoizedState=e,[t,n,!1]}function Bh(e){var t=Oe();return qy(t,me,e)}function qy(e,t,n){if(t=Gf(e,t,Hy)[0],e=rs(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=gr(t)}catch(r){throw r===Zl?ho:r}else i=t;t=Oe();var l=t.queue,a=l.dispatch;return n!==t.memoizedState&&(J.flags|=2048,Ul(9,{destroy:void 0},f1.bind(null,l,n),null)),[i,a,e]}function f1(e,t){e.action=t}function Uh(e){var t=Oe(),n=me;if(n!==null)return qy(t,n,e);Oe(),t=t.memoizedState,n=Oe();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Ul(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=J.updateQueue,t===null&&(t=po(),J.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(i=n.next,n.next=e,e.next=i,t.lastEffect=e),e}function Fy(){return Oe().memoizedState}function ss(e,t,n,i){var l=nt();J.flags|=e,l.memoizedState=Ul(1|t,{destroy:void 0},n,i===void 0?null:i)}function go(e,t,n,i){var l=Oe();i=i===void 0?null:i;var a=l.memoizedState.inst;me!==null&&i!==null&&Bf(i,me.memoizedState.deps)?l.memoizedState=Ul(t,a,n,i):(J.flags|=e,l.memoizedState=Ul(1|t,a,n,i))}function Ih(e,t){ss(8390656,8,e,t)}function Vf(e,t){go(2048,8,e,t)}function d1(e){J.flags|=4;var t=J.updateQueue;if(t===null)t=po(),J.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Gy(e){var t=Oe().memoizedState;return d1({ref:t,nextImpl:e}),function(){if((ue&2)!==0)throw Error(L(440));return t.impl.apply(void 0,arguments)}}function Vy(e,t){return go(4,2,e,t)}function Yy(e,t){return go(4,4,e,t)}function Py(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xy(e,t,n){n=n!=null?n.concat([e]):null,go(4,4,Py.bind(null,t,e),n)}function Yf(){}function Qy(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&Bf(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function Zy(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&Bf(t,i[1]))return i[0];if(i=e(),Vi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[i,t],i}function Pf(e,t,n){return n===void 0||(Mn&1073741824)!==0&&(ie&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Bx(),J.lanes|=e,Si|=e,n)}function Ky(e,t,n,i){return jt(n,t)?n:Bl.current!==null?(e=Pf(e,n,i),jt(e,t)||(Be=!0),e):(Mn&42)===0||(Mn&1073741824)!==0&&(ie&261930)===0?(Be=!0,e.memoizedState=n):(e=Bx(),J.lanes|=e,Si|=e,t)}function $y(e,t,n,i,l){var a=ce.p;ce.p=a!==0&&8>a?a:8;var r=Z.T,s={};Z.T=s,Qf(e,!1,t,n);try{var u=l(),c=Z.S;if(c!==null&&c(s,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var d=s1(u,i);Da(e,t,d,wt(e))}else Da(e,t,i,wt(e))}catch(f){Da(e,t,{then:function(){},status:"rejected",reason:f},wt())}finally{ce.p=a,r!==null&&s.types!==null&&(r.types=s.types),Z.T=r}}function h1(){}function xc(e,t,n,i){if(e.tag!==5)throw Error(L(476));var l=Jy(e).queue;$y(e,l,t,Mi,n===null?h1:function(){return Wy(e),n(i)})}function Jy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Mi,baseState:Mi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:Mi},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wy(e){var t=Jy(e);t.next===null&&(t=e.alternate.memoizedState),Da(e,t.next.queue,{},wt())}function Xf(){return Ke(tr)}function ex(){return Oe().memoizedState}function tx(){return Oe().memoizedState}function p1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wt();e=ci(n);var i=fi(t,e,n);i!==null&&(pt(i,t,n),_a(i,t,n)),t={cache:Of()},e.payload=t;return}t=t.return}}function m1(e,t,n){var i=wt();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},yo(e)?ix(t,n):(n=Af(e,t,n,i),n!==null&&(pt(n,e,i),lx(n,t,i)))}function nx(e,t,n){var i=wt();Da(e,t,n,i)}function Da(e,t,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(yo(e))ix(t,l);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var r=t.lastRenderedState,s=a(r,n);if(l.hasEagerState=!0,l.eagerState=s,jt(s,r))return fo(e,t,l,0),ye===null&&co(),!1}catch{}finally{}if(n=Af(e,t,l,i),n!==null)return pt(n,e,i),lx(n,t,i),!0}return!1}function Qf(e,t,n,i){if(i={lane:2,revertLane:id(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},yo(e)){if(t)throw Error(L(479))}else t=Af(e,n,i,2),t!==null&&pt(t,e,2)}function yo(e){var t=e.alternate;return e===J||t!==null&&t===J}function ix(e,t){jl=Ls=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function lx(e,t,n){if((n&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,Gg(e,n)}}var Ja={readContext:Ke,use:mo,useCallback:Ae,useContext:Ae,useEffect:Ae,useImperativeHandle:Ae,useLayoutEffect:Ae,useInsertionEffect:Ae,useMemo:Ae,useReducer:Ae,useRef:Ae,useState:Ae,useDebugValue:Ae,useDeferredValue:Ae,useTransition:Ae,useSyncExternalStore:Ae,useId:Ae,useHostTransitionStatus:Ae,useFormState:Ae,useActionState:Ae,useOptimistic:Ae,useMemoCache:Ae,useCacheRefresh:Ae};Ja.useEffectEvent=Ae;var ax={readContext:Ke,use:mo,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Ih,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ss(4194308,4,Py.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=nt();t=t===void 0?null:t;var i=e();if(Vi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[i,t],i},useReducer:function(e,t,n){var i=nt();if(n!==void 0){var l=n(t);if(Vi){ii(!0);try{n(t)}finally{ii(!1)}}}else l=t;return i.memoizedState=i.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},i.queue=e,e=e.dispatch=m1.bind(null,J,e),[i.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:function(e){e=gc(e);var t=e.queue,n=nx.bind(null,J,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Yf,useDeferredValue:function(e,t){var n=nt();return Pf(n,e,t)},useTransition:function(){var e=gc(!1);return e=$y.bind(null,J,e.queue,!0,!1),nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=J,l=nt();if(se){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),ye===null)throw Error(L(349));(ie&127)!==0||Oy(i,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,Ih(zy.bind(null,i,a,e),[e]),i.flags|=2048,Ul(9,{destroy:void 0},Dy.bind(null,i,a,n,t),null),n},useId:function(){var e=nt(),t=ye.identifierPrefix;if(se){var n=fn,i=cn;n=(i&~(1<<32-Nt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Ms++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=o1++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Xf,useFormState:Mh,useActionState:Mh,useOptimistic:function(e){var t=nt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qf.bind(null,J,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ff,useCacheRefresh:function(){return nt().memoizedState=p1.bind(null,J)},useEffectEvent:function(e){var t=nt(),n={impl:e};return t.memoizedState=n,function(){if((ue&2)!==0)throw Error(L(440));return n.impl.apply(void 0,arguments)}}},Zf={readContext:Ke,use:mo,useCallback:Qy,useContext:Ke,useEffect:Vf,useImperativeHandle:Xy,useInsertionEffect:Vy,useLayoutEffect:Yy,useMemo:Zy,useReducer:rs,useRef:Fy,useState:function(){return rs(Bn)},useDebugValue:Yf,useDeferredValue:function(e,t){var n=Oe();return Ky(n,me.memoizedState,e,t)},useTransition:function(){var e=rs(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:gr(e),t]},useSyncExternalStore:Ry,useId:ex,useHostTransitionStatus:Xf,useFormState:Bh,useActionState:Bh,useOptimistic:function(e,t){var n=Oe();return By(n,me,e,t)},useMemoCache:Ff,useCacheRefresh:tx};Zf.useEffectEvent=Gy;var rx={readContext:Ke,use:mo,useCallback:Qy,useContext:Ke,useEffect:Vf,useImperativeHandle:Xy,useInsertionEffect:Vy,useLayoutEffect:Yy,useMemo:Zy,useReducer:eu,useRef:Fy,useState:function(){return eu(Bn)},useDebugValue:Yf,useDeferredValue:function(e,t){var n=Oe();return me===null?Pf(n,e,t):Ky(n,me.memoizedState,e,t)},useTransition:function(){var e=eu(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:gr(e),t]},useSyncExternalStore:Ry,useId:ex,useHostTransitionStatus:Xf,useFormState:Uh,useActionState:Uh,useOptimistic:function(e,t){var n=Oe();return me!==null?By(n,me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ff,useCacheRefresh:tx};rx.useEffectEvent=Gy;function tu(e,t,n,i){t=e.memoizedState,n=n(i,t),n=n==null?t:Te({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var vc={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=wt(),l=ci(i);l.payload=t,n!=null&&(l.callback=n),t=fi(e,l,i),t!==null&&(pt(t,e,i),_a(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=wt(),l=ci(i);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=fi(e,l,i),t!==null&&(pt(t,e,i),_a(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wt(),i=ci(n);i.tag=2,t!=null&&(i.callback=t),t=fi(e,i,n),t!==null&&(pt(t,e,n),_a(t,e,n))}};function Hh(e,t,n,i,l,a,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,a,r):t.prototype&&t.prototype.isPureReactComponent?!Xa(n,i)||!Xa(l,a):!0}function qh(e,t,n,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,i),t.state!==e&&vc.enqueueReplaceState(t,t.state,null)}function Yi(e,t){var n=t;if("ref"in t){n={};for(var i in t)i!=="ref"&&(n[i]=t[i])}if(e=e.defaultProps){n===t&&(n=Te({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function sx(e){As(e)}function ox(e){console.error(e)}function ux(e){As(e)}function Bs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Fh(e,t,n){try{var i=e.onCaughtError;i(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function bc(e,t,n){return n=ci(n),n.tag=3,n.payload={element:null},n.callback=function(){Bs(e,t)},n}function cx(e){return e=ci(e),e.tag=3,e}function fx(e,t,n,i){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var a=i.value;e.payload=function(){return l(a)},e.callback=function(){Fh(t,n,i)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Fh(t,n,i),typeof l!="function"&&(di===null?di=new Set([this]):di.add(this));var s=i.stack;this.componentDidCatch(i.value,{componentStack:s!==null?s:""})})}function g1(e,t,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Ql(t,n,l,!0),n=_t.current,n!==null){switch(n.tag){case 31:case 13:return Ft===null?Fs():n.alternate===null&&je===0&&(je=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===Os?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),du(e,i,l)),!1;case 22:return n.flags|=65536,i===Os?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([i]):n.add(i)),du(e,i,l)),!1}throw Error(L(435,n.tag))}return du(e,i,l),Fs(),!1}if(se)return t=_t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,i!==sc&&(e=Error(L(422),{cause:i}),Za(Ht(e,n)))):(i!==sc&&(t=Error(L(423),{cause:i}),Za(Ht(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,i=Ht(i,n),l=bc(e.stateNode,i,l),Wo(e,l),je!==4&&(je=2)),!1;var a=Error(L(520),{cause:i});if(a=Ht(a,n),Ma===null?Ma=[a]:Ma.push(a),je!==4&&(je=2),t===null)return!0;i=Ht(i,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=bc(n.stateNode,i,e),Wo(n,e),!1;case 1:if(t=n.type,a=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(di===null||!di.has(a))))return n.flags|=65536,l&=-l,n.lanes|=l,l=cx(l),fx(l,e,n,i),Wo(n,l),!1}n=n.return}while(n!==null);return!1}var Kf=Error(L(461)),Be=!1;function Xe(e,t,n,i){t.child=e===null?ky(t,null,n,i):Gi(t,e.child,n,i)}function Gh(e,t,n,i,l){n=n.render;var a=t.ref;if("ref"in i){var r={};for(var s in i)s!=="ref"&&(r[s]=i[s])}else r=i;return Fi(t),i=Uf(e,t,n,r,a,l),s=If(),e!==null&&!Be?(Hf(e,t,l),Un(e,t,l)):(se&&s&&_f(t),t.flags|=1,Xe(e,t,i,l),t.child)}function Vh(e,t,n,i,l){if(e===null){var a=n.type;return typeof a=="function"&&!jf(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,dx(e,t,a,i,l)):(e=ls(n.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!$f(e,l)){var r=a.memoizedProps;if(n=n.compare,n=n!==null?n:Xa,n(r,i)&&e.ref===t.ref)return Un(e,t,l)}return t.flags|=1,e=On(a,i),e.ref=t.ref,e.return=t,t.child=e}function dx(e,t,n,i,l){if(e!==null){var a=e.memoizedProps;if(Xa(a,i)&&e.ref===t.ref)if(Be=!1,t.pendingProps=i=a,$f(e,l))(e.flags&131072)!==0&&(Be=!0);else return t.lanes=e.lanes,Un(e,t,l)}return Sc(e,t,n,i,l)}function hx(e,t,n,i){var l=i.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(a=a!==null?a.baseLanes|n:n,e!==null){for(i=t.child=e.child,l=0;i!==null;)l=l|i.lanes|i.childLanes,i=i.sibling;i=l&~a}else i=0,t.child=null;return Yh(e,t,a,n,i)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&as(t,a!==null?a.cachePool:null),a!==null?Dh(t,a):pc(),Ay(t);else return i=t.lanes=536870912,Yh(e,t,a!==null?a.baseLanes|n:n,n,i)}else a!==null?(as(t,a.cachePool),Dh(t,a),Wn(),t.memoizedState=null):(e!==null&&as(t,null),pc(),Wn());return Xe(e,t,l,n),t.child}function Ea(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yh(e,t,n,i,l){var a=Df();return a=a===null?null:{parent:Me._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&as(t,null),pc(),Ay(t),e!==null&&Ql(e,t,i,!0),t.childLanes=l,null}function os(e,t){return t=Us({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Ph(e,t,n){return Gi(t,e.child,null,n),e=os(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function y1(e,t,n){var i=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(se){if(i.mode==="hidden")return e=os(t,i),t.lanes=536870912,Ea(null,e);if(mc(t),(e=Ee)?(e=av(e,qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi!==null?{id:cn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},n=xy(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw vi(t);return t.lanes=536870912,null}return os(t,i)}var a=e.memoizedState;if(a!==null){var r=a.dehydrated;if(mc(t),l)if(t.flags&256)t.flags&=-257,t=Ph(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(L(558));else if(Be||Ql(e,t,n,!1),l=(n&e.childLanes)!==0,Be||l){if(i=ye,i!==null&&(r=Vg(i,n),r!==0&&r!==a.retryLane))throw a.retryLane=r,$i(e,r),pt(i,e,r),Kf;Fs(),t=Ph(e,t,n)}else e=a.treeContext,Ee=Gt(r.nextSibling),Ze=t,se=!0,ui=null,qt=!1,e!==null&&by(t,e),t=os(t,i),t.flags|=4096;return t}return e=On(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function us(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(L(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Sc(e,t,n,i,l){return Fi(t),n=Uf(e,t,n,i,void 0,l),i=If(),e!==null&&!Be?(Hf(e,t,l),Un(e,t,l)):(se&&i&&_f(t),t.flags|=1,Xe(e,t,n,l),t.child)}function Xh(e,t,n,i,l,a){return Fi(t),t.updateQueue=null,n=_y(t,i,n,l),jy(e),i=If(),e!==null&&!Be?(Hf(e,t,a),Un(e,t,a)):(se&&i&&_f(t),t.flags|=1,Xe(e,t,n,a),t.child)}function Qh(e,t,n,i,l){if(Fi(t),t.stateNode===null){var a=bl,r=n.contextType;typeof r=="object"&&r!==null&&(a=Ke(r)),a=new n(i,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=vc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=i,a.state=t.memoizedState,a.refs={},Lf(t),r=n.contextType,a.context=typeof r=="object"&&r!==null?Ke(r):bl,a.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(tu(t,n,r,i),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(r=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),r!==a.state&&vc.enqueueReplaceState(a,a.state,null),Oa(t,i,a,l),Ra(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,u=Yi(n,s);a.props=u;var c=a.context,d=n.contextType;r=bl,typeof d=="object"&&d!==null&&(r=Ke(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(s||c!==r)&&qh(t,a,i,r),Zn=!1;var h=t.memoizedState;a.state=h,Oa(t,i,a,l),Ra(),c=t.memoizedState,s||h!==c||Zn?(typeof f=="function"&&(tu(t,n,f,i),c=t.memoizedState),(u=Zn||Hh(t,n,u,i,h,c,r))?(d||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=i,t.memoizedState=c),a.props=i,a.state=c,a.context=r,i=u):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{a=t.stateNode,dc(e,t),r=t.memoizedProps,d=Yi(n,r),a.props=d,f=t.pendingProps,h=a.context,c=n.contextType,u=bl,typeof c=="object"&&c!==null&&(u=Ke(c)),s=n.getDerivedStateFromProps,(c=typeof s=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(r!==f||h!==u)&&qh(t,a,i,u),Zn=!1,h=t.memoizedState,a.state=h,Oa(t,i,a,l),Ra();var p=t.memoizedState;r!==f||h!==p||Zn||e!==null&&e.dependencies!==null&&Rs(e.dependencies)?(typeof s=="function"&&(tu(t,n,s,i),p=t.memoizedState),(d=Zn||Hh(t,n,d,i,h,p,u)||e!==null&&e.dependencies!==null&&Rs(e.dependencies))?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(i,p,u),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(i,p,u)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=p),a.props=i,a.state=p,a.context=u,i=d):(typeof a.componentDidUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),i=!1)}return a=i,us(e,t),i=(t.flags&128)!==0,a||i?(a=t.stateNode,n=i&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&i?(t.child=Gi(t,e.child,null,l),t.child=Gi(t,null,n,l)):Xe(e,t,n,l),t.memoizedState=a.state,e=t.child):e=Un(e,t,l),e}function Zh(e,t,n,i){return qi(),t.flags|=256,Xe(e,t,n,i),t.child}var nu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function iu(e){return{baseLanes:e,cachePool:Ey()}}function lu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ct),e}function px(e,t,n){var i=t.pendingProps,l=!1,a=(t.flags&128)!==0,r;if((r=a)||(r=e!==null&&e.memoizedState===null?!1:(Re.current&2)!==0),r&&(l=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(se){if(l?Jn(t):Wn(),(e=Ee)?(e=av(e,qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xi!==null?{id:cn,overflow:fn}:null,retryLane:536870912,hydrationErrors:null},n=xy(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw vi(t);return Lc(e)?t.lanes=32:t.lanes=536870912,null}var s=i.children;return i=i.fallback,l?(Wn(),l=t.mode,s=Us({mode:"hidden",children:s},l),i=Bi(i,l,n,null),s.return=t,i.return=t,s.sibling=i,t.child=s,i=t.child,i.memoizedState=iu(n),i.childLanes=lu(e,r,n),t.memoizedState=nu,Ea(null,i)):(Jn(t),Ec(t,s))}var u=e.memoizedState;if(u!==null&&(s=u.dehydrated,s!==null)){if(a)t.flags&256?(Jn(t),t.flags&=-257,t=au(e,t,n)):t.memoizedState!==null?(Wn(),t.child=e.child,t.flags|=128,t=null):(Wn(),s=i.fallback,l=t.mode,i=Us({mode:"visible",children:i.children},l),s=Bi(s,l,n,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,Gi(t,e.child,null,n),i=t.child,i.memoizedState=iu(n),i.childLanes=lu(e,r,n),t.memoizedState=nu,t=Ea(null,i));else if(Jn(t),Lc(s)){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;r=c,i=Error(L(419)),i.stack="",i.digest=r,Za({value:i,source:null,stack:null}),t=au(e,t,n)}else if(Be||Ql(e,t,n,!1),r=(n&e.childLanes)!==0,Be||r){if(r=ye,r!==null&&(i=Vg(r,n),i!==0&&i!==u.retryLane))throw u.retryLane=i,$i(e,i),pt(r,e,i),Kf;zc(s)||Fs(),t=au(e,t,n)}else zc(s)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,Ee=Gt(s.nextSibling),Ze=t,se=!0,ui=null,qt=!1,e!==null&&by(t,e),t=Ec(t,i.children),t.flags|=4096);return t}return l?(Wn(),s=i.fallback,l=t.mode,u=e.child,c=u.sibling,i=On(u,{mode:"hidden",children:i.children}),i.subtreeFlags=u.subtreeFlags&65011712,c!==null?s=On(c,s):(s=Bi(s,l,n,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,Ea(null,i),i=t.child,s=e.child.memoizedState,s===null?s=iu(n):(l=s.cachePool,l!==null?(u=Me._currentValue,l=l.parent!==u?{parent:u,pool:u}:l):l=Ey(),s={baseLanes:s.baseLanes|n,cachePool:l}),i.memoizedState=s,i.childLanes=lu(e,r,n),t.memoizedState=nu,Ea(e.child,i)):(Jn(t),n=e.child,e=n.sibling,n=On(n,{mode:"visible",children:i.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Ec(e,t){return t=Us({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Us(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function au(e,t,n){return Gi(t,e.child,null,n),e=Ec(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kh(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),uc(e.return,t,n)}function ru(e,t,n,i,l,a){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:n,tailMode:l,treeForkCount:a}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=i,r.tail=n,r.tailMode=l,r.treeForkCount=a)}function mx(e,t,n){var i=t.pendingProps,l=i.revealOrder,a=i.tail;i=i.children;var r=Re.current,s=(r&2)!==0;if(s?(r=r&1|2,t.flags|=128):r&=1,be(Re,r),Xe(e,t,i,n),i=se?Qa:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Kh(e,n,t);else if(e.tag===19)Kh(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}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&zs(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ru(t,!1,l,n,a,i);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&zs(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ru(t,!0,n,null,a,i);break;case"together":ru(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function Un(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Si|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ql(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=On(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=On(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $f(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Rs(e)))}function x1(e,t,n){switch(t.tag){case 3:Ts(t,t.stateNode.containerInfo),$n(t,Me,e.memoizedState.cache),qi();break;case 27:case 5:Ku(t);break;case 4:Ts(t,t.stateNode.containerInfo);break;case 10:$n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,mc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(Jn(t),t.flags|=128,null):(n&t.child.childLanes)!==0?px(e,t,n):(Jn(t),e=Un(e,t,n),e!==null?e.sibling:null);Jn(t);break;case 19:var l=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Ql(e,t,n,!1),i=(n&t.childLanes)!==0),l){if(i)return mx(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),be(Re,Re.current),i)break;return null;case 22:return t.lanes=0,hx(e,t,n,t.pendingProps);case 24:$n(t,Me,e.memoizedState.cache)}return Un(e,t,n)}function gx(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!$f(e,n)&&(t.flags&128)===0)return Be=!1,x1(e,t,n);Be=(e.flags&131072)!==0}else Be=!1,se&&(t.flags&1048576)!==0&&vy(t,Qa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Oi(t.elementType),t.type=e,typeof e=="function")jf(e)?(i=Yi(e,i),t.tag=1,t=Qh(null,t,e,i,n)):(t.tag=0,t=Sc(null,t,e,i,n));else{if(e!=null){var l=e.$$typeof;if(l===mf){t.tag=11,t=Gh(null,t,e,i,n);break e}else if(l===gf){t.tag=14,t=Vh(null,t,e,i,n);break e}}throw t=Qu(e)||e,Error(L(306,t,""))}}return t;case 0:return Sc(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,l=Yi(i,t.pendingProps),Qh(e,t,i,l,n);case 3:e:{if(Ts(t,t.stateNode.containerInfo),e===null)throw Error(L(387));i=t.pendingProps;var a=t.memoizedState;l=a.element,dc(e,t),Oa(t,i,null,n);var r=t.memoizedState;if(i=r.cache,$n(t,Me,i),i!==a.cache&&cc(t,[Me],n,!0),Ra(),i=r.element,a.isDehydrated)if(a={element:i,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Zh(e,t,i,n);break e}else if(i!==l){l=Ht(Error(L(424)),t),Za(l),t=Zh(e,t,i,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ee=Gt(e.firstChild),Ze=t,se=!0,ui=null,qt=!0,n=ky(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(qi(),i===l){t=Un(e,t,n);break e}Xe(e,t,i,n)}t=t.child}return t;case 26:return us(e,t),e===null?(n=gp(t.type,null,t.pendingProps,null))?t.memoizedState=n:se||(n=t.type,e=t.pendingProps,i=Ps(oi.current).createElement(n),i[Qe]=t,i[mt]=e,$e(i,n,e),Ye(i),t.stateNode=i):t.memoizedState=gp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ku(t),e===null&&se&&(i=t.stateNode=rv(t.type,t.pendingProps,oi.current),Ze=t,qt=!0,l=Ee,Ci(t.type)?(Mc=l,Ee=Gt(i.firstChild)):Ee=l),Xe(e,t,t.pendingProps.children,n),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&se&&((l=i=Ee)&&(i=Q1(i,t.type,t.pendingProps,qt),i!==null?(t.stateNode=i,Ze=t,Ee=Gt(i.firstChild),qt=!1,l=!0):l=!1),l||vi(t)),Ku(t),l=t.type,a=t.pendingProps,r=e!==null?e.memoizedProps:null,i=a.children,Oc(l,a)?i=null:r!==null&&Oc(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=Uf(e,t,u1,null,null,n),tr._currentValue=l),us(e,t),Xe(e,t,i,n),t.child;case 6:return e===null&&se&&((e=n=Ee)&&(n=Z1(n,t.pendingProps,qt),n!==null?(t.stateNode=n,Ze=t,Ee=null,e=!0):e=!1),e||vi(t)),null;case 13:return px(e,t,n);case 4:return Ts(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Gi(t,null,i,n):Xe(e,t,i,n),t.child;case 11:return Gh(e,t,t.type,t.pendingProps,n);case 7:return Xe(e,t,t.pendingProps,n),t.child;case 8:return Xe(e,t,t.pendingProps.children,n),t.child;case 12:return Xe(e,t,t.pendingProps.children,n),t.child;case 10:return i=t.pendingProps,$n(t,t.type,i.value),Xe(e,t,i.children,n),t.child;case 9:return l=t.type._context,i=t.pendingProps.children,Fi(t),l=Ke(l),i=i(l),t.flags|=1,Xe(e,t,i,n),t.child;case 14:return Vh(e,t,t.type,t.pendingProps,n);case 15:return dx(e,t,t.type,t.pendingProps,n);case 19:return mx(e,t,n);case 31:return y1(e,t,n);case 22:return hx(e,t,n,t.pendingProps);case 24:return Fi(t),i=Ke(Me),e===null?(l=Df(),l===null&&(l=ye,a=Of(),l.pooledCache=a,a.refCount++,a!==null&&(l.pooledCacheLanes|=n),l=a),t.memoizedState={parent:i,cache:l},Lf(t),$n(t,Me,l)):((e.lanes&n)!==0&&(dc(e,t),Oa(t,null,null,n),Ra()),l=e.memoizedState,a=t.memoizedState,l.parent!==i?(l={parent:i,cache:i},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),$n(t,Me,i)):(i=a.cache,$n(t,Me,i),i!==l.cache&&cc(t,[Me],n,!0))),Xe(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(L(156,t.tag))}function Cn(e){e.flags|=4}function su(e,t,n,i,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Hx())e.flags|=8192;else throw Ii=Os,zf}else e.flags&=-16777217}function $h(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!uv(t))if(Hx())e.flags|=8192;else throw Ii=Os,zf}function Ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?qg():536870912,e.lanes|=t,Il|=t)}function fa(e,t){if(!se)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 i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function Se(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,i=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags&65011712,i|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,i|=l.subtreeFlags,i|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=i,e.childLanes=n,t}function v1(e,t,n){var i=t.pendingProps;switch(Rf(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Se(t),null;case 1:return Se(t),null;case 3:return n=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Dn(Me),Dl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(al(t)?Cn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Jo())),Se(t),null;case 26:var l=t.type,a=t.memoizedState;return e===null?(Cn(t),a!==null?(Se(t),$h(t,a)):(Se(t),su(t,l,null,i,n))):a?a!==e.memoizedState?(Cn(t),Se(t),$h(t,a)):(Se(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Cn(t),Se(t),su(t,l,e,i,n)),null;case 27:if(ks(t),n=oi.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(!i){if(t.stateNode===null)throw Error(L(166));return Se(t),null}e=hn.current,al(t)?Nh(t):(e=rv(l,i,n),t.stateNode=e,Cn(t))}return Se(t),null;case 5:if(ks(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(!i){if(t.stateNode===null)throw Error(L(166));return Se(t),null}if(a=hn.current,al(t))Nh(t);else{var r=Ps(oi.current);switch(a){case 1:a=r.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:a=r.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":a=r.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":a=r.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":a=r.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof i.is=="string"?r.createElement("select",{is:i.is}):r.createElement("select"),i.multiple?a.multiple=!0:i.size&&(a.size=i.size);break;default:a=typeof i.is=="string"?r.createElement(l,{is:i.is}):r.createElement(l)}}a[Qe]=t,a[mt]=i;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)a.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=a;e:switch($e(a,l,i),l){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&Cn(t)}}return Se(t),su(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&Cn(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(L(166));if(e=oi.current,al(t)){if(e=t.stateNode,n=t.memoizedProps,i=null,l=Ze,l!==null)switch(l.tag){case 27:case 5:i=l.memoizedProps}e[Qe]=t,e=!!(e.nodeValue===n||i!==null&&i.suppressHydrationWarning===!0||nv(e.nodeValue,n)),e||vi(t,!0)}else e=Ps(e).createTextNode(i),e[Qe]=t,t.stateNode=e}return Se(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(i=al(t),n!==null){if(e===null){if(!i)throw Error(L(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(557));e[Qe]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Se(t),e=!1}else n=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(St(t),t):(St(t),null);if((t.flags&128)!==0)throw Error(L(558))}return Se(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=al(t),i!==null&&i.dehydrated!==null){if(e===null){if(!l)throw Error(L(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(L(317));l[Qe]=t}else qi(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Se(t),l=!1}else l=Jo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(St(t),t):(St(t),null)}return St(t),(t.flags&128)!==0?(t.lanes=n,t):(n=i!==null,e=e!==null&&e.memoizedState!==null,n&&(i=t.child,l=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(l=i.alternate.memoizedState.cachePool.pool),a=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(a=i.memoizedState.cachePool.pool),a!==l&&(i.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ir(t,t.updateQueue),Se(t),null);case 4:return Dl(),e===null&&ld(t.stateNode.containerInfo),Se(t),null;case 10:return Dn(t.type),Se(t),null;case 19:if(Pe(Re),i=t.memoizedState,i===null)return Se(t),null;if(l=(t.flags&128)!==0,a=i.rendering,a===null)if(l)fa(i,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(a=zs(e),a!==null){for(t.flags|=128,fa(i,!1),e=a.updateQueue,t.updateQueue=e,Ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yy(n,e),n=n.sibling;return be(Re,Re.current&1|2),se&&wn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Tt()>Hs&&(t.flags|=128,l=!0,fa(i,!1),t.lanes=4194304)}else{if(!l)if(e=zs(a),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Ir(t,e),fa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!se)return Se(t),null}else 2*Tt()-i.renderingStartTime>Hs&&n!==536870912&&(t.flags|=128,l=!0,fa(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(e=i.last,e!==null?e.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Tt(),e.sibling=null,n=Re.current,be(Re,l?n&1|2:n&1),se&&wn(t,i.treeForkCount),e):(Se(t),null);case 22:case 23:return St(t),Mf(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(n&536870912)!==0&&(t.flags&128)===0&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),n=t.updateQueue,n!==null&&Ir(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==n&&(t.flags|=2048),e!==null&&Pe(Ui),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Dn(Me),Se(t),null;case 25:return null;case 30:return null}throw Error(L(156,t.tag))}function b1(e,t){switch(Rf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(Me),Dl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ks(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(L(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(St(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));qi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Re),null;case 4:return Dl(),null;case 10:return Dn(t.type),null;case 22:case 23:return St(t),Mf(),e!==null&&Pe(Ui),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Dn(Me),null;case 25:return null;default:return null}}function yx(e,t){switch(Rf(t),t.tag){case 3:Dn(Me),Dl();break;case 26:case 27:case 5:ks(t);break;case 4:Dl();break;case 31:t.memoizedState!==null&&St(t);break;case 13:St(t);break;case 19:Pe(Re);break;case 10:Dn(t.type);break;case 22:case 23:St(t),Mf(),e!==null&&Pe(Ui);break;case 24:Dn(Me)}}function yr(e,t){try{var n=t.updateQueue,i=n!==null?n.lastEffect:null;if(i!==null){var l=i.next;n=l;do{if((n.tag&e)===e){i=void 0;var a=n.create,r=n.inst;i=a(),r.destroy=i}n=n.next}while(n!==l)}}catch(s){he(t,t.return,s)}}function bi(e,t,n){try{var i=t.updateQueue,l=i!==null?i.lastEffect:null;if(l!==null){var a=l.next;i=a;do{if((i.tag&e)===e){var r=i.inst,s=r.destroy;if(s!==void 0){r.destroy=void 0,l=t;var u=n,c=s;try{c()}catch(d){he(l,u,d)}}}i=i.next}while(i!==a)}}catch(d){he(t,t.return,d)}}function xx(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{wy(t,n)}catch(i){he(e,e.return,i)}}}function vx(e,t,n){n.props=Yi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){he(e,t,i)}}function za(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof n=="function"?e.refCleanup=n(i):n.current=i}}catch(l){he(e,t,l)}}function dn(e,t){var n=e.ref,i=e.refCleanup;if(n!==null)if(typeof i=="function")try{i()}catch(l){he(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){he(e,t,l)}else n.current=null}function bx(e){var t=e.type,n=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&i.focus();break e;case"img":n.src?i.src=n.src:n.srcSet&&(i.srcset=n.srcSet)}}catch(l){he(e,e.return,l)}}function ou(e,t,n){try{var i=e.stateNode;F1(i,e.type,n,t),i[mt]=t}catch(l){he(e,e.return,l)}}function Sx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ci(e.type)||e.tag===4}function uu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Sx(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.tag===27&&Ci(e.type)||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 Cc(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n));else if(i!==4&&(i===27&&Ci(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Cc(e,t,n),e=e.sibling;e!==null;)Cc(e,t,n),e=e.sibling}function Is(e,t,n){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(i!==4&&(i===27&&Ci(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Is(e,t,n),e=e.sibling;e!==null;)Is(e,t,n),e=e.sibling}function Ex(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);$e(t,i,n),t[Qe]=e,t[mt]=n}catch(a){he(e,e.return,a)}}var An=!1,Le=!1,cu=!1,Jh=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function S1(e,t){if(e=e.containerInfo,_c=Ks,e=uy(e),Nf(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var l=i.anchorOffset,a=i.focusNode;i=i.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break e}var r=0,s=-1,u=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||l!==0&&f.nodeType!==3||(s=r+l),f!==a||i!==0&&f.nodeType!==3||(u=r+i),f.nodeType===3&&(r+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===l&&(s=r),h===a&&++d===i&&(u=r),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=s===-1||u===-1?null:{start:s,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rc={focusedElem:e,selectionRange:n},Ks=!1,Ve=t;Ve!==null;)if(t=Ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ve=e;else for(;Ve!==null;){switch(t=Ve,a=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&a!==null){e=void 0,n=t,l=a.memoizedProps,a=a.memoizedState,i=n.stateNode;try{var y=Yi(n.type,l);e=i.getSnapshotBeforeUpdate(y,a),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){he(n,n.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Dc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Dc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(L(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function Cx(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:kn(e,n),i&4&&yr(5,n);break;case 1:if(kn(e,n),i&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){he(n,n.return,r)}else{var l=Yi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){he(n,n.return,r)}}i&64&&xx(n),i&512&&za(n,n.return);break;case 3:if(kn(e,n),i&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{wy(e,t)}catch(r){he(n,n.return,r)}}break;case 27:t===null&&i&4&&Ex(n);case 26:case 5:kn(e,n),t===null&&i&4&&bx(n),i&512&&za(n,n.return);break;case 12:kn(e,n);break;case 31:kn(e,n),i&4&&Nx(e,n);break;case 13:kn(e,n),i&4&&wx(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=_1.bind(null,n),K1(e,n))));break;case 22:if(i=n.memoizedState!==null||An,!i){t=t!==null&&t.memoizedState!==null||Le,l=An;var a=Le;An=i,(Le=t)&&!a?Nn(e,n,(n.subtreeFlags&8772)!==0):kn(e,n),An=l,Le=a}break;case 30:break;default:kn(e,n)}}function Tx(e){var t=e.alternate;t!==null&&(e.alternate=null,Tx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bf(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ke=null,dt=!1;function Tn(e,t,n){for(n=n.child;n!==null;)kx(e,t,n),n=n.sibling}function kx(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(cr,n)}catch{}switch(n.tag){case 26:Le||dn(n,t),Tn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Le||dn(n,t);var i=ke,l=dt;Ci(n.type)&&(ke=n.stateNode,dt=!1),Tn(e,t,n),Ua(n.stateNode),ke=i,dt=l;break;case 5:Le||dn(n,t);case 6:if(i=ke,l=dt,ke=null,Tn(e,t,n),ke=i,dt=l,ke!==null)if(dt)try{(ke.nodeType===9?ke.body:ke.nodeName==="HTML"?ke.ownerDocument.body:ke).removeChild(n.stateNode)}catch(a){he(n,t,a)}else try{ke.removeChild(n.stateNode)}catch(a){he(n,t,a)}break;case 18:ke!==null&&(dt?(e=ke,fp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Gl(e)):fp(ke,n.stateNode));break;case 4:i=ke,l=dt,ke=n.stateNode.containerInfo,dt=!0,Tn(e,t,n),ke=i,dt=l;break;case 0:case 11:case 14:case 15:bi(2,n,t),Le||bi(4,n,t),Tn(e,t,n);break;case 1:Le||(dn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&vx(n,t,i)),Tn(e,t,n);break;case 21:Tn(e,t,n);break;case 22:Le=(i=Le)||n.memoizedState!==null,Tn(e,t,n),Le=i;break;default:Tn(e,t,n)}}function Nx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gl(e)}catch(n){he(t,t.return,n)}}}function wx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gl(e)}catch(n){he(t,t.return,n)}}function E1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Jh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Jh),t;default:throw Error(L(435,e.tag))}}function Hr(e,t){var n=E1(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var l=R1.bind(null,e,i);i.then(l,l)}})}function ot(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var l=n[i],a=e,r=t,s=r;e:for(;s!==null;){switch(s.tag){case 27:if(Ci(s.type)){ke=s.stateNode,dt=!1;break e}break;case 5:ke=s.stateNode,dt=!1;break e;case 3:case 4:ke=s.stateNode.containerInfo,dt=!0;break e}s=s.return}if(ke===null)throw Error(L(160));kx(a,r,l),ke=null,dt=!1,a=l.alternate,a!==null&&(a.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ax(t,e),t=t.sibling}var Jt=null;function Ax(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ot(t,e),ut(e),i&4&&(bi(3,e,e.return),yr(3,e),bi(5,e,e.return));break;case 1:ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),i&64&&An&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?i:n.concat(i))));break;case 26:var l=Jt;if(ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),i&4){var a=n!==null?n.memoizedState:null;if(i=e.memoizedState,n===null)if(i===null)if(e.stateNode===null){e:{i=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(i){case"title":a=l.getElementsByTagName("title")[0],(!a||a[hr]||a[Qe]||a.namespaceURI==="http://www.w3.org/2000/svg"||a.hasAttribute("itemprop"))&&(a=l.createElement(i),l.head.insertBefore(a,l.querySelector("head > title"))),$e(a,i,n),a[Qe]=e,Ye(a),i=a;break e;case"link":var r=xp("link","href",l).get(i+(n.href||""));if(r){for(var s=0;s<r.length;s++)if(a=r[s],a.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&a.getAttribute("rel")===(n.rel==null?null:n.rel)&&a.getAttribute("title")===(n.title==null?null:n.title)&&a.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(s,1);break t}}a=l.createElement(i),$e(a,i,n),l.head.appendChild(a);break;case"meta":if(r=xp("meta","content",l).get(i+(n.content||""))){for(s=0;s<r.length;s++)if(a=r[s],a.getAttribute("content")===(n.content==null?null:""+n.content)&&a.getAttribute("name")===(n.name==null?null:n.name)&&a.getAttribute("property")===(n.property==null?null:n.property)&&a.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&a.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(s,1);break t}}a=l.createElement(i),$e(a,i,n),l.head.appendChild(a);break;default:throw Error(L(468,i))}a[Qe]=e,Ye(a),i=a}e.stateNode=i}else vp(l,e.type,e.stateNode);else e.stateNode=yp(l,i,e.memoizedProps);else a!==i?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,i===null?vp(l,e.type,e.stateNode):yp(l,i,e.memoizedProps)):i===null&&e.stateNode!==null&&ou(e,e.memoizedProps,n.memoizedProps)}break;case 27:ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),n!==null&&i&4&&ou(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ot(t,e),ut(e),i&512&&(Le||n===null||dn(n,n.return)),e.flags&32){l=e.stateNode;try{Ll(l,"")}catch(y){he(e,e.return,y)}}i&4&&e.stateNode!=null&&(l=e.memoizedProps,ou(e,l,n!==null?n.memoizedProps:l)),i&1024&&(cu=!0);break;case 6:if(ot(t,e),ut(e),i&4){if(e.stateNode===null)throw Error(L(162));i=e.memoizedProps,n=e.stateNode;try{n.nodeValue=i}catch(y){he(e,e.return,y)}}break;case 3:if(ds=null,l=Jt,Jt=Xs(t.containerInfo),ot(t,e),Jt=l,ut(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Gl(t.containerInfo)}catch(y){he(e,e.return,y)}cu&&(cu=!1,jx(e));break;case 4:i=Jt,Jt=Xs(e.stateNode.containerInfo),ot(t,e),ut(e),Jt=i;break;case 12:ot(t,e),ut(e);break;case 31:ot(t,e),ut(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 13:ot(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(xo=Tt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 22:l=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,c=An,d=Le;if(An=c||l,Le=d||u,ot(t,e),Le=d,An=c,ut(e),i&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||u||An||Le||Di(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){u=n=t;try{if(a=u.stateNode,l)r=a.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{s=u.stateNode;var f=u.memoizedProps.style,h=f!=null&&f.hasOwnProperty("display")?f.display:null;s.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(y){he(u,u.return,y)}}}else if(t.tag===6){if(n===null){u=t;try{u.stateNode.nodeValue=l?"":u.memoizedProps}catch(y){he(u,u.return,y)}}}else if(t.tag===18){if(n===null){u=t;try{var p=u.stateNode;l?dp(p,!0):dp(u.stateNode,!1)}catch(y){he(u,u.return,y)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(n=i.retryQueue,n!==null&&(i.retryQueue=null,Hr(e,n))));break;case 19:ot(t,e),ut(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,Hr(e,i)));break;case 30:break;case 21:break;default:ot(t,e),ut(e)}}function ut(e){var t=e.flags;if(t&2){try{for(var n,i=e.return;i!==null;){if(Sx(i)){n=i;break}i=i.return}if(n==null)throw Error(L(160));switch(n.tag){case 27:var l=n.stateNode,a=uu(e);Is(e,a,l);break;case 5:var r=n.stateNode;n.flags&32&&(Ll(r,""),n.flags&=-33);var s=uu(e);Is(e,s,r);break;case 3:case 4:var u=n.stateNode.containerInfo,c=uu(e);Cc(e,c,u);break;default:throw Error(L(161))}}catch(d){he(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jx(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Cx(e,t.alternate,t),t=t.sibling}function Di(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bi(4,t,t.return),Di(t);break;case 1:dn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&vx(t,t.return,n),Di(t);break;case 27:Ua(t.stateNode);case 26:case 5:dn(t,t.return),Di(t);break;case 22:t.memoizedState===null&&Di(t);break;case 30:Di(t);break;default:Di(t)}e=e.sibling}}function Nn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,l=e,a=t,r=a.flags;switch(a.tag){case 0:case 11:case 15:Nn(l,a,n),yr(4,a);break;case 1:if(Nn(l,a,n),i=a,l=i.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(c){he(i,i.return,c)}if(i=a,l=i.updateQueue,l!==null){var s=i.stateNode;try{var u=l.shared.hiddenCallbacks;if(u!==null)for(l.shared.hiddenCallbacks=null,l=0;l<u.length;l++)Ny(u[l],s)}catch(c){he(i,i.return,c)}}n&&r&64&&xx(a),za(a,a.return);break;case 27:Ex(a);case 26:case 5:Nn(l,a,n),n&&i===null&&r&4&&bx(a),za(a,a.return);break;case 12:Nn(l,a,n);break;case 31:Nn(l,a,n),n&&r&4&&Nx(l,a);break;case 13:Nn(l,a,n),n&&r&4&&wx(l,a);break;case 22:a.memoizedState===null&&Nn(l,a,n),za(a,a.return);break;case 30:break;default:Nn(l,a,n)}t=t.sibling}}function Jf(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&mr(n))}function Wf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e))}function Zt(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)_x(e,t,n,i),t=t.sibling}function _x(e,t,n,i){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,n,i),l&2048&&yr(9,t);break;case 1:Zt(e,t,n,i);break;case 3:Zt(e,t,n,i),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&mr(e)));break;case 12:if(l&2048){Zt(e,t,n,i),e=t.stateNode;try{var a=t.memoizedProps,r=a.id,s=a.onPostCommit;typeof s=="function"&&s(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){he(t,t.return,u)}}else Zt(e,t,n,i);break;case 31:Zt(e,t,n,i);break;case 13:Zt(e,t,n,i);break;case 23:break;case 22:a=t.stateNode,r=t.alternate,t.memoizedState!==null?a._visibility&2?Zt(e,t,n,i):La(e,t):a._visibility&2?Zt(e,t,n,i):(a._visibility|=2,ul(e,t,n,i,(t.subtreeFlags&10256)!==0||!1)),l&2048&&Jf(r,t);break;case 24:Zt(e,t,n,i),l&2048&&Wf(t.alternate,t);break;default:Zt(e,t,n,i)}}function ul(e,t,n,i,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,r=t,s=n,u=i,c=r.flags;switch(r.tag){case 0:case 11:case 15:ul(a,r,s,u,l),yr(8,r);break;case 23:break;case 22:var d=r.stateNode;r.memoizedState!==null?d._visibility&2?ul(a,r,s,u,l):La(a,r):(d._visibility|=2,ul(a,r,s,u,l)),l&&c&2048&&Jf(r.alternate,r);break;case 24:ul(a,r,s,u,l),l&&c&2048&&Wf(r.alternate,r);break;default:ul(a,r,s,u,l)}t=t.sibling}}function La(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,i=t,l=i.flags;switch(i.tag){case 22:La(n,i),l&2048&&Jf(i.alternate,i);break;case 24:La(n,i),l&2048&&Wf(i.alternate,i);break;default:La(n,i)}t=t.sibling}}var Ca=8192;function rl(e,t,n){if(e.subtreeFlags&Ca)for(e=e.child;e!==null;)Rx(e,t,n),e=e.sibling}function Rx(e,t,n){switch(e.tag){case 26:rl(e,t,n),e.flags&Ca&&e.memoizedState!==null&&oE(n,Jt,e.memoizedState,e.memoizedProps);break;case 5:rl(e,t,n);break;case 3:case 4:var i=Jt;Jt=Xs(e.stateNode.containerInfo),rl(e,t,n),Jt=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=Ca,Ca=16777216,rl(e,t,n),Ca=i):rl(e,t,n));break;default:rl(e,t,n)}}function Ox(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function da(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,zx(i,e)}Ox(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dx(e),e=e.sibling}function Dx(e){switch(e.tag){case 0:case 11:case 15:da(e),e.flags&2048&&bi(9,e,e.return);break;case 3:da(e);break;case 12:da(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cs(e)):da(e);break;default:da(e)}}function cs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,zx(i,e)}Ox(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bi(8,t,t.return),cs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cs(t));break;default:cs(t)}e=e.sibling}}function zx(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:bi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var i=n.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:mr(n.memoizedState.cache)}if(i=n.child,i!==null)i.return=n,Ve=i;else e:for(n=e;Ve!==null;){i=Ve;var l=i.sibling,a=i.return;if(Tx(i),i===n){Ve=null;break e}if(l!==null){l.return=a,Ve=l;break e}Ve=a}}}var C1={getCacheForType:function(e){var t=Ke(Me),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ke(Me).controller.signal}},T1=typeof WeakMap=="function"?WeakMap:Map,ue=0,ye=null,te=null,ie=0,de=0,bt=null,ai=!1,Kl=!1,ed=!1,In=0,je=0,Si=0,Hi=0,td=0,Ct=0,Il=0,Ma=null,ht=null,Tc=!1,xo=0,Lx=0,Hs=1/0,qs=null,di=null,Fe=0,hi=null,Hl=null,zn=0,kc=0,Nc=null,Mx=null,Ba=0,wc=null;function wt(){return(ue&2)!==0&&ie!==0?ie&-ie:Z.T!==null?id():Yg()}function Bx(){if(Ct===0)if((ie&536870912)===0||se){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),Ct=e}else Ct=536870912;return e=_t.current,e!==null&&(e.flags|=32),Ct}function pt(e,t,n){(e===ye&&(de===2||de===9)||e.cancelPendingCommit!==null)&&(ql(e,0),ri(e,ie,Ct,!1)),dr(e,n),((ue&2)===0||e!==ye)&&(e===ye&&((ue&2)===0&&(Hi|=n),je===4&&ri(e,ie,Ct,!1)),xn(e))}function Ux(e,t,n){if((ue&6)!==0)throw Error(L(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||fr(e,t),l=i?w1(e,t):fu(e,t,!0),a=i;do{if(l===0){Kl&&!i&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!k1(n)){l=fu(e,t,!1),a=!1;continue}if(l===2){if(a=t,e.errorRecoveryDisabledLanes&a)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var s=e;l=Ma;var u=s.current.memoizedState.isDehydrated;if(u&&(ql(s,r).flags|=256),r=fu(s,r,!1),r!==2){if(ed&&!u){s.errorRecoveryDisabledLanes|=a,Hi|=a,l=4;break e}a=ht,ht=l,a!==null&&(ht===null?ht=a:ht.push.apply(ht,a))}l=r}if(a=!1,l!==2)continue}}if(l===1){ql(e,0),ri(e,t,0,!0);break}e:{switch(i=e,a=l,a){case 0:case 1:throw Error(L(345));case 4:if((t&4194048)!==t)break;case 6:ri(i,t,Ct,!ai);break e;case 2:ht=null;break;case 3:case 5:break;default:throw Error(L(329))}if((t&62914560)===t&&(l=xo+300-Tt(),10<l)){if(ri(i,t,Ct,!ai),ro(i,0,!0)!==0)break e;zn=t,i.timeoutHandle=lv(Wh.bind(null,i,n,ht,qs,Tc,t,Ct,Hi,Il,ai,a,"Throttled",-0,0),l);break e}Wh(i,n,ht,qs,Tc,t,Ct,Hi,Il,ai,a,null,-0,0)}}break}while(!0);xn(e)}function Wh(e,t,n,i,l,a,r,s,u,c,d,f,h,p){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},Rx(t,a,f);var y=(a&62914560)===a?xo-Tt():(a&4194048)===a?Lx-Tt():0;if(y=uE(f,y),y!==null){zn=a,e.cancelPendingCommit=y(tp.bind(null,e,t,a,n,i,l,r,s,u,d,f,null,h,p)),ri(e,a,r,!c);return}}tp(e,t,a,n,i,l,r,s,u)}function k1(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var i=0;i<n.length;i++){var l=n[i],a=l.getSnapshot;l=l.value;try{if(!jt(a(),l))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 ri(e,t,n,i){t&=~td,t&=~Hi,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var l=t;0<l;){var a=31-Nt(l),r=1<<a;i[a]=-1,l&=~r}n!==0&&Fg(e,n,t)}function vo(){return(ue&6)===0?(xr(0),!1):!0}function nd(){if(te!==null){if(de===0)var e=te.return;else e=te,Rn=Ji=null,qf(e),Al=null,Ka=0,e=te;for(;e!==null;)yx(e.alternate,e),e=e.return;te=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Y1(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zn=0,nd(),ye=e,te=n=On(e.current,null),ie=t,de=0,bt=null,ai=!1,Kl=fr(e,t),ed=!1,Il=Ct=td=Hi=Si=je=0,ht=Ma=null,Tc=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var l=31-Nt(i),a=1<<l;t|=e[l],i&=~a}return In=t,co(),n}function Ix(e,t){J=null,Z.H=Ja,t===Zl||t===ho?(t=Rh(),de=3):t===zf?(t=Rh(),de=4):de=t===Kf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,te===null&&(je=1,Bs(e,Ht(t,e.current)))}function Hx(){var e=_t.current;return e===null?!0:(ie&4194048)===ie?Ft===null:(ie&62914560)===ie||(ie&536870912)!==0?e===Ft:!1}function qx(){var e=Z.H;return Z.H=Ja,e===null?Ja:e}function Fx(){var e=Z.A;return Z.A=C1,e}function Fs(){je=4,ai||(ie&4194048)!==ie&&_t.current!==null||(Kl=!0),(Si&134217727)===0&&(Hi&134217727)===0||ye===null||ri(ye,ie,Ct,!1)}function fu(e,t,n){var i=ue;ue|=2;var l=qx(),a=Fx();(ye!==e||ie!==t)&&(qs=null,ql(e,t)),t=!1;var r=je;e:do try{if(de!==0&&te!==null){var s=te,u=bt;switch(de){case 8:nd(),r=6;break e;case 3:case 2:case 9:case 6:_t.current===null&&(t=!0);var c=de;if(de=0,bt=null,Cl(e,s,u,c),n&&Kl){r=0;break e}break;default:c=de,de=0,bt=null,Cl(e,s,u,c)}}N1(),r=je;break}catch(d){Ix(e,d)}while(!0);return t&&e.shellSuspendCounter++,Rn=Ji=null,ue=i,Z.H=l,Z.A=a,te===null&&(ye=null,ie=0,co()),r}function N1(){for(;te!==null;)Gx(te)}function w1(e,t){var n=ue;ue|=2;var i=qx(),l=Fx();ye!==e||ie!==t?(qs=null,Hs=Tt()+500,ql(e,t)):Kl=fr(e,t);e:do try{if(de!==0&&te!==null){t=te;var a=bt;t:switch(de){case 1:de=0,bt=null,Cl(e,t,a,1);break;case 2:case 9:if(_h(a)){de=0,bt=null,ep(t);break}t=function(){de!==2&&de!==9||ye!==e||(de=7),xn(e)},a.then(t,t);break e;case 3:de=7;break e;case 4:de=5;break e;case 7:_h(a)?(de=0,bt=null,ep(t)):(de=0,bt=null,Cl(e,t,a,7));break;case 5:var r=null;switch(te.tag){case 26:r=te.memoizedState;case 5:case 27:var s=te;if(r?uv(r):s.stateNode.complete){de=0,bt=null;var u=s.sibling;if(u!==null)te=u;else{var c=s.return;c!==null?(te=c,bo(c)):te=null}break t}}de=0,bt=null,Cl(e,t,a,5);break;case 6:de=0,bt=null,Cl(e,t,a,6);break;case 8:nd(),je=6;break e;default:throw Error(L(462))}}A1();break}catch(d){Ix(e,d)}while(!0);return Rn=Ji=null,Z.H=i,Z.A=l,ue=n,te!==null?0:(ye=null,ie=0,co(),je)}function A1(){for(;te!==null&&!$0();)Gx(te)}function Gx(e){var t=gx(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?bo(e):te=t}function ep(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Xh(n,t,t.pendingProps,t.type,void 0,ie);break;case 11:t=Xh(n,t,t.pendingProps,t.type.render,t.ref,ie);break;case 5:qf(t);default:yx(n,t),t=te=yy(t,In),t=gx(n,t,In)}e.memoizedProps=e.pendingProps,t===null?bo(e):te=t}function Cl(e,t,n,i){Rn=Ji=null,qf(t),Al=null,Ka=0;var l=t.return;try{if(g1(e,l,t,n,ie)){je=1,Bs(e,Ht(n,e.current)),te=null;return}}catch(a){if(l!==null)throw te=l,a;je=1,Bs(e,Ht(n,e.current)),te=null;return}t.flags&32768?(se||i===1?e=!0:Kl||(ie&536870912)!==0?e=!1:(ai=e=!0,(i===2||i===9||i===3||i===6)&&(i=_t.current,i!==null&&i.tag===13&&(i.flags|=16384))),Vx(t,e)):bo(t)}function bo(e){var t=e;do{if((t.flags&32768)!==0){Vx(t,ai);return}e=t.return;var n=v1(t.alternate,t,In);if(n!==null){te=n;return}if(t=t.sibling,t!==null){te=t;return}te=t=e}while(t!==null);je===0&&(je=5)}function Vx(e,t){do{var n=b1(e.alternate,e);if(n!==null){n.flags&=32767,te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){te=e;return}te=e=n}while(e!==null);je=6,te=null}function tp(e,t,n,i,l,a,r,s,u){e.cancelPendingCommit=null;do So();while(Fe!==0);if((ue&6)!==0)throw Error(L(327));if(t!==null){if(t===e.current)throw Error(L(177));if(a=t.lanes|t.childLanes,a|=wf,sS(e,n,a,r,s,u),e===ye&&(te=ye=null,ie=0),Hl=t,hi=e,zn=n,kc=a,Nc=l,Mx=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,O1(Ns,function(){return Zx(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=Z.T,Z.T=null,l=ce.p,ce.p=2,r=ue,ue|=4;try{S1(e,t,n)}finally{ue=r,ce.p=l,Z.T=i}}Fe=1,Yx(),Px(),Xx()}}function Yx(){if(Fe===1){Fe=0;var e=hi,t=Hl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{Ax(t,e);var a=Rc,r=uy(e.containerInfo),s=a.focusedElem,u=a.selectionRange;if(r!==s&&s&&s.ownerDocument&&oy(s.ownerDocument.documentElement,s)){if(u!==null&&Nf(s)){var c=u.start,d=u.end;if(d===void 0&&(d=c),"selectionStart"in s)s.selectionStart=c,s.selectionEnd=Math.min(d,s.value.length);else{var f=s.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),y=s.textContent.length,x=Math.min(u.start,y),E=u.end===void 0?x:Math.min(u.end,y);!p.extend&&x>E&&(r=E,E=x,x=r);var g=Ch(s,x),m=Ch(s,E);if(g&&m&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==m.node||p.focusOffset!==m.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),x>E?(p.addRange(v),p.extend(m.node,m.offset)):(v.setEnd(m.node,m.offset),p.addRange(v))}}}}for(f=[],p=s;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<f.length;s++){var C=f[s];C.element.scrollLeft=C.left,C.element.scrollTop=C.top}}Ks=!!_c,Rc=_c=null}finally{ue=l,ce.p=i,Z.T=n}}e.current=t,Fe=2}}function Px(){if(Fe===2){Fe=0;var e=hi,t=Hl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{Cx(e,t.alternate,t)}finally{ue=l,ce.p=i,Z.T=n}}Fe=3}}function Xx(){if(Fe===4||Fe===3){Fe=0,J0();var e=hi,t=Hl,n=zn,i=Mx;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Fe=5:(Fe=0,Hl=hi=null,Qx(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(di=null),vf(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(cr,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=Z.T,l=ce.p,ce.p=2,Z.T=null;try{for(var a=e.onRecoverableError,r=0;r<i.length;r++){var s=i[r];a(s.value,{componentStack:s.stack})}}finally{Z.T=t,ce.p=l}}(zn&3)!==0&&So(),xn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===wc?Ba++:(Ba=0,wc=e):Ba=0,xr(0)}}function Qx(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,mr(t)))}function So(){return Yx(),Px(),Xx(),Zx()}function Zx(){if(Fe!==5)return!1;var e=hi,t=kc;kc=0;var n=vf(zn),i=Z.T,l=ce.p;try{ce.p=32>n?32:n,Z.T=null,n=Nc,Nc=null;var a=hi,r=zn;if(Fe=0,Hl=hi=null,zn=0,(ue&6)!==0)throw Error(L(331));var s=ue;if(ue|=4,Dx(a.current),_x(a,a.current,r,n),ue=s,xr(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(cr,a)}catch{}return!0}finally{ce.p=l,Z.T=i,Qx(e,t)}}function np(e,t,n){t=Ht(n,t),t=bc(e.stateNode,t,2),e=fi(e,t,2),e!==null&&(dr(e,2),xn(e))}function he(e,t,n){if(e.tag===3)np(e,e,n);else for(;t!==null;){if(t.tag===3){np(t,e,n);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(di===null||!di.has(i))){e=Ht(n,e),n=cx(2),i=fi(t,n,2),i!==null&&(fx(n,i,t,e),dr(i,2),xn(i));break}}t=t.return}}function du(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new T1;var l=new Set;i.set(t,l)}else l=i.get(t),l===void 0&&(l=new Set,i.set(t,l));l.has(n)||(ed=!0,l.add(n),e=j1.bind(null,e,t,n),t.then(e,e))}function j1(e,t,n){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ye===e&&(ie&n)===n&&(je===4||je===3&&(ie&62914560)===ie&&300>Tt()-xo?(ue&2)===0&&ql(e,0):td|=n,Il===ie&&(Il=0)),xn(e)}function Kx(e,t){t===0&&(t=qg()),e=$i(e,t),e!==null&&(dr(e,t),xn(e))}function _1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kx(e,n)}function R1(e,t){var n=0;switch(e.tag){case 31:case 13:var i=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(L(314))}i!==null&&i.delete(t),Kx(e,n)}function O1(e,t){return yf(e,t)}var Gs=null,cl=null,Ac=!1,Vs=!1,hu=!1,si=0;function xn(e){e!==cl&&e.next===null&&(cl===null?Gs=cl=e:cl=cl.next=e),Vs=!0,Ac||(Ac=!0,z1())}function xr(e,t){if(!hu&&Vs){hu=!0;do for(var n=!1,i=Gs;i!==null;){if(e!==0){var l=i.pendingLanes;if(l===0)var a=0;else{var r=i.suspendedLanes,s=i.pingedLanes;a=(1<<31-Nt(42|e)+1)-1,a&=l&~(r&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,ip(i,a))}else a=ie,a=ro(i,i===ye?a:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(a&3)===0||fr(i,a)||(n=!0,ip(i,a));i=i.next}while(n);hu=!1}}function D1(){$x()}function $x(){Vs=Ac=!1;var e=0;si!==0&&V1()&&(e=si);for(var t=Tt(),n=null,i=Gs;i!==null;){var l=i.next,a=Jx(i,t);a===0?(i.next=null,n===null?Gs=l:n.next=l,l===null&&(cl=n)):(n=i,(e!==0||(a&3)!==0)&&(Vs=!0)),i=l}Fe!==0&&Fe!==5||xr(e),si!==0&&(si=0)}function Jx(e,t){for(var n=e.suspendedLanes,i=e.pingedLanes,l=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var r=31-Nt(a),s=1<<r,u=l[r];u===-1?((s&n)===0||(s&i)!==0)&&(l[r]=rS(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}if(t=ye,n=ie,n=ro(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,n===0||e===t&&(de===2||de===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&qo(i),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||fr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&qo(i),vf(n)){case 2:case 8:n=Ig;break;case 32:n=Ns;break;case 268435456:n=Hg;break;default:n=Ns}return i=Wx.bind(null,e),n=yf(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&qo(i),e.callbackPriority=2,e.callbackNode=null,2}function Wx(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(So()&&e.callbackNode!==n)return null;var i=ie;return i=ro(e,e===ye?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Ux(e,i,t),Jx(e,Tt()),e.callbackNode!=null&&e.callbackNode===n?Wx.bind(null,e):null)}function ip(e,t){if(So())return null;Ux(e,t,!0)}function z1(){P1(function(){(ue&6)!==0?yf(Ug,D1):$x()})}function id(){if(si===0){var e=Ml;e===0&&(e=Rr,Rr<<=1,(Rr&261888)===0&&(Rr=256)),si=e}return si}function lp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ts(""+e)}function ap(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function L1(e,t,n,i,l){if(t==="submit"&&n&&n.stateNode===l){var a=lp((l[mt]||null).action),r=i.submitter;r&&(t=(t=r[mt]||null)?lp(t.formAction):r.getAttribute("formAction"),t!==null&&(a=t,r=null));var s=new so("action","action",null,i,l);e.push({event:s,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(si!==0){var u=r?ap(l,r):new FormData(l);xc(n,{pending:!0,data:u,method:l.method,action:a},null,u)}}else typeof a=="function"&&(s.preventDefault(),u=r?ap(l,r):new FormData(l),xc(n,{pending:!0,data:u,method:l.method,action:a},a,u))},currentTarget:l}]})}}for(var pu=0;pu<rc.length;pu++){var mu=rc[pu],M1=mu.toLowerCase(),B1=mu[0].toUpperCase()+mu.slice(1);nn(M1,"on"+B1)}nn(fy,"onAnimationEnd");nn(dy,"onAnimationIteration");nn(hy,"onAnimationStart");nn("dblclick","onDoubleClick");nn("focusin","onFocus");nn("focusout","onBlur");nn(WS,"onTransitionRun");nn(e1,"onTransitionStart");nn(t1,"onTransitionCancel");nn(py,"onTransitionEnd");zl("onMouseEnter",["mouseout","mouseover"]);zl("onMouseLeave",["mouseout","mouseover"]);zl("onPointerEnter",["pointerout","pointerover"]);zl("onPointerLeave",["pointerout","pointerover"]);Qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Qi("onBeforeInput",["compositionend","keypress","textInput","paste"]);Qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wa="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(" "),U1=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wa));function ev(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var i=e[n],l=i.event;i=i.listeners;e:{var a=void 0;if(t)for(var r=i.length-1;0<=r;r--){var s=i[r],u=s.instance,c=s.currentTarget;if(s=s.listener,u!==a&&l.isPropagationStopped())break e;a=s,l.currentTarget=c;try{a(l)}catch(d){As(d)}l.currentTarget=null,a=u}else for(r=0;r<i.length;r++){if(s=i[r],u=s.instance,c=s.currentTarget,s=s.listener,u!==a&&l.isPropagationStopped())break e;a=s,l.currentTarget=c;try{a(l)}catch(d){As(d)}l.currentTarget=null,a=u}}}}function ee(e,t){var n=t[Ju];n===void 0&&(n=t[Ju]=new Set);var i=e+"__bubble";n.has(i)||(tv(t,e,2,!1),n.add(i))}function gu(e,t,n){var i=0;t&&(i|=4),tv(n,e,i,t)}var qr="_reactListening"+Math.random().toString(36).slice(2);function ld(e){if(!e[qr]){e[qr]=!0,Pg.forEach(function(n){n!=="selectionchange"&&(U1.has(n)||gu(n,!1,e),gu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qr]||(t[qr]=!0,gu("selectionchange",!1,t))}}function tv(e,t,n,i){switch(pv(t)){case 2:var l=dE;break;case 8:l=hE;break;default:l=od}n=l.bind(null,t,n,e),l=void 0,!ic||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),i?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function yu(e,t,n,i,l){var a=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var r=i.tag;if(r===3||r===4){var s=i.stateNode.containerInfo;if(s===l)break;if(r===4)for(r=i.return;r!==null;){var u=r.tag;if((u===3||u===4)&&r.stateNode.containerInfo===l)return;r=r.return}for(;s!==null;){if(r=pl(s),r===null)return;if(u=r.tag,u===5||u===6||u===26||u===27){i=a=r;continue e}s=s.parentNode}}i=i.return}ey(function(){var c=a,d=Ef(n),f=[];e:{var h=my.get(e);if(h!==void 0){var p=so,y=e;switch(e){case"keypress":if(is(n)===0)break e;case"keydown":case"keyup":p=RS;break;case"focusin":y="focus",p=Po;break;case"focusout":y="blur",p=Po;break;case"beforeblur":case"afterblur":p=Po;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":p=hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=vS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=zS;break;case fy:case dy:case hy:p=ES;break;case py:p=MS;break;case"scroll":case"scrollend":p=yS;break;case"wheel":p=US;break;case"copy":case"cut":case"paste":p=TS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=mh;break;case"toggle":case"beforetoggle":p=HS}var x=(t&4)!==0,E=!x&&(e==="scroll"||e==="scrollend"),g=x?h!==null?h+"Capture":null:h;x=[];for(var m=c,v;m!==null;){var C=m;if(v=C.stateNode,C=C.tag,C!==5&&C!==26&&C!==27||v===null||g===null||(C=Ya(m,g),C!=null&&x.push(er(m,C,v))),E)break;m=m.return}0<x.length&&(h=new p(h,y,null,n,d),f.push({event:h,listeners:x}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==nc&&(y=n.relatedTarget||n.fromElement)&&(pl(y)||y[Pl]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(y=n.relatedTarget||n.toElement,p=c,y=y?pl(y):null,y!==null&&(E=ur(y),x=y.tag,y!==E||x!==5&&x!==27&&x!==6)&&(y=null)):(p=null,y=c),p!==y)){if(x=hh,C="onMouseLeave",g="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(x=mh,C="onPointerLeave",g="onPointerEnter",m="pointer"),E=p==null?h:Sa(p),v=y==null?h:Sa(y),h=new x(C,m+"leave",p,n,d),h.target=E,h.relatedTarget=v,C=null,pl(d)===c&&(x=new x(g,m+"enter",y,n,d),x.target=v,x.relatedTarget=E,C=x),E=C,p&&y)t:{for(x=I1,g=p,m=y,v=0,C=g;C;C=x(C))v++;C=0;for(var A=m;A;A=x(A))C++;for(;0<v-C;)g=x(g),v--;for(;0<C-v;)m=x(m),C--;for(;v--;){if(g===m||m!==null&&g===m.alternate){x=g;break t}g=x(g),m=x(m)}x=null}else x=null;p!==null&&rp(f,h,p,x,!1),y!==null&&E!==null&&rp(f,E,y,x,!0)}}e:{if(h=c?Sa(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var N=vh;else if(xh(h))if(ry)N=KS;else{N=QS;var _=XS}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&Sf(c.elementType)&&(N=vh):N=ZS;if(N&&(N=N(e,c))){ay(f,N,n,d);break e}_&&_(e,h,c),e==="focusout"&&c&&h.type==="number"&&c.memoizedProps.value!=null&&tc(h,"number",h.value)}switch(_=c?Sa(c):window,e){case"focusin":(xh(_)||_.contentEditable==="true")&&(yl=_,lc=c,Aa=null);break;case"focusout":Aa=lc=yl=null;break;case"mousedown":ac=!0;break;case"contextmenu":case"mouseup":case"dragend":ac=!1,Th(f,n,d);break;case"selectionchange":if(JS)break;case"keydown":case"keyup":Th(f,n,d)}var I;if(kf)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else gl?iy(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(ny&&n.locale!=="ko"&&(gl||D!=="onCompositionStart"?D==="onCompositionEnd"&&gl&&(I=ty()):(li=d,Cf="value"in li?li.value:li.textContent,gl=!0)),_=Ys(c,D),0<_.length&&(D=new ph(D,e,null,n,d),f.push({event:D,listeners:_}),I?D.data=I:(I=ly(n),I!==null&&(D.data=I)))),(I=FS?GS(e,n):VS(e,n))&&(D=Ys(c,"onBeforeInput"),0<D.length&&(_=new ph("onBeforeInput","beforeinput",null,n,d),f.push({event:_,listeners:D}),_.data=I)),L1(f,e,c,n,d)}ev(f,t)})}function er(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ys(e,t){for(var n=t+"Capture",i=[];e!==null;){var l=e,a=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||a===null||(l=Ya(e,n),l!=null&&i.unshift(er(e,l,a)),l=Ya(e,t),l!=null&&i.push(er(e,l,a))),e.tag===3)return i;e=e.return}return[]}function I1(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rp(e,t,n,i,l){for(var a=t._reactName,r=[];n!==null&&n!==i;){var s=n,u=s.alternate,c=s.stateNode;if(s=s.tag,u!==null&&u===i)break;s!==5&&s!==26&&s!==27||c===null||(u=c,l?(c=Ya(n,a),c!=null&&r.unshift(er(n,c,u))):l||(c=Ya(n,a),c!=null&&r.push(er(n,c,u)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var H1=/\r\n?/g,q1=/\u0000|\uFFFD/g;function sp(e){return(typeof e=="string"?e:""+e).replace(H1,`
49
+ `).replace(q1,"")}function nv(e,t){return t=sp(t),sp(e)===t}function pe(e,t,n,i,l,a){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ll(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ll(e,""+i);break;case"className":zr(e,"class",i);break;case"tabIndex":zr(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":zr(e,n,i);break;case"style":Wg(e,i,a);break;case"data":if(t!=="object"){zr(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=ts(""+i),e.setAttribute(n,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&pe(e,t,"name",l.name,l,null),pe(e,t,"formEncType",l.formEncType,l,null),pe(e,t,"formMethod",l.formMethod,l,null),pe(e,t,"formTarget",l.formTarget,l,null)):(pe(e,t,"encType",l.encType,l,null),pe(e,t,"method",l.method,l,null),pe(e,t,"target",l.target,l,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(n);break}i=ts(""+i),e.setAttribute(n,i);break;case"onClick":i!=null&&(e.onclick=_n);break;case"onScroll":i!=null&&ee("scroll",e);break;case"onScrollEnd":i!=null&&ee("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(L(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}n=ts(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""+i):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":i===!0?e.setAttribute(n,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(n,i):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(n,i):e.removeAttribute(n);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(n):e.setAttribute(n,i);break;case"popover":ee("beforetoggle",e),ee("toggle",e),es(e,"popover",i);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":es(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=mS.get(n)||n,es(e,n,i))}}function jc(e,t,n,i,l,a){switch(n){case"style":Wg(e,i,a);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(L(61));if(n=i.__html,n!=null){if(l.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"children":typeof i=="string"?Ll(e,i):(typeof i=="number"||typeof i=="bigint")&&Ll(e,""+i);break;case"onScroll":i!=null&&ee("scroll",e);break;case"onScrollEnd":i!=null&&ee("scrollend",e);break;case"onClick":i!=null&&(e.onclick=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xg.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),a=e[mt]||null,a=a!=null?a[n]:null,typeof a=="function"&&e.removeEventListener(t,a,l),typeof i=="function")){typeof a!="function"&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,i,l);break e}n in e?e[n]=i:i===!0?e.setAttribute(n,""):es(e,n,i)}}}function $e(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ee("error",e),ee("load",e);var i=!1,l=!1,a;for(a in n)if(n.hasOwnProperty(a)){var r=n[a];if(r!=null)switch(a){case"src":i=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:pe(e,t,a,r,n,null)}}l&&pe(e,t,"srcSet",n.srcSet,n,null),i&&pe(e,t,"src",n.src,n,null);return;case"input":ee("invalid",e);var s=a=r=l=null,u=null,c=null;for(i in n)if(n.hasOwnProperty(i)){var d=n[i];if(d!=null)switch(i){case"name":l=d;break;case"type":r=d;break;case"checked":u=d;break;case"defaultChecked":c=d;break;case"value":a=d;break;case"defaultValue":s=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(L(137,t));break;default:pe(e,t,i,d,n,null)}}Kg(e,a,s,u,c,r,l,!1);return;case"select":ee("invalid",e),i=r=a=null;for(l in n)if(n.hasOwnProperty(l)&&(s=n[l],s!=null))switch(l){case"value":a=s;break;case"defaultValue":r=s;break;case"multiple":i=s;default:pe(e,t,l,s,n,null)}t=a,n=r,e.multiple=!!i,t!=null?kl(e,!!i,t,!1):n!=null&&kl(e,!!i,n,!0);return;case"textarea":ee("invalid",e),a=l=i=null;for(r in n)if(n.hasOwnProperty(r)&&(s=n[r],s!=null))switch(r){case"value":i=s;break;case"defaultValue":l=s;break;case"children":a=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(L(91));break;default:pe(e,t,r,s,n,null)}Jg(e,i,l,a);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(i=n[u],i!=null))switch(u){case"selected":e.selected=i&&typeof i!="function"&&typeof i!="symbol";break;default:pe(e,t,u,i,n,null)}return;case"dialog":ee("beforetoggle",e),ee("toggle",e),ee("cancel",e),ee("close",e);break;case"iframe":case"object":ee("load",e);break;case"video":case"audio":for(i=0;i<Wa.length;i++)ee(Wa[i],e);break;case"image":ee("error",e),ee("load",e);break;case"details":ee("toggle",e);break;case"embed":case"source":case"link":ee("error",e),ee("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(i=n[c],i!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:pe(e,t,c,i,n,null)}return;default:if(Sf(t)){for(d in n)n.hasOwnProperty(d)&&(i=n[d],i!==void 0&&jc(e,t,d,i,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(i=n[s],i!=null&&pe(e,t,s,i,n,null))}function F1(e,t,n,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,a=null,r=null,s=null,u=null,c=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":u=f;default:i.hasOwnProperty(p)||pe(e,t,p,null,i,f)}}for(var h in i){var p=i[h];if(f=n[h],i.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":a=p;break;case"name":l=p;break;case"checked":c=p;break;case"defaultChecked":d=p;break;case"value":r=p;break;case"defaultValue":s=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(L(137,t));break;default:p!==f&&pe(e,t,h,p,i,f)}}ec(e,r,s,u,c,d,a,l);return;case"select":p=r=s=h=null;for(a in n)if(u=n[a],n.hasOwnProperty(a)&&u!=null)switch(a){case"value":break;case"multiple":p=u;default:i.hasOwnProperty(a)||pe(e,t,a,null,i,u)}for(l in i)if(a=i[l],u=n[l],i.hasOwnProperty(l)&&(a!=null||u!=null))switch(l){case"value":h=a;break;case"defaultValue":s=a;break;case"multiple":r=a;default:a!==u&&pe(e,t,l,a,i,u)}t=s,n=r,i=p,h!=null?kl(e,!!n,h,!1):!!i!=!!n&&(t!=null?kl(e,!!n,t,!0):kl(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null&&!i.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:pe(e,t,s,null,i,l)}for(r in i)if(l=i[r],a=n[r],i.hasOwnProperty(r)&&(l!=null||a!=null))switch(r){case"value":h=l;break;case"defaultValue":p=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(L(91));break;default:l!==a&&pe(e,t,r,l,i,a)}$g(e,h,p);return;case"option":for(var y in n)if(h=n[y],n.hasOwnProperty(y)&&h!=null&&!i.hasOwnProperty(y))switch(y){case"selected":e.selected=!1;break;default:pe(e,t,y,null,i,h)}for(u in i)if(h=i[u],p=n[u],i.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"selected":e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:pe(e,t,u,h,i,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var x in n)h=n[x],n.hasOwnProperty(x)&&h!=null&&!i.hasOwnProperty(x)&&pe(e,t,x,null,i,h);for(c in i)if(h=i[c],p=n[c],i.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(L(137,t));break;default:pe(e,t,c,h,i,p)}return;default:if(Sf(t)){for(var E in n)h=n[E],n.hasOwnProperty(E)&&h!==void 0&&!i.hasOwnProperty(E)&&jc(e,t,E,void 0,i,h);for(d in i)h=i[d],p=n[d],!i.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||jc(e,t,d,h,i,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!i.hasOwnProperty(g)&&pe(e,t,g,null,i,h);for(f in i)h=i[f],p=n[f],!i.hasOwnProperty(f)||h===p||h==null&&p==null||pe(e,t,f,h,i,p)}function op(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G1(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),i=0;i<n.length;i++){var l=n[i],a=l.transferSize,r=l.initiatorType,s=l.duration;if(a&&s&&op(r)){for(r=0,s=l.responseEnd,i+=1;i<n.length;i++){var u=n[i],c=u.startTime;if(c>s)break;var d=u.transferSize,f=u.initiatorType;d&&op(f)&&(u=u.responseEnd,r+=d*(u<s?1:(s-c)/(u-c)))}if(--i,t+=8*(a+r)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Rc=null;function Ps(e){return e.nodeType===9?e:e.ownerDocument}function up(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function iv(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Oc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var xu=null;function V1(){var e=window.event;return e&&e.type==="popstate"?e===xu?!1:(xu=e,!0):(xu=null,!1)}var lv=typeof setTimeout=="function"?setTimeout:void 0,Y1=typeof clearTimeout=="function"?clearTimeout:void 0,cp=typeof Promise=="function"?Promise:void 0,P1=typeof queueMicrotask=="function"?queueMicrotask:typeof cp<"u"?function(e){return cp.resolve(null).then(e).catch(X1)}:lv;function X1(e){setTimeout(function(){throw e})}function Ci(e){return e==="head"}function fp(e,t){var n=t,i=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(i===0){e.removeChild(l),Gl(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Ua(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ua(n);for(var a=n.firstChild;a;){var r=a.nextSibling,s=a.nodeName;a[hr]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=r}}else n==="body"&&Ua(e.ownerDocument.body);n=l}while(n);Gl(t)}function dp(e,t){var n=e;e=0;do{var i=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=i}while(n)}function Dc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Dc(n),bf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Q1(e,t,n,i){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[hr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Gt(e.nextSibling),e===null)break}return null}function Z1(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Gt(e.nextSibling),e===null))return null;return e}function av(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gt(e.nextSibling),e===null))return null;return e}function zc(e){return e.data==="$?"||e.data==="$~"}function Lc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function K1(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var i=function(){t(),n.removeEventListener("DOMContentLoaded",i)};n.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function Gt(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Mc=null;function hp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Gt(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function pp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function rv(e,t,n){switch(t=Ps(n),e){case"html":if(e=t.documentElement,!e)throw Error(L(452));return e;case"head":if(e=t.head,!e)throw Error(L(453));return e;case"body":if(e=t.body,!e)throw Error(L(454));return e;default:throw Error(L(451))}}function Ua(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bf(e)}var Vt=new Map,mp=new Set;function Xs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=ce.d;ce.d={f:$1,r:J1,D:W1,C:eE,L:tE,m:nE,X:lE,S:iE,M:aE};function $1(){var e=qn.f(),t=vo();return e||t}function J1(e){var t=Xl(e);t!==null&&t.tag===5&&t.type==="form"?Wy(t):qn.r(e)}var $l=typeof document>"u"?null:document;function sv(e,t,n){var i=$l;if(i&&typeof t=="string"&&t){var l=It(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),mp.has(l)||(mp.add(l),e={rel:e,crossOrigin:n,href:t},i.querySelector(l)===null&&(t=i.createElement("link"),$e(t,"link",e),Ye(t),i.head.appendChild(t)))}}function W1(e){qn.D(e),sv("dns-prefetch",e,null)}function eE(e,t){qn.C(e,t),sv("preconnect",e,t)}function tE(e,t,n){qn.L(e,t,n);var i=$l;if(i&&e&&t){var l='link[rel="preload"][as="'+It(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+It(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+It(n.imageSizes)+'"]')):l+='[href="'+It(e)+'"]';var a=l;switch(t){case"style":a=Fl(e);break;case"script":a=Jl(e)}Vt.has(a)||(e=Te({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Vt.set(a,e),i.querySelector(l)!==null||t==="style"&&i.querySelector(vr(a))||t==="script"&&i.querySelector(br(a))||(t=i.createElement("link"),$e(t,"link",e),Ye(t),i.head.appendChild(t)))}}function nE(e,t){qn.m(e,t);var n=$l;if(n&&e){var i=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+It(i)+'"][href="'+It(e)+'"]',a=l;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Jl(e)}if(!Vt.has(a)&&(e=Te({rel:"modulepreload",href:e},t),Vt.set(a,e),n.querySelector(l)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(br(a)))return}i=n.createElement("link"),$e(i,"link",e),Ye(i),n.head.appendChild(i)}}}function iE(e,t,n){qn.S(e,t,n);var i=$l;if(i&&e){var l=Tl(i).hoistableStyles,a=Fl(e);t=t||"default";var r=l.get(a);if(!r){var s={loading:0,preload:null};if(r=i.querySelector(vr(a)))s.loading=5;else{e=Te({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vt.get(a))&&ad(e,n);var u=r=i.createElement("link");Ye(u),$e(u,"link",e),u._p=new Promise(function(c,d){u.onload=c,u.onerror=d}),u.addEventListener("load",function(){s.loading|=1}),u.addEventListener("error",function(){s.loading|=2}),s.loading|=4,fs(r,t,i)}r={type:"stylesheet",instance:r,count:1,state:s},l.set(a,r)}}}function lE(e,t){qn.X(e,t);var n=$l;if(n&&e){var i=Tl(n).hoistableScripts,l=Jl(e),a=i.get(l);a||(a=n.querySelector(br(l)),a||(e=Te({src:e,async:!0},t),(t=Vt.get(l))&&rd(e,t),a=n.createElement("script"),Ye(a),$e(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function aE(e,t){qn.M(e,t);var n=$l;if(n&&e){var i=Tl(n).hoistableScripts,l=Jl(e),a=i.get(l);a||(a=n.querySelector(br(l)),a||(e=Te({src:e,async:!0,type:"module"},t),(t=Vt.get(l))&&rd(e,t),a=n.createElement("script"),Ye(a),$e(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function gp(e,t,n,i){var l=(l=oi.current)?Xs(l):null;if(!l)throw Error(L(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Fl(n.href),n=Tl(l).hoistableStyles,i=n.get(t),i||(i={type:"style",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Fl(n.href);var a=Tl(l).hoistableStyles,r=a.get(e);if(r||(l=l.ownerDocument||l,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,r),(a=l.querySelector(vr(e)))&&!a._p&&(r.instance=a,r.state.loading=5),Vt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Vt.set(e,n),a||rE(l,e,n,r.state))),t&&i===null)throw Error(L(528,""));return r}if(t&&i!==null)throw Error(L(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Jl(n),n=Tl(l).hoistableScripts,i=n.get(t),i||(i={type:"script",instance:null,count:0,state:null},n.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,e))}}function Fl(e){return'href="'+It(e)+'"'}function vr(e){return'link[rel="stylesheet"]['+e+"]"}function ov(e){return Te({},e,{"data-precedence":e.precedence,precedence:null})}function rE(e,t,n,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),$e(t,"link",n),Ye(t),e.head.appendChild(t))}function Jl(e){return'[src="'+It(e)+'"]'}function br(e){return"script[async]"+e}function yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+It(n.href)+'"]');if(i)return t.instance=i,Ye(i),i;var l=Te({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Ye(i),$e(i,"style",l),fs(i,n.precedence,e),t.instance=i;case"stylesheet":l=Fl(n.href);var a=e.querySelector(vr(l));if(a)return t.state.loading|=4,t.instance=a,Ye(a),a;i=ov(n),(l=Vt.get(l))&&ad(i,l),a=(e.ownerDocument||e).createElement("link"),Ye(a);var r=a;return r._p=new Promise(function(s,u){r.onload=s,r.onerror=u}),$e(a,"link",i),t.state.loading|=4,fs(a,n.precedence,e),t.instance=a;case"script":return a=Jl(n.src),(l=e.querySelector(br(a)))?(t.instance=l,Ye(l),l):(i=n,(l=Vt.get(a))&&(i=Te({},n),rd(i,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ye(l),$e(l,"link",i),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(L(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,fs(i,n.precedence,e));return t.instance}function fs(e,t,n){for(var i=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=i.length?i[i.length-1]:null,a=l,r=0;r<i.length;r++){var s=i[r];if(s.dataset.precedence===t)a=s;else if(a!==l)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ad(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function rd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ds=null;function xp(e,t,n){if(ds===null){var i=new Map,l=ds=new Map;l.set(n,i)}else l=ds,i=l.get(n),i||(i=new Map,l.set(n,i));if(i.has(e))return i;for(i.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var a=n[l];if(!(a[hr]||a[Qe]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var r=a.getAttribute(t)||"";r=e+r;var s=i.get(r);s?s.push(a):i.set(r,[a])}}return i}function vp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function sE(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function uv(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function oE(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Fl(i.href),a=t.querySelector(vr(l));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qs.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ye(a);return}a=t.ownerDocument||t,i=ov(i),(l=Vt.get(l))&&ad(i,l),a=a.createElement("link"),Ye(a);var r=a;r._p=new Promise(function(s,u){r.onload=s,r.onerror=u}),$e(a,"link",i),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Qs.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var vu=0;function uE(e,t){return e.stylesheets&&e.count===0&&hs(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&vu===0&&(vu=62500*G1());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>vu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function Qs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zs=null;function hs(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zs=new Map,t.forEach(cE,e),Zs=null,Qs.call(e))}function cE(e,t){if(!(t.state.loading&4)){var n=Zs.get(e);if(n)var i=n.get(null);else{n=new Map,Zs.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<l.length;a++){var r=l[a];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),i=r)}i&&n.set(null,i)}l=t.instance,r=l.getAttribute("data-precedence"),a=n.get(r)||i,a===i&&n.set(null,l),n.set(r,l),this.count++,i=Qs.bind(this),l.addEventListener("load",i),l.addEventListener("error",i),a?a.parentNode.insertBefore(l,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var tr={$$typeof:jn,Provider:null,Consumer:null,_currentValue:Mi,_currentValue2:Mi,_threadCount:0};function fE(e,t,n,i,l,a,r,s,u){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fo(0),this.hiddenUpdates=Fo(null),this.identifierPrefix=i,this.onUncaughtError=l,this.onCaughtError=a,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function cv(e,t,n,i,l,a,r,s,u,c,d,f){return e=new fE(e,t,n,r,u,c,d,f,s),t=1,a===!0&&(t|=24),a=Et(3,null,null,t),e.current=a,a.stateNode=e,t=Of(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:i,isDehydrated:n,cache:t},Lf(a),e}function fv(e){return e?(e=bl,e):bl}function dv(e,t,n,i,l,a){l=fv(l),i.context===null?i.context=l:i.pendingContext=l,i=ci(t),i.payload={element:n},a=a===void 0?null:a,a!==null&&(i.callback=a),n=fi(e,i,t),n!==null&&(pt(n,e,t),_a(n,e,t))}function bp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sd(e,t){bp(e,t),(e=e.alternate)&&bp(e,t)}function hv(e){if(e.tag===13||e.tag===31){var t=$i(e,67108864);t!==null&&pt(t,e,67108864),sd(e,67108864)}}function Sp(e){if(e.tag===13||e.tag===31){var t=wt();t=xf(t);var n=$i(e,t);n!==null&&pt(n,e,t),sd(e,t)}}var Ks=!0;function dE(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=2,od(e,t,n,i)}finally{ce.p=a,Z.T=l}}function hE(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=8,od(e,t,n,i)}finally{ce.p=a,Z.T=l}}function od(e,t,n,i){if(Ks){var l=Bc(i);if(l===null)yu(e,t,i,$s,n),Ep(e,i);else if(mE(l,e,t,n,i))i.stopPropagation();else if(Ep(e,i),t&4&&-1<pE.indexOf(e)){for(;l!==null;){var a=Xl(l);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var r=Ri(a.pendingLanes);if(r!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;r;){var u=1<<31-Nt(r);s.entanglements[1]|=u,r&=~u}xn(a),(ue&6)===0&&(Hs=Tt()+500,xr(0))}}break;case 31:case 13:s=$i(a,2),s!==null&&pt(s,a,2),vo(),sd(a,2)}if(a=Bc(i),a===null&&yu(e,t,i,$s,n),a===l)break;l=a}l!==null&&i.stopPropagation()}else yu(e,t,i,null,n)}}function Bc(e){return e=Ef(e),ud(e)}var $s=null;function ud(e){if($s=null,e=pl(e),e!==null){var t=ur(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Dg(t),e!==null)return e;e=null}else if(n===31){if(e=zg(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 $s=e,null}function pv(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(W0()){case Ug:return 2;case Ig:return 8;case Ns:case eS:return 32;case Hg:return 268435456;default:return 32}default:return 32}}var Uc=!1,pi=null,mi=null,gi=null,nr=new Map,ir=new Map,ei=[],pE="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ep(e,t){switch(e){case"focusin":case"focusout":pi=null;break;case"dragenter":case"dragleave":mi=null;break;case"mouseover":case"mouseout":gi=null;break;case"pointerover":case"pointerout":nr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ir.delete(t.pointerId)}}function ha(e,t,n,i,l,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:i,nativeEvent:a,targetContainers:[l]},t!==null&&(t=Xl(t),t!==null&&hv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function mE(e,t,n,i,l){switch(t){case"focusin":return pi=ha(pi,e,t,n,i,l),!0;case"dragenter":return mi=ha(mi,e,t,n,i,l),!0;case"mouseover":return gi=ha(gi,e,t,n,i,l),!0;case"pointerover":var a=l.pointerId;return nr.set(a,ha(nr.get(a)||null,e,t,n,i,l)),!0;case"gotpointercapture":return a=l.pointerId,ir.set(a,ha(ir.get(a)||null,e,t,n,i,l)),!0}return!1}function mv(e){var t=pl(e.target);if(t!==null){var n=ur(t);if(n!==null){if(t=n.tag,t===13){if(t=Dg(n),t!==null){e.blockedOn=t,rh(e.priority,function(){Sp(n)});return}}else if(t===31){if(t=zg(n),t!==null){e.blockedOn=t,rh(e.priority,function(){Sp(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 ps(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Bc(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);nc=i,n.target.dispatchEvent(i),nc=null}else return t=Xl(n),t!==null&&hv(t),e.blockedOn=n,!1;t.shift()}return!0}function Cp(e,t,n){ps(e)&&n.delete(t)}function gE(){Uc=!1,pi!==null&&ps(pi)&&(pi=null),mi!==null&&ps(mi)&&(mi=null),gi!==null&&ps(gi)&&(gi=null),nr.forEach(Cp),ir.forEach(Cp)}function Fr(e,t){e.blockedOn===t&&(e.blockedOn=null,Uc||(Uc=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,gE)))}var Gr=null;function Tp(e){Gr!==e&&(Gr=e,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,function(){Gr===e&&(Gr=null);for(var t=0;t<e.length;t+=3){var n=e[t],i=e[t+1],l=e[t+2];if(typeof i!="function"){if(ud(i||n)===null)continue;break}var a=Xl(n);a!==null&&(e.splice(t,3),t-=3,xc(a,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Gl(e){function t(u){return Fr(u,e)}pi!==null&&Fr(pi,e),mi!==null&&Fr(mi,e),gi!==null&&Fr(gi,e),nr.forEach(t),ir.forEach(t);for(var n=0;n<ei.length;n++){var i=ei[n];i.blockedOn===e&&(i.blockedOn=null)}for(;0<ei.length&&(n=ei[0],n.blockedOn===null);)mv(n),n.blockedOn===null&&ei.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(i=0;i<n.length;i+=3){var l=n[i],a=n[i+1],r=l[mt]||null;if(typeof a=="function")r||Tp(n);else if(r){var s=null;if(a&&a.hasAttribute("formAction")){if(l=a,r=a[mt]||null)s=r.formAction;else if(ud(l)!==null)continue}else s=r.action;typeof s=="function"?n[i+1]=s:(n.splice(i,3),i-=3),Tp(n)}}}function gv(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(r){return l=r})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),i||setTimeout(n,20)}function n(){if(!i&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function cd(e){this._internalRoot=e}Eo.prototype.render=cd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));var n=t.current,i=wt();dv(n,i,e,t,null,null)};Eo.prototype.unmount=cd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dv(e.current,2,null,e,null,null),vo(),t[Pl]=null}};function Eo(e){this._internalRoot=e}Eo.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yg();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ei.length&&t!==0&&t<ei[n].priority;n++);ei.splice(n,0,e),n===0&&mv(e)}};var kp=Rg.version;if(kp!=="19.2.5")throw Error(L(527,kp,"19.2.5"));ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=P0(t),e=e!==null?Lg(e):null,e=e===null?null:e.stateNode,e};var yE={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vr.isDisabled&&Vr.supportsFiber)try{cr=Vr.inject(yE),kt=Vr}catch{}}lo.createRoot=function(e,t){if(!Og(e))throw Error(L(299));var n=!1,i="",l=sx,a=ox,r=ux;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=cv(e,1,!1,null,null,n,i,null,l,a,r,gv),e[Pl]=t.current,ld(e),new cd(t)};lo.hydrateRoot=function(e,t,n){if(!Og(e))throw Error(L(299));var i=!1,l="",a=sx,r=ox,s=ux,u=null;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=cv(e,1,!0,t,n??null,i,l,u,a,r,s,gv),t.context=fv(null),n=t.current,i=wt(),i=xf(i),l=ci(i),l.callback=null,fi(n,l,i),n=i,t.current.lanes=n,dr(t,n),xn(t),e[Pl]=t.current,ld(e),new Eo(t)};lo.version="19.2.5";function yv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(yv)}catch(e){console.error(e)}}yv(),kg.exports=lo;var xE=kg.exports;/**
50
50
  * react-router v7.14.0
51
51
  *
52
52
  * Copyright (c) Remix Software Inc.
@@ -55,40 +55,40 @@ Error generating stack: `+i.message+`
55
55
  * LICENSE.md file in the root directory of this source tree.
56
56
  *
57
57
  * @license MIT
58
- */var Np="popstate";function wp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function yE(e={}){function t(i,l){var c;let a=(c=l.state)==null?void 0:c.masked,{pathname:r,search:s,hash:u}=a||i.location;return Ic("",{pathname:r,search:s,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",a?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,l){return typeof l=="string"?l:lr(l)}return vE(t,n,null,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function xE(){return Math.random().toString(36).substring(2,10)}function Ap(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ic(e,t,n=null,i,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wl(t):t,state:n,key:t&&t.key||i||xE(),unstable_mask:l}}function lr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function vE(e,t,n,i={}){let{window:l=document.defaultView,v5Compat:a=!1}=i,r=l.history,s="POP",u=null,c=d();c==null&&(c=0,r.replaceState({...r.state,idx:c},""));function d(){return(r.state||{idx:null}).idx}function f(){s="POP";let E=d(),g=E==null?null:E-c;c=E,u&&u({action:s,location:x.location,delta:g})}function h(E,g){s="PUSH";let m=wp(E)?E:Ic(x.location,E,g);c=d()+1;let v=Ap(m,c),C=x.createHref(m.unstable_mask||m);try{r.pushState(v,"",C)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;l.location.assign(C)}a&&u&&u({action:s,location:x.location,delta:1})}function p(E,g){s="REPLACE";let m=wp(E)?E:Ic(x.location,E,g);c=d();let v=Ap(m,c),C=x.createHref(m.unstable_mask||m);r.replaceState(v,"",C),a&&u&&u({action:s,location:x.location,delta:0})}function y(E){return bE(E)}let x={get action(){return s},get location(){return e(l,r)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Np,f),u=E,()=>{l.removeEventListener(Np,f),u=null}},createHref(E){return t(l,E)},createURL:y,encodeLocation(E){let g=y(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(E){return r.go(E)}};return x}function bE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ne(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:lr(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function gv(e,t,n="/"){return SE(e,t,n,!1)}function SE(e,t,n,i){let l=typeof t=="string"?Wl(t):t,a=Hn(l.pathname||"/",n);if(a==null)return null;let r=yv(e);EE(r);let s=null;for(let u=0;s==null&&u<r.length;++u){let c=DE(a);s=RE(r[u],c,i)}return s}function yv(e,t=[],n=[],i="",l=!1){let a=(r,s,u=l,c)=>{let d={relativePath:c===void 0?r.path||"":c,caseSensitive:r.caseSensitive===!0,childrenIndex:s,route:r};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(i)&&u)return;Ne(d.relativePath.startsWith(i),`Absolute route path "${d.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(i.length)}let f=pn([i,d.relativePath]),h=n.concat(d);r.children&&r.children.length>0&&(Ne(r.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),yv(r.children,t,h,f,u)),!(r.path==null&&!r.index)&&t.push({path:f,score:jE(f,r.index),routesMeta:h})};return e.forEach((r,s)=>{var u;if(r.path===""||!((u=r.path)!=null&&u.includes("?")))a(r,s);else for(let c of xv(r.path))a(r,s,!0,c)}),t}function xv(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,l=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return l?[a,""]:[a];let r=xv(i.join("/")),s=[];return s.push(...r.map(u=>u===""?a:[a,u].join("/"))),l&&s.push(...r),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function EE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:_E(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var CE=/^:[\w-]+$/,TE=3,kE=2,NE=1,wE=10,AE=-2,jp=e=>e==="*";function jE(e,t){let n=e.split("/"),i=n.length;return n.some(jp)&&(i+=AE),t&&(i+=kE),n.filter(l=>!jp(l)).reduce((l,a)=>l+(CE.test(a)?TE:a===""?NE:wE),i)}function _E(e,t){return e.length===t.length&&e.slice(0,-1).every((i,l)=>i===t[l])?e[e.length-1]-t[t.length-1]:0}function RE(e,t,n=!1){let{routesMeta:i}=e,l={},a="/",r=[];for(let s=0;s<i.length;++s){let u=i[s],c=s===i.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=Js({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),h=u.route;if(!f&&c&&n&&!i[i.length-1].route.index&&(f=Js({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(l,f.params),r.push({params:l,pathname:pn([a,f.pathname]),pathnameBase:BE(pn([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=pn([a,f.pathnameBase]))}return r}function Js(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=OE(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let a=l[0],r=a.replace(/(.)\/+$/,"$1"),s=l.slice(1);return{params:i.reduce((c,{paramName:d,isOptional:f},h)=>{if(d==="*"){let y=s[h]||"";r=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const p=s[h];return f&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:r,pattern:e}}function OE(e,t=!1,n=!0){Yt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,s,u,c,d)=>{if(i.push({paramName:s,isOptional:u!=null}),u){let f=d.charAt(c+r.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),i]}function DE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Hn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var zE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function LE(e,t="/"){let{pathname:n,search:i="",hash:l=""}=typeof e=="string"?Wl(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=_p(n.substring(1),"/"):a=_p(n,t)):a=t,{pathname:a,search:UE(i),hash:IE(l)}}function _p(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function bu(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ME(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fd(e){let t=ME(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Co(e,t,n,i=!1){let l;typeof e=="string"?l=Wl(e):(l={...e},Ne(!l.pathname||!l.pathname.includes("?"),bu("?","pathname","search",l)),Ne(!l.pathname||!l.pathname.includes("#"),bu("#","pathname","hash",l)),Ne(!l.search||!l.search.includes("#"),bu("#","search","hash",l)));let a=e===""||l.pathname==="",r=a?"/":l.pathname,s;if(r==null)s=n;else{let f=t.length-1;if(!i&&r.startsWith("..")){let h=r.split("/");for(;h[0]==="..";)h.shift(),f-=1;l.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=LE(l,s),c=r&&r!=="/"&&r.endsWith("/"),d=(a||r===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var pn=e=>e.join("/").replace(/\/\/+/g,"/"),BE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),UE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,IE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,HE=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function qE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function FE(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var vv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function bv(e,t){let n=e;if(typeof n!="string"||!zE.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,l=!1;if(vv)try{let a=new URL(window.location.href),r=n.startsWith("//")?new URL(a.protocol+n):new URL(n),s=Hn(r.pathname,t);r.origin===a.origin&&s!=null?n=s+r.search+r.hash:l=!0}catch{Yt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:l,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Sv=["POST","PUT","PATCH","DELETE"];new Set(Sv);var GE=["GET",...Sv];new Set(GE);var ea=b.createContext(null);ea.displayName="DataRouter";var To=b.createContext(null);To.displayName="DataRouterState";var Ev=b.createContext(!1);function VE(){return b.useContext(Ev)}var Cv=b.createContext({isTransitioning:!1});Cv.displayName="ViewTransition";var YE=b.createContext(new Map);YE.displayName="Fetchers";var PE=b.createContext(null);PE.displayName="Await";var Rt=b.createContext(null);Rt.displayName="Navigation";var Sr=b.createContext(null);Sr.displayName="Location";var Pt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Pt.displayName="Route";var dd=b.createContext(null);dd.displayName="RouteError";var Tv="REACT_ROUTER_ERROR",XE="REDIRECT",QE="ROUTE_ERROR_RESPONSE";function ZE(e){if(e.startsWith(`${Tv}:${XE}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function KE(e){if(e.startsWith(`${Tv}:${QE}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new HE(t.status,t.statusText,t.data)}catch{}}function $E(e,{relative:t}={}){Ne(ta(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=b.useContext(Rt),{hash:l,pathname:a,search:r}=Er(e,{relative:t}),s=a;return n!=="/"&&(s=a==="/"?n:pn([n,a])),i.createHref({pathname:s,search:r,hash:l})}function ta(){return b.useContext(Sr)!=null}function rt(){return Ne(ta(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Sr).location}var kv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Nv(e){b.useContext(Rt).static||b.useLayoutEffect(e)}function Je(){let{isDataRoute:e}=b.useContext(Pt);return e?dC():JE()}function JE(){Ne(ta(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(ea),{basename:t,navigator:n}=b.useContext(Rt),{matches:i}=b.useContext(Pt),{pathname:l}=rt(),a=JSON.stringify(fd(i)),r=b.useRef(!1);return Nv(()=>{r.current=!0}),b.useCallback((u,c={})=>{if(Yt(r.current,kv),!r.current)return;if(typeof u=="number"){n.go(u);return}let d=Co(u,JSON.parse(a),l,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:pn([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,a,l,e])}var WE=b.createContext(null);function eC(e){let t=b.useContext(Pt).outlet;return b.useMemo(()=>t&&b.createElement(WE.Provider,{value:e},t),[t,e])}function Wi(){let{matches:e}=b.useContext(Pt),t=e[e.length-1];return t?t.params:{}}function Er(e,{relative:t}={}){let{matches:n}=b.useContext(Pt),{pathname:i}=rt(),l=JSON.stringify(fd(n));return b.useMemo(()=>Co(e,JSON.parse(l),i,t==="path"),[e,l,i,t])}function tC(e,t){return wv(e,t)}function wv(e,t,n){var E;Ne(ta(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=b.useContext(Rt),{matches:l}=b.useContext(Pt),a=l[l.length-1],r=a?a.params:{},s=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;{let g=c&&c.path||"";jv(s,!c||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
58
+ */var Np="popstate";function wp(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function vE(e={}){function t(i,l){var c;let a=(c=l.state)==null?void 0:c.masked,{pathname:r,search:s,hash:u}=a||i.location;return Ic("",{pathname:r,search:s,hash:u},l.state&&l.state.usr||null,l.state&&l.state.key||"default",a?{pathname:i.location.pathname,search:i.location.search,hash:i.location.hash}:void 0)}function n(i,l){return typeof l=="string"?l:lr(l)}return SE(t,n,null,e)}function Ne(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Yt(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function bE(){return Math.random().toString(36).substring(2,10)}function Ap(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Ic(e,t,n=null,i,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Wl(t):t,state:n,key:t&&t.key||i||bE(),unstable_mask:l}}function lr({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function Wl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let i=e.indexOf("?");i>=0&&(t.search=e.substring(i),e=e.substring(0,i)),e&&(t.pathname=e)}return t}function SE(e,t,n,i={}){let{window:l=document.defaultView,v5Compat:a=!1}=i,r=l.history,s="POP",u=null,c=d();c==null&&(c=0,r.replaceState({...r.state,idx:c},""));function d(){return(r.state||{idx:null}).idx}function f(){s="POP";let E=d(),g=E==null?null:E-c;c=E,u&&u({action:s,location:x.location,delta:g})}function h(E,g){s="PUSH";let m=wp(E)?E:Ic(x.location,E,g);c=d()+1;let v=Ap(m,c),C=x.createHref(m.unstable_mask||m);try{r.pushState(v,"",C)}catch(A){if(A instanceof DOMException&&A.name==="DataCloneError")throw A;l.location.assign(C)}a&&u&&u({action:s,location:x.location,delta:1})}function p(E,g){s="REPLACE";let m=wp(E)?E:Ic(x.location,E,g);c=d();let v=Ap(m,c),C=x.createHref(m.unstable_mask||m);r.replaceState(v,"",C),a&&u&&u({action:s,location:x.location,delta:0})}function y(E){return EE(E)}let x={get action(){return s},get location(){return e(l,r)},listen(E){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Np,f),u=E,()=>{l.removeEventListener(Np,f),u=null}},createHref(E){return t(l,E)},createURL:y,encodeLocation(E){let g=y(E);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:h,replace:p,go(E){return r.go(E)}};return x}function EE(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ne(n,"No window.location.(origin|href) available to create URL");let i=typeof e=="string"?e:lr(e);return i=i.replace(/ $/,"%20"),!t&&i.startsWith("//")&&(i=n+i),new URL(i,n)}function xv(e,t,n="/"){return CE(e,t,n,!1)}function CE(e,t,n,i){let l=typeof t=="string"?Wl(t):t,a=Hn(l.pathname||"/",n);if(a==null)return null;let r=vv(e);TE(r);let s=null;for(let u=0;s==null&&u<r.length;++u){let c=LE(a);s=DE(r[u],c,i)}return s}function vv(e,t=[],n=[],i="",l=!1){let a=(r,s,u=l,c)=>{let d={relativePath:c===void 0?r.path||"":c,caseSensitive:r.caseSensitive===!0,childrenIndex:s,route:r};if(d.relativePath.startsWith("/")){if(!d.relativePath.startsWith(i)&&u)return;Ne(d.relativePath.startsWith(i),`Absolute route path "${d.relativePath}" nested under path "${i}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),d.relativePath=d.relativePath.slice(i.length)}let f=pn([i,d.relativePath]),h=n.concat(d);r.children&&r.children.length>0&&(Ne(r.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${f}".`),vv(r.children,t,h,f,u)),!(r.path==null&&!r.index)&&t.push({path:f,score:RE(f,r.index),routesMeta:h})};return e.forEach((r,s)=>{var u;if(r.path===""||!((u=r.path)!=null&&u.includes("?")))a(r,s);else for(let c of bv(r.path))a(r,s,!0,c)}),t}function bv(e){let t=e.split("/");if(t.length===0)return[];let[n,...i]=t,l=n.endsWith("?"),a=n.replace(/\?$/,"");if(i.length===0)return l?[a,""]:[a];let r=bv(i.join("/")),s=[];return s.push(...r.map(u=>u===""?a:[a,u].join("/"))),l&&s.push(...r),s.map(u=>e.startsWith("/")&&u===""?"/":u)}function TE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:OE(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var kE=/^:[\w-]+$/,NE=3,wE=2,AE=1,jE=10,_E=-2,jp=e=>e==="*";function RE(e,t){let n=e.split("/"),i=n.length;return n.some(jp)&&(i+=_E),t&&(i+=wE),n.filter(l=>!jp(l)).reduce((l,a)=>l+(kE.test(a)?NE:a===""?AE:jE),i)}function OE(e,t){return e.length===t.length&&e.slice(0,-1).every((i,l)=>i===t[l])?e[e.length-1]-t[t.length-1]:0}function DE(e,t,n=!1){let{routesMeta:i}=e,l={},a="/",r=[];for(let s=0;s<i.length;++s){let u=i[s],c=s===i.length-1,d=a==="/"?t:t.slice(a.length)||"/",f=Js({path:u.relativePath,caseSensitive:u.caseSensitive,end:c},d),h=u.route;if(!f&&c&&n&&!i[i.length-1].route.index&&(f=Js({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!f)return null;Object.assign(l,f.params),r.push({params:l,pathname:pn([a,f.pathname]),pathnameBase:IE(pn([a,f.pathnameBase])),route:h}),f.pathnameBase!=="/"&&(a=pn([a,f.pathnameBase]))}return r}function Js(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=zE(e.path,e.caseSensitive,e.end),l=t.match(n);if(!l)return null;let a=l[0],r=a.replace(/(.)\/+$/,"$1"),s=l.slice(1);return{params:i.reduce((c,{paramName:d,isOptional:f},h)=>{if(d==="*"){let y=s[h]||"";r=a.slice(0,a.length-y.length).replace(/(.)\/+$/,"$1")}const p=s[h];return f&&!p?c[d]=void 0:c[d]=(p||"").replace(/%2F/g,"/"),c},{}),pathname:a,pathnameBase:r,pattern:e}}function zE(e,t=!1,n=!0){Yt(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let i=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(r,s,u,c,d)=>{if(i.push({paramName:s,isOptional:u!=null}),u){let f=d.charAt(c+r.length);return f&&f!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(i.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),i]}function LE(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Yt(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Hn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,i=e.charAt(n);return i&&i!=="/"?null:e.slice(n)||"/"}var ME=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function BE(e,t="/"){let{pathname:n,search:i="",hash:l=""}=typeof e=="string"?Wl(e):e,a;return n?(n=n.replace(/\/\/+/g,"/"),n.startsWith("/")?a=_p(n.substring(1),"/"):a=_p(n,t)):a=t,{pathname:a,search:HE(i),hash:qE(l)}}function _p(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function bu(e,t,n,i){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(i)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function UE(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function fd(e){let t=UE(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function Co(e,t,n,i=!1){let l;typeof e=="string"?l=Wl(e):(l={...e},Ne(!l.pathname||!l.pathname.includes("?"),bu("?","pathname","search",l)),Ne(!l.pathname||!l.pathname.includes("#"),bu("#","pathname","hash",l)),Ne(!l.search||!l.search.includes("#"),bu("#","search","hash",l)));let a=e===""||l.pathname==="",r=a?"/":l.pathname,s;if(r==null)s=n;else{let f=t.length-1;if(!i&&r.startsWith("..")){let h=r.split("/");for(;h[0]==="..";)h.shift(),f-=1;l.pathname=h.join("/")}s=f>=0?t[f]:"/"}let u=BE(l,s),c=r&&r!=="/"&&r.endsWith("/"),d=(a||r===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var pn=e=>e.join("/").replace(/\/\/+/g,"/"),IE=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),HE=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qE=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,FE=class{constructor(e,t,n,i=!1){this.status=e,this.statusText=t||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function GE(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function VE(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Sv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ev(e,t){let n=e;if(typeof n!="string"||!ME.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,l=!1;if(Sv)try{let a=new URL(window.location.href),r=n.startsWith("//")?new URL(a.protocol+n):new URL(n),s=Hn(r.pathname,t);r.origin===a.origin&&s!=null?n=s+r.search+r.hash:l=!0}catch{Yt(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:i,isExternal:l,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Cv=["POST","PUT","PATCH","DELETE"];new Set(Cv);var YE=["GET",...Cv];new Set(YE);var ea=b.createContext(null);ea.displayName="DataRouter";var To=b.createContext(null);To.displayName="DataRouterState";var Tv=b.createContext(!1);function PE(){return b.useContext(Tv)}var kv=b.createContext({isTransitioning:!1});kv.displayName="ViewTransition";var XE=b.createContext(new Map);XE.displayName="Fetchers";var QE=b.createContext(null);QE.displayName="Await";var Rt=b.createContext(null);Rt.displayName="Navigation";var Sr=b.createContext(null);Sr.displayName="Location";var Pt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Pt.displayName="Route";var dd=b.createContext(null);dd.displayName="RouteError";var Nv="REACT_ROUTER_ERROR",ZE="REDIRECT",KE="ROUTE_ERROR_RESPONSE";function $E(e){if(e.startsWith(`${Nv}:${ZE}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function JE(e){if(e.startsWith(`${Nv}:${KE}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new FE(t.status,t.statusText,t.data)}catch{}}function WE(e,{relative:t}={}){Ne(ta(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:i}=b.useContext(Rt),{hash:l,pathname:a,search:r}=Er(e,{relative:t}),s=a;return n!=="/"&&(s=a==="/"?n:pn([n,a])),i.createHref({pathname:s,search:r,hash:l})}function ta(){return b.useContext(Sr)!=null}function rt(){return Ne(ta(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Sr).location}var wv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Av(e){b.useContext(Rt).static||b.useLayoutEffect(e)}function Je(){let{isDataRoute:e}=b.useContext(Pt);return e?pC():eC()}function eC(){Ne(ta(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(ea),{basename:t,navigator:n}=b.useContext(Rt),{matches:i}=b.useContext(Pt),{pathname:l}=rt(),a=JSON.stringify(fd(i)),r=b.useRef(!1);return Av(()=>{r.current=!0}),b.useCallback((u,c={})=>{if(Yt(r.current,wv),!r.current)return;if(typeof u=="number"){n.go(u);return}let d=Co(u,JSON.parse(a),l,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:pn([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,a,l,e])}var tC=b.createContext(null);function nC(e){let t=b.useContext(Pt).outlet;return b.useMemo(()=>t&&b.createElement(tC.Provider,{value:e},t),[t,e])}function Wi(){let{matches:e}=b.useContext(Pt),t=e[e.length-1];return t?t.params:{}}function Er(e,{relative:t}={}){let{matches:n}=b.useContext(Pt),{pathname:i}=rt(),l=JSON.stringify(fd(n));return b.useMemo(()=>Co(e,JSON.parse(l),i,t==="path"),[e,l,i,t])}function iC(e,t){return jv(e,t)}function jv(e,t,n){var E;Ne(ta(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:i}=b.useContext(Rt),{matches:l}=b.useContext(Pt),a=l[l.length-1],r=a?a.params:{},s=a?a.pathname:"/",u=a?a.pathnameBase:"/",c=a&&a.route;{let g=c&&c.path||"";Rv(s,!c||g.endsWith("*")||g.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${g}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
59
 
60
- Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let d=rt(),f;if(t){let g=typeof t=="string"?Wl(t):t;Ne(u==="/"||((E=g.pathname)==null?void 0:E.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),f=g}else f=d;let h=f.pathname||"/",p=h;if(u!=="/"){let g=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=gv(e,{pathname:p});Yt(c||y!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Yt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=rC(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},r,g.params),pathname:pn([u,i.encodeLocation?i.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:pn([u,i.encodeLocation?i.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),l,n);return t&&x?b.createElement(Sr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},x):x}function nC(){let e=fC(),t=qE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},r=null;return console.error("Error handled by React Router default ErrorBoundary:",e),r=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:a},"ErrorBoundary")," or"," ",b.createElement("code",{style:a},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:l},n):null,r)}var iC=b.createElement(nC,null),Av=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=KE(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Pt.Provider,{value:this.props.routeContext},b.createElement(dd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(lC,{error:e},t):t}};Av.contextType=Ev;var Su=new WeakMap;function lC({children:e,error:t}){let{basename:n}=b.useContext(Rt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=ZE(t.digest);if(i){let l=Su.get(t);if(l)throw l;let a=bv(i.location,n);if(vv&&!Su.get(t))if(a.isExternal||i.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:i.replace}));throw Su.set(t,r),r}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function aC({routeContext:e,match:t,children:n}){let i=b.useContext(ea);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Pt.Provider,{value:e},n)}function rC(e,t=[],n){let i=n==null?void 0:n.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let l=e,a=i==null?void 0:i.errors;if(a!=null){let d=l.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);Ne(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),l=l.slice(0,Math.min(l.length,d+1))}let r=!1,s=-1;if(n&&i){r=i.renderFallback;for(let d=0;d<l.length;d++){let f=l[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(s=d),f.route.id){let{loaderData:h,errors:p}=i,y=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||y){n.isStatic&&(r=!0),s>=0?l=l.slice(0,s+1):l=[l[0]];break}}}}let u=n==null?void 0:n.onError,c=i&&u?(d,f)=>{var h,p;u(d,{location:i.location,params:((p=(h=i.matches)==null?void 0:h[0])==null?void 0:p.params)??{},unstable_pattern:FE(i.matches),errorInfo:f})}:void 0;return l.reduceRight((d,f,h)=>{let p,y=!1,x=null,E=null;i&&(p=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||iC,r&&(s<0&&h===0?(jv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,E=null):s===h&&(y=!0,E=f.route.hydrateFallbackElement||null)));let g=t.concat(l.slice(0,h+1)),m=()=>{let v;return p?v=x:y?v=E:f.route.Component?v=b.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,b.createElement(aC,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:i!=null},children:v})};return i&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?b.createElement(Av,{location:i.location,revalidation:i.revalidation,component:x,error:p,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):m()},null)}function hd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function sC(e){let t=b.useContext(ea);return Ne(t,hd(e)),t}function oC(e){let t=b.useContext(To);return Ne(t,hd(e)),t}function uC(e){let t=b.useContext(Pt);return Ne(t,hd(e)),t}function pd(e){let t=uC(e),n=t.matches[t.matches.length-1];return Ne(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function cC(){return pd("useRouteId")}function fC(){var i;let e=b.useContext(dd),t=oC("useRouteError"),n=pd("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function dC(){let{router:e}=sC("useNavigate"),t=pd("useNavigate"),n=b.useRef(!1);return Nv(()=>{n.current=!0}),b.useCallback(async(l,a={})=>{Yt(n.current,kv),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...a}))},[e,t])}var Rp={};function jv(e,t,n){!t&&!Rp[e]&&(Rp[e]=!0,Yt(!1,n))}b.memo(hC);function hC({routes:e,future:t,state:n,isStatic:i,onError:l}){return wv(e,void 0,{state:n,isStatic:i,onError:l})}function pC({to:e,replace:t,state:n,relative:i}){Ne(ta(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=b.useContext(Rt);Yt(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=b.useContext(Pt),{pathname:r}=rt(),s=Je(),u=Co(e,fd(a),r,i==="path"),c=JSON.stringify(u);return b.useEffect(()=>{s(JSON.parse(c),{replace:t,state:n,relative:i})},[s,c,i,t,n]),null}function md(e){return eC(e.context)}function qe(e){Ne(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function mC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:l,static:a=!1,unstable_useTransitions:r}){Ne(!ta(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:s,navigator:l,static:a,unstable_useTransitions:r,future:{}}),[s,l,a,r]);typeof n=="string"&&(n=Wl(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default",unstable_mask:y}=n,x=b.useMemo(()=>{let E=Hn(c,s);return E==null?null:{location:{pathname:E,search:d,hash:f,state:h,key:p,unstable_mask:y},navigationType:i}},[s,c,d,f,h,p,i,y]);return Yt(x!=null,`<Router basename="${s}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:b.createElement(Rt.Provider,{value:u},b.createElement(Sr.Provider,{children:t,value:x}))}function gC({children:e,location:t}){return tC(Hc(e),t)}function Hc(e,t=[]){let n=[];return b.Children.forEach(e,(i,l)=>{if(!b.isValidElement(i))return;let a=[...t,l];if(i.type===b.Fragment){n.push.apply(n,Hc(i.props.children,a));return}Ne(i.type===qe,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ne(!i.props.index||!i.props.children,"An index route cannot have child routes.");let r={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(r.children=Hc(i.props.children,a)),n.push(r)}),n}var ms="get",gs="application/x-www-form-urlencoded";function ko(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function yC(e){return ko(e)&&e.tagName.toLowerCase()==="button"}function xC(e){return ko(e)&&e.tagName.toLowerCase()==="form"}function vC(e){return ko(e)&&e.tagName.toLowerCase()==="input"}function bC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function SC(e,t){return e.button===0&&(!t||t==="_self")&&!bC(e)}function qc(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map(l=>[n,l]):[[n,i]])},[]))}function EC(e,t){let n=qc(e);return t&&t.forEach((i,l)=>{n.has(l)||t.getAll(l).forEach(a=>{n.append(l,a)})}),n}var Yr=null;function CC(){if(Yr===null)try{new FormData(document.createElement("form"),0),Yr=!1}catch{Yr=!0}return Yr}var TC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Eu(e){return e!=null&&!TC.has(e)?(Yt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gs}"`),null):e}function kC(e,t){let n,i,l,a,r;if(xC(e)){let s=e.getAttribute("action");i=s?Hn(s,t):null,n=e.getAttribute("method")||ms,l=Eu(e.getAttribute("enctype"))||gs,a=new FormData(e)}else if(yC(e)||vC(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(i=u?Hn(u,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||ms,l=Eu(e.getAttribute("formenctype"))||Eu(s.getAttribute("enctype"))||gs,a=new FormData(s,e),!CC()){let{name:c,type:d,value:f}=e;if(d==="image"){let h=c?`${c}.`:"";a.append(`${h}x`,"0"),a.append(`${h}y`,"0")}else c&&a.append(c,f)}}else{if(ko(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ms,i=null,l=gs,r=e}return a&&l==="text/plain"&&(r=a,a=void 0),{action:i,method:n.toLowerCase(),encType:l,formData:a,body:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function _v(e,t,n,i){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${i}`:l.pathname=`${l.pathname}.${i}`:l.pathname==="/"?l.pathname=`_root.${i}`:t&&Hn(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${i}`,l}async function NC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function wC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function AC(e,t,n){let i=await Promise.all(e.map(async l=>{let a=t.routes[l.route.id];if(a){let r=await NC(a,n);return r.links?r.links():[]}return[]}));return OC(i.flat(1).filter(wC).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Op(e,t,n,i,l,a){let r=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,s=(u,c)=>{var d;return n[c].pathname!==u.pathname||((d=n[c].route.path)==null?void 0:d.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return a==="assets"?t.filter((u,c)=>r(u,c)||s(u,c)):a==="data"?t.filter((u,c)=>{var f;let d=i.routes[u.route.id];if(!d||!d.hasLoader)return!1;if(r(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let h=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function jC(e,t,{includeHydrateFallback:n}={}){return _C(e.map(i=>{let l=t.routes[i.route.id];if(!l)return[];let a=[l.module];return l.clientActionModule&&(a=a.concat(l.clientActionModule)),l.clientLoaderModule&&(a=a.concat(l.clientLoaderModule)),n&&l.hydrateFallbackModule&&(a=a.concat(l.hydrateFallbackModule)),l.imports&&(a=a.concat(l.imports)),a}).flat(1))}function _C(e){return[...new Set(e)]}function RC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function OC(e,t){let n=new Set;return new Set(t),e.reduce((i,l)=>{let a=JSON.stringify(RC(l));return n.has(a)||(n.add(a),i.push({key:a,link:l})),i},[])}function yd(){let e=b.useContext(ea);return gd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function DC(){let e=b.useContext(To);return gd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var xd=b.createContext(void 0);xd.displayName="FrameworkContext";function vd(){let e=b.useContext(xd);return gd(e,"You must render this element inside a <HydratedRouter> element"),e}function zC(e,t){let n=b.useContext(xd),[i,l]=b.useState(!1),[a,r]=b.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,h=b.useRef(null);b.useEffect(()=>{if(e==="render"&&r(!0),e==="viewport"){let x=g=>{g.forEach(m=>{r(m.isIntersecting)})},E=new IntersectionObserver(x,{threshold:.5});return h.current&&E.observe(h.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(i){let x=setTimeout(()=>{r(!0)},100);return()=>{clearTimeout(x)}}},[i]);let p=()=>{l(!0)},y=()=>{l(!1),r(!1)};return n?e!=="intent"?[a,h,{}]:[a,h,{onFocus:pa(s,p),onBlur:pa(u,y),onMouseEnter:pa(c,p),onMouseLeave:pa(d,y),onTouchStart:pa(f,p)}]:[!1,h,{}]}function pa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function LC({page:e,...t}){let n=VE(),{router:i}=yd(),l=b.useMemo(()=>gv(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?n?b.createElement(BC,{page:e,matches:l,...t}):b.createElement(UC,{page:e,matches:l,...t}):null}function MC(e){let{manifest:t,routeModules:n}=vd(),[i,l]=b.useState([]);return b.useEffect(()=>{let a=!1;return AC(e,t,n).then(r=>{a||l(r)}),()=>{a=!0}},[e,t,n]),i}function BC({page:e,matches:t,...n}){let i=rt(),{future:l}=vd(),{basename:a}=yd(),r=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let s=_v(e,a,l.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?u=!0:c.push(d.route.id);return u&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[a,l.unstable_trailingSlashAwareDataRequests,e,i,t]);return b.createElement(b.Fragment,null,r.map(s=>b.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...n})))}function UC({page:e,matches:t,...n}){let i=rt(),{future:l,manifest:a,routeModules:r}=vd(),{basename:s}=yd(),{loaderData:u,matches:c}=DC(),d=b.useMemo(()=>Op(e,t,c,a,i,"data"),[e,t,c,a,i]),f=b.useMemo(()=>Op(e,t,c,a,i,"assets"),[e,t,c,a,i]),h=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let x=new Set,E=!1;if(t.forEach(m=>{var C;let v=a.routes[m.route.id];!v||!v.hasLoader||(!d.some(A=>A.route.id===m.route.id)&&m.route.id in u&&((C=r[m.route.id])!=null&&C.shouldRevalidate)||v.hasClientLoader?E=!0:x.add(m.route.id))}),x.size===0)return[];let g=_v(e,s,l.unstable_trailingSlashAwareDataRequests,"data");return E&&x.size>0&&g.searchParams.set("_routes",t.filter(m=>x.has(m.route.id)).map(m=>m.route.id).join(",")),[g.pathname+g.search]},[s,l.unstable_trailingSlashAwareDataRequests,u,i,a,d,t,e,r]),p=b.useMemo(()=>jC(f,a),[f,a]),y=MC(f);return b.createElement(b.Fragment,null,h.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),p.map(x=>b.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),y.map(({key:x,link:E})=>b.createElement("link",{key:x,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function IC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var HC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{HC&&(window.__reactRouterVersion="7.14.0")}catch{}function qC({basename:e,children:t,unstable_useTransitions:n,window:i}){let l=b.useRef();l.current==null&&(l.current=yE({window:i,v5Compat:!0}));let a=l.current,[r,s]=b.useState({action:a.action,location:a.location}),u=b.useCallback(c=>{n===!1?s(c):b.startTransition(()=>s(c))},[n]);return b.useLayoutEffect(()=>a.listen(u),[a,u]),b.createElement(mC,{basename:e,children:t,location:r.location,navigationType:r.action,navigator:a,unstable_useTransitions:n})}var Rv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pi=b.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:l,reloadDocument:a,replace:r,unstable_mask:s,state:u,target:c,to:d,preventScrollReset:f,viewTransition:h,unstable_defaultShouldRevalidate:p,...y},x){let{basename:E,navigator:g,unstable_useTransitions:m}=b.useContext(Rt),v=typeof d=="string"&&Rv.test(d),C=bv(d,E);d=C.to;let A=$E(d,{relative:l}),N=rt(),_=null;if(s){let V=Co(s,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);E!=="/"&&(V.pathname=V.pathname==="/"?E:pn([E,V.pathname])),_=g.createHref(V)}let[U,D,T]=zC(i,y),M=VC(d,{replace:r,unstable_mask:s,state:u,target:c,preventScrollReset:f,relative:l,viewTransition:h,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m});function q(V){t&&t(V),V.defaultPrevented||M(V)}let P=!(C.isExternal||a),F=b.createElement("a",{...y,...T,href:(P?_:void 0)||C.absoluteURL||A,onClick:P?q:t,ref:IC(x,D),target:c,"data-discover":!v&&n==="render"?"true":void 0});return U&&!v?b.createElement(b.Fragment,null,F,b.createElement(LC,{page:A})):F});Pi.displayName="Link";var Fc=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:l=!1,style:a,to:r,viewTransition:s,children:u,...c},d){let f=Er(r,{relative:c.relative}),h=rt(),p=b.useContext(To),{navigator:y,basename:x}=b.useContext(Rt),E=p!=null&&KC(f)&&s===!0,g=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,m=h.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(m=m.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&x&&(v=Hn(v,x)||v);const C=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=m===g||!l&&m.startsWith(g)&&m.charAt(C)==="/",N=v!=null&&(v===g||!l&&v.startsWith(g)&&v.charAt(g.length)==="/"),_={isActive:A,isPending:N,isTransitioning:E},U=A?t:void 0,D;typeof i=="function"?D=i(_):D=[i,A?"active":null,N?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let T=typeof a=="function"?a(_):a;return b.createElement(Pi,{...c,"aria-current":U,className:D,ref:d,style:T,to:r,viewTransition:s},typeof u=="function"?u(_):u)});Fc.displayName="NavLink";var FC=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:l,state:a,method:r=ms,action:s,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:h,...p},y)=>{let{unstable_useTransitions:x}=b.useContext(Rt),E=QC(),g=ZC(s,{relative:c}),m=r.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&Rv.test(s),C=A=>{if(u&&u(A),A.defaultPrevented)return;A.preventDefault();let N=A.nativeEvent.submitter,_=(N==null?void 0:N.getAttribute("formmethod"))||r,U=()=>E(N||A.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:l,state:a,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:h});x&&n!==!1?b.startTransition(()=>U()):U()};return b.createElement("form",{ref:y,method:m,action:g,onSubmit:i?u:C,...p,"data-discover":!v&&e==="render"?"true":void 0})});FC.displayName="Form";function GC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ov(e){let t=b.useContext(ea);return Ne(t,GC(e)),t}function VC(e,{target:t,replace:n,unstable_mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=Je(),f=rt(),h=Er(e,{relative:r});return b.useCallback(p=>{if(SC(p,t)){p.preventDefault();let y=n!==void 0?n:lr(f)===lr(h),x=()=>d(e,{replace:y,unstable_mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,unstable_defaultShouldRevalidate:u});c?b.startTransition(()=>x()):x()}},[f,d,h,n,i,l,t,e,a,r,s,u,c])}function YC(e){Yt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=b.useRef(qc(e)),n=b.useRef(!1),i=rt(),l=b.useMemo(()=>EC(i.search,n.current?null:t.current),[i.search]),a=Je(),r=b.useCallback((s,u)=>{const c=qc(typeof s=="function"?s(new URLSearchParams(l)):s);n.current=!0,a("?"+c,u)},[a,l]);return[l,r]}var PC=0,XC=()=>`__${String(++PC)}__`;function QC(){let{router:e}=Ov("useSubmit"),{basename:t}=b.useContext(Rt),n=cC(),i=e.fetch,l=e.navigate;return b.useCallback(async(a,r={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=kC(a,t);if(r.navigate===!1){let h=r.fetcherKey||XC();await i(h,n,r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:d,body:f,formMethod:r.method||u,formEncType:r.encType||c,flushSync:r.flushSync})}else await l(r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:d,body:f,formMethod:r.method||u,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[i,l,t,n])}function ZC(e,{relative:t}={}){let{basename:n}=b.useContext(Rt),i=b.useContext(Pt);Ne(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),a={...Er(e||".",{relative:t})},r=rt();if(e==null){a.search=r.search;let s=new URLSearchParams(a.search),u=s.getAll("index");if(u.some(d=>d==="")){s.delete("index"),u.filter(f=>f).forEach(f=>s.append("index",f));let d=s.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&l.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:pn([n,a.pathname])),lr(a)}function KC(e,{relative:t}={}){let n=b.useContext(Cv);Ne(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Ov("useViewTransitionState"),l=Er(e,{relative:t});if(!n.isTransitioning)return!1;let a=Hn(n.currentLocation.pathname,i)||n.currentLocation.pathname,r=Hn(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Js(l.pathname,r)!=null||Js(l.pathname,a)!=null}const $C="/beta";class Dp extends Error{constructor(n,i,l){super(l);ll(this,"url");ll(this,"status");ll(this,"statusText");ll(this,"body");ll(this,"request");this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=n}}class JC extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var on,un,$t,ti,Li,Ol,ni;class WC{constructor(t){Yn(this,on);Yn(this,un);Yn(this,$t);Yn(this,ti);Yn(this,Li);Yn(this,Ol);Yn(this,ni);Qt(this,on,!1),Qt(this,un,!1),Qt(this,$t,!1),Qt(this,ti,[]),Qt(this,Li,new Promise((n,i)=>{Qt(this,Ol,n),Qt(this,ni,i);const l=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||(Qt(this,on,!0),fe(this,Ol)&&fe(this,Ol).call(this,s))},a=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||(Qt(this,un,!0),fe(this,ni)&&fe(this,ni).call(this,s))},r=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||fe(this,ti).push(s)};return Object.defineProperty(r,"isResolved",{get:()=>fe(this,on)}),Object.defineProperty(r,"isRejected",{get:()=>fe(this,un)}),Object.defineProperty(r,"isCancelled",{get:()=>fe(this,$t)}),t(l,a,r)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(t,n){return fe(this,Li).then(t,n)}catch(t){return fe(this,Li).catch(t)}finally(t){return fe(this,Li).finally(t)}cancel(){if(!(fe(this,on)||fe(this,un)||fe(this,$t))){if(Qt(this,$t,!0),fe(this,ti).length)try{for(const t of fe(this,ti))t()}catch(t){console.warn("Cancellation threw an error",t);return}fe(this,ti).length=0,fe(this,ni)&&fe(this,ni).call(this,new JC("Request aborted"))}}get isCancelled(){return fe(this,$t)}}on=new WeakMap,un=new WeakMap,$t=new WeakMap,ti=new WeakMap,Li=new WeakMap,Ol=new WeakMap,ni=new WeakMap;const B={BASE:"",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var zp;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatusBeforeClaim||(e.taskStatusBeforeClaim={}))})(zp||(zp={}));var Lp;(function(e){(function(t){t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(Lp||(Lp={}));var Mp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Mp||(Mp={}));var Bp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Bp||(Bp={}));var Up;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Up||(Up={}));var Ip;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Ip||(Ip={}));var rn;(function(e){(function(t){t.NOT_STARTED="not_started",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.MCP_AUTH_FLOW_STARTED="mcp_auth_flow_started",t.MCP_AUTH_FLOW_COMPLETED="mcp_auth_flow_completed",t.CONNECTIONS_FLOW_STARTED="connections_flow_started",t.CONNECTIONS_FLOW_COMPLETED="connections_flow_completed",t.AUTHORIZATION_CODE_ISSUED="authorization_code_issued",t.AUTHORIZATION_CODE_EXCHANGED="authorization_code_exchanged"})(e.status||(e.status={}))})(rn||(rn={}));var Hp;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Hp||(Hp={}));var qp;(function(e){(function(t){t.OPENAI="openai",t.ADK="adk"})(e.type||(e.type={}))})(qp||(qp={}));var Fp;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Fp||(Fp={}));var Kn;(function(e){(function(t){t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Kn||(Kn={}));var Gp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Gp||(Gp={}));var Vp;(function(e){(function(t){t.OPENAI="openai",t.ADK="adk"})(e.type||(e.type={}))})(Vp||(Vp={}));var Gc;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Gc||(Gc={}));var Yp;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Yp||(Yp={}));var Pp;(function(e){(function(t){t.TASK="task",t.CONTEXT_BLOCK="context_block",t.AGENT="agent",t.PROJECT="project",t.TAG="tag",t.TOOL="tool"})(e.type||(e.type={}))})(Pp||(Pp={}));var Xp;(function(e){(function(t){t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(Xp||(Xp={}));var Qp;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Qp||(Qp={}));var Ia;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Ia||(Ia={}));var Zp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Zp||(Zp={}));var Kp;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Kp||(Kp={}));var $p;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})($p||($p={}));var Jp;(function(e){(function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"})(e.status||(e.status={})),(function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.INTERRUPTED="INTERRUPTED",t.UNKNOWN="UNKNOWN"})(e.errorCode||(e.errorCode={}))})(Jp||(Jp={}));var Wp;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),(function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"})(e.status||(e.status={})),(function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.INTERRUPTED="INTERRUPTED",t.UNKNOWN="UNKNOWN"})(e.errorCode||(e.errorCode={}))})(Wp||(Wp={}));var em;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={}))})(em||(em={}));var Vc;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Vc||(Vc={}));var tm;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(tm||(tm={}));var nm;(function(e){(function(t){t.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(e.grant_type||(e.grant_type={})),(function(t){t.URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN="urn:ietf:params:oauth:token-type:access_token"})(e.subject_token_type||(e.subject_token_type={}))})(nm||(nm={}));var im;(function(e){(function(t){t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(im||(im={}));var lm;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(lm||(lm={}));var am;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(am||(am={}));var rm;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={})),(function(t){t.FULL_PAGE="FULL_PAGE",t.BANNER="BANNER",t.OFF="OFF"})(e.onboardingDisplayMode||(e.onboardingDisplayMode={}))})(rm||(rm={}));var sm;(function(e){(function(t){t.FULL_PAGE="FULL_PAGE",t.BANNER="BANNER",t.OFF="OFF"})(e.onboardingDisplayMode||(e.onboardingDisplayMode={}))})(sm||(sm={}));const bd=e=>e!=null,Cr=e=>typeof e=="string",Cu=e=>Cr(e)&&e!=="",Sd=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),Dv=e=>e instanceof FormData,eT=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},tT=e=>{const t=[],n=(l,a)=>{t.push(`${encodeURIComponent(l)}=${encodeURIComponent(String(a))}`)},i=(l,a)=>{bd(a)&&(Array.isArray(a)?a.forEach(r=>{i(l,r)}):typeof a=="object"?Object.entries(a).forEach(([r,s])=>{i(`${l}[${r}]`,s)}):n(l,a))};return Object.entries(e).forEach(([l,a])=>{i(l,a)}),t.length>0?`?${t.join("&")}`:""},nT=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,i=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(a,r)=>{var s;return(s=t.path)!=null&&s.hasOwnProperty(r)?n(String(t.path[r])):a}),l=`${e.BASE}${i}`;return t.query?`${l}${tT(t.query)}`:l},iT=e=>{if(e.formData){const t=new FormData,n=(i,l)=>{Cr(l)||Sd(l)?t.append(i,l):t.append(i,JSON.stringify(l))};return Object.entries(e.formData).filter(([i,l])=>bd(l)).forEach(([i,l])=>{Array.isArray(l)?l.forEach(a=>n(i,a)):n(i,l)}),t}},Pr=async(e,t)=>typeof t=="function"?t(e):t,lT=async(e,t)=>{const[n,i,l,a]=await Promise.all([Pr(t,e.TOKEN),Pr(t,e.USERNAME),Pr(t,e.PASSWORD),Pr(t,e.HEADERS)]),r=Object.entries({Accept:"application/json",...a,...t.headers}).filter(([s,u])=>bd(u)).reduce((s,[u,c])=>({...s,[u]:String(c)}),{});if(Cu(n)&&(r.Authorization=`Bearer ${n}`),Cu(i)&&Cu(l)){const s=eT(`${i}:${l}`);r.Authorization=`Basic ${s}`}return t.body!==void 0&&(t.mediaType?r["Content-Type"]=t.mediaType:Sd(t.body)?r["Content-Type"]=t.body.type||"application/octet-stream":Cr(t.body)?r["Content-Type"]="text/plain":Dv(t.body)||(r["Content-Type"]="application/json")),new Headers(r)},aT=e=>{var t;if(e.body!==void 0)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Cr(e.body)||Sd(e.body)||Dv(e.body)?e.body:JSON.stringify(e.body)},rT=async(e,t,n,i,l,a,r)=>{const s=new AbortController,u={headers:a,body:i??l,method:t.method,signal:s.signal};return e.WITH_CREDENTIALS&&(u.credentials=e.CREDENTIALS),r(()=>s.abort()),await fetch(n,u)},sT=(e,t)=>{if(t){const n=e.headers.get(t);if(Cr(n))return n}},oT=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some(l=>t.toLowerCase().startsWith(l))?await e.json():await e.text()}catch(t){console.error(t)}},uT=(e,t)=>{const i={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(i)throw new Dp(e,t,i);if(!t.ok){const l=t.status??"unknown",a=t.statusText??"unknown",r=(()=>{try{return JSON.stringify(t.body,null,2)}catch{return}})();throw new Dp(e,t,`Generic Error: status: ${l}; status text: ${a}; body: ${r}`)}},I=(e,t)=>new WC(async(n,i,l)=>{try{const a=nT(e,t),r=iT(t),s=aT(t),u=await lT(e,t);if(!l.isCancelled){const c=await rT(e,t,a,s,r,u,l),d=await oT(c),f=sT(c,t.responseHeader),h={url:a,ok:c.ok,status:c.status,statusText:c.statusText,body:f??d};uT(t,h),n(h.body)}}catch(a){i(a)}});class Tu{static agentsControllerCreateAgent(t,n=B){return I(n,{method:"POST",url:"/api/v1/agents",body:t,mediaType:"application/json"})}static agentsControllerListAgents(t,n=1,i=20,l=B){return I(l,{method:"GET",url:"/api/v1/agents",query:{isActive:t,page:n,limit:i}})}static agentsControllerListAgentTemplates(t=B){return I(t,{method:"GET",url:"/api/v1/agents/templates"})}static agentsControllerGetAgentBySlug(t,n=B){return I(n,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:t}})}static agentsControllerPatchAgent(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:t},body:n,mediaType:"application/json"})}static agentsControllerDeleteAgent(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:t}})}static agentToolPermissionsControllerListAgentToolPermissions(t,n=B){return I(n,{method:"GET",url:"/api/v1/agents/{actorId}/tool-permissions",path:{actorId:t}})}static agentToolPermissionsControllerUpsertAgentToolPermission(t,n,i,l=B){return I(l,{method:"PUT",url:"/api/v1/agents/{actorId}/tool-permissions/{serverId}",path:{actorId:t,serverId:n},body:i,mediaType:"application/json"})}static agentToolPermissionsControllerDeleteAgentToolPermission(t,n,i=B){return I(i,{method:"DELETE",url:"/api/v1/agents/{actorId}/tool-permissions/{serverId}",path:{actorId:t,serverId:n}})}}class cT{static authJourneysControllerGetAuthJourneys(t,n=B){return I(n,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}}class fT{static clientRegistrationControllerRegisterClient(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)",409:"A client with this name is already registered"}})}static clientRegistrationControllerGetClient(t,n=B){return I(n,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:t},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(t=B){return I(t,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(t,n,i,l,a,r,s,u,c,d,f=B){return I(f,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:s,version:u},query:{response_type:t,scope:c,client_id:n,code_challenge:i,code_challenge_method:l,redirect_uri:a,state:r,resource:d},errors:{302:"Redirects to consent screen with authorization request ID",400:"Invalid authorization request parameters",404:"MCP server or client not found"}})}static authorizationControllerAuthorizeConsent(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{302:"Redirects to client redirect_uri with authorization code or error",400:"Invalid consent decision or flow state",401:"Authorization flow has already been used",404:"Authorization flow not found"}})}static authorizationControllerGetConsentMetadata(t,n=B){return I(n,{method:"GET",url:"/api/v1/auth/consent/{flowId}",path:{flowId:t},errors:{401:"Authentication required to access consent metadata",404:"Authorization flow not found"}})}static authorizationControllerToken(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid token exchange request parameters",401:"Invalid or expired MCP JWT",403:"Insufficient scope - requested scope not entitled",404:"Connection not found"}})}static authorizationControllerCallback(t,n,i,l,a,r=B){return I(r,{method:"GET",url:"/api/v1/auth/callback",query:{code:t,state:n,error:i,scope:l,error_description:a},errors:{302:"Redirects to next step in the authorization flow",400:"Invalid callback parameters or state",404:"Connection flow not found for provided state"}})}static authorizationControllerGetScopes(t=B){return I(t,{method:"GET",url:"/api/v1/auth/scopes"})}}class Kt{static contextControllerCreateBlock(t,n=B){return I(n,{method:"POST",url:"/api/v1/context/blocks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(t,n=B){return I(n,{method:"GET",url:"/api/v1/context/blocks",query:{tag:t}})}static contextControllerSearchBlocks(t,n=10,i=.3,l=B){return I(l,{method:"GET",url:"/api/v1/context/blocks/search/query",query:{query:t,limit:n,threshold:i}})}static contextControllerGetBlockTree(t=B){return I(t,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerExportBlocks(t=B){return I(t,{method:"GET",url:"/api/v1/context/blocks/export"})}static contextControllerImportBlocks(t,n=B){return I(n,{method:"POST",url:"/api/v1/context/blocks/import",formData:t,mediaType:"multipart/form-data",errors:{400:"No archive file uploaded or invalid file type"}})}static contextControllerGetBlock(t,n=B){return I(n,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerUpdateBlock(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerAppendToBlock(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerReorderBlock(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerMoveBlock(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(t,n,i=B){return I(i,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:t,tagId:n}})}static contextControllerHandleMcpGet(t=B){return I(t,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(t=B){return I(t,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(t=B){return I(t,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(t=B){return I(t,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(t=B){return I(t,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(t=B){return I(t,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(t=B){return I(t,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class zv{static metaControllerCreateTag(t,n=B){return I(n,{method:"POST",url:"/api/v1/meta/tags",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(t=B){return I(t,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(t=B){return I(t,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:t},errors:{404:"Tag not found"}})}static metaControllerGetVersion(t=B){return I(t,{method:"GET",url:"/api/v1/meta/version"})}}class en{static tasksControllerCreateTask(t,n=B){return I(n,{method:"POST",url:"/api/v1/tasks/tasks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(t,n,i,l=1,a=20,r=B){return I(r,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:t,sessionId:n,tag:i,page:l,limit:a}})}static tasksControllerUpdateTask(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerGetTask(t,n=B){return I(n,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerAssignTask(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(t,n=B){return I(n,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(t,n=10,i=.3,l=B){return I(l,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n,threshold:i}})}static tasksControllerAddComment(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAddArtefact(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/artefacts",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(t,n,i=B){return I(i,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:t,tagId:n},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(t,n,i,l=B){return I(l,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:t,inputRequestId:n},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(t=B){return I(t,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(t=B){return I(t,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(t=B){return I(t,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(t=B){return I(t,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(t=B){return I(t,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(t=B){return I(t,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(t=B){return I(t,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}class ct{static mcpRegistryControllerCreateServer(t,n=B){return I(n,{method:"POST",url:"/api/v1/mcp/servers",body:t,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(t,n,i=B){return I(i,{method:"GET",url:"/api/v1/mcp/servers",query:{page:t,limit:n}})}static mcpRegistryControllerGetServer(t,n=B){return I(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(t,n=B){return I(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(t,n,i=B){return I(i,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(t,n,i=B){return I(i,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(t,n=B){return I(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(t,n=B){return I(n,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(t,n,i=B){return I(i,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},body:n,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(t,n,i=B){return I(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:t},body:n,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(t,n,i=B){return I(i,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(t,n=B){return I(n,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:t},errors:{404:"Mapping not found"}})}}class ma{static webAuthControllerLogin(t,n=B){return I(n,{method:"POST",url:"/api/v1/auth/login",body:t,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerRefresh(t=B){return I(t,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(t=B){return I(t,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(t=B){return I(t,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(t,n=B){return I(n,{method:"POST",url:"/api/v1/auth/change-password",body:t,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}static webAuthControllerGetOnboardingStatus(t=B){return I(t,{method:"GET",url:"/api/v1/auth/onboarding-status"})}static webAuthControllerOnboard(t,n=B){return I(n,{method:"POST",url:"/api/v1/auth/onboard",body:t,mediaType:"application/json",errors:{409:"Admin users already exist, onboarding not allowed"}})}static webAuthControllerMarkWalkthroughSeen(t=B){return I(t,{method:"POST",url:"/api/v1/auth/mark-walkthrough-seen",errors:{401:"Not authenticated"}})}}const Lv=()=>"",Mv=e=>e,el=Lv();B.BASE=el;B.CREDENTIALS="include";B.BASE=el;const Bv=b.createContext(void 0);function dT({children:e}){const[t,n]=b.useState(null),[i,l]=b.useState(!0);b.useEffect(()=>{ma.webAuthControllerMe().then(c=>{console.log("found me"),n(c)}).catch(()=>{console.log("not me"),n(null)}).finally(()=>{l(!1)})},[]),b.useEffect(()=>{if(!t)return;const c=setInterval(async()=>{try{const d=await ma.webAuthControllerRefresh();n(d.user)}catch(d){console.error("Token refresh failed:",d),n(null)}},480*1e3);return()=>clearInterval(c)},[t]);const u={user:t,isAuthenticated:!!t,isLoading:i,login:async(c,d)=>{const f=await ma.webAuthControllerLogin({email:c,password:d});n(f.user)},logout:async()=>{try{await ma.webAuthControllerLogout()}finally{n(null)}},refreshAuth:async()=>{const c=await ma.webAuthControllerRefresh();n(c.user)}};return o.jsx(Bv.Provider,{value:u,children:e})}function Ed(){const e=b.useContext(Bv);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function hT({children:e}){const{isAuthenticated:t,isLoading:n}=Ed(),i=rt();return n?o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:o.jsx("div",{style:{color:"white",fontSize:"18px",fontWeight:"600"},children:"Loading..."})}):t?o.jsx(o.Fragment,{children:e}):o.jsx(pC,{to:"/login",state:{from:i},replace:!0})}function pT(){var p,y;const[e,t]=b.useState(""),[n,i]=b.useState(""),[l,a]=b.useState(""),[r,s]=b.useState(!1),{login:u}=Ed(),c=Je(),f=((y=(p=rt().state)==null?void 0:p.from)==null?void 0:y.pathname)||"/",h=async x=>{x.preventDefault(),s(!0),a("");try{await u(e,n),c(f,{replace:!0})}catch{a("Invalid email or password")}finally{s(!1)}};return o.jsx("div",{className:"login-page",children:o.jsx("div",{className:"login-container",children:o.jsxs("div",{className:"login-card",children:[o.jsxs("div",{className:"login-header",children:[o.jsx("h1",{className:"login-title",children:"Welcome Back"}),o.jsx("p",{className:"login-subtitle",children:"Sign in to your account"})]}),o.jsxs("form",{onSubmit:h,className:"login-form",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"email",className:"form-label",children:"Email"}),o.jsx("input",{id:"email",type:"email",value:e,onChange:x=>t(x.target.value),className:"form-input",placeholder:"you@example.com",required:!0,disabled:r,autoComplete:"email"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"password",className:"form-label",children:"Password"}),o.jsx("input",{id:"password",type:"password",value:n,onChange:x=>i(x.target.value),className:"form-input",placeholder:"••••••••",required:!0,disabled:r,autoComplete:"current-password"})]}),l&&o.jsx("div",{className:"login-error",children:l}),o.jsx("button",{type:"submit",className:"login-button",disabled:r,children:r?"Signing in...":"Sign In"})]})]})})})}function mT({collapsed:e}){const t=[{name:"Home",path:"/",icon:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})},{name:"Agents",path:"/agents",icon:"🤖"},{name:"Tasks",path:"/tasks",icon:"📋"},{name:"Context",path:"/context",icon:"📚"},{name:"Tools",path:"/mcp-registry",icon:"🔧"}];return o.jsxs("nav",{className:"sidebar-nav-container",children:[o.jsx("div",{className:"sidebar-nav-main",children:t.map(n=>o.jsxs(Fc,{to:n.path,className:({isActive:i})=>`sidebar-nav-link ${i?"active":""} ${e?"collapsed":""}`,end:n.path==="/",children:[o.jsx("div",{className:"sidebar-nav-icon",children:typeof n.icon=="string"?o.jsx("span",{children:n.icon}):n.icon}),o.jsx("span",{className:"nav-link-text",children:n.name})]},n.path))}),o.jsx("div",{className:"sidebar-nav-bottom",children:o.jsxs(Fc,{to:"/logout",className:({isActive:n})=>`sidebar-nav-link ${n?"active":""} ${e?"collapsed":""}`,end:!0,children:[o.jsx("div",{className:"sidebar-nav-icon",children:o.jsx("span",{children:"🔓"})}),o.jsx("span",{className:"nav-link-text",children:"Logout"})]},"213")})]})}const gT=768;function ar(){return window.innerWidth<gT}function yT(){const[e,t]=b.useState(()=>ar());return b.useEffect(()=>{const n=()=>{t(ar())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const om="app-nav-collapsed";function xT(){const[e,t]=b.useState(()=>{const i=localStorage.getItem(om);return i!==null?i==="true":ar()});b.useEffect(()=>{localStorage.setItem(om,String(e))},[e]);const n=()=>{t(!e)};return o.jsxs("div",{className:"root-layout",children:[o.jsxs("aside",{className:`sidebar-app-nav ${e?"collapsed":""}`,children:[o.jsx("nav",{className:"sidebar-content",children:o.jsx(mT,{collapsed:e})}),o.jsx("button",{className:"sidebar-toggle",onClick:n,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:e?"→":"←"})]}),o.jsx("div",{className:"root-layout-main",children:o.jsx(md,{})})]})}function tl(e){const t=b.useRef(null);b.useEffect(()=>(t.current=document.title,document.title=e,()=>{t.current!==null&&(document.title=t.current)}),[e])}function vT(){tl("taico — Home");const e=[{name:"Tasks",description:"Manage and track your tasks across different stages with our Kanban board.",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",description:"Create, edit, and organize your knowledge base with our wiki platform.",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",description:"Manage Model Context Protocol servers, scopes, and OAuth connections.",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"}];return o.jsx("div",{className:"home-page",children:o.jsxs("div",{className:"home-container",children:[o.jsxs("header",{className:"home-header",children:[o.jsx("h1",{className:"home-title",children:"taico"}),o.jsx("p",{className:"home-subtitle",children:"Your all-in-one platform for task management, knowledge organization, and protocol integration"})]}),o.jsx("div",{className:"apps-grid",children:e.map(t=>o.jsxs(Pi,{to:t.path,className:"app-card",style:{"--app-color":t.color},children:[o.jsx("div",{className:"app-icon",children:t.icon}),o.jsx("h2",{className:"app-name",children:t.name}),o.jsx("p",{className:"app-description",children:t.description}),o.jsx("div",{className:"app-arrow",children:"→"})]},t.path))}),o.jsx("footer",{className:"home-footer",children:o.jsx("p",{children:"Built with React + TypeScript + Vite"})})]})})}const Uv=({tag:e,onRemove:t,small:n=!1})=>{const i=e.color||"#6B7280";return o.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:i,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&o.jsx("button",{onClick:l=>{l.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function bT({task:e,onClick:t}){var l,a;const n=r=>{const s=new Date(r);return(new Date().getTime()-s.getTime())/(1e3*60*60)<24?s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):s.toLocaleDateString("en-US",{month:"short",day:"numeric"})},i=((l=e.comments)==null?void 0:l.length)??0;return o.jsxs("div",{className:"task-card",onClick:t,children:[o.jsx("h3",{className:"task-card-title",children:e.name}),o.jsx("p",{className:"task-card-description",children:e.description}),e.tags&&e.tags.length>0&&o.jsx("div",{style:{marginTop:"8px",marginBottom:"8px"},children:e.tags.map(r=>o.jsx(Uv,{tag:r,small:!0},r.name))}),o.jsx("div",{className:"task-card-divider"}),o.jsxs("div",{className:"task-card-footer",children:[o.jsxs("div",{className:"task-card-assignee",children:[e.assignee?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"assignee-emoji",children:"👤"}),o.jsx("span",{className:"assignee-name",children:((a=e.assigneeActor)==null?void 0:a.displayName)||"unassigned"})]}):o.jsx("span",{className:"unassigned-text",children:"Unassigned"}),i>0?o.jsxs("span",{className:"comment-count","aria-label":`${i} comments`,children:["💬 ",i]}):null]}),o.jsx("div",{className:"task-card-date",children:n(e.updatedAt)})]})]})}B.BASE=el;function Iv(){const[e,t]=b.useState([]),n=b.useCallback((l,a="info")=>{const r=Date.now();t(s=>[...s,{id:r,message:l,type:a}])},[]),i=b.useCallback(l=>{t(a=>a.filter(r=>r.id!==l))},[]);return{toasts:e,showToast:n,removeToast:i}}function Hv({message:e,type:t="info",onClose:n,duration:i=3e3}){return b.useEffect(()=>{const l=setTimeout(n,i);return()=>clearTimeout(l)},[n,i]),o.jsxs("div",{className:`toast toast-${t}`,children:[o.jsx("span",{children:e}),o.jsx("button",{onClick:n,className:"toast-close","aria-label":"Close",children:"×"})]})}const Cd=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[i,l]=b.useState(""),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(-1),[f,h]=b.useState([]),p=b.useRef(null),y=b.useRef(null);b.useEffect(()=>{(async()=>{try{const v=await zv.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),b.useEffect(()=>{const v=setTimeout(()=>{if(i.trim().length>0){const C=i.trim().toLowerCase(),A=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(A),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var C;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&i.trim()||m.key==="Enter"&&i.trim()?(m.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):m.key==="ArrowDown"?(m.preventDefault(),d(v=>v<a.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),d(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),d(-1)):m.key==="Backspace"&&!i&&e.length>0&&t(e.slice(0,-1))};return o.jsxs("div",{ref:y,style:{position:"relative"},children:[o.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=f.find(A=>A.name===m),C=(v==null?void 0:v.color)||"#3B82F6";return o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:C,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,o.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),E(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:m=>l(m.target.value),onKeyDown:g,onFocus:()=>i&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),s&&a.length>0&&o.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:a.map((m,v)=>o.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>d(v),children:[o.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),s&&i&&a.length===0&&o.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',i,'"']})]})};function ST({key:e,defaultValue:t,debounceMs:n=500}){const[i,l]=b.useState(()=>{try{const s=localStorage.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Error loading draft from localStorage:",s)}return t}),a=b.useRef(void 0);return b.useEffect(()=>(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{try{localStorage.setItem(e,JSON.stringify(i))}catch(s){console.error("Error saving draft to localStorage:",s)}},n),()=>{a.current&&clearTimeout(a.current)}),[i,e,n]),[i,l,()=>{try{localStorage.removeItem(e),l(t)}catch(s){console.error("Error clearing draft from localStorage:",s)}}]}const ET={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function CT({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=Iv(),[l,a,r]=ST({key:"create-task-draft",defaultValue:ET}),[s,u]=b.useState(!1),{name:c,description:d,assignee:f,sessionId:h,tagNames:p,dependsOnIds:y}=l,x=(g,m)=>{a({...l,[g]:m})};b.useEffect(()=>{const g=m=>{m.key==="Escape"&&e()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e]);const E=async g=>{var m;g.preventDefault(),u(!0);try{await en.tasksControllerCreateTask({name:c,description:d,...f&&{assignee:f},...h&&{sessionId:h},...p.length>0&&{tagNames:p},...y.length>0&&{dependsOnIds:y}}),r(),e()}catch(v){const C=((m=v==null?void 0:v.body)==null?void 0:m.detail)||(v==null?void 0:v.message)||"Failed to create task";n(`Error: ${C}`,"error"),console.error(v)}finally{u(!1)}};return o.jsx("div",{className:"modal-overlay",onClick:e,children:o.jsxs("div",{className:"modal-content",onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h2",{children:"Create New Task"}),o.jsx("button",{onClick:e,className:"btn-close",children:"×"})]}),o.jsxs("form",{onSubmit:E,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Title *"}),o.jsx("input",{id:"name",type:"text",value:c,onChange:g=>x("name",g.target.value),required:!0,placeholder:"Enter task name"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description *"}),o.jsx("textarea",{id:"description",value:d,onChange:g=>x("description",g.target.value),required:!0,placeholder:"Enter task description",rows:4})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"assignee",children:"Assigned to"}),o.jsx("input",{id:"assignee",type:"text",value:f,onChange:g=>x("assignee",g.target.value),placeholder:"Agent name or assignee"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"sessionId",children:"Session ID"}),o.jsx("input",{id:"sessionId",type:"text",value:h,onChange:g=>x("sessionId",g.target.value),placeholder:"Agent session ID"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"tags",children:"Tags"}),o.jsx(Cd,{value:p,onChange:g=>x("tagNames",g),placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"dependsOn",children:"Depends On (Task IDs)"}),o.jsx("input",{id:"dependsOn",type:"text",value:y.join(", "),onChange:g=>x("dependsOnIds",g.target.value.split(",").map(m=>m.trim()).filter(m=>m)),placeholder:"Enter task IDs separated by commas"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",disabled:s,children:s?"Creating...":"Create Task"})]})]}),t.map(g=>o.jsx(Hv,{message:g.message,type:g.type,onClose:()=>i(g.id)},g.id))]})})}const re=Vc.status;function qv({task:e,onClose:t,onUpdate:n}){var D,T,M,q;const[i,l]=b.useState(e.description),[a,r]=b.useState((D=e.assigneeActor)==null?void 0:D.id),[s,u]=b.useState(e.sessionId||""),[c,d]=b.useState(((T=e.tags)==null?void 0:T.map(P=>P.name))||[]),[f,h]=b.useState(""),[p,y]=b.useState(""),[x,E]=b.useState(!1),[g,m]=b.useState("");b.useEffect(()=>{const P=F=>{F.key==="Escape"&&t()};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[t]);const v=async()=>{var P;if(i!==e.description)try{const F=await en.tasksControllerUpdateTask(e.id,{description:i});n(F),m("")}catch(F){console.error("Failed to update task:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to update description";m(V)}},C=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},A=async()=>{var P;if(f.trim())try{await en.tasksControllerAddComment(e.id,{content:f});const F=await en.tasksControllerGetTask(e.id);n(F),h(""),m("")}catch(F){console.error("Failed to add comment:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to add comment";m(V)}},N=async P=>{var F;try{const V={status:P};P===re.DONE&&p.trim()&&(V.comment=p);const j=await en.tasksControllerChangeStatus(e.id,V);n(j),y(""),m("")}catch(V){console.error("Failed to change status:",V);const j=((F=V==null?void 0:V.body)==null?void 0:F.detail)||(V==null?void 0:V.message)||"Failed to change status";m(j)}},_=async()=>{var P;try{await en.tasksControllerDeleteTask(e.id),t()}catch(F){console.error("Failed to delete task:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to delete task";m(V)}},U=async P=>{var F,V;d(P);try{const j=await en.tasksControllerUpdateTask(e.id,{tagNames:P});n(j),m("")}catch(j){console.error("Failed to update tags:",j);const O=((F=j==null?void 0:j.body)==null?void 0:F.detail)||(j==null?void 0:j.message)||"Failed to update tags";m(O),d(((V=e.tags)==null?void 0:V.map(w=>w.name))||[])}};return o.jsx("div",{className:"modal-overlay",onClick:t,children:o.jsxs("div",{className:"modal-content task-detail",onClick:P=>P.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h2",{children:e.name}),o.jsx("button",{onClick:t,className:"btn-close",children:"×"})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Description"}),o.jsx("textarea",{value:i,onChange:P=>l(P.target.value),onBlur:v,placeholder:"Enter task description...",className:"description-textarea"})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Status"}),g&&o.jsxs("div",{className:"error-message",children:[o.jsx("strong",{children:"Error:"})," ",g]}),o.jsxs("div",{className:"status-buttons",children:[o.jsx("button",{onClick:()=>N(re.NOT_STARTED),className:`status-btn ${e.status===re.NOT_STARTED?"active status-not-started":""}`,children:"Not Started"}),o.jsx("button",{onClick:()=>N(re.IN_PROGRESS),className:`status-btn ${e.status===re.IN_PROGRESS?"active status-in-progress":""}`,children:"In Progress"}),o.jsx("button",{onClick:()=>N(re.FOR_REVIEW),className:`status-btn ${e.status===re.FOR_REVIEW?"active status-for-review":""}`,children:"For Review"}),o.jsx("button",{onClick:()=>N(re.DONE),className:`status-btn ${e.status===re.DONE?"active status-done":""}`,children:"Done"})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Assignee & Session"}),o.jsxs("div",{className:"assignee-form",children:[o.jsxs("div",{className:"form-row",children:[o.jsxs("div",{className:"form-field",children:[o.jsx("label",{children:"Assignee"}),o.jsx("input",{type:"text",value:e.assignee?`@${e.assignee}`:"@",onChange:P=>r(P.target.value),placeholder:"Enter assignee name"})]}),o.jsxs("div",{className:"form-field",children:[o.jsx("label",{children:"Session ID"}),o.jsx("input",{type:"text",value:s,onChange:P=>u(P.target.value),placeholder:"Enter session ID"})]})]}),o.jsx("button",{onClick:C,className:"btn-primary",children:"Update Assignment"})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Tags"}),o.jsx(Cd,{value:c,onChange:U,placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Task Info"}),o.jsxs("div",{className:"task-info-grid",children:[o.jsxs("div",{className:"info-item",children:[o.jsx("label",{children:"Created By"}),o.jsxs("span",{children:["@",e.createdByActor.slug]})]}),e.dependsOnIds&&e.dependsOnIds.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("label",{children:"Depends On"}),o.jsx("div",{className:"dependency-list",children:e.dependsOnIds.map(P=>o.jsx("span",{className:"dependency-id",children:P},P))})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsxs("h3",{children:["Comments (",((M=e.comments)==null?void 0:M.length)||0,")"]}),o.jsx("div",{className:"comments-list",children:(q=e.comments)==null?void 0:q.map(P=>o.jsxs("div",{className:"comment",children:[o.jsx("strong",{children:P.commenterName}),o.jsx("p",{children:P.content}),o.jsx("span",{className:"comment-date",children:new Date(P.createdAt).toLocaleString()})]},P.id))}),o.jsxs("div",{className:"add-comment",children:[o.jsx("textarea",{placeholder:"Add a comment...",value:f,onChange:P=>h(P.target.value),rows:3}),o.jsx("button",{onClick:A,className:"btn-primary",children:"Add Comment"})]})]}),o.jsx("div",{className:"detail-section",children:o.jsxs("div",{className:"task-actions",children:[e.status===re.FOR_REVIEW&&o.jsxs("div",{className:"review-shortcuts",children:[o.jsx("button",{onClick:()=>N(re.DONE),className:"btn-review-done",children:"✓ Done"}),o.jsx("button",{onClick:()=>N(re.IN_PROGRESS),className:"btn-review-needs-work",children:"← Needs work"})]}),x?o.jsxs("div",{className:"delete-confirm",children:[o.jsx("button",{onClick:_,className:"btn-danger",children:"Confirm Delete"}),o.jsx("button",{onClick:()=>E(!1),className:"btn-secondary",children:"Cancel"})]}):o.jsx("button",{onClick:()=>E(!0),className:"btn-danger",children:"Delete Task"})]})})]})})}function rr(){return o.jsx(Pi,{to:"/",className:"home-link",title:"Back to Home",children:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})})}const gn=Object.create(null);gn.open="0";gn.close="1";gn.ping="2";gn.pong="3";gn.message="4";gn.upgrade="5";gn.noop="6";const ys=Object.create(null);Object.keys(gn).forEach(e=>{ys[gn[e]]=e});const Yc={type:"error",data:"parser error"},Fv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Gv=typeof ArrayBuffer=="function",Vv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Td=({type:e,data:t},n,i)=>Fv&&t instanceof Blob?n?i(t):um(t,i):Gv&&(t instanceof ArrayBuffer||Vv(t))?n?i(t):um(new Blob([t]),i):i(gn[e]+(t||"")),um=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function cm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ku;function TT(e,t){if(Fv&&e.data instanceof Blob)return e.data.arrayBuffer().then(cm).then(t);if(Gv&&(e.data instanceof ArrayBuffer||Vv(e.data)))return t(cm(e.data));Td(e,!1,n=>{ku||(ku=new TextEncoder),t(ku.encode(n))})}const fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ta=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<fm.length;e++)Ta[fm.charCodeAt(e)]=e;const kT=e=>{let t=e.length*.75,n=e.length,i,l=0,a,r,s,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(i=0;i<n;i+=4)a=Ta[e.charCodeAt(i)],r=Ta[e.charCodeAt(i+1)],s=Ta[e.charCodeAt(i+2)],u=Ta[e.charCodeAt(i+3)],d[l++]=a<<2|r>>4,d[l++]=(r&15)<<4|s>>2,d[l++]=(s&3)<<6|u&63;return c},NT=typeof ArrayBuffer=="function",kd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Yv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:wT(e.substring(1),t)}:ys[n]?e.length>1?{type:ys[n],data:e.substring(1)}:{type:ys[n]}:Yc},wT=(e,t)=>{if(NT){const n=kT(e);return Yv(n,t)}else return{base64:!0,data:e}},Yv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Pv="",AT=(e,t)=>{const n=e.length,i=new Array(n);let l=0;e.forEach((a,r)=>{Td(a,!1,s=>{i[r]=s,++l===n&&t(i.join(Pv))})})},jT=(e,t)=>{const n=e.split(Pv),i=[];for(let l=0;l<n.length;l++){const a=kd(n[l],t);if(i.push(a),a.type==="error")break}return i};function _T(){return new TransformStream({transform(e,t){TT(e,n=>{const i=n.length;let l;if(i<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,i);else if(i<65536){l=new Uint8Array(3);const a=new DataView(l.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{l=new Uint8Array(9);const a=new DataView(l.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(n)})}})}let Nu;function Xr(e){return e.reduce((t,n)=>t+n.length,0)}function Qr(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let l=0;l<t;l++)n[l]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function RT(e,t){Nu||(Nu=new TextDecoder);const n=[];let i=0,l=-1,a=!1;return new TransformStream({transform(r,s){for(n.push(r);;){if(i===0){if(Xr(n)<1)break;const u=Qr(n,1);a=(u[0]&128)===128,l=u[0]&127,l<126?i=3:l===126?i=1:i=2}else if(i===1){if(Xr(n)<2)break;const u=Qr(n,2);l=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),i=3}else if(i===2){if(Xr(n)<8)break;const u=Qr(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){s.enqueue(Yc);break}l=d*Math.pow(2,32)+c.getUint32(4),i=3}else{if(Xr(n)<l)break;const u=Qr(n,l);s.enqueue(kd(a?u:Nu.decode(u),t)),i=0}if(l===0||l>e){s.enqueue(Yc);break}}}})}const Xv=4;function Ue(e){if(e)return OT(e)}function OT(e){for(var t in Ue.prototype)e[t]=Ue.prototype[t];return e}Ue.prototype.on=Ue.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ue.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ue.prototype.off=Ue.prototype.removeListener=Ue.prototype.removeAllListeners=Ue.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,l=0;l<n.length;l++)if(i=n[l],i===t||i.fn===t){n.splice(l,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ue.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,l=n.length;i<l;++i)n[i].apply(this,t)}return this};Ue.prototype.emitReserved=Ue.prototype.emit;Ue.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ue.prototype.hasListeners=function(e){return!!this.listeners(e).length};const No=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),DT="arraybuffer";function Qv(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const zT=Bt.setTimeout,LT=Bt.clearTimeout;function wo(e,t){t.useNativeTimers?(e.setTimeoutFn=zT.bind(Bt),e.clearTimeoutFn=LT.bind(Bt)):(e.setTimeoutFn=Bt.setTimeout.bind(Bt),e.clearTimeoutFn=Bt.clearTimeout.bind(Bt))}const MT=1.33;function BT(e){return typeof e=="string"?UT(e):Math.ceil((e.byteLength||e.size)*MT)}function UT(e){let t=0,n=0;for(let i=0,l=e.length;i<l;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function Zv(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function IT(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function HT(e){let t={},n=e.split("&");for(let i=0,l=n.length;i<l;i++){let a=n[i].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class qT extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Nd extends Ue{constructor(t){super(),this.writable=!1,wo(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,i){return super.emitReserved("error",new qT(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=kd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=IT(t);return n.length?"?"+n:""}}class FT extends Nd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};jT(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,AT(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Zv()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Kv=!1;try{Kv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const GT=Kv;function VT(){}class YT extends FT{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(l,a)=>{this.onError("xhr post error",l,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class mn extends Ue{constructor(t,n,i){super(),this.createRequest=t,wo(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=Qv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&i.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var l;i.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=mn.requestsCount++,mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=VT,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}mn.requestsCount=0;mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",dm);else if(typeof addEventListener=="function"){const e="onpagehide"in Bt?"pagehide":"unload";addEventListener(e,dm,!1)}}function dm(){for(let e in mn.requests)mn.requests.hasOwnProperty(e)&&mn.requests[e].abort()}const PT=(function(){const e=$v({xdomain:!1});return e&&e.responseType!==null})();class XT extends YT{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=PT&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new mn($v,this.uri(),t)}}function $v(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||GT))return new XMLHttpRequest}catch{}if(!t)try{return new Bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Jv=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class QT extends Nd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=Jv?{}:Qv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],l=n===t.length-1;Td(i,this.supportsBinary,a=>{try{this.doWrite(i,a)}catch{}l&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Zv()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const wu=Bt.WebSocket||Bt.MozWebSocket;class ZT extends QT{createSocket(t,n,i){return Jv?new wu(t,n,i):n?new wu(t,n):new wu(t)}doWrite(t,n){this.ws.send(n)}}class KT extends Nd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=RT(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),l=_T();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const a=()=>{i.read().then(({done:s,value:u})=>{s||(this.onPacket(u),a())}).catch(s=>{})};a();const r={type:"open"};this.query.sid&&(r.data=`{"sid":"${this.query.sid}"}`),this._writer.write(r).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],l=n===t.length-1;this._writer.write(i).then(()=>{l&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const $T={websocket:ZT,webtransport:KT,polling:XT},JT=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,WT=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let l=JT.exec(e||""),a={},r=14;for(;r--;)a[WT[r]]=l[r]||"";return n!=-1&&i!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=ek(a,a.path),a.queryKey=tk(a,a.query),a}function ek(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function tk(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,l,a){l&&(n[l]=a)}),n}const Xc=typeof addEventListener=="function"&&typeof removeEventListener=="function",xs=[];Xc&&addEventListener("offline",()=>{xs.forEach(e=>e())},!1);class yi extends Ue{constructor(t,n){if(super(),this.binaryType=DT,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=Pc(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=Pc(n.host).host);wo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const l=i.prototype.name;this.transports.push(l),this._transportsByName[l]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=HT(this.opts.query)),Xc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},xs.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Xv,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const l=this.writeBuffer[i].data;if(l&&(n+=BT(l)),i>0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,No(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,l){if(typeof n=="function"&&(l=n,n=void 0),typeof i=="function"&&(l=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const a={type:t,data:n,options:i};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Xc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=xs.indexOf(this._offlineEventListener);i!==-1&&xs.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Xv;class nk extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),i=!1;yi.priorWebsocketSuccess=!1;const l=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!i)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function a(){i||(i=!0,d(),n.close(),n=null)}const r=f=>{const h=new Error("probe error: "+f);h.transport=n.name,a(),this.emitReserved("upgradeError",h)};function s(){r("transport closed")}function u(){r("socket closed")}function c(f){n&&f.name!==n.name&&a()}const d=()=>{n.removeListener("open",l),n.removeListener("error",r),n.removeListener("close",s),this.off("close",u),this.off("upgrading",c)};n.once("open",l),n.once("error",r),n.once("close",s),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}}let ik=class extends nk{constructor(t,n={}){const i=typeof t=="object"?t:n;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(l=>$T[l]).filter(l=>!!l)),super(t,i)}};function lk(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=Pc(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const a=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port+t,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}const ak=typeof ArrayBuffer=="function",rk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Wv=Object.prototype.toString,sk=typeof Blob=="function"||typeof Blob<"u"&&Wv.call(Blob)==="[object BlobConstructor]",ok=typeof File=="function"||typeof File<"u"&&Wv.call(File)==="[object FileConstructor]";function wd(e){return ak&&(e instanceof ArrayBuffer||rk(e))||sk&&e instanceof Blob||ok&&e instanceof File}function vs(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(vs(e[n]))return!0;return!1}if(wd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vs(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vs(e[n]))return!0;return!1}function uk(e){const t=[],n=e.data,i=e;return i.data=Qc(n,t),i.attachments=t.length,{packet:i,buffers:t}}function Qc(e,t){if(!e)return e;if(wd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=Qc(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Qc(e[i],t));return n}return e}function ck(e,t){return e.data=Zc(e.data,t),delete e.attachments,e}function Zc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Zc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Zc(e[n],t));return e}const fk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ae;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ae||(ae={}));class dk{constructor(t){this.replacer=t}encode(t){return(t.type===ae.EVENT||t.type===ae.ACK)&&vs(t)?this.encodeAsBinary({type:t.type===ae.EVENT?ae.BINARY_EVENT:ae.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ae.BINARY_EVENT||t.type===ae.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=uk(t),i=this.encodeAsString(n.packet),l=n.buffers;return l.unshift(i),l}}class Ad extends Ue{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===ae.BINARY_EVENT;i||n.type===ae.BINARY_ACK?(n.type=i?ae.EVENT:ae.ACK,this.reconstructor=new hk(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(ae[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===ae.BINARY_EVENT||i.type===ae.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const r=t.substring(a,n);if(r!=Number(r)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const s=Number(r);if(!pk(s)||s<0)throw new Error("Illegal attachments");if(s>this.opts.maxAttachments)throw new Error("too many attachments");i.attachments=s}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(a,n)}else i.nsp="/";const l=t.charAt(n+1);if(l!==""&&Number(l)==l){const a=n+1;for(;++n;){const r=t.charAt(n);if(r==null||Number(r)!=r){--n;break}if(n===t.length)break}i.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Ad.isPayloadValid(i.type,a))i.data=a;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ae.CONNECT:return hm(n);case ae.DISCONNECT:return n===void 0;case ae.CONNECT_ERROR:return typeof n=="string"||hm(n);case ae.EVENT:case ae.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&fk.indexOf(n[0])===-1);case ae.ACK:case ae.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class hk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=ck(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const pk=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function hm(e){return Object.prototype.toString.call(e)==="[object Object]"}const mk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ad,Encoder:dk,get PacketType(){return ae}},Symbol.toStringTag,{value:"Module"}));function Wt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const gk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class eb extends Ue{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Wt(t,"open",this.onopen.bind(this)),Wt(t,"packet",this.onpacket.bind(this)),Wt(t,"error",this.onerror.bind(this)),Wt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,l,a;if(gk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:ae.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),r.id=d}const s=(l=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||l===void 0?void 0:l.writable,u=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(u?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var i;const l=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(l===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},l),r=(...s)=>{this.io.clearTimeoutFn(a),n.apply(this,s)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...n){return new Promise((i,l)=>{const a=(r,s)=>r?l(r):i(s);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...a)=>(this._queue[0],l!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(l)):(this._queue.shift(),n&&n(null,...a)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ae.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ae.EVENT:case ae.BINARY_EVENT:this.onevent(t);break;case ae.ACK:case ae.BINARY_ACK:this.onack(t);break;case ae.DISCONNECT:this.ondisconnect();break;case ae.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...l){i||(i=!0,n.packet({type:ae.ACK,id:t,data:l}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function na(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}na.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};na.prototype.reset=function(){this.attempts=0};na.prototype.setMin=function(e){this.ms=e};na.prototype.setMax=function(e){this.max=e};na.prototype.setJitter=function(e){this.jitter=e};class Kc extends Ue{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,wo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new na({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const l=n.parser||mk;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ik(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const l=Wt(n,"open",function(){i.onopen(),t&&t()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},r=Wt(n,"error",a);if(this._timeout!==!1){const s=this._timeout,u=this.setTimeoutFn(()=>{l(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(l),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Wt(t,"ping",this.onping.bind(this)),Wt(t,"data",this.ondata.bind(this)),Wt(t,"error",this.onerror.bind(this)),Wt(t,"close",this.onclose.bind(this)),Wt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){No(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new eb(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ga={};function Ha(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=lk(e,t.path||"/socket.io"),i=n.source,l=n.id,a=n.path,r=ga[l]&&a in ga[l].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||r;let u;return s?u=new Kc(i,t):(ga[l]||(ga[l]=new Kc(i,t)),u=ga[l]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Ha,{Manager:Kc,Socket:eb,io:Ha,connect:Ha});const yk=Mv("/tasks"),tb=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null),[u,c]=b.useState(!1);b.useEffect(()=>(f(),h(),()=>{r&&r.disconnect()}),[]);const d=p=>[...p].sort((y,x)=>{const E=new Date(y.updatedAt).getTime();return new Date(x.updatedAt).getTime()-E}),f=async()=>{t(!0),i(null);try{const p=await en.tasksControllerListTasks();a(d(p.items))}catch(p){i(p instanceof Error?p.message:"Failed to load tasks")}finally{t(!1)}},h=()=>{const p=Ha(yk,{transports:["websocket","polling"],withCredentials:!0});return p.on("connect",()=>{console.log("Connected to websocket"),p.emit("tasks.subscribe",{},y=>{y.ok?(console.log(y),console.log("Subscribed to room:",y.room),c(!0)):(console.error("Failed to subscribe to room"),c(!1))}),f()}),p.on("disconnect",()=>{console.log("WebSocket disconnected"),c(!1)}),p.on("task.created",y=>{a(x=>x.some(E=>E.id===y.id)?x:d([y,...x]))}),p.on("task.updated",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),p.on("task.deleted",({taskId:y})=>{a(x=>x.filter(E=>E.id!==y))}),p.on("task.assigned",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),p.on("task.commented",async y=>{try{const x=await en.tasksControllerGetTask(y.taskId);a(E=>E.findIndex(m=>m.id===x.id)===-1?d([x,...E]):d(E.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after comment",x)}}),p.on("input.request.answered",async y=>{try{const x=await en.tasksControllerGetTask(y.taskId);a(E=>E.findIndex(m=>m.id===x.id)===-1?d([x,...E]):d(E.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after input request answer",x)}}),p.on("task.status_changed",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),s(p),()=>{p.close()}};return{isLoading:e,error:n,tasks:l,isConnected:u}};function xk(){const{tasks:e,isConnected:t}=tb(),[n,i]=b.useState(null),[l,a]=b.useState(!1);tl("Tasks");const r={[re.NOT_STARTED]:e.filter(s=>s.status===re.NOT_STARTED),[re.IN_PROGRESS]:e.filter(s=>s.status===re.IN_PROGRESS),[re.FOR_REVIEW]:e.filter(s=>s.status===re.FOR_REVIEW),[re.DONE]:e.filter(s=>s.status===re.DONE)};return o.jsxs("div",{className:"task-board",children:[o.jsxs("div",{className:"task-board-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Tasks"}),o.jsx("p",{className:"subtitle",children:"Manage and track your tasks across different stages"})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(rr,{}),o.jsx("span",{className:`status-indicator ${t?"connected":"disconnected"}`,children:t?"● Connected":"○ Disconnected"})]})]}),o.jsx("div",{className:"kanban-board",children:Object.entries(r).map(([s,u])=>o.jsxs("div",{className:`kanban-column column-${s.replace(" ","-")}`,children:[o.jsxs("div",{className:"column-header",children:[o.jsx("h2",{children:s.toUpperCase()}),o.jsx("span",{className:"task-count",children:u.length})]}),o.jsxs("div",{className:"column-content",children:[s===re.NOT_STARTED&&o.jsx("button",{onClick:()=>a(!0),className:"btn-add-task",children:"+ Add New Task"}),u.map(c=>o.jsx(bT,{task:c,onClick:()=>i(c)},c.id))]})]},s))}),l&&o.jsx(CT,{onClose:()=>a(!1)}),n&&o.jsx(qv,{task:n,onClose:()=>i(null),onUpdate:s=>i(s)})]})}function vk(){const[e,t]=b.useState(!1),n=rt(),i=()=>t(!e),l=()=>t(!1),a=[{name:"Home",path:"/",icon:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),color:"#8e8e93"},{name:"Tasks",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"},{name:"Logout",path:"/logout",icon:"🔒"}];return o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"hamburger-button",onClick:i,"aria-label":"Menu",children:o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),o.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),o.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e&&o.jsx("div",{className:"hamburger-overlay",onClick:l}),o.jsxs("div",{className:`hamburger-drawer ${e?"open":""}`,children:[o.jsxs("div",{className:"hamburger-header",children:[o.jsx("h2",{children:"Menu"}),o.jsx("button",{className:"hamburger-close",onClick:l,"aria-label":"Close menu",children:o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o.jsx("nav",{className:"hamburger-nav",children:a.map(r=>{const s=n.pathname===r.path||r.path!=="/"&&n.pathname.startsWith(r.path);return o.jsxs(Pi,{to:r.path,className:`hamburger-nav-item ${s?"active":""}`,onClick:l,children:[o.jsx("div",{className:"hamburger-nav-icon",style:{color:r.color},children:typeof r.icon=="string"?o.jsx("span",{className:"hamburger-emoji",children:r.icon}):r.icon}),o.jsx("span",{className:"hamburger-nav-label",children:r.name}),s&&o.jsx("svg",{className:"hamburger-nav-check",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("polyline",{points:"20 6 9 17 4 12"})})]},r.path)})})]})]})}const bk=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE],Zr={[re.NOT_STARTED]:{label:"Queued",icon:"○",sublabel:"Ideas + intake"},[re.IN_PROGRESS]:{label:"Building",icon:"▣",sublabel:"Actively running"},[re.FOR_REVIEW]:{label:"Review",icon:"◆",sublabel:"Needs eyeballs"},[re.DONE]:{label:"Shipped",icon:"▴",sublabel:"Mission complete"}};function Sk(){const{tasks:e,isConnected:t}=tb(),[n,i]=b.useState(null),[l,a]=b.useState(!1),[r,s]=b.useState(re.NOT_STARTED);tl("Tasks");const u=b.useMemo(()=>e.reduce((f,h)=>(f[h.status]=f[h.status]?[...f[h.status],h]:[h],f),{[re.NOT_STARTED]:[],[re.IN_PROGRESS]:[],[re.FOR_REVIEW]:[],[re.DONE]:[]}),[e]),c=u[r]??[],d=f=>{const h=new Date(f),y=Math.round((new Date().getTime()-h.getTime())/(1e3*60));if(y<60)return`${Math.max(y,1)}m ago`;const x=Math.round(y/60);return x<24?`${x}h ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return o.jsxs("div",{className:"task-board-mobile",children:[o.jsxs("div",{className:"matrix-frame",children:[o.jsxs("header",{className:"matrix-header",children:[o.jsx(vk,{}),o.jsx("div",{className:"matrix-header-copy",children:o.jsx("h1",{children:"Tasks"})}),o.jsxs("div",{className:"matrix-connection",children:[o.jsx("span",{className:`matrix-connection-dot ${t?"online":"offline"}`,"aria-hidden":!0}),o.jsx("span",{children:t?"":"offline"})]})]}),o.jsxs("section",{className:"matrix-status-panel",children:[o.jsxs("div",{children:[o.jsx("h2",{children:Zr[r].label}),o.jsx("p",{className:"matrix-status-sub",children:Zr[r].sublabel})]}),o.jsxs("div",{className:"matrix-status-count",children:[o.jsx("span",{className:"matrix-count-number",children:c.length}),o.jsx("span",{className:"matrix-count-text",children:"tasks"})]})]}),o.jsxs("section",{className:"matrix-task-feed",children:[c.length===0&&o.jsxs("div",{className:"matrix-empty-state",children:[o.jsx("p",{children:"No entries in this lane."}),r===re.NOT_STARTED&&o.jsx("button",{type:"button",className:"matrix-link",onClick:()=>a(!0),children:"create the first task"})]}),c.map(f=>o.jsxs("article",{className:"matrix-task-card",onClick:()=>i(f),children:[o.jsxs("div",{className:"matrix-task-meta-row",children:[o.jsxs("span",{className:"matrix-task-id",children:["#",f.id.slice(0,6).toUpperCase()]}),o.jsx("span",{className:"matrix-task-updated",children:d(f.updatedAt)})]}),o.jsx("h3",{children:f.name}),o.jsx("p",{children:f.description}),f.tags&&f.tags.length>0&&o.jsx("div",{className:"matrix-task-tags",children:f.tags.map(h=>o.jsx(Uv,{tag:h,small:!0},h.name))}),o.jsxs("div",{className:"matrix-task-footer",children:[o.jsx("span",{children:f.assignee?`Assigned: ${f.assignee}`:"Unassigned"}),f.comments&&f.comments.length>0&&o.jsxs("span",{children:["💬 ",f.comments.length]})]})]},f.id))]})]}),o.jsx("nav",{className:"matrix-bottom-nav","aria-label":"Task status navigation",children:bk.map(f=>o.jsxs("button",{className:`matrix-nav-item ${f===r?"active":""}`,onClick:()=>s(f),type:"button",children:[o.jsx("span",{className:"matrix-nav-icon",children:Zr[f].icon}),o.jsx("span",{className:"matrix-nav-label",children:Zr[f].label}),o.jsx("span",{className:"matrix-nav-count",children:u[f].length})]},f))}),o.jsx("button",{type:"button",className:"matrix-fab",onClick:()=>a(!0),"aria-label":"Create task",children:"➕"}),n&&o.jsx(qv,{task:n,onClose:()=>i(null),onUpdate:f=>i(f)}),l&&o.jsx(Ek,{onClose:()=>a(!1)})]})}function Ek({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=Iv(),[l,a]=b.useState(""),[r,s]=b.useState(""),[u,c]=b.useState(""),[d,f]=b.useState(""),[h,p]=b.useState([]),[y,x]=b.useState(""),[E,g]=b.useState(!1),m=async v=>{var C;if(v.preventDefault(),!l.trim()||!r.trim()){n("Name and description are required","error");return}g(!0);try{const A=y.split(",").map(N=>N.trim()).filter(Boolean);await en.tasksControllerCreateTask({name:l,description:r,...u&&{assignee:u},...d&&{sessionId:d},...h.length>0&&{tagNames:h},...A.length>0&&{dependsOnIds:A}}),e()}catch(A){const N=((C=A==null?void 0:A.body)==null?void 0:C.detail)||(A==null?void 0:A.message)||"Failed to create task";n(N,"error")}finally{g(!1)}};return o.jsx("div",{className:"mobile-create-overlay",onClick:e,children:o.jsxs("div",{className:"mobile-create-panel",onClick:v=>v.stopPropagation(),children:[o.jsxs("header",{className:"mobile-create-header",children:[o.jsxs("div",{children:[o.jsx("p",{className:"matrix-status-label",children:"New task payload"}),o.jsx("h2",{children:"Compose"})]}),o.jsx("button",{type:"button",className:"matrix-link",onClick:e,children:"close"})]}),o.jsxs("form",{className:"mobile-create-form",onSubmit:m,children:[o.jsxs("label",{children:[o.jsx("span",{children:"Title *"}),o.jsx("input",{type:"text",value:l,onChange:v=>a(v.target.value),placeholder:"Ship a feature",required:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Description *"}),o.jsx("textarea",{value:r,onChange:v=>s(v.target.value),placeholder:"Outline what needs to happen",rows:4,required:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Assignee"}),o.jsx("input",{type:"text",value:u,onChange:v=>c(v.target.value),placeholder:"agent or human"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Session ID"}),o.jsx("input",{type:"text",value:d,onChange:v=>f(v.target.value),placeholder:"link a running session"})]}),o.jsxs("div",{className:"mobile-form-control",children:[o.jsx("span",{children:"Tags"}),o.jsx(Cd,{value:h,onChange:p,placeholder:"ops, agents, ui"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Depends on task IDs"}),o.jsx("input",{type:"text",value:y,onChange:v=>x(v.target.value),placeholder:"comma separated"})]}),o.jsx("button",{type:"submit",className:"matrix-submit",disabled:E,children:E?"Transmitting…":"Create Task"})]}),t.map(v=>o.jsx(Hv,{message:v.message,type:v.type,onClose:()=>i(v.id)},v.id))]})})}function nb(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>nb(n,t)):!1:!1}const Ck=b.memo(function e({page:t,level:n,isActive:i,currentPageId:l,onPageClick:a,onAddChild:r}){const s=t.children&&t.children.length>0,u=s&&nb(t,l),[c,d]=b.useState(u);b.useEffect(()=>{u&&d(!0)},[u]);const f=x=>{x.stopPropagation(),d(!c)},h=x=>{x.preventDefault(),a(t.id)},p=x=>{x.preventDefault(),x.stopPropagation(),r(t.id)},y=b.useMemo(()=>s?[...t.children].sort((x,E)=>x.order-E.order):[],[s,t.children]);return o.jsxs("div",{className:"page-tree-item",children:[o.jsxs("div",{className:`tree-item-content ${i?"active":""}`,style:{paddingLeft:`${n*20}px`},children:[s?o.jsx("button",{className:"tree-toggle",onClick:f,"aria-label":c?"Collapse":"Expand","aria-expanded":c,children:c?"▼":"▶"}):o.jsx("span",{className:"tree-spacer"}),o.jsx("a",{href:"#",className:"tree-item-link",onClick:h,"aria-current":i?"page":void 0,children:t.title}),o.jsx("button",{className:"tree-item-add-child",onClick:p,"aria-label":`Add child page to ${t.title}`,title:"Add child page",children:"+"})]}),c&&s&&o.jsx("div",{className:"tree-item-children",children:y.map(x=>o.jsx(e,{page:x,level:n+1,isActive:x.id===l,currentPageId:l,onPageClick:a,onAddChild:r},x.id))})]})});function Tk({pages:e,currentPageId:t,onPageClick:n}){const i=Je(),l=b.useMemo(()=>[...e].sort((r,s)=>r.order-s.order),[e]),a=r=>{i(`/context/page/${r}/new`)};return o.jsx("div",{className:"page-tree",children:l.map(r=>o.jsx(Ck,{page:r,level:0,isActive:r.id===t,currentPageId:t,onPageClick:n,onAddChild:a},r.id))})}B.BASE=el;const kk=Mv("/context"),Tr=()=>{const[e,t]=b.useState([]),[n,i]=b.useState(null),[l,a]=b.useState(!1),[r,s]=b.useState(!1),[u,c]=b.useState(!1),[d,f]=b.useState(!1),[h,p]=b.useState(!1),[y,x]=b.useState(null),[E,g]=b.useState(null),[m,v]=b.useState(!1),C=b.useCallback(async()=>{a(!0),x(null);try{const j=await Kt.contextControllerListBlocks();t(j.items)}catch(j){x(j instanceof Error?j.message:"Failed to load wiki pages")}finally{a(!1)}},[]),A=b.useCallback(async j=>{s(!0),x(null),i(null);try{const O=await Kt.contextControllerGetBlock(j);i(O)}catch(O){x(O instanceof Error?O.message:"Failed to fetch wiki page")}finally{s(!1)}},[]),N=b.useCallback(async j=>{c(!0),x(null);try{const O=await Kt.contextControllerCreateBlock(j);return t(w=>{const X=w.filter(S=>S.id!==O.id);return[{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt},...X]}),i(O),O}catch(O){throw x(O instanceof Error?O.message:"Failed to create wiki page"),O}finally{c(!1)}},[]),_=b.useCallback(j=>{A(j)},[A]),U=b.useCallback(async(j,O)=>{f(!0),x(null);try{const w=await Kt.contextControllerUpdateBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to update page"),w}finally{f(!1)}},[n]),D=b.useCallback(async j=>{p(!0),x(null);try{await Kt.contextControllerDeleteBlock(j),t(O=>O.filter(w=>w.id!==j)),(n==null?void 0:n.id)===j&&i(null)}catch(O){throw x(O instanceof Error?O.message:"Failed to delete page"),O}finally{p(!1)}},[n]),T=b.useCallback(async(j,O)=>{f(!0),x(null);try{const w=await Kt.contextControllerAppendToBlock(j,{content:O});return(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to append content"),w}finally{f(!1)}},[n]),M=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerAddTagToBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to add tag"),w}},[n]),q=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerRemoveTagFromBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to remove tag"),w}},[n]),P=b.useCallback(async()=>{x(null);try{return await Kt.contextControllerGetBlockTree()}catch(j){throw x(j instanceof Error?j.message:"Failed to fetch page tree"),j}},[]),F=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerReorderBlock(j,{newOrder:O});return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to reorder page"),w}},[n]),V=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerMoveBlock(j,{newParentId:O});return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to move page"),w}},[n]);return b.useEffect(()=>{const j=Ha(kk,{transports:["websocket","polling"],withCredentials:!0});return j.on("connect",()=>{console.log("Connected to Context websocket"),j.emit("context.subscribe",{},O=>{O.ok?(console.log(O),console.log("Subscribed to room:",O.room),v(!0)):(console.error("Failed to subscribe to room"),v(!1))}),v(!0),C()}),j.on("disconnect",()=>{console.log("Context WebSocket disconnected"),v(!1)}),j.on("page.created",O=>{t(w=>w.some(X=>X.id===O.id)?w:[{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt},...w])}),j.on("page.updated",O=>{t(w=>w.map(X=>X.id===O.id?{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt}:X)),(n==null?void 0:n.id)===O.id&&i(O)}),j.on("page.deleted",({pageId:O})=>{t(w=>w.filter(X=>X.id!==O)),(n==null?void 0:n.id)===O&&i(null)}),g(j),()=>{j.disconnect()}},[C,n==null?void 0:n.id]),b.useEffect(()=>{C()},[C]),{pages:e,selectedPage:n,isLoadingList:l,isLoadingPage:r,isCreating:u,isUpdating:d,isDeleting:h,error:y,isConnected:m,socket:E,loadPages:C,createPage:N,selectPage:_,updatePage:U,appendToPage:T,deletePage:D,addTagToPage:M,removeTagFromPage:q,getPageTree:P,reorderPage:F,movePage:V}},pm="context-sidebar-collapsed";function Nk(){const{pageId:e}=Wi(),t=Je(),{getPageTree:n,isConnected:i,socket:l}=Tr(),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(()=>{const y=localStorage.getItem(pm);return y!==null?y==="true":ar()});b.useEffect(()=>{localStorage.setItem(pm,String(c))},[c]);const f=b.useCallback(async()=>{u(!0);try{const y=await n();r(y)}catch(y){console.error("Failed to load page tree:",y)}finally{u(!1)}},[n]);b.useEffect(()=>{f()},[f]),b.useEffect(()=>{if(!l)return;const y=()=>{f()},x=()=>{f()},E=()=>{f()};return l.on("page.created",y),l.on("page.updated",x),l.on("page.deleted",E),()=>{l.off("page.created",y),l.off("page.updated",x),l.off("page.deleted",E)}},[l,f]);const h=b.useCallback(y=>{t(`/context/page/${y}`)},[t]),p=()=>{d(!c)};return o.jsxs("div",{className:"context-with-sidebar",children:[o.jsxs("aside",{className:`sidebar-app-specific ${c?"collapsed":""}`,children:[o.jsxs("nav",{className:"sidebar-content",children:[c&&o.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px"},children:o.jsx("span",{className:`context-status-dot ${i?"connected":"disconnected"}`,title:i?"WebSocket connected":"WebSocket disconnected","aria-label":i?"WebSocket connected":"WebSocket disconnected"})}),!c&&o.jsxs("div",{children:[o.jsxs("div",{className:"context-sidebar-header",children:[o.jsxs("h2",{className:"context-sidebar-title",children:["📚 Context",o.jsx("span",{className:`context-status-dot ${i?"connected":"disconnected"}`,title:i?"WebSocket connected":"WebSocket disconnected","aria-label":i?"WebSocket connected":"WebSocket disconnected"})]}),o.jsx("button",{className:"context-button primary context-sidebar-new-page",type:"button",onClick:()=>t("/context/new"),title:"Create new page",children:"+ New page"})]}),s&&o.jsx("div",{className:"context-status",children:"Loading pages…"}),a.length>0&&o.jsx(Tk,{pages:a,currentPageId:e,onPageClick:h}),a.length===0&&!s&&o.jsx("div",{className:"context-empty-sidebar",children:o.jsx("span",{children:"No pages yet"})})]})]}),o.jsx("button",{className:"sidebar-toggle",onClick:p,"aria-label":c?"Expand sidebar":"Collapse sidebar",children:c?"→":"←"})]}),o.jsx("main",{className:"context-content",children:o.jsx(md,{})})]})}const ib=({tag:e,onRemove:t,small:n=!1})=>{const i=e.color||"#6B7280";return o.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:i,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&o.jsx("button",{onClick:l=>{l.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function wk(){const e=Je(),{pages:t,isLoadingList:n}=Tr();return n?o.jsx("div",{className:"context-welcome",children:o.jsx("p",{children:"Loading pages..."})}):t.length===0?o.jsxs("div",{className:"context-welcome",children:[o.jsx("h2",{children:"Context"}),o.jsx("br",{}),o.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}):o.jsxs("div",{className:"context-content",style:{padding:"24px"},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[o.jsx("h2",{style:{margin:0},children:"All Pages"}),o.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}),o.jsx("div",{className:"context-grid",children:t.map(i=>o.jsxs("div",{className:"context-card",onClick:()=>e(`/context/page/${i.id}`),style:{cursor:"pointer"},children:[o.jsx("h3",{children:i.title}),i.tags&&i.tags.length>0&&o.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:i.tags.map(l=>o.jsx(ib,{tag:l},l.name))}),o.jsxs("div",{className:"context-card-meta",children:[o.jsxs("span",{children:["By ",i.createdBy||"unknown"]}),o.jsxs("span",{children:["Created ",new Date(i.createdAt).toLocaleDateString()]}),i.updatedAt!==i.createdAt&&o.jsxs("span",{children:["Updated ",new Date(i.updatedAt).toLocaleDateString()]})]})]},i.id))})]})}const Ak=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[i,l]=b.useState(""),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(-1),[f,h]=b.useState([]),p=b.useRef(null),y=b.useRef(null);b.useEffect(()=>{(async()=>{try{const v=await zv.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),b.useEffect(()=>{const v=setTimeout(()=>{if(i.trim().length>0){const C=i.trim().toLowerCase(),A=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(A),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var C;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&i.trim()||m.key==="Enter"&&i.trim()?(m.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):m.key==="ArrowDown"?(m.preventDefault(),d(v=>v<a.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),d(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),d(-1)):m.key==="Backspace"&&!i&&e.length>0&&t(e.slice(0,-1))};return o.jsxs("div",{ref:y,style:{position:"relative"},children:[o.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=f.find(A=>A.name===m),C=(v==null?void 0:v.color)||"#3B82F6";return o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:C,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,o.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),E(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:m=>l(m.target.value),onKeyDown:g,onFocus:()=>i&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),s&&a.length>0&&o.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:a.map((m,v)=>o.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>d(v),children:[o.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),s&&i&&a.length===0&&o.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',i,'"']})]})};function jk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const _k=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ok={};function mm(e,t){return(Ok.jsx?Rk:_k).test(e)}const Dk=/[ \t\n\f\r]/g;function zk(e){return typeof e=="object"?e.type==="text"?gm(e.value):!1:gm(e)}function gm(e){return e.replace(Dk,"")===""}class kr{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}kr.prototype.normal={};kr.prototype.property={};kr.prototype.space=void 0;function lb(e,t){const n={},i={};for(const l of e)Object.assign(n,l.property),Object.assign(i,l.normal);return new kr(n,i,t)}function $c(e){return e.toLowerCase()}class yt{constructor(t,n){this.attribute=n,this.property=t}}yt.prototype.attribute="";yt.prototype.booleanish=!1;yt.prototype.boolean=!1;yt.prototype.commaOrSpaceSeparated=!1;yt.prototype.commaSeparated=!1;yt.prototype.defined=!1;yt.prototype.mustUseProperty=!1;yt.prototype.number=!1;yt.prototype.overloadedBoolean=!1;yt.prototype.property="";yt.prototype.spaceSeparated=!1;yt.prototype.space=void 0;let Lk=0;const W=nl(),De=nl(),Jc=nl(),H=nl(),ve=nl(),Rl=nl(),vt=nl();function nl(){return 2**++Lk}const Wc=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:De,commaOrSpaceSeparated:vt,commaSeparated:Rl,number:H,overloadedBoolean:Jc,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Au=Object.keys(Wc);class jd extends yt{constructor(t,n,i,l){let a=-1;if(super(t,n),ym(this,"space",l),typeof i=="number")for(;++a<Au.length;){const r=Au[a];ym(this,Au[a],(i&Wc[r])===Wc[r])}}}jd.prototype.defined=!0;function ym(e,t,n){n&&(e[t]=n)}function ia(e){const t={},n={};for(const[i,l]of Object.entries(e.properties)){const a=new jd(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,n[$c(i)]=i,n[$c(a.attribute)]=i}return new kr(t,n,e.space)}const ab=ia({properties:{ariaActiveDescendant:null,ariaAtomic:De,ariaAutoComplete:null,ariaBusy:De,ariaChecked:De,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:De,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:De,ariaFlowTo:ve,ariaGrabbed:De,ariaHasPopup:null,ariaHidden:De,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:H,ariaLive:null,ariaModal:De,ariaMultiLine:De,ariaMultiSelectable:De,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:De,ariaReadOnly:De,ariaRelevant:null,ariaRequired:De,ariaRoleDescription:ve,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:De,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rb(e,t){return t in e?e[t]:t}function sb(e,t){return rb(e,t.toLowerCase())}const Mk=ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rl,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:ve,autoFocus:W,autoPlay:W,blocking:ve,capture:null,charSet:null,checked:W,cite:null,className:ve,cols:H,colSpan:null,content:null,contentEditable:De,controls:W,controlsList:ve,coords:H|Rl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Jc,draggable:De,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:ve,height:H,hidden:Jc,high:H,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:ve,itemRef:ve,itemScope:W,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:H,pattern:null,ping:ve,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:ve,required:W,reversed:W,rows:H,rowSpan:H,sandbox:ve,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:De,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:De,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:De,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:sb}),Bk=ia({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:vt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:ve,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Rl,g2:Rl,glyphName:Rl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:vt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vt,rev:vt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vt,requiredFeatures:vt,requiredFonts:vt,requiredFormats:vt,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:vt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rb}),ob=ia({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()}}),ub=ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:sb}),cb=ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Uk={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"},Ik=/[A-Z]/g,xm=/-[a-z]/g,Hk=/^data[-\w.:]+$/i;function qk(e,t){const n=$c(t);let i=t,l=yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Hk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(xm,Gk);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!xm.test(a)){let r=a.replace(Ik,Fk);r.charAt(0)!=="-"&&(r="-"+r),t="data"+r}}l=jd}return new l(i,t)}function Fk(e){return"-"+e.toLowerCase()}function Gk(e){return e.charAt(1).toUpperCase()}const Vk=lb([ab,Mk,ob,ub,cb],"html"),_d=lb([ab,Bk,ob,ub,cb],"svg");function Yk(e){return e.join(" ").trim()}var Rd={},vm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Pk=/\n/g,Xk=/^\s*/,Qk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Zk=/^:\s*/,Kk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,$k=/^[;\s]*/,Jk=/^\s+|\s+$/g,Wk=`
61
- `,bm="/",Sm="*",zi="",eN="comment",tN="declaration";function nN(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function l(y){var x=y.match(Pk);x&&(n+=x.length);var E=y.lastIndexOf(Wk);i=~E?y.length-E:i+y.length}function a(){var y={line:n,column:i};return function(x){return x.position=new r(y),c(),x}}function r(y){this.start=y,this.end={line:n,column:i},this.source=t.source}r.prototype.content=e;function s(y){var x=new Error(t.source+":"+n+":"+i+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=i,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var E=x[0];return l(E),e=e.slice(E.length),x}}function c(){u(Xk)}function d(y){var x;for(y=y||[];x=f();)x!==!1&&y.push(x);return y}function f(){var y=a();if(!(bm!=e.charAt(0)||Sm!=e.charAt(1))){for(var x=2;zi!=e.charAt(x)&&(Sm!=e.charAt(x)||bm!=e.charAt(x+1));)++x;if(x+=2,zi===e.charAt(x-1))return s("End of comment missing");var E=e.slice(2,x-2);return i+=2,l(E),e=e.slice(x),i+=2,y({type:eN,comment:E})}}function h(){var y=a(),x=u(Qk);if(x){if(f(),!u(Zk))return s("property missing ':'");var E=u(Kk),g=y({type:tN,property:Em(x[0].replace(vm,zi)),value:E?Em(E[0].replace(vm,zi)):zi});return u($k),g}}function p(){var y=[];d(y);for(var x;x=h();)x!==!1&&(y.push(x),d(y));return y}return c(),p()}function Em(e){return e?e.replace(Jk,zi):zi}var iN=nN,lN=Es&&Es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rd,"__esModule",{value:!0});Rd.default=rN;const aN=lN(iN);function rN(e,t){let n=null;if(!e||typeof e!="string")return n;const i=(0,aN.default)(e),l=typeof t=="function";return i.forEach(a=>{if(a.type!=="declaration")return;const{property:r,value:s}=a;l?t(r,s,a):s&&(n=n||{},n[r]=s)}),n}var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.camelCase=void 0;var sN=/^--[a-zA-Z0-9_-]+$/,oN=/-([a-z])/g,uN=/^[^-]+$/,cN=/^-(webkit|moz|ms|o|khtml)-/,fN=/^-(ms)-/,dN=function(e){return!e||uN.test(e)||sN.test(e)},hN=function(e,t){return t.toUpperCase()},Cm=function(e,t){return"".concat(t,"-")},pN=function(e,t){return t===void 0&&(t={}),dN(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(fN,Cm):e=e.replace(cN,Cm),e.replace(oN,hN))};Ao.camelCase=pN;var mN=Es&&Es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},gN=mN(Rd),yN=Ao;function ef(e,t){var n={};return!e||typeof e!="string"||(0,gN.default)(e,function(i,l){i&&l&&(n[(0,yN.camelCase)(i,t)]=l)}),n}ef.default=ef;var xN=ef;const vN=hg(xN),fb=db("end"),Od=db("start");function db(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function bN(e){const t=Od(e),n=fb(e);if(t&&n)return{start:t,end:n}}function qa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Tm(e.position):"start"in e||"end"in e?Tm(e):"line"in e||"column"in e?tf(e):""}function tf(e){return km(e&&e.line)+":"+km(e&&e.column)}function Tm(e){return tf(e&&e.start)+"-"+tf(e&&e.end)}function km(e){return e&&typeof e=="number"?e:1}class tt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let l="",a={},r=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?l=t:!a.cause&&t&&(r=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?a.ruleId=i:(a.source=i.slice(0,u),a.ruleId=i.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=s?s.line:void 0,this.name=qa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=r&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tt.prototype.file="";tt.prototype.name="";tt.prototype.reason="";tt.prototype.message="";tt.prototype.stack="";tt.prototype.column=void 0;tt.prototype.line=void 0;tt.prototype.ancestors=void 0;tt.prototype.cause=void 0;tt.prototype.fatal=void 0;tt.prototype.place=void 0;tt.prototype.ruleId=void 0;tt.prototype.source=void 0;const Dd={}.hasOwnProperty,SN=new Map,EN=/[A-Z]/g,CN=new Set(["table","tbody","thead","tfoot","tr"]),TN=new Set(["td","th"]),hb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function kN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=DN(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");i=ON(n,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?_d:Vk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=pb(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function pb(e,t,n){if(t.type==="element")return NN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return wN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return jN(e,t,n);if(t.type==="mdxjsEsm")return AN(e,t);if(t.type==="root")return _N(e,t,n);if(t.type==="text")return RN(e,t)}function NN(e,t,n){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=_d,e.schema=l),e.ancestors.push(t);const a=gb(e,t.tagName,!1),r=zN(e,t);let s=Ld(e,t);return CN.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!zk(u):!0})),mb(e,r,a,t),zd(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function wN(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}sr(e,t.position)}function AN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sr(e,t.position)}function jN(e,t,n){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=_d,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:gb(e,t.name,!0),r=LN(e,t),s=Ld(e,t);return mb(e,r,a,t),zd(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function _N(e,t,n){const i={};return zd(i,Ld(e,t)),e.create(t,e.Fragment,i,n)}function RN(e,t){return t.value}function mb(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function zd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function ON(e,t,n){return i;function i(l,a,r,s){const c=Array.isArray(r.children)?n:t;return s?c(a,r,s):c(a,r)}}function DN(e,t){return n;function n(i,l,a,r){const s=Array.isArray(a.children),u=Od(i);return t(l,a,r,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function zN(e,t){const n={};let i,l;for(l in t.properties)if(l!=="children"&&Dd.call(t.properties,l)){const a=MN(e,l,t.properties[l]);if(a){const[r,s]=a;e.tableCellAlignToStyle&&r==="align"&&typeof s=="string"&&TN.has(t.tagName)?i=s:n[r]=s}}if(i){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function LN(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const r=a.expression;r.type;const s=r.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else sr(e,t.position);else{const l=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const s=i.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else sr(e,t.position);else a=i.value===null?!0:i.value;n[l]=a}return n}function Ld(e,t){const n=[];let i=-1;const l=e.passKeys?new Map:SN;for(;++i<t.children.length;){const a=t.children[i];let r;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=l.get(u)||0;r=u+"-"+c,l.set(u,c+1)}}const s=pb(e,a,r);s!==void 0&&n.push(s)}return n}function MN(e,t,n){const i=qk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?jk(n):Yk(n)),i.property==="style"){let l=typeof n=="object"?n:BN(e,String(n));return e.stylePropertyNameCase==="css"&&(l=UN(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?Uk[i.property]||i.property:i.attribute,n]}}function BN(e,t){try{return vN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,l=new tt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=hb+"#cannot-parse-style-attribute",l}}function gb(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,r;for(;++a<l.length;){const s=mm(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};r=r?{type:"MemberExpression",object:r,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}i=r}else i=mm(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return Dd.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);sr(e)}function sr(e,t){const n=new tt("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=hb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function UN(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[IN(n)]=e[n]);return t}function IN(e){let t=e.replace(EN,HN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function HN(e){return"-"+e.toLowerCase()}const ju={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"]},qN={};function Md(e,t){const n=qN,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return yb(e,i,l)}function yb(e,t,n){if(FN(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 Nm(e.children,t,n)}return Array.isArray(e)?Nm(e,t,n):""}function Nm(e,t,n){const i=[];let l=-1;for(;++l<e.length;)i[l]=yb(e[l],t,n);return i.join("")}function FN(e){return!!(e&&typeof e=="object")}const wm=document.createElement("i");function Bd(e){const t="&"+e+";";wm.innerHTML=t;const n=wm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function At(e,t,n,i){const l=e.length;let a=0,r;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);a<i.length;)r=i.slice(a,a+1e4),r.unshift(t,0),e.splice(...r),a+=1e4,t+=1e4}function Ut(e,t){return e.length>0?(At(e,e.length,0,t),e):t}const Am={}.hasOwnProperty;function xb(e){const t={};let n=-1;for(;++n<e.length;)GN(t,e[n]);return t}function GN(e,t){let n;for(n in t){const l=(Am.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let r;if(a)for(r in a){Am.call(l,r)||(l[r]=[]);const s=a[r];VN(l[r],Array.isArray(s)?s:s?[s]:[])}}}function VN(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);At(e,0,0,i)}function vb(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 tn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const it=Ti(/[A-Za-z]/),et=Ti(/[\dA-Za-z]/),YN=Ti(/[#-'*+\--9=?A-Z^-~]/);function Ws(e){return e!==null&&(e<32||e===127)}const nf=Ti(/\d/),PN=Ti(/[\dA-Fa-f]/),XN=Ti(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}const jo=Ti(new RegExp("\\p{P}|\\p{S}","u")),Xi=Ti(/\s/);function Ti(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function la(e){const t=[];let n=-1,i=0,l=0;for(;++n<e.length;){const a=e.charCodeAt(n);let r="";if(a===37&&et(e.charCodeAt(n+1))&&et(e.charCodeAt(n+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(r=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(r=String.fromCharCode(a,s),l=1):r="�"}else r=String.fromCharCode(a);r&&(t.push(e.slice(i,n),encodeURIComponent(r)),i=n+l+1,r=""),l&&(n+=l,l=0)}return t.join("")+e.slice(i)}function oe(e,t,n,i){const l=i?i-1:Number.POSITIVE_INFINITY;let a=0;return r;function r(u){return ne(u)?(e.enter(n),s(u)):t(u)}function s(u){return ne(u)&&a++<l?(e.consume(u),s):(e.exit(n),t(u))}}const QN={tokenize:ZN};function ZN(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let n;return t;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),oe(e,t,"linePrefix")}function l(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,r(s)}function r(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Q(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),r)}}const KN={tokenize:$N},jm={tokenize:JN};function $N(e){const t=this,n=[];let i=0,l,a,r;return s;function s(v){if(i<n.length){const C=n[i];return t.containerState=C[1],e.attempt(C[0].continuation,u,c)(v)}return c(v)}function u(v){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&m();const C=t.events.length;let A=C,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}g(i);let _=C;for(;_<t.events.length;)t.events[_][1].end={...N},_++;return At(t.events,A+1,0,t.events.slice(C)),t.events.length=_,c(v)}return s(v)}function c(v){if(i===n.length){if(!l)return h(v);if(l.currentConstruct&&l.currentConstruct.concrete)return y(v);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(jm,d,f)(v)}function d(v){return l&&m(),g(i),h(v)}function f(v){return t.parser.lazy[t.now().line]=i!==n.length,r=t.now().offset,y(v)}function h(v){return t.containerState={},e.attempt(jm,p,y)(v)}function p(v){return i++,n.push([t.currentConstruct,t.containerState]),h(v)}function y(v){if(v===null){l&&m(),g(0),e.consume(v);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),x(v)}function x(v){if(v===null){E(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Q(v)?(e.consume(v),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(v),x)}function E(v,C){const A=t.sliceStream(v);if(C&&A.push(null),v.previous=a,a&&(a.next=v),a=v,l.defineSkip(v.start),l.write(A),t.parser.lazy[v.start.line]){let N=l.events.length;for(;N--;)if(l.events[N][1].start.offset<r&&(!l.events[N][1].end||l.events[N][1].end.offset>r))return;const _=t.events.length;let U=_,D,T;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){if(D){T=t.events[U][1].end;break}D=!0}for(g(i),N=_;N<t.events.length;)t.events[N][1].end={...T},N++;At(t.events,U+1,0,t.events.slice(_)),t.events.length=N}}function g(v){let C=n.length;for(;C-- >v;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=v}function m(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function JN(e,t,n){return oe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vl(e){if(e===null||xe(e)||Xi(e))return 1;if(jo(e))return 2}function _o(e,t,n){const i=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!i.includes(a)&&(t=a(t,n),i.push(a))}return t}const lf={name:"attention",resolveAll:WN,tokenize:ew};function WN(e,t){let n=-1,i,l,a,r,s,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[i][1].end},h={...e[n][1].start};_m(f,-u),_m(h,u),r={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},a={type:u>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},l={type:u>1?"strong":"emphasis",start:{...r.start},end:{...s.end}},e[i][1].end={...r.start},e[n][1].start={...s.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=Ut(c,[["enter",e[i][1],t],["exit",e[i][1],t]])),c=Ut(c,[["enter",l,t],["enter",r,t],["exit",r,t],["enter",a,t]]),c=Ut(c,_o(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),c=Ut(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=Ut(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,At(e,i-1,n-i+3,c),n=i+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ew(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Vl(i);let a;return r;function r(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const c=e.exit("attentionSequence"),d=Vl(u),f=!d||d===2&&l||n.includes(u),h=!l||l===2&&d||n.includes(i);return c._open=!!(a===42?f:f&&(l||!h)),c._close=!!(a===42?h:h&&(d||!f)),t(u)}}function _m(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const tw={name:"autolink",tokenize:nw};function nw(e,t,n){let i=0;return l;function l(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return it(p)?(e.consume(p),r):p===64?n(p):c(p)}function r(p){return p===43||p===45||p===46||et(p)?(i=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),i=0,u):(p===43||p===45||p===46||et(p))&&i++<32?(e.consume(p),s):(i=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ws(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),d):YN(p)?(e.consume(p),c):n(p)}function d(p){return et(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),i=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||et(p))&&i++<63){const y=p===45?h:f;return e.consume(p),y}return n(p)}}const Nr={partial:!0,tokenize:iw};function iw(e,t,n){return i;function i(a){return ne(a)?oe(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||Q(a)?t(a):n(a)}}const bb={continuation:{tokenize:aw},exit:rw,name:"blockQuote",tokenize:lw};function lw(e,t,n){const i=this;return l;function l(r){if(r===62){const s=i.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(r),e.exit("blockQuoteMarker"),a}return n(r)}function a(r){return ne(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}function aw(e,t,n){const i=this;return l;function l(r){return ne(r)?oe(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):a(r)}function a(r){return e.attempt(bb,t,n)(r)}}function rw(e){e.exit("blockQuote")}const Sb={name:"characterEscape",tokenize:sw};function sw(e,t,n){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return XN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Eb={name:"characterReference",tokenize:ow};function ow(e,t,n){const i=this;let l=0,a,r;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,r=et,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,r=PN,d):(e.enter("characterReferenceValue"),a=7,r=nf,d(f))}function d(f){if(f===59&&l){const h=e.exit("characterReferenceValue");return r===et&&!Bd(i.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return r(f)&&l++<a?(e.consume(f),d):n(f)}}const Rm={partial:!0,tokenize:cw},Om={concrete:!0,name:"codeFenced",tokenize:uw};function uw(e,t,n){const i=this,l={partial:!0,tokenize:A};let a=0,r=0,s;return u;function u(N){return c(N)}function c(N){const _=i.events[i.events.length-1];return a=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===s?(r++,e.consume(N),d):r<3?n(N):(e.exit("codeFencedFenceSequence"),ne(N)?oe(e,f,"whitespace")(N):f(N))}function f(N){return N===null||Q(N)?(e.exit("codeFencedFence"),i.interrupt?t(N):e.check(Rm,x,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):ne(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,p,"whitespace")(N)):N===96&&N===s?n(N):(e.consume(N),h)}function p(N){return N===null||Q(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(N))}function y(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===s?n(N):(e.consume(N),y)}function x(N){return e.attempt(l,C,E)(N)}function E(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return a>0&&ne(N)?oe(e,m,"linePrefix",a+1)(N):m(N)}function m(N){return N===null||Q(N)?e.check(Rm,x,C)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||Q(N)?(e.exit("codeFlowValue"),m(N)):(e.consume(N),v)}function C(N){return e.exit("codeFenced"),t(N)}function A(N,_,U){let D=0;return T;function T(V){return N.enter("lineEnding"),N.consume(V),N.exit("lineEnding"),M}function M(V){return N.enter("codeFencedFence"),ne(V)?oe(N,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):q(V)}function q(V){return V===s?(N.enter("codeFencedFenceSequence"),P(V)):U(V)}function P(V){return V===s?(D++,N.consume(V),P):D>=r?(N.exit("codeFencedFenceSequence"),ne(V)?oe(N,F,"whitespace")(V):F(V)):U(V)}function F(V){return V===null||Q(V)?(N.exit("codeFencedFence"),_(V)):U(V)}}}function cw(e,t,n){const i=this;return l;function l(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a)}function a(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const _u={name:"codeIndented",tokenize:dw},fw={partial:!0,tokenize:hw};function dw(e,t,n){const i=this;return l;function l(c){return e.enter("codeIndented"),oe(e,a,"linePrefix",5)(c)}function a(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?u(c):Q(c)?e.attempt(fw,r,u)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Q(c)?(e.exit("codeFlowValue"),r(c)):(e.consume(c),s)}function u(c){return e.exit("codeIndented"),t(c)}}function hw(e,t,n){const i=this;return l;function l(r){return i.parser.lazy[i.now().line]?n(r):Q(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),l):oe(e,a,"linePrefix",5)(r)}function a(r){const s=i.events[i.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(r):Q(r)?l(r):n(r)}}const pw={name:"codeText",previous:gw,resolve:mw,tokenize:yw};function mw(e){let t=e.length-4,n=3,i,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function gw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function yw(e,t,n){let i=0,l,a;return r;function r(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),i++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),l=0,d(f)):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Q(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),l++,d):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class xw{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const l=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&ya(this.left,i),a.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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 Cb(e){const t={};let n=-1,i,l,a,r,s,u,c;const d=new xw(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(i=d.get(n),n&&i[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,vw(d,n)),n=t[n],c=!0);else if(i[1]._container){for(a=n,l=void 0;a--;)if(r=d.get(a),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank")r[0]==="enter"&&(l&&(d.get(l)[1].type="lineEndingBlank"),r[1].type="lineEnding",l=a);else if(!(r[1].type==="linePrefix"||r[1].type==="listItemIndent"))break;l&&(i[1].end={...d.get(l)[1].start},s=d.slice(l,n),s.unshift(i),d.splice(l,n-l+1,s))}}return At(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function vw(e,t){const n=e.get(t)[1],i=e.get(t)[2];let l=t-1;const a=[];let r=n._tokenizer;r||(r=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(r._contentTypeTextTrailing=!0));const s=r.events,u=[],c={};let d,f,h=-1,p=n,y=0,x=0;const E=[x];for(;p;){for(;e.get(++l)[1]!==p;);a.push(l),p._tokenizer||(d=i.sliceStream(p),p.next||d.push(null),f&&r.defineSkip(p.start),p._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(d),p._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(x=h+1,E.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(r.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),h=E.length;h--;){const g=s.slice(E[h],E[h+1]),m=a.pop();u.push([m,m+g.length-1]),e.splice(m,2,g)}for(u.reverse(),h=-1;++h<u.length;)c[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return c}const bw={resolve:Ew,tokenize:Cw},Sw={partial:!0,tokenize:Tw};function Ew(e){return Cb(e),e}function Cw(e,t){let n;return i;function i(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(s)}function l(s){return s===null?a(s):Q(s)?e.check(Sw,r,a)(s):(e.consume(s),l)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function r(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function Tw(e,t,n){const i=this;return l;function l(r){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),oe(e,a,"linePrefix")}function a(r){if(r===null||Q(r))return n(r);const s=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function Tb(e,t,n,i,l,a,r,s,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(g){return g===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(g),e.exit(a),h):g===null||g===32||g===41||Ws(g)?n(g):(e.enter(i),e.enter(r),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),h(g)):g===null||g===60||Q(g)?n(g):(e.consume(g),g===92?y:p)}function y(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function x(g){return!d&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(s),e.exit(r),e.exit(i),t(g)):d<c&&g===40?(e.consume(g),d++,x):g===41?(e.consume(g),d--,x):g===null||g===32||g===40||Ws(g)?n(g):(e.consume(g),g===92?E:x)}function E(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function kb(e,t,n,i,l,a){const r=this;let s=0,u;return c;function c(p){return e.enter(i),e.enter(l),e.consume(p),e.exit(l),e.enter(a),d}function d(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in r.parser.constructs?n(p):p===93?(e.exit(a),e.enter(l),e.consume(p),e.exit(l),e.exit(i),t):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Q(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!ne(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function Nb(e,t,n,i,l,a){let r;return s;function s(h){return h===34||h===39||h===40?(e.enter(i),e.enter(l),e.consume(h),e.exit(l),r=h===40?41:h,u):n(h)}function u(h){return h===r?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),t):(e.enter(a),c(h))}function c(h){return h===r?(e.exit(a),u(r)):h===null?n(h):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),oe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===r||h===null||Q(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?f:d)}function f(h){return h===r||h===92?(e.consume(h),d):d(h)}}function Fa(e,t){let n;return i;function i(l){return Q(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,i):ne(l)?oe(e,i,n?"linePrefix":"lineSuffix")(l):t(l)}}const kw={name:"definition",tokenize:ww},Nw={partial:!0,tokenize:Aw};function ww(e,t,n){const i=this;let l;return a;function a(p){return e.enter("definition"),r(p)}function r(p){return kb.call(i,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return l=tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return xe(p)?Fa(e,c)(p):c(p)}function c(p){return Tb(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(Nw,f,f)(p)}function f(p){return ne(p)?oe(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Q(p)?(e.exit("definition"),i.parser.defined.push(l),t(p)):n(p)}}function Aw(e,t,n){return i;function i(s){return xe(s)?Fa(e,l)(s):n(s)}function l(s){return Nb(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return ne(s)?oe(e,r,"whitespace")(s):r(s)}function r(s){return s===null||Q(s)?t(s):n(s)}}const jw={name:"hardBreakEscape",tokenize:_w};function _w(e,t,n){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return Q(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Rw={name:"headingAtx",resolve:Ow,tokenize:Dw};function Ow(e,t){let n=e.length-2,i=3,l,a;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},a={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},At(e,i,n-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function Dw(e,t,n){let i=0;return l;function l(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),r(d)}function r(d){return d===35&&i++<6?(e.consume(d),r):d===null||xe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Q(d)?(e.exit("atxHeading"),t(d)):ne(d)?oe(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||xe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const zw=["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"],Dm=["pre","script","style","textarea"],Lw={concrete:!0,name:"htmlFlow",resolveTo:Uw,tokenize:Iw},Mw={partial:!0,tokenize:qw},Bw={partial:!0,tokenize:Hw};function Uw(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 Iw(e,t,n){const i=this;let l,a,r,s,u;return c;function c(k){return d(k)}function d(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),f}function f(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),a=!0,x):k===63?(e.consume(k),l=3,i.interrupt?t:S):it(k)?(e.consume(k),r=String.fromCharCode(k),E):n(k)}function h(k){return k===45?(e.consume(k),l=2,p):k===91?(e.consume(k),l=5,s=0,y):it(k)?(e.consume(k),l=4,i.interrupt?t:S):n(k)}function p(k){return k===45?(e.consume(k),i.interrupt?t:S):n(k)}function y(k){const _e="CDATA[";return k===_e.charCodeAt(s++)?(e.consume(k),s===_e.length?i.interrupt?t:q:y):n(k)}function x(k){return it(k)?(e.consume(k),r=String.fromCharCode(k),E):n(k)}function E(k){if(k===null||k===47||k===62||xe(k)){const _e=k===47,st=r.toLowerCase();return!_e&&!a&&Dm.includes(st)?(l=1,i.interrupt?t(k):q(k)):zw.includes(r.toLowerCase())?(l=6,_e?(e.consume(k),g):i.interrupt?t(k):q(k)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(k):a?m(k):v(k))}return k===45||et(k)?(e.consume(k),r+=String.fromCharCode(k),E):n(k)}function g(k){return k===62?(e.consume(k),i.interrupt?t:q):n(k)}function m(k){return ne(k)?(e.consume(k),m):T(k)}function v(k){return k===47?(e.consume(k),T):k===58||k===95||it(k)?(e.consume(k),C):ne(k)?(e.consume(k),v):T(k)}function C(k){return k===45||k===46||k===58||k===95||et(k)?(e.consume(k),C):A(k)}function A(k){return k===61?(e.consume(k),N):ne(k)?(e.consume(k),A):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),u=k,_):ne(k)?(e.consume(k),N):U(k)}function _(k){return k===u?(e.consume(k),u=null,D):k===null||Q(k)?n(k):(e.consume(k),_)}function U(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||xe(k)?A(k):(e.consume(k),U)}function D(k){return k===47||k===62||ne(k)?v(k):n(k)}function T(k){return k===62?(e.consume(k),M):n(k)}function M(k){return k===null||Q(k)?q(k):ne(k)?(e.consume(k),M):n(k)}function q(k){return k===45&&l===2?(e.consume(k),j):k===60&&l===1?(e.consume(k),O):k===62&&l===4?(e.consume(k),we):k===63&&l===3?(e.consume(k),S):k===93&&l===5?(e.consume(k),X):Q(k)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Mw,We,P)(k)):k===null||Q(k)?(e.exit("htmlFlowData"),P(k)):(e.consume(k),q)}function P(k){return e.check(Bw,F,We)(k)}function F(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),V}function V(k){return k===null||Q(k)?P(k):(e.enter("htmlFlowData"),q(k))}function j(k){return k===45?(e.consume(k),S):q(k)}function O(k){return k===47?(e.consume(k),r="",w):q(k)}function w(k){if(k===62){const _e=r.toLowerCase();return Dm.includes(_e)?(e.consume(k),we):q(k)}return it(k)&&r.length<8?(e.consume(k),r+=String.fromCharCode(k),w):q(k)}function X(k){return k===93?(e.consume(k),S):q(k)}function S(k){return k===62?(e.consume(k),we):k===45&&l===2?(e.consume(k),S):q(k)}function we(k){return k===null||Q(k)?(e.exit("htmlFlowData"),We(k)):(e.consume(k),we)}function We(k){return e.exit("htmlFlow"),t(k)}}function Hw(e,t,n){const i=this;return l;function l(r){return Q(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a):n(r)}function a(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function qw(e,t,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Nr,t,n)}}const Fw={name:"htmlText",tokenize:Gw};function Gw(e,t,n){const i=this;let l,a,r;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),c):S===47?(e.consume(S),A):S===63?(e.consume(S),v):it(S)?(e.consume(S),U):n(S)}function c(S){return S===45?(e.consume(S),d):S===91?(e.consume(S),a=0,y):it(S)?(e.consume(S),m):n(S)}function d(S){return S===45?(e.consume(S),p):n(S)}function f(S){return S===null?n(S):S===45?(e.consume(S),h):Q(S)?(r=f,O(S)):(e.consume(S),f)}function h(S){return S===45?(e.consume(S),p):f(S)}function p(S){return S===62?j(S):S===45?h(S):f(S)}function y(S){const we="CDATA[";return S===we.charCodeAt(a++)?(e.consume(S),a===we.length?x:y):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),E):Q(S)?(r=x,O(S)):(e.consume(S),x)}function E(S){return S===93?(e.consume(S),g):x(S)}function g(S){return S===62?j(S):S===93?(e.consume(S),g):x(S)}function m(S){return S===null||S===62?j(S):Q(S)?(r=m,O(S)):(e.consume(S),m)}function v(S){return S===null?n(S):S===63?(e.consume(S),C):Q(S)?(r=v,O(S)):(e.consume(S),v)}function C(S){return S===62?j(S):v(S)}function A(S){return it(S)?(e.consume(S),N):n(S)}function N(S){return S===45||et(S)?(e.consume(S),N):_(S)}function _(S){return Q(S)?(r=_,O(S)):ne(S)?(e.consume(S),_):j(S)}function U(S){return S===45||et(S)?(e.consume(S),U):S===47||S===62||xe(S)?D(S):n(S)}function D(S){return S===47?(e.consume(S),j):S===58||S===95||it(S)?(e.consume(S),T):Q(S)?(r=D,O(S)):ne(S)?(e.consume(S),D):j(S)}function T(S){return S===45||S===46||S===58||S===95||et(S)?(e.consume(S),T):M(S)}function M(S){return S===61?(e.consume(S),q):Q(S)?(r=M,O(S)):ne(S)?(e.consume(S),M):D(S)}function q(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,P):Q(S)?(r=q,O(S)):ne(S)?(e.consume(S),q):(e.consume(S),F)}function P(S){return S===l?(e.consume(S),l=void 0,V):S===null?n(S):Q(S)?(r=P,O(S)):(e.consume(S),P)}function F(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||xe(S)?D(S):(e.consume(S),F)}function V(S){return S===47||S===62||xe(S)?D(S):n(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function O(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),w}function w(S){return ne(S)?oe(e,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):X(S)}function X(S){return e.enter("htmlTextData"),r(S)}}const Ud={name:"labelEnd",resolveAll:Xw,resolveTo:Qw,tokenize:Zw},Vw={tokenize:Kw},Yw={tokenize:$w},Pw={tokenize:Jw};function Xw(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==n.length&&At(e,0,e.length,n),e}function Qw(e,t){let n=e.length,i=0,l,a,r,s;for(;n--;)if(l=e[n][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(r){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=n,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(r=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[r][1].end}},d={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[r-2][1].start}};return s=[["enter",u,t],["enter",c,t]],s=Ut(s,e.slice(a+1,a+i+3)),s=Ut(s,[["enter",d,t]]),s=Ut(s,_o(t.parser.constructs.insideSpan.null,e.slice(a+i+4,r-3),t)),s=Ut(s,[["exit",d,t],e[r-2],e[r-1],["exit",c,t]]),s=Ut(s,e.slice(r+1)),s=Ut(s,[["exit",u,t]]),At(e,a,e.length,s),e}function Zw(e,t,n){const i=this;let l=i.events.length,a,r;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){a=i.events[l][1];break}return s;function s(h){return a?a._inactive?f(h):(r=i.parser.defined.includes(tn(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(Vw,d,r?d:f)(h):h===91?e.attempt(Yw,d,r?c:f)(h):r?d(h):f(h)}function c(h){return e.attempt(Pw,d,f)(h)}function d(h){return t(h)}function f(h){return a._balanced=!0,n(h)}}function Kw(e,t,n){return i;function i(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),l}function l(f){return xe(f)?Fa(e,a)(f):a(f)}function a(f){return f===41?d(f):Tb(e,r,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function r(f){return xe(f)?Fa(e,u)(f):d(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Nb(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return xe(f)?Fa(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function $w(e,t,n){const i=this;return l;function l(s){return kb.call(i,e,a,r,"reference","referenceMarker","referenceString")(s)}function a(s){return i.parser.defined.includes(tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function r(s){return n(s)}}function Jw(e,t,n){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const Ww={name:"labelStartImage",resolveAll:Ud.resolveAll,tokenize:eA};function eA(e,t,n){const i=this;return l;function l(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),r):n(s)}function r(s){return s===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(s):t(s)}}const tA={name:"labelStartLink",resolveAll:Ud.resolveAll,tokenize:nA};function nA(e,t,n){const i=this;return l;function l(r){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(r),e.exit("labelMarker"),e.exit("labelLink"),a}function a(r){return r===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(r):t(r)}}const Ru={name:"lineEnding",tokenize:iA};function iA(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const bs={name:"thematicBreak",tokenize:lA};function lA(e,t,n){let i=0,l;return a;function a(c){return e.enter("thematicBreak"),r(c)}function r(c){return l=c,s(c)}function s(c){return c===l?(e.enter("thematicBreakSequence"),u(c)):i>=3&&(c===null||Q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===l?(e.consume(c),i++,u):(e.exit("thematicBreakSequence"),ne(c)?oe(e,s,"whitespace")(c):s(c))}}const ft={continuation:{tokenize:oA},exit:cA,name:"list",tokenize:sA},aA={partial:!0,tokenize:fA},rA={partial:!0,tokenize:uA};function sA(e,t,n){const i=this,l=i.events[i.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,r=0;return s;function s(p){const y=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:nf(p)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(bs,n,c)(p):c(p);if(!i.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return nf(p)&&++r<10?(e.consume(p),u):(!i.interrupt||r<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,e.check(Nr,i.interrupt?n:d,e.attempt(aA,h,f))}function d(p){return i.containerState.initialBlankLine=!0,a++,h(p)}function f(p){return ne(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function oA(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Nr,l,a);function l(s){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,oe(e,t,"listItemIndent",i.containerState.size+1)(s)}function a(s){return i.containerState.furtherBlankLines||!ne(s)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(s)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(rA,t,r)(s))}function r(s){return i.containerState._closeFlow=!0,i.interrupt=void 0,oe(e,e.attempt(ft,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function uA(e,t,n){const i=this;return oe(e,l,"listItemIndent",i.containerState.size+1);function l(a){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(a):n(a)}}function cA(e){e.exit(this.containerState.type)}function fA(e,t,n){const i=this;return oe(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const r=i.events[i.events.length-1];return!ne(a)&&r&&r[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const zm={name:"setextUnderline",resolveTo:dA,tokenize:hA};function dA(e,t){let n=e.length,i,l,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",r,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function hA(e,t,n){const i=this;let l;return a;function a(c){let d=i.events.length,f;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){f=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),l=c,r(c)):n(c)}function r(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===l?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ne(c)?oe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const pA={tokenize:mA};function mA(e){const t=this,n=e.attempt(Nr,i,e.attempt(this.parser.constructs.flowInitial,l,oe(e,e.attempt(this.parser.constructs.flow,l,e.attempt(bw,l)),"linePrefix")));return n;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const gA={resolveAll:Ab()},yA=wb("string"),xA=wb("text");function wb(e){return{resolveAll:Ab(e==="text"?vA:void 0),tokenize:t};function t(n){const i=this,l=this.parser.constructs[e],a=n.attempt(l,r,s);return r;function r(d){return c(d)?a(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=l[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(i,i.previous))return!0}return!1}}}function Ab(e){return t;function t(n,i){let l=-1,a;for(;++l<=n.length;)a===void 0?n[l]&&n[l][1].type==="data"&&(a=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==a+2&&(n[a][1].end=n[l-1][1].end,n.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(n,i):n}}function vA(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 i=e[n-1][1],l=t.sliceStream(i);let a=l.length,r=-1,s=0,u;for(;a--;){const c=l[a];if(typeof c=="string"){for(r=c.length;c.charCodeAt(r-1)===32;)s++,r--;if(r)break;r=-1}else if(c===-2)u=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?r:i.start._bufferIndex+r,_index:i.start._index+a,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const bA={42:ft,43:ft,45:ft,48:ft,49:ft,50:ft,51:ft,52:ft,53:ft,54:ft,55:ft,56:ft,57:ft,62:bb},SA={91:kw},EA={[-2]:_u,[-1]:_u,32:_u},CA={35:Rw,42:bs,45:[zm,bs],60:Lw,61:zm,95:bs,96:Om,126:Om},TA={38:Eb,92:Sb},kA={[-5]:Ru,[-4]:Ru,[-3]:Ru,33:Ww,38:Eb,42:lf,60:[tw,Fw],91:tA,92:[jw,Sb],93:Ud,95:lf,96:pw},NA={null:[lf,gA]},wA={null:[42,95]},AA={null:[]},jA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:wA,contentInitial:SA,disable:AA,document:bA,flow:CA,flowInitial:EA,insideSpan:NA,string:TA,text:kA},Symbol.toStringTag,{value:"Module"}));function _A(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},a=[];let r=[],s=[];const u={attempt:_(A),check:_(N),consume:m,enter:v,exit:C,interrupt:_(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(M){return r=Ut(r,M),E(),r[r.length-1]!==null?[]:(U(t,0),c.events=_o(a,c.events,c),c.events)}function h(M,q){return OA(p(M),q)}function p(M){return RA(r,M)}function y(){const{_bufferIndex:M,_index:q,line:P,column:F,offset:V}=i;return{_bufferIndex:M,_index:q,line:P,column:F,offset:V}}function x(M){l[M.line]=M.column,T()}function E(){let M;for(;i._index<r.length;){const q=r[i._index];if(typeof q=="string")for(M=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===M&&i._bufferIndex<q.length;)g(q.charCodeAt(i._bufferIndex));else g(q)}}function g(M){d=d(M)}function m(M){Q(M)?(i.line++,i.column=1,i.offset+=M===-3?2:1,T()):M!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===r[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=M}function v(M,q){const P=q||{};return P.type=M,P.start=y(),c.events.push(["enter",P,c]),s.push(P),P}function C(M){const q=s.pop();return q.end=y(),c.events.push(["exit",q,c]),q}function A(M,q){U(M,q.from)}function N(M,q){q.restore()}function _(M,q){return P;function P(F,V,j){let O,w,X,S;return Array.isArray(F)?We(F):"tokenize"in F?We([F]):we(F);function we(Ie){return ki;function ki(ln){const Gn=ln!==null&&Ie[ln],Vn=ln!==null&&Ie.null,Ni=[...Array.isArray(Gn)?Gn:Gn?[Gn]:[],...Array.isArray(Vn)?Vn:Vn?[Vn]:[]];return We(Ni)(ln)}}function We(Ie){return O=Ie,w=0,Ie.length===0?j:k(Ie[w])}function k(Ie){return ki;function ki(ln){return S=D(),X=Ie,Ie.partial||(c.currentConstruct=Ie),Ie.name&&c.parser.constructs.disable.null.includes(Ie.name)?st():Ie.tokenize.call(q?Object.assign(Object.create(c),q):c,u,_e,st)(ln)}}function _e(Ie){return M(X,S),V}function st(Ie){return S.restore(),++w<O.length?k(O[w]):j}}}function U(M,q){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&At(c.events,q,c.events.length-q,M.resolve(c.events.slice(q),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function D(){const M=y(),q=c.previous,P=c.currentConstruct,F=c.events.length,V=Array.from(s);return{from:F,restore:j};function j(){i=M,c.previous=q,c.currentConstruct=P,c.events.length=F,s=V,T()}}function T(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function RA(e,t){const n=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let r;if(n===l)r=[e[n].slice(i,a)];else{if(r=e.slice(n,l),i>-1){const s=r[0];typeof s=="string"?r[0]=s.slice(i):r.shift()}a>0&&r.push(e[l].slice(0,a))}return r}function OA(e,t){let n=-1;const i=[];let l;for(;++n<e.length;){const a=e[n];let r;if(typeof a=="string")r=a;else switch(a){case-5:{r="\r";break}case-4:{r=`
60
+ Please change the parent <Route path="${g}"> to <Route path="${g==="/"?"*":`${g}/*`}">.`)}let d=rt(),f;if(t){let g=typeof t=="string"?Wl(t):t;Ne(u==="/"||((E=g.pathname)==null?void 0:E.startsWith(u)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${u}" but pathname "${g.pathname}" was given in the \`location\` prop.`),f=g}else f=d;let h=f.pathname||"/",p=h;if(u!=="/"){let g=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(g.length).join("/")}let y=xv(e,{pathname:p});Yt(c||y!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),Yt(y==null||y[y.length-1].route.element!==void 0||y[y.length-1].route.Component!==void 0||y[y.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let x=oC(y&&y.map(g=>Object.assign({},g,{params:Object.assign({},r,g.params),pathname:pn([u,i.encodeLocation?i.encodeLocation(g.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?u:pn([u,i.encodeLocation?i.encodeLocation(g.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:g.pathnameBase])})),l,n);return t&&x?b.createElement(Sr.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...f},navigationType:"POP"}},x):x}function lC(){let e=hC(),t=GE(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,i="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:i},a={padding:"2px 4px",backgroundColor:i},r=null;return console.error("Error handled by React Router default ErrorBoundary:",e),r=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:a},"ErrorBoundary")," or"," ",b.createElement("code",{style:a},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),n?b.createElement("pre",{style:l},n):null,r)}var aC=b.createElement(lC,null),_v=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=JE(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Pt.Provider,{value:this.props.routeContext},b.createElement(dd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(rC,{error:e},t):t}};_v.contextType=Tv;var Su=new WeakMap;function rC({children:e,error:t}){let{basename:n}=b.useContext(Rt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let i=$E(t.digest);if(i){let l=Su.get(t);if(l)throw l;let a=Ev(i.location,n);if(Sv&&!Su.get(t))if(a.isExternal||i.reloadDocument)window.location.href=a.absoluteURL||a.to;else{const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:i.replace}));throw Su.set(t,r),r}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function sC({routeContext:e,match:t,children:n}){let i=b.useContext(ea);return i&&i.static&&i.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Pt.Provider,{value:e},n)}function oC(e,t=[],n){let i=n==null?void 0:n.state;if(e==null){if(!i)return null;if(i.errors)e=i.matches;else if(t.length===0&&!i.initialized&&i.matches.length>0)e=i.matches;else return null}let l=e,a=i==null?void 0:i.errors;if(a!=null){let d=l.findIndex(f=>f.route.id&&(a==null?void 0:a[f.route.id])!==void 0);Ne(d>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(",")}`),l=l.slice(0,Math.min(l.length,d+1))}let r=!1,s=-1;if(n&&i){r=i.renderFallback;for(let d=0;d<l.length;d++){let f=l[d];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(s=d),f.route.id){let{loaderData:h,errors:p}=i,y=f.route.loader&&!h.hasOwnProperty(f.route.id)&&(!p||p[f.route.id]===void 0);if(f.route.lazy||y){n.isStatic&&(r=!0),s>=0?l=l.slice(0,s+1):l=[l[0]];break}}}}let u=n==null?void 0:n.onError,c=i&&u?(d,f)=>{var h,p;u(d,{location:i.location,params:((p=(h=i.matches)==null?void 0:h[0])==null?void 0:p.params)??{},unstable_pattern:VE(i.matches),errorInfo:f})}:void 0;return l.reduceRight((d,f,h)=>{let p,y=!1,x=null,E=null;i&&(p=a&&f.route.id?a[f.route.id]:void 0,x=f.route.errorElement||aC,r&&(s<0&&h===0?(Rv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),y=!0,E=null):s===h&&(y=!0,E=f.route.hydrateFallbackElement||null)));let g=t.concat(l.slice(0,h+1)),m=()=>{let v;return p?v=x:y?v=E:f.route.Component?v=b.createElement(f.route.Component,null):f.route.element?v=f.route.element:v=d,b.createElement(sC,{match:f,routeContext:{outlet:d,matches:g,isDataRoute:i!=null},children:v})};return i&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?b.createElement(_v,{location:i.location,revalidation:i.revalidation,component:x,error:p,children:m(),routeContext:{outlet:null,matches:g,isDataRoute:!0},onError:c}):m()},null)}function hd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uC(e){let t=b.useContext(ea);return Ne(t,hd(e)),t}function cC(e){let t=b.useContext(To);return Ne(t,hd(e)),t}function fC(e){let t=b.useContext(Pt);return Ne(t,hd(e)),t}function pd(e){let t=fC(e),n=t.matches[t.matches.length-1];return Ne(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function dC(){return pd("useRouteId")}function hC(){var i;let e=b.useContext(dd),t=cC("useRouteError"),n=pd("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function pC(){let{router:e}=uC("useNavigate"),t=pd("useNavigate"),n=b.useRef(!1);return Av(()=>{n.current=!0}),b.useCallback(async(l,a={})=>{Yt(n.current,wv),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...a}))},[e,t])}var Rp={};function Rv(e,t,n){!t&&!Rp[e]&&(Rp[e]=!0,Yt(!1,n))}b.memo(mC);function mC({routes:e,future:t,state:n,isStatic:i,onError:l}){return jv(e,void 0,{state:n,isStatic:i,onError:l})}function gC({to:e,replace:t,state:n,relative:i}){Ne(ta(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l}=b.useContext(Rt);Yt(!l,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:a}=b.useContext(Pt),{pathname:r}=rt(),s=Je(),u=Co(e,fd(a),r,i==="path"),c=JSON.stringify(u);return b.useEffect(()=>{s(JSON.parse(c),{replace:t,state:n,relative:i})},[s,c,i,t,n]),null}function md(e){return nC(e.context)}function qe(e){Ne(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function yC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:l,static:a=!1,unstable_useTransitions:r}){Ne(!ta(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let s=e.replace(/^\/*/,"/"),u=b.useMemo(()=>({basename:s,navigator:l,static:a,unstable_useTransitions:r,future:{}}),[s,l,a,r]);typeof n=="string"&&(n=Wl(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default",unstable_mask:y}=n,x=b.useMemo(()=>{let E=Hn(c,s);return E==null?null:{location:{pathname:E,search:d,hash:f,state:h,key:p,unstable_mask:y},navigationType:i}},[s,c,d,f,h,p,i,y]);return Yt(x!=null,`<Router basename="${s}"> is not able to match the URL "${c}${d}${f}" because it does not start with the basename, so the <Router> won't render anything.`),x==null?null:b.createElement(Rt.Provider,{value:u},b.createElement(Sr.Provider,{children:t,value:x}))}function xC({children:e,location:t}){return iC(Hc(e),t)}function Hc(e,t=[]){let n=[];return b.Children.forEach(e,(i,l)=>{if(!b.isValidElement(i))return;let a=[...t,l];if(i.type===b.Fragment){n.push.apply(n,Hc(i.props.children,a));return}Ne(i.type===qe,`[${typeof i.type=="string"?i.type:i.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ne(!i.props.index||!i.props.children,"An index route cannot have child routes.");let r={id:i.props.id||a.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,middleware:i.props.middleware,loader:i.props.loader,action:i.props.action,hydrateFallbackElement:i.props.hydrateFallbackElement,HydrateFallback:i.props.HydrateFallback,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.hasErrorBoundary===!0||i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(r.children=Hc(i.props.children,a)),n.push(r)}),n}var ms="get",gs="application/x-www-form-urlencoded";function ko(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function vC(e){return ko(e)&&e.tagName.toLowerCase()==="button"}function bC(e){return ko(e)&&e.tagName.toLowerCase()==="form"}function SC(e){return ko(e)&&e.tagName.toLowerCase()==="input"}function EC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function CC(e,t){return e.button===0&&(!t||t==="_self")&&!EC(e)}function qc(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let i=e[n];return t.concat(Array.isArray(i)?i.map(l=>[n,l]):[[n,i]])},[]))}function TC(e,t){let n=qc(e);return t&&t.forEach((i,l)=>{n.has(l)||t.getAll(l).forEach(a=>{n.append(l,a)})}),n}var Yr=null;function kC(){if(Yr===null)try{new FormData(document.createElement("form"),0),Yr=!1}catch{Yr=!0}return Yr}var NC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Eu(e){return e!=null&&!NC.has(e)?(Yt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${gs}"`),null):e}function wC(e,t){let n,i,l,a,r;if(bC(e)){let s=e.getAttribute("action");i=s?Hn(s,t):null,n=e.getAttribute("method")||ms,l=Eu(e.getAttribute("enctype"))||gs,a=new FormData(e)}else if(vC(e)||SC(e)&&(e.type==="submit"||e.type==="image")){let s=e.form;if(s==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let u=e.getAttribute("formaction")||s.getAttribute("action");if(i=u?Hn(u,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||ms,l=Eu(e.getAttribute("formenctype"))||Eu(s.getAttribute("enctype"))||gs,a=new FormData(s,e),!kC()){let{name:c,type:d,value:f}=e;if(d==="image"){let h=c?`${c}.`:"";a.append(`${h}x`,"0"),a.append(`${h}y`,"0")}else c&&a.append(c,f)}}else{if(ko(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ms,i=null,l=gs,r=e}return a&&l==="text/plain"&&(r=a,a=void 0),{action:i,method:n.toLowerCase(),encType:l,formData:a,body:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function gd(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ov(e,t,n,i){let l=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?l.pathname.endsWith("/")?l.pathname=`${l.pathname}_.${i}`:l.pathname=`${l.pathname}.${i}`:l.pathname==="/"?l.pathname=`_root.${i}`:t&&Hn(l.pathname,t)==="/"?l.pathname=`${t.replace(/\/$/,"")}/_root.${i}`:l.pathname=`${l.pathname.replace(/\/$/,"")}.${i}`,l}async function AC(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function jC(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function _C(e,t,n){let i=await Promise.all(e.map(async l=>{let a=t.routes[l.route.id];if(a){let r=await AC(a,n);return r.links?r.links():[]}return[]}));return zC(i.flat(1).filter(jC).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Op(e,t,n,i,l,a){let r=(u,c)=>n[c]?u.route.id!==n[c].route.id:!0,s=(u,c)=>{var d;return n[c].pathname!==u.pathname||((d=n[c].route.path)==null?void 0:d.endsWith("*"))&&n[c].params["*"]!==u.params["*"]};return a==="assets"?t.filter((u,c)=>r(u,c)||s(u,c)):a==="data"?t.filter((u,c)=>{var f;let d=i.routes[u.route.id];if(!d||!d.hasLoader)return!1;if(r(u,c)||s(u,c))return!0;if(u.route.shouldRevalidate){let h=u.route.shouldRevalidate({currentUrl:new URL(l.pathname+l.search+l.hash,window.origin),currentParams:((f=n[0])==null?void 0:f.params)||{},nextUrl:new URL(e,window.origin),nextParams:u.params,defaultShouldRevalidate:!0});if(typeof h=="boolean")return h}return!0}):[]}function RC(e,t,{includeHydrateFallback:n}={}){return OC(e.map(i=>{let l=t.routes[i.route.id];if(!l)return[];let a=[l.module];return l.clientActionModule&&(a=a.concat(l.clientActionModule)),l.clientLoaderModule&&(a=a.concat(l.clientLoaderModule)),n&&l.hydrateFallbackModule&&(a=a.concat(l.hydrateFallbackModule)),l.imports&&(a=a.concat(l.imports)),a}).flat(1))}function OC(e){return[...new Set(e)]}function DC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function zC(e,t){let n=new Set;return new Set(t),e.reduce((i,l)=>{let a=JSON.stringify(DC(l));return n.has(a)||(n.add(a),i.push({key:a,link:l})),i},[])}function yd(){let e=b.useContext(ea);return gd(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function LC(){let e=b.useContext(To);return gd(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var xd=b.createContext(void 0);xd.displayName="FrameworkContext";function vd(){let e=b.useContext(xd);return gd(e,"You must render this element inside a <HydratedRouter> element"),e}function MC(e,t){let n=b.useContext(xd),[i,l]=b.useState(!1),[a,r]=b.useState(!1),{onFocus:s,onBlur:u,onMouseEnter:c,onMouseLeave:d,onTouchStart:f}=t,h=b.useRef(null);b.useEffect(()=>{if(e==="render"&&r(!0),e==="viewport"){let x=g=>{g.forEach(m=>{r(m.isIntersecting)})},E=new IntersectionObserver(x,{threshold:.5});return h.current&&E.observe(h.current),()=>{E.disconnect()}}},[e]),b.useEffect(()=>{if(i){let x=setTimeout(()=>{r(!0)},100);return()=>{clearTimeout(x)}}},[i]);let p=()=>{l(!0)},y=()=>{l(!1),r(!1)};return n?e!=="intent"?[a,h,{}]:[a,h,{onFocus:pa(s,p),onBlur:pa(u,y),onMouseEnter:pa(c,p),onMouseLeave:pa(d,y),onTouchStart:pa(f,p)}]:[!1,h,{}]}function pa(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function BC({page:e,...t}){let n=PE(),{router:i}=yd(),l=b.useMemo(()=>xv(i.routes,e,i.basename),[i.routes,e,i.basename]);return l?n?b.createElement(IC,{page:e,matches:l,...t}):b.createElement(HC,{page:e,matches:l,...t}):null}function UC(e){let{manifest:t,routeModules:n}=vd(),[i,l]=b.useState([]);return b.useEffect(()=>{let a=!1;return _C(e,t,n).then(r=>{a||l(r)}),()=>{a=!0}},[e,t,n]),i}function IC({page:e,matches:t,...n}){let i=rt(),{future:l}=vd(),{basename:a}=yd(),r=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let s=Ov(e,a,l.unstable_trailingSlashAwareDataRequests,"rsc"),u=!1,c=[];for(let d of t)typeof d.route.shouldRevalidate=="function"?u=!0:c.push(d.route.id);return u&&c.length>0&&s.searchParams.set("_routes",c.join(",")),[s.pathname+s.search]},[a,l.unstable_trailingSlashAwareDataRequests,e,i,t]);return b.createElement(b.Fragment,null,r.map(s=>b.createElement("link",{key:s,rel:"prefetch",as:"fetch",href:s,...n})))}function HC({page:e,matches:t,...n}){let i=rt(),{future:l,manifest:a,routeModules:r}=vd(),{basename:s}=yd(),{loaderData:u,matches:c}=LC(),d=b.useMemo(()=>Op(e,t,c,a,i,"data"),[e,t,c,a,i]),f=b.useMemo(()=>Op(e,t,c,a,i,"assets"),[e,t,c,a,i]),h=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let x=new Set,E=!1;if(t.forEach(m=>{var C;let v=a.routes[m.route.id];!v||!v.hasLoader||(!d.some(A=>A.route.id===m.route.id)&&m.route.id in u&&((C=r[m.route.id])!=null&&C.shouldRevalidate)||v.hasClientLoader?E=!0:x.add(m.route.id))}),x.size===0)return[];let g=Ov(e,s,l.unstable_trailingSlashAwareDataRequests,"data");return E&&x.size>0&&g.searchParams.set("_routes",t.filter(m=>x.has(m.route.id)).map(m=>m.route.id).join(",")),[g.pathname+g.search]},[s,l.unstable_trailingSlashAwareDataRequests,u,i,a,d,t,e,r]),p=b.useMemo(()=>RC(f,a),[f,a]),y=UC(f);return b.createElement(b.Fragment,null,h.map(x=>b.createElement("link",{key:x,rel:"prefetch",as:"fetch",href:x,...n})),p.map(x=>b.createElement("link",{key:x,rel:"modulepreload",href:x,...n})),y.map(({key:x,link:E})=>b.createElement("link",{key:x,nonce:n.nonce,...E,crossOrigin:E.crossOrigin??n.crossOrigin})))}function qC(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var FC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{FC&&(window.__reactRouterVersion="7.14.0")}catch{}function GC({basename:e,children:t,unstable_useTransitions:n,window:i}){let l=b.useRef();l.current==null&&(l.current=vE({window:i,v5Compat:!0}));let a=l.current,[r,s]=b.useState({action:a.action,location:a.location}),u=b.useCallback(c=>{n===!1?s(c):b.startTransition(()=>s(c))},[n]);return b.useLayoutEffect(()=>a.listen(u),[a,u]),b.createElement(yC,{basename:e,children:t,location:r.location,navigationType:r.action,navigator:a,unstable_useTransitions:n})}var Dv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Pi=b.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:l,reloadDocument:a,replace:r,unstable_mask:s,state:u,target:c,to:d,preventScrollReset:f,viewTransition:h,unstable_defaultShouldRevalidate:p,...y},x){let{basename:E,navigator:g,unstable_useTransitions:m}=b.useContext(Rt),v=typeof d=="string"&&Dv.test(d),C=Ev(d,E);d=C.to;let A=WE(d,{relative:l}),N=rt(),_=null;if(s){let V=Co(s,[],N.unstable_mask?N.unstable_mask.pathname:"/",!0);E!=="/"&&(V.pathname=V.pathname==="/"?E:pn([E,V.pathname])),_=g.createHref(V)}let[I,D,T]=MC(i,y),M=PC(d,{replace:r,unstable_mask:s,state:u,target:c,preventScrollReset:f,relative:l,viewTransition:h,unstable_defaultShouldRevalidate:p,unstable_useTransitions:m});function q(V){t&&t(V),V.defaultPrevented||M(V)}let P=!(C.isExternal||a),F=b.createElement("a",{...y,...T,href:(P?_:void 0)||C.absoluteURL||A,onClick:P?q:t,ref:qC(x,D),target:c,"data-discover":!v&&n==="render"?"true":void 0});return I&&!v?b.createElement(b.Fragment,null,F,b.createElement(BC,{page:A})):F});Pi.displayName="Link";var Fc=b.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:i="",end:l=!1,style:a,to:r,viewTransition:s,children:u,...c},d){let f=Er(r,{relative:c.relative}),h=rt(),p=b.useContext(To),{navigator:y,basename:x}=b.useContext(Rt),E=p!=null&&JC(f)&&s===!0,g=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,m=h.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(m=m.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&x&&(v=Hn(v,x)||v);const C=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let A=m===g||!l&&m.startsWith(g)&&m.charAt(C)==="/",N=v!=null&&(v===g||!l&&v.startsWith(g)&&v.charAt(g.length)==="/"),_={isActive:A,isPending:N,isTransitioning:E},I=A?t:void 0,D;typeof i=="function"?D=i(_):D=[i,A?"active":null,N?"pending":null,E?"transitioning":null].filter(Boolean).join(" ");let T=typeof a=="function"?a(_):a;return b.createElement(Pi,{...c,"aria-current":I,className:D,ref:d,style:T,to:r,viewTransition:s},typeof u=="function"?u(_):u)});Fc.displayName="NavLink";var VC=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:l,state:a,method:r=ms,action:s,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:h,...p},y)=>{let{unstable_useTransitions:x}=b.useContext(Rt),E=KC(),g=$C(s,{relative:c}),m=r.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&Dv.test(s),C=A=>{if(u&&u(A),A.defaultPrevented)return;A.preventDefault();let N=A.nativeEvent.submitter,_=(N==null?void 0:N.getAttribute("formmethod"))||r,I=()=>E(N||A.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:l,state:a,relative:c,preventScrollReset:d,viewTransition:f,unstable_defaultShouldRevalidate:h});x&&n!==!1?b.startTransition(()=>I()):I()};return b.createElement("form",{ref:y,method:m,action:g,onSubmit:i?u:C,...p,"data-discover":!v&&e==="render"?"true":void 0})});VC.displayName="Form";function YC(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zv(e){let t=b.useContext(ea);return Ne(t,YC(e)),t}function PC(e,{target:t,replace:n,unstable_mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,unstable_defaultShouldRevalidate:u,unstable_useTransitions:c}={}){let d=Je(),f=rt(),h=Er(e,{relative:r});return b.useCallback(p=>{if(CC(p,t)){p.preventDefault();let y=n!==void 0?n:lr(f)===lr(h),x=()=>d(e,{replace:y,unstable_mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,unstable_defaultShouldRevalidate:u});c?b.startTransition(()=>x()):x()}},[f,d,h,n,i,l,t,e,a,r,s,u,c])}function XC(e){Yt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=b.useRef(qc(e)),n=b.useRef(!1),i=rt(),l=b.useMemo(()=>TC(i.search,n.current?null:t.current),[i.search]),a=Je(),r=b.useCallback((s,u)=>{const c=qc(typeof s=="function"?s(new URLSearchParams(l)):s);n.current=!0,a("?"+c,u)},[a,l]);return[l,r]}var QC=0,ZC=()=>`__${String(++QC)}__`;function KC(){let{router:e}=zv("useSubmit"),{basename:t}=b.useContext(Rt),n=dC(),i=e.fetch,l=e.navigate;return b.useCallback(async(a,r={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=wC(a,t);if(r.navigate===!1){let h=r.fetcherKey||ZC();await i(h,n,r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:d,body:f,formMethod:r.method||u,formEncType:r.encType||c,flushSync:r.flushSync})}else await l(r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:d,body:f,formMethod:r.method||u,formEncType:r.encType||c,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[i,l,t,n])}function $C(e,{relative:t}={}){let{basename:n}=b.useContext(Rt),i=b.useContext(Pt);Ne(i,"useFormAction must be used inside a RouteContext");let[l]=i.matches.slice(-1),a={...Er(e||".",{relative:t})},r=rt();if(e==null){a.search=r.search;let s=new URLSearchParams(a.search),u=s.getAll("index");if(u.some(d=>d==="")){s.delete("index"),u.filter(f=>f).forEach(f=>s.append("index",f));let d=s.toString();a.search=d?`?${d}`:""}}return(!e||e===".")&&l.route.index&&(a.search=a.search?a.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(a.pathname=a.pathname==="/"?n:pn([n,a.pathname])),lr(a)}function JC(e,{relative:t}={}){let n=b.useContext(kv);Ne(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=zv("useViewTransitionState"),l=Er(e,{relative:t});if(!n.isTransitioning)return!1;let a=Hn(n.currentLocation.pathname,i)||n.currentLocation.pathname,r=Hn(n.nextLocation.pathname,i)||n.nextLocation.pathname;return Js(l.pathname,r)!=null||Js(l.pathname,a)!=null}const WC="/beta";class Dp extends Error{constructor(n,i,l){super(l);ll(this,"url");ll(this,"status");ll(this,"statusText");ll(this,"body");ll(this,"request");this.name="ApiError",this.url=i.url,this.status=i.status,this.statusText=i.statusText,this.body=i.body,this.request=n}}class eT extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var on,un,$t,ti,Li,Ol,ni;class tT{constructor(t){Yn(this,on);Yn(this,un);Yn(this,$t);Yn(this,ti);Yn(this,Li);Yn(this,Ol);Yn(this,ni);Qt(this,on,!1),Qt(this,un,!1),Qt(this,$t,!1),Qt(this,ti,[]),Qt(this,Li,new Promise((n,i)=>{Qt(this,Ol,n),Qt(this,ni,i);const l=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||(Qt(this,on,!0),fe(this,Ol)&&fe(this,Ol).call(this,s))},a=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||(Qt(this,un,!0),fe(this,ni)&&fe(this,ni).call(this,s))},r=s=>{fe(this,on)||fe(this,un)||fe(this,$t)||fe(this,ti).push(s)};return Object.defineProperty(r,"isResolved",{get:()=>fe(this,on)}),Object.defineProperty(r,"isRejected",{get:()=>fe(this,un)}),Object.defineProperty(r,"isCancelled",{get:()=>fe(this,$t)}),t(l,a,r)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(t,n){return fe(this,Li).then(t,n)}catch(t){return fe(this,Li).catch(t)}finally(t){return fe(this,Li).finally(t)}cancel(){if(!(fe(this,on)||fe(this,un)||fe(this,$t))){if(Qt(this,$t,!0),fe(this,ti).length)try{for(const t of fe(this,ti))t()}catch(t){console.warn("Cancellation threw an error",t);return}fe(this,ti).length=0,fe(this,ni)&&fe(this,ni).call(this,new eT("Request aborted"))}}get isCancelled(){return fe(this,$t)}}on=new WeakMap,un=new WeakMap,$t=new WeakMap,ti=new WeakMap,Li=new WeakMap,Ol=new WeakMap,ni=new WeakMap;const B={BASE:"",VERSION:"1.0",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0};var zp;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatusBeforeClaim||(e.taskStatusBeforeClaim={}))})(zp||(zp={}));var Lp;(function(e){(function(t){t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(Lp||(Lp={}));var Mp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Mp||(Mp={}));var Bp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Bp||(Bp={}));var Up;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Up||(Up={}));var Ip;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Ip||(Ip={}));var rn;(function(e){(function(t){t.NOT_STARTED="not_started",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.MCP_AUTH_FLOW_STARTED="mcp_auth_flow_started",t.MCP_AUTH_FLOW_COMPLETED="mcp_auth_flow_completed",t.CONNECTIONS_FLOW_STARTED="connections_flow_started",t.CONNECTIONS_FLOW_COMPLETED="connections_flow_completed",t.AUTHORIZATION_CODE_ISSUED="authorization_code_issued",t.AUTHORIZATION_CODE_EXCHANGED="authorization_code_exchanged"})(e.status||(e.status={}))})(rn||(rn={}));var Hp;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Hp||(Hp={}));var qp;(function(e){(function(t){t.OPENAI="openai",t.ADK="adk"})(e.type||(e.type={}))})(qp||(qp={}));var Fp;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Fp||(Fp={}));var Kn;(function(e){(function(t){t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Kn||(Kn={}));var Gp;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Gp||(Gp={}));var Vp;(function(e){(function(t){t.OPENAI="openai",t.ADK="adk"})(e.type||(e.type={}))})(Vp||(Vp={}));var Yp;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(Yp||(Yp={}));var Gc;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Gc||(Gc={}));var Pp;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Pp||(Pp={}));var Xp;(function(e){(function(t){t.TASK="task",t.CONTEXT_BLOCK="context_block",t.AGENT="agent",t.PROJECT="project",t.TAG="tag",t.TOOL="tool"})(e.type||(e.type={}))})(Xp||(Xp={}));var Qp;(function(e){(function(t){t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(Qp||(Qp={}));var Zp;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(Zp||(Zp={}));var Kp;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(Kp||(Kp={}));var Ia;(function(e){(function(t){t.CLIENT_NOT_REGISTERED="CLIENT_NOT_REGISTERED",t.CLIENT_REGISTERED="CLIENT_REGISTERED",t.AUTHORIZATION_REQUEST_STARTED="AUTHORIZATION_REQUEST_STARTED",t.USER_CONSENT_OK="USER_CONSENT_OK",t.USER_CONSENT_REJECTED="USER_CONSENT_REJECTED",t.WAITING_ON_DOWNSTREAM_AUTH="WAITING_ON_DOWNSTREAM_AUTH",t.AUTHORIZATION_CODE_ISSUED="AUTHORIZATION_CODE_ISSUED",t.AUTHORIZATION_CODE_EXCHANGED="AUTHORIZATION_CODE_EXCHANGED"})(e.status||(e.status={}))})(Ia||(Ia={}));var $p;(function(e){(function(t){t.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})($p||($p={}));var Jp;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Jp||(Jp={}));var Wp;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Wp||(Wp={}));var em;(function(e){(function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"})(e.status||(e.status={})),(function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.INTERRUPTED="INTERRUPTED",t.UNKNOWN="UNKNOWN"})(e.errorCode||(e.errorCode={}))})(em||(em={}));var tm;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={})),(function(t){t.SUCCEEDED="SUCCEEDED",t.FAILED="FAILED",t.STALE="STALE",t.CANCELLED="CANCELLED"})(e.status||(e.status={})),(function(t){t.OUT_OF_QUOTA="OUT_OF_QUOTA",t.INTERRUPTED="INTERRUPTED",t.UNKNOWN="UNKNOWN"})(e.errorCode||(e.errorCode={}))})(tm||(tm={}));var nm;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.taskStatus||(e.taskStatus={}))})(nm||(nm={}));var Vc;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(Vc||(Vc={}));var im;(function(e){(function(t){t.NOT_STARTED="NOT_STARTED",t.IN_PROGRESS="IN_PROGRESS",t.FOR_REVIEW="FOR_REVIEW",t.DONE="DONE"})(e.status||(e.status={}))})(im||(im={}));var lm;(function(e){(function(t){t.URN_IETF_PARAMS_OAUTH_GRANT_TYPE_TOKEN_EXCHANGE="urn:ietf:params:oauth:grant-type:token-exchange"})(e.grant_type||(e.grant_type={})),(function(t){t.URN_IETF_PARAMS_OAUTH_TOKEN_TYPE_ACCESS_TOKEN="urn:ietf:params:oauth:token-type:access_token"})(e.subject_token_type||(e.subject_token_type={}))})(lm||(lm={}));var am;(function(e){(function(t){t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(am||(am={}));var rm;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(rm||(rm={}));var sm;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(sm||(sm={}));var om;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={})),(function(t){t.FULL_PAGE="FULL_PAGE",t.BANNER="BANNER",t.OFF="OFF"})(e.onboardingDisplayMode||(e.onboardingDisplayMode={}))})(om||(om={}));var um;(function(e){(function(t){t.FULL_PAGE="FULL_PAGE",t.BANNER="BANNER",t.OFF="OFF"})(e.onboardingDisplayMode||(e.onboardingDisplayMode={}))})(um||(um={}));const bd=e=>e!=null,Cr=e=>typeof e=="string",Cu=e=>Cr(e)&&e!=="",Sd=e=>typeof e=="object"&&typeof e.type=="string"&&typeof e.stream=="function"&&typeof e.arrayBuffer=="function"&&typeof e.constructor=="function"&&typeof e.constructor.name=="string"&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),Lv=e=>e instanceof FormData,nT=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},iT=e=>{const t=[],n=(l,a)=>{t.push(`${encodeURIComponent(l)}=${encodeURIComponent(String(a))}`)},i=(l,a)=>{bd(a)&&(Array.isArray(a)?a.forEach(r=>{i(l,r)}):typeof a=="object"?Object.entries(a).forEach(([r,s])=>{i(`${l}[${r}]`,s)}):n(l,a))};return Object.entries(e).forEach(([l,a])=>{i(l,a)}),t.length>0?`?${t.join("&")}`:""},lT=(e,t)=>{const n=e.ENCODE_PATH||encodeURI,i=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(a,r)=>{var s;return(s=t.path)!=null&&s.hasOwnProperty(r)?n(String(t.path[r])):a}),l=`${e.BASE}${i}`;return t.query?`${l}${iT(t.query)}`:l},aT=e=>{if(e.formData){const t=new FormData,n=(i,l)=>{Cr(l)||Sd(l)?t.append(i,l):t.append(i,JSON.stringify(l))};return Object.entries(e.formData).filter(([i,l])=>bd(l)).forEach(([i,l])=>{Array.isArray(l)?l.forEach(a=>n(i,a)):n(i,l)}),t}},Pr=async(e,t)=>typeof t=="function"?t(e):t,rT=async(e,t)=>{const[n,i,l,a]=await Promise.all([Pr(t,e.TOKEN),Pr(t,e.USERNAME),Pr(t,e.PASSWORD),Pr(t,e.HEADERS)]),r=Object.entries({Accept:"application/json",...a,...t.headers}).filter(([s,u])=>bd(u)).reduce((s,[u,c])=>({...s,[u]:String(c)}),{});if(Cu(n)&&(r.Authorization=`Bearer ${n}`),Cu(i)&&Cu(l)){const s=nT(`${i}:${l}`);r.Authorization=`Basic ${s}`}return t.body!==void 0&&(t.mediaType?r["Content-Type"]=t.mediaType:Sd(t.body)?r["Content-Type"]=t.body.type||"application/octet-stream":Cr(t.body)?r["Content-Type"]="text/plain":Lv(t.body)||(r["Content-Type"]="application/json")),new Headers(r)},sT=e=>{var t;if(e.body!==void 0)return(t=e.mediaType)!=null&&t.includes("/json")?JSON.stringify(e.body):Cr(e.body)||Sd(e.body)||Lv(e.body)?e.body:JSON.stringify(e.body)},oT=async(e,t,n,i,l,a,r)=>{const s=new AbortController,u={headers:a,body:i??l,method:t.method,signal:s.signal};return e.WITH_CREDENTIALS&&(u.credentials=e.CREDENTIALS),r(()=>s.abort()),await fetch(n,u)},uT=(e,t)=>{if(t){const n=e.headers.get(t);if(Cr(n))return n}},cT=async e=>{if(e.status!==204)try{const t=e.headers.get("Content-Type");if(t)return["application/json","application/problem+json"].some(l=>t.toLowerCase().startsWith(l))?await e.json():await e.text()}catch(t){console.error(t)}},fT=(e,t)=>{const i={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(i)throw new Dp(e,t,i);if(!t.ok){const l=t.status??"unknown",a=t.statusText??"unknown",r=(()=>{try{return JSON.stringify(t.body,null,2)}catch{return}})();throw new Dp(e,t,`Generic Error: status: ${l}; status text: ${a}; body: ${r}`)}},U=(e,t)=>new tT(async(n,i,l)=>{try{const a=lT(e,t),r=aT(t),s=sT(t),u=await rT(e,t);if(!l.isCancelled){const c=await oT(e,t,a,s,r,u,l),d=await cT(c),f=uT(c,t.responseHeader),h={url:a,ok:c.ok,status:c.status,statusText:c.statusText,body:f??d};fT(t,h),n(h.body)}}catch(a){i(a)}});class Tu{static agentsControllerCreateAgent(t,n=B){return U(n,{method:"POST",url:"/api/v1/agents",body:t,mediaType:"application/json"})}static agentsControllerListAgents(t,n=1,i=20,l=B){return U(l,{method:"GET",url:"/api/v1/agents",query:{isActive:t,page:n,limit:i}})}static agentsControllerListAgentTemplates(t=B){return U(t,{method:"GET",url:"/api/v1/agents/templates"})}static agentsControllerGetAgentBySlug(t,n=B){return U(n,{method:"GET",url:"/api/v1/agents/{slug}",path:{slug:t}})}static agentsControllerPatchAgent(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/agents/{actorId}",path:{actorId:t},body:n,mediaType:"application/json"})}static agentsControllerDeleteAgent(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/agents/{actorId}",path:{actorId:t}})}static agentToolPermissionsControllerListAgentToolPermissions(t,n=B){return U(n,{method:"GET",url:"/api/v1/agents/{actorId}/tool-permissions",path:{actorId:t}})}static agentToolPermissionsControllerUpsertAgentToolPermission(t,n,i,l=B){return U(l,{method:"PUT",url:"/api/v1/agents/{actorId}/tool-permissions/{serverId}",path:{actorId:t,serverId:n},body:i,mediaType:"application/json"})}static agentToolPermissionsControllerDeleteAgentToolPermission(t,n,i=B){return U(i,{method:"DELETE",url:"/api/v1/agents/{actorId}/tool-permissions/{serverId}",path:{actorId:t,serverId:n}})}}class dT{static authJourneysControllerGetAuthJourneys(t,n=B){return U(n,{method:"GET",url:"/api/v1/auth-journeys/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}}class hT{static clientRegistrationControllerRegisterClient(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/auth/clients/register/mcp/{serverId}/{version}",path:{serverId:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid client metadata (missing fields, invalid redirect URIs, unsupported grant types, or PKCE not configured)",409:"A client with this name is already registered"}})}static clientRegistrationControllerGetClient(t,n=B){return U(n,{method:"GET",url:"/api/v1/auth/clients/{clientId}",path:{clientId:t},errors:{404:"Client not found"}})}static clientRegistrationControllerListClients(t=B){return U(t,{method:"GET",url:"/api/v1/auth/clients"})}static authorizationControllerAuthorize(t,n,i,l,a,r,s,u,c,d,f=B){return U(f,{method:"GET",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:s,version:u},query:{response_type:t,scope:c,client_id:n,code_challenge:i,code_challenge_method:l,redirect_uri:a,state:r,resource:d},errors:{302:"Redirects to consent screen with authorization request ID",400:"Invalid authorization request parameters",404:"MCP server or client not found"}})}static authorizationControllerAuthorizeConsent(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/auth/authorize/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{302:"Redirects to client redirect_uri with authorization code or error",400:"Invalid consent decision or flow state",401:"Authorization flow has already been used",404:"Authorization flow not found"}})}static authorizationControllerGetConsentMetadata(t,n=B){return U(n,{method:"GET",url:"/api/v1/auth/consent/{flowId}",path:{flowId:t},errors:{401:"Authentication required to access consent metadata",404:"Authorization flow not found"}})}static authorizationControllerToken(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/auth/token/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid token request parameters",401:"Invalid authorization code, code_verifier, or expired code"}})}static authorizationControllerIntrospect(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/auth/introspect/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid introspection request parameters"}})}static authorizationControllerTokenExchange(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/auth/token-exchange/mcp/{serverIdentifier}/{version}",path:{serverIdentifier:t,version:n},body:i,mediaType:"application/json",errors:{400:"Invalid token exchange request parameters",401:"Invalid or expired MCP JWT",403:"Insufficient scope - requested scope not entitled",404:"Connection not found"}})}static authorizationControllerCallback(t,n,i,l,a,r=B){return U(r,{method:"GET",url:"/api/v1/auth/callback",query:{code:t,state:n,error:i,scope:l,error_description:a},errors:{302:"Redirects to next step in the authorization flow",400:"Invalid callback parameters or state",404:"Connection flow not found for provided state"}})}static authorizationControllerGetScopes(t=B){return U(t,{method:"GET",url:"/api/v1/auth/scopes"})}}class Kt{static contextControllerCreateBlock(t,n=B){return U(n,{method:"POST",url:"/api/v1/context/blocks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerListBlocks(t,n=B){return U(n,{method:"GET",url:"/api/v1/context/blocks",query:{tag:t}})}static contextControllerSearchBlocks(t,n=10,i=.3,l=B){return U(l,{method:"GET",url:"/api/v1/context/blocks/search/query",query:{query:t,limit:n,threshold:i}})}static contextControllerGetBlockTree(t=B){return U(t,{method:"GET",url:"/api/v1/context/blocks/tree"})}static contextControllerExportBlocks(t=B){return U(t,{method:"GET",url:"/api/v1/context/blocks/export"})}static contextControllerImportBlocks(t,n=B){return U(n,{method:"POST",url:"/api/v1/context/blocks/import",formData:t,mediaType:"multipart/form-data",errors:{400:"No archive file uploaded or invalid file type"}})}static contextControllerGetBlock(t,n=B){return U(n,{method:"GET",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerUpdateBlock(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"No update fields provided"}})}static contextControllerDeleteBlock(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/context/blocks/{id}",path:{id:t}})}static contextControllerAppendToBlock(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/context/blocks/{id}/append",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerReorderBlock(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}/reorder",path:{id:t},body:n,mediaType:"application/json"})}static contextControllerMoveBlock(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/context/blocks/{id}/move",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Circular reference detected or parent not found"}})}static contextControllerAddTagToBlock(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/context/blocks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data"}})}static contextControllerRemoveTagFromBlock(t,n,i=B){return U(i,{method:"DELETE",url:"/api/v1/context/blocks/{id}/tags/{tagId}",path:{id:t,tagId:n}})}static contextControllerHandleMcpGet(t=B){return U(t,{method:"GET",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPost(t=B){return U(t,{method:"POST",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPut(t=B){return U(t,{method:"PUT",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpDelete(t=B){return U(t,{method:"DELETE",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpPatch(t=B){return U(t,{method:"PATCH",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpOptions(t=B){return U(t,{method:"OPTIONS",url:"/api/v1/context/blocks/mcp"})}static contextControllerHandleMcpHead(t=B){return U(t,{method:"HEAD",url:"/api/v1/context/blocks/mcp"})}}class Mv{static metaControllerCreateTag(t,n=B){return U(n,{method:"POST",url:"/api/v1/meta/tags",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static metaControllerGetAllTags(t=B){return U(t,{method:"GET",url:"/api/v1/meta/tags"})}static metaControllerGetTagColors(t=B){return U(t,{method:"GET",url:"/api/v1/meta/tags/colors"})}static metaControllerDeleteTag(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/meta/tags/{tagId}",path:{tagId:t},errors:{404:"Tag not found"}})}static metaControllerGetVersion(t=B){return U(t,{method:"GET",url:"/api/v1/meta/version"})}}class en{static tasksControllerCreateTask(t,n=B){return U(n,{method:"POST",url:"/api/v1/tasks/tasks",body:t,mediaType:"application/json",errors:{400:"Invalid input data"}})}static tasksControllerListTasks(t,n,i,l=1,a=20,r=B){return U(r,{method:"GET",url:"/api/v1/tasks/tasks",query:{assignee:t,sessionId:n,tag:i,page:l,limit:a}})}static tasksControllerUpdateTask(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerDeleteTask(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerGetTask(t,n=B){return U(n,{method:"GET",url:"/api/v1/tasks/tasks/{id}",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerAssignTask(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAssignTaskToMe(t,n=B){return U(n,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/assign-to-me",path:{id:t},errors:{404:"Task not found"}})}static tasksControllerSearchTasks(t,n=10,i=.3,l=B){return U(l,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n,threshold:i}})}static tasksControllerAddComment(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/comments",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAddArtefact(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/artefacts",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerChangeStatus(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/tasks/tasks/{id}/status",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid status transition or comment required",404:"Task not found"}})}static tasksControllerAddTagToTask(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/tags",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerRemoveTagFromTask(t,n,i=B){return U(i,{method:"DELETE",url:"/api/v1/tasks/tasks/{id}/tags/{tagId}",path:{id:t,tagId:n},errors:{404:"Task not found"}})}static tasksControllerCreateInputRequest(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests",path:{id:t},body:n,mediaType:"application/json",errors:{400:"Invalid input data",404:"Task not found"}})}static tasksControllerAnswerInputRequest(t,n,i,l=B){return U(l,{method:"POST",url:"/api/v1/tasks/tasks/{id}/input-requests/{inputRequestId}/answer",path:{id:t,inputRequestId:n},body:i,mediaType:"application/json",errors:{400:"Invalid input data",404:"Input request not found"}})}static tasksControllerHandleMcpGet(t=B){return U(t,{method:"GET",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPost(t=B){return U(t,{method:"POST",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPut(t=B){return U(t,{method:"PUT",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpDelete(t=B){return U(t,{method:"DELETE",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpPatch(t=B){return U(t,{method:"PATCH",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpOptions(t=B){return U(t,{method:"OPTIONS",url:"/api/v1/tasks/tasks/mcp"})}static tasksControllerHandleMcpHead(t=B){return U(t,{method:"HEAD",url:"/api/v1/tasks/tasks/mcp"})}}class ct{static mcpRegistryControllerCreateServer(t,n=B){return U(n,{method:"POST",url:"/api/v1/mcp/servers",body:t,mediaType:"application/json",errors:{409:"Server with providedId already exists"}})}static mcpRegistryControllerListServers(t,n,i=B){return U(i,{method:"GET",url:"/api/v1/mcp/servers",query:{page:t,limit:n}})}static mcpRegistryControllerGetServer(t,n=B){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerUpdateServer(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found"}})}static mcpRegistryControllerDeleteServer(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}",path:{serverId:t},errors:{404:"Server not found",409:"Server has dependencies"}})}static mcpRegistryControllerCreateScopes(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Scope already exists"}})}static mcpRegistryControllerListScopes(t,n=B){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetScope(t,n,i=B){return U(i,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteScope(t,n,i=B){return U(i,{method:"DELETE",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}",path:{serverId:t,scopeId:n},errors:{404:"Scope not found",409:"Scope has mappings"}})}static mcpRegistryControllerCreateConnection(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},body:n,mediaType:"application/json",errors:{404:"Server not found",409:"Connection name conflict"}})}static mcpRegistryControllerListConnections(t,n=B){return U(n,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/connections",path:{serverId:t},errors:{404:"Server not found"}})}static mcpRegistryControllerGetConnection(t,n=B){return U(n,{method:"GET",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found"}})}static mcpRegistryControllerUpdateConnection(t,n,i=B){return U(i,{method:"PATCH",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},body:n,mediaType:"application/json",errors:{404:"Connection not found",409:"Connection name conflict"}})}static mcpRegistryControllerDeleteConnection(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/mcp/connections/{connectionId}",path:{connectionId:t},errors:{404:"Connection not found",409:"Connection has mappings"}})}static mcpRegistryControllerCreateMapping(t,n,i=B){return U(i,{method:"POST",url:"/api/v1/mcp/servers/{serverId}/mappings",path:{serverId:t},body:n,mediaType:"application/json",errors:{400:"Invalid mapping",404:"Scope or connection not found"}})}static mcpRegistryControllerListMappings(t,n,i=B){return U(i,{method:"GET",url:"/api/v1/mcp/servers/{serverId}/scopes/{scopeId}/mappings",path:{serverId:t,scopeId:n},errors:{404:"Scope not found"}})}static mcpRegistryControllerDeleteMapping(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/mcp/mappings/{mappingId}",path:{mappingId:t},errors:{404:"Mapping not found"}})}}class ma{static webAuthControllerLogin(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/login",body:t,mediaType:"application/json",errors:{401:"Invalid credentials"}})}static webAuthControllerListUsers(t=B){return U(t,{method:"GET",url:"/api/v1/auth/users"})}static webAuthControllerCreateUser(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/users",body:t,mediaType:"application/json"})}static webAuthControllerResetUserPassword(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/users/{userId}/reset-password",path:{userId:t}})}static webAuthControllerDeleteUser(t,n=B){return U(n,{method:"DELETE",url:"/api/v1/auth/users/{userId}",path:{userId:t}})}static webAuthControllerGetAccountSetupStatus(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/account-setup-status",body:t,mediaType:"application/json"})}static webAuthControllerSetupAccount(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/setup-account",body:t,mediaType:"application/json"})}static webAuthControllerRefresh(t=B){return U(t,{method:"POST",url:"/api/v1/auth/refresh",errors:{401:"Invalid or expired refresh token"}})}static webAuthControllerLogout(t=B){return U(t,{method:"POST",url:"/api/v1/auth/logout"})}static webAuthControllerMe(t=B){return U(t,{method:"GET",url:"/api/v1/auth/me",errors:{401:"Not authenticated"}})}static webAuthControllerChangePassword(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/change-password",body:t,mediaType:"application/json",errors:{401:"Not authenticated or current password is incorrect"}})}static webAuthControllerGetOnboardingStatus(t=B){return U(t,{method:"GET",url:"/api/v1/auth/onboarding-status"})}static webAuthControllerOnboard(t,n=B){return U(n,{method:"POST",url:"/api/v1/auth/onboard",body:t,mediaType:"application/json",errors:{409:"Admin users already exist, onboarding not allowed"}})}static webAuthControllerMarkWalkthroughSeen(t=B){return U(t,{method:"POST",url:"/api/v1/auth/mark-walkthrough-seen",errors:{401:"Not authenticated"}})}}const Bv=()=>"",Uv=e=>e,el=Bv();B.BASE=el;B.CREDENTIALS="include";B.BASE=el;const Iv=b.createContext(void 0);function pT({children:e}){const[t,n]=b.useState(null),[i,l]=b.useState(!0);b.useEffect(()=>{ma.webAuthControllerMe().then(c=>{console.log("found me"),n(c)}).catch(()=>{console.log("not me"),n(null)}).finally(()=>{l(!1)})},[]),b.useEffect(()=>{if(!t)return;const c=setInterval(async()=>{try{const d=await ma.webAuthControllerRefresh();n(d.user)}catch(d){console.error("Token refresh failed:",d),n(null)}},480*1e3);return()=>clearInterval(c)},[t]);const u={user:t,isAuthenticated:!!t,isLoading:i,login:async(c,d)=>{const f=await ma.webAuthControllerLogin({email:c,password:d});n(f.user)},logout:async()=>{try{await ma.webAuthControllerLogout()}finally{n(null)}},refreshAuth:async()=>{const c=await ma.webAuthControllerRefresh();n(c.user)}};return o.jsx(Iv.Provider,{value:u,children:e})}function Ed(){const e=b.useContext(Iv);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function mT({children:e}){const{isAuthenticated:t,isLoading:n}=Ed(),i=rt();return n?o.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",minHeight:"100vh",background:"linear-gradient(135deg, #667eea 0%, #764ba2 100%)"},children:o.jsx("div",{style:{color:"white",fontSize:"18px",fontWeight:"600"},children:"Loading..."})}):t?o.jsx(o.Fragment,{children:e}):o.jsx(gC,{to:"/login",state:{from:i},replace:!0})}function gT(){var p,y;const[e,t]=b.useState(""),[n,i]=b.useState(""),[l,a]=b.useState(""),[r,s]=b.useState(!1),{login:u}=Ed(),c=Je(),f=((y=(p=rt().state)==null?void 0:p.from)==null?void 0:y.pathname)||"/",h=async x=>{x.preventDefault(),s(!0),a("");try{await u(e,n),c(f,{replace:!0})}catch{a("Invalid email or password")}finally{s(!1)}};return o.jsx("div",{className:"login-page",children:o.jsx("div",{className:"login-container",children:o.jsxs("div",{className:"login-card",children:[o.jsxs("div",{className:"login-header",children:[o.jsx("h1",{className:"login-title",children:"Welcome Back"}),o.jsx("p",{className:"login-subtitle",children:"Sign in to your account"})]}),o.jsxs("form",{onSubmit:h,className:"login-form",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"email",className:"form-label",children:"Email"}),o.jsx("input",{id:"email",type:"email",value:e,onChange:x=>t(x.target.value),className:"form-input",placeholder:"you@example.com",required:!0,disabled:r,autoComplete:"email"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"password",className:"form-label",children:"Password"}),o.jsx("input",{id:"password",type:"password",value:n,onChange:x=>i(x.target.value),className:"form-input",placeholder:"••••••••",required:!0,disabled:r,autoComplete:"current-password"})]}),l&&o.jsx("div",{className:"login-error",children:l}),o.jsx("button",{type:"submit",className:"login-button",disabled:r,children:r?"Signing in...":"Sign In"})]})]})})})}function yT({collapsed:e}){const t=[{name:"Home",path:"/",icon:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})},{name:"Agents",path:"/agents",icon:"🤖"},{name:"Tasks",path:"/tasks",icon:"📋"},{name:"Context",path:"/context",icon:"📚"},{name:"Tools",path:"/mcp-registry",icon:"🔧"}];return o.jsxs("nav",{className:"sidebar-nav-container",children:[o.jsx("div",{className:"sidebar-nav-main",children:t.map(n=>o.jsxs(Fc,{to:n.path,className:({isActive:i})=>`sidebar-nav-link ${i?"active":""} ${e?"collapsed":""}`,end:n.path==="/",children:[o.jsx("div",{className:"sidebar-nav-icon",children:typeof n.icon=="string"?o.jsx("span",{children:n.icon}):n.icon}),o.jsx("span",{className:"nav-link-text",children:n.name})]},n.path))}),o.jsx("div",{className:"sidebar-nav-bottom",children:o.jsxs(Fc,{to:"/logout",className:({isActive:n})=>`sidebar-nav-link ${n?"active":""} ${e?"collapsed":""}`,end:!0,children:[o.jsx("div",{className:"sidebar-nav-icon",children:o.jsx("span",{children:"🔓"})}),o.jsx("span",{className:"nav-link-text",children:"Logout"})]},"213")})]})}const xT=768;function ar(){return window.innerWidth<xT}function vT(){const[e,t]=b.useState(()=>ar());return b.useEffect(()=>{const n=()=>{t(ar())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const cm="app-nav-collapsed";function bT(){const[e,t]=b.useState(()=>{const i=localStorage.getItem(cm);return i!==null?i==="true":ar()});b.useEffect(()=>{localStorage.setItem(cm,String(e))},[e]);const n=()=>{t(!e)};return o.jsxs("div",{className:"root-layout",children:[o.jsxs("aside",{className:`sidebar-app-nav ${e?"collapsed":""}`,children:[o.jsx("nav",{className:"sidebar-content",children:o.jsx(yT,{collapsed:e})}),o.jsx("button",{className:"sidebar-toggle",onClick:n,"aria-label":e?"Expand sidebar":"Collapse sidebar",children:e?"→":"←"})]}),o.jsx("div",{className:"root-layout-main",children:o.jsx(md,{})})]})}function tl(e){const t=b.useRef(null);b.useEffect(()=>(t.current=document.title,document.title=e,()=>{t.current!==null&&(document.title=t.current)}),[e])}function ST(){tl("taico — Home");const e=[{name:"Tasks",description:"Manage and track your tasks across different stages with our Kanban board.",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",description:"Create, edit, and organize your knowledge base with our wiki platform.",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",description:"Manage Model Context Protocol servers, scopes, and OAuth connections.",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"}];return o.jsx("div",{className:"home-page",children:o.jsxs("div",{className:"home-container",children:[o.jsxs("header",{className:"home-header",children:[o.jsx("h1",{className:"home-title",children:"taico"}),o.jsx("p",{className:"home-subtitle",children:"Your all-in-one platform for task management, knowledge organization, and protocol integration"})]}),o.jsx("div",{className:"apps-grid",children:e.map(t=>o.jsxs(Pi,{to:t.path,className:"app-card",style:{"--app-color":t.color},children:[o.jsx("div",{className:"app-icon",children:t.icon}),o.jsx("h2",{className:"app-name",children:t.name}),o.jsx("p",{className:"app-description",children:t.description}),o.jsx("div",{className:"app-arrow",children:"→"})]},t.path))}),o.jsx("footer",{className:"home-footer",children:o.jsx("p",{children:"Built with React + TypeScript + Vite"})})]})})}const Hv=({tag:e,onRemove:t,small:n=!1})=>{const i=e.color||"#6B7280";return o.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:i,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&o.jsx("button",{onClick:l=>{l.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function ET({task:e,onClick:t}){var l,a;const n=r=>{const s=new Date(r);return(new Date().getTime()-s.getTime())/(1e3*60*60)<24?s.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}):s.toLocaleDateString("en-US",{month:"short",day:"numeric"})},i=((l=e.comments)==null?void 0:l.length)??0;return o.jsxs("div",{className:"task-card",onClick:t,children:[o.jsx("h3",{className:"task-card-title",children:e.name}),o.jsx("p",{className:"task-card-description",children:e.description}),e.tags&&e.tags.length>0&&o.jsx("div",{style:{marginTop:"8px",marginBottom:"8px"},children:e.tags.map(r=>o.jsx(Hv,{tag:r,small:!0},r.name))}),o.jsx("div",{className:"task-card-divider"}),o.jsxs("div",{className:"task-card-footer",children:[o.jsxs("div",{className:"task-card-assignee",children:[e.assignee?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"assignee-emoji",children:"👤"}),o.jsx("span",{className:"assignee-name",children:((a=e.assigneeActor)==null?void 0:a.displayName)||"unassigned"})]}):o.jsx("span",{className:"unassigned-text",children:"Unassigned"}),i>0?o.jsxs("span",{className:"comment-count","aria-label":`${i} comments`,children:["💬 ",i]}):null]}),o.jsx("div",{className:"task-card-date",children:n(e.updatedAt)})]})]})}B.BASE=el;function qv(){const[e,t]=b.useState([]),n=b.useCallback((l,a="info")=>{const r=Date.now();t(s=>[...s,{id:r,message:l,type:a}])},[]),i=b.useCallback(l=>{t(a=>a.filter(r=>r.id!==l))},[]);return{toasts:e,showToast:n,removeToast:i}}function Fv({message:e,type:t="info",onClose:n,duration:i=3e3}){return b.useEffect(()=>{const l=setTimeout(n,i);return()=>clearTimeout(l)},[n,i]),o.jsxs("div",{className:`toast toast-${t}`,children:[o.jsx("span",{children:e}),o.jsx("button",{onClick:n,className:"toast-close","aria-label":"Close",children:"×"})]})}const Cd=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[i,l]=b.useState(""),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(-1),[f,h]=b.useState([]),p=b.useRef(null),y=b.useRef(null);b.useEffect(()=>{(async()=>{try{const v=await Mv.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),b.useEffect(()=>{const v=setTimeout(()=>{if(i.trim().length>0){const C=i.trim().toLowerCase(),A=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(A),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var C;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&i.trim()||m.key==="Enter"&&i.trim()?(m.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):m.key==="ArrowDown"?(m.preventDefault(),d(v=>v<a.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),d(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),d(-1)):m.key==="Backspace"&&!i&&e.length>0&&t(e.slice(0,-1))};return o.jsxs("div",{ref:y,style:{position:"relative"},children:[o.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=f.find(A=>A.name===m),C=(v==null?void 0:v.color)||"#3B82F6";return o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:C,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,o.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),E(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:m=>l(m.target.value),onKeyDown:g,onFocus:()=>i&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),s&&a.length>0&&o.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:a.map((m,v)=>o.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>d(v),children:[o.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),s&&i&&a.length===0&&o.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',i,'"']})]})};function CT({key:e,defaultValue:t,debounceMs:n=500}){const[i,l]=b.useState(()=>{try{const s=localStorage.getItem(e);if(s)return JSON.parse(s)}catch(s){console.error("Error loading draft from localStorage:",s)}return t}),a=b.useRef(void 0);return b.useEffect(()=>(a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{try{localStorage.setItem(e,JSON.stringify(i))}catch(s){console.error("Error saving draft to localStorage:",s)}},n),()=>{a.current&&clearTimeout(a.current)}),[i,e,n]),[i,l,()=>{try{localStorage.removeItem(e),l(t)}catch(s){console.error("Error clearing draft from localStorage:",s)}}]}const TT={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function kT({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=qv(),[l,a,r]=CT({key:"create-task-draft",defaultValue:TT}),[s,u]=b.useState(!1),{name:c,description:d,assignee:f,sessionId:h,tagNames:p,dependsOnIds:y}=l,x=(g,m)=>{a({...l,[g]:m})};b.useEffect(()=>{const g=m=>{m.key==="Escape"&&e()};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e]);const E=async g=>{var m;g.preventDefault(),u(!0);try{await en.tasksControllerCreateTask({name:c,description:d,...f&&{assignee:f},...h&&{sessionId:h},...p.length>0&&{tagNames:p},...y.length>0&&{dependsOnIds:y}}),r(),e()}catch(v){const C=((m=v==null?void 0:v.body)==null?void 0:m.detail)||(v==null?void 0:v.message)||"Failed to create task";n(`Error: ${C}`,"error"),console.error(v)}finally{u(!1)}};return o.jsx("div",{className:"modal-overlay",onClick:e,children:o.jsxs("div",{className:"modal-content",onClick:g=>g.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h2",{children:"Create New Task"}),o.jsx("button",{onClick:e,className:"btn-close",children:"×"})]}),o.jsxs("form",{onSubmit:E,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Title *"}),o.jsx("input",{id:"name",type:"text",value:c,onChange:g=>x("name",g.target.value),required:!0,placeholder:"Enter task name"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description *"}),o.jsx("textarea",{id:"description",value:d,onChange:g=>x("description",g.target.value),required:!0,placeholder:"Enter task description",rows:4})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"assignee",children:"Assigned to"}),o.jsx("input",{id:"assignee",type:"text",value:f,onChange:g=>x("assignee",g.target.value),placeholder:"Agent name or assignee"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"sessionId",children:"Session ID"}),o.jsx("input",{id:"sessionId",type:"text",value:h,onChange:g=>x("sessionId",g.target.value),placeholder:"Agent session ID"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"tags",children:"Tags"}),o.jsx(Cd,{value:p,onChange:g=>x("tagNames",g),placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"dependsOn",children:"Depends On (Task IDs)"}),o.jsx("input",{id:"dependsOn",type:"text",value:y.join(", "),onChange:g=>x("dependsOnIds",g.target.value.split(",").map(m=>m.trim()).filter(m=>m)),placeholder:"Enter task IDs separated by commas"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:e,className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",disabled:s,children:s?"Creating...":"Create Task"})]})]}),t.map(g=>o.jsx(Fv,{message:g.message,type:g.type,onClose:()=>i(g.id)},g.id))]})})}const re=Vc.status;function Gv({task:e,onClose:t,onUpdate:n}){var D,T,M,q;const[i,l]=b.useState(e.description),[a,r]=b.useState((D=e.assigneeActor)==null?void 0:D.id),[s,u]=b.useState(e.sessionId||""),[c,d]=b.useState(((T=e.tags)==null?void 0:T.map(P=>P.name))||[]),[f,h]=b.useState(""),[p,y]=b.useState(""),[x,E]=b.useState(!1),[g,m]=b.useState("");b.useEffect(()=>{const P=F=>{F.key==="Escape"&&t()};return document.addEventListener("keydown",P),()=>{document.removeEventListener("keydown",P)}},[t]);const v=async()=>{var P;if(i!==e.description)try{const F=await en.tasksControllerUpdateTask(e.id,{description:i});n(F),m("")}catch(F){console.error("Failed to update task:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to update description";m(V)}},C=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},A=async()=>{var P;if(f.trim())try{await en.tasksControllerAddComment(e.id,{content:f});const F=await en.tasksControllerGetTask(e.id);n(F),h(""),m("")}catch(F){console.error("Failed to add comment:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to add comment";m(V)}},N=async P=>{var F;try{const V={status:P};P===re.DONE&&p.trim()&&(V.comment=p);const j=await en.tasksControllerChangeStatus(e.id,V);n(j),y(""),m("")}catch(V){console.error("Failed to change status:",V);const j=((F=V==null?void 0:V.body)==null?void 0:F.detail)||(V==null?void 0:V.message)||"Failed to change status";m(j)}},_=async()=>{var P;try{await en.tasksControllerDeleteTask(e.id),t()}catch(F){console.error("Failed to delete task:",F);const V=((P=F==null?void 0:F.body)==null?void 0:P.detail)||(F==null?void 0:F.message)||"Failed to delete task";m(V)}},I=async P=>{var F,V;d(P);try{const j=await en.tasksControllerUpdateTask(e.id,{tagNames:P});n(j),m("")}catch(j){console.error("Failed to update tags:",j);const O=((F=j==null?void 0:j.body)==null?void 0:F.detail)||(j==null?void 0:j.message)||"Failed to update tags";m(O),d(((V=e.tags)==null?void 0:V.map(w=>w.name))||[])}};return o.jsx("div",{className:"modal-overlay",onClick:t,children:o.jsxs("div",{className:"modal-content task-detail",onClick:P=>P.stopPropagation(),children:[o.jsxs("div",{className:"modal-header",children:[o.jsx("h2",{children:e.name}),o.jsx("button",{onClick:t,className:"btn-close",children:"×"})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Description"}),o.jsx("textarea",{value:i,onChange:P=>l(P.target.value),onBlur:v,placeholder:"Enter task description...",className:"description-textarea"})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Status"}),g&&o.jsxs("div",{className:"error-message",children:[o.jsx("strong",{children:"Error:"})," ",g]}),o.jsxs("div",{className:"status-buttons",children:[o.jsx("button",{onClick:()=>N(re.NOT_STARTED),className:`status-btn ${e.status===re.NOT_STARTED?"active status-not-started":""}`,children:"Not Started"}),o.jsx("button",{onClick:()=>N(re.IN_PROGRESS),className:`status-btn ${e.status===re.IN_PROGRESS?"active status-in-progress":""}`,children:"In Progress"}),o.jsx("button",{onClick:()=>N(re.FOR_REVIEW),className:`status-btn ${e.status===re.FOR_REVIEW?"active status-for-review":""}`,children:"For Review"}),o.jsx("button",{onClick:()=>N(re.DONE),className:`status-btn ${e.status===re.DONE?"active status-done":""}`,children:"Done"})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Assignee & Session"}),o.jsxs("div",{className:"assignee-form",children:[o.jsxs("div",{className:"form-row",children:[o.jsxs("div",{className:"form-field",children:[o.jsx("label",{children:"Assignee"}),o.jsx("input",{type:"text",value:e.assignee?`@${e.assignee}`:"@",onChange:P=>r(P.target.value),placeholder:"Enter assignee name"})]}),o.jsxs("div",{className:"form-field",children:[o.jsx("label",{children:"Session ID"}),o.jsx("input",{type:"text",value:s,onChange:P=>u(P.target.value),placeholder:"Enter session ID"})]})]}),o.jsx("button",{onClick:C,className:"btn-primary",children:"Update Assignment"})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Tags"}),o.jsx(Cd,{value:c,onChange:I,placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h3",{children:"Task Info"}),o.jsxs("div",{className:"task-info-grid",children:[o.jsxs("div",{className:"info-item",children:[o.jsx("label",{children:"Created By"}),o.jsxs("span",{children:["@",e.createdByActor.slug]})]}),e.dependsOnIds&&e.dependsOnIds.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("label",{children:"Depends On"}),o.jsx("div",{className:"dependency-list",children:e.dependsOnIds.map(P=>o.jsx("span",{className:"dependency-id",children:P},P))})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsxs("h3",{children:["Comments (",((M=e.comments)==null?void 0:M.length)||0,")"]}),o.jsx("div",{className:"comments-list",children:(q=e.comments)==null?void 0:q.map(P=>o.jsxs("div",{className:"comment",children:[o.jsx("strong",{children:P.commenterName}),o.jsx("p",{children:P.content}),o.jsx("span",{className:"comment-date",children:new Date(P.createdAt).toLocaleString()})]},P.id))}),o.jsxs("div",{className:"add-comment",children:[o.jsx("textarea",{placeholder:"Add a comment...",value:f,onChange:P=>h(P.target.value),rows:3}),o.jsx("button",{onClick:A,className:"btn-primary",children:"Add Comment"})]})]}),o.jsx("div",{className:"detail-section",children:o.jsxs("div",{className:"task-actions",children:[e.status===re.FOR_REVIEW&&o.jsxs("div",{className:"review-shortcuts",children:[o.jsx("button",{onClick:()=>N(re.DONE),className:"btn-review-done",children:"✓ Done"}),o.jsx("button",{onClick:()=>N(re.IN_PROGRESS),className:"btn-review-needs-work",children:"← Needs work"})]}),x?o.jsxs("div",{className:"delete-confirm",children:[o.jsx("button",{onClick:_,className:"btn-danger",children:"Confirm Delete"}),o.jsx("button",{onClick:()=>E(!1),className:"btn-secondary",children:"Cancel"})]}):o.jsx("button",{onClick:()=>E(!0),className:"btn-danger",children:"Delete Task"})]})})]})})}function rr(){return o.jsx(Pi,{to:"/",className:"home-link",title:"Back to Home",children:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]})})}const gn=Object.create(null);gn.open="0";gn.close="1";gn.ping="2";gn.pong="3";gn.message="4";gn.upgrade="5";gn.noop="6";const ys=Object.create(null);Object.keys(gn).forEach(e=>{ys[gn[e]]=e});const Yc={type:"error",data:"parser error"},Vv=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Yv=typeof ArrayBuffer=="function",Pv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Td=({type:e,data:t},n,i)=>Vv&&t instanceof Blob?n?i(t):fm(t,i):Yv&&(t instanceof ArrayBuffer||Pv(t))?n?i(t):fm(new Blob([t]),i):i(gn[e]+(t||"")),fm=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function dm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ku;function NT(e,t){if(Vv&&e.data instanceof Blob)return e.data.arrayBuffer().then(dm).then(t);if(Yv&&(e.data instanceof ArrayBuffer||Pv(e.data)))return t(dm(e.data));Td(e,!1,n=>{ku||(ku=new TextEncoder),t(ku.encode(n))})}const hm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ta=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<hm.length;e++)Ta[hm.charCodeAt(e)]=e;const wT=e=>{let t=e.length*.75,n=e.length,i,l=0,a,r,s,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const c=new ArrayBuffer(t),d=new Uint8Array(c);for(i=0;i<n;i+=4)a=Ta[e.charCodeAt(i)],r=Ta[e.charCodeAt(i+1)],s=Ta[e.charCodeAt(i+2)],u=Ta[e.charCodeAt(i+3)],d[l++]=a<<2|r>>4,d[l++]=(r&15)<<4|s>>2,d[l++]=(s&3)<<6|u&63;return c},AT=typeof ArrayBuffer=="function",kd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Xv(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:jT(e.substring(1),t)}:ys[n]?e.length>1?{type:ys[n],data:e.substring(1)}:{type:ys[n]}:Yc},jT=(e,t)=>{if(AT){const n=wT(e);return Xv(n,t)}else return{base64:!0,data:e}},Xv=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Qv="",_T=(e,t)=>{const n=e.length,i=new Array(n);let l=0;e.forEach((a,r)=>{Td(a,!1,s=>{i[r]=s,++l===n&&t(i.join(Qv))})})},RT=(e,t)=>{const n=e.split(Qv),i=[];for(let l=0;l<n.length;l++){const a=kd(n[l],t);if(i.push(a),a.type==="error")break}return i};function OT(){return new TransformStream({transform(e,t){NT(e,n=>{const i=n.length;let l;if(i<126)l=new Uint8Array(1),new DataView(l.buffer).setUint8(0,i);else if(i<65536){l=new Uint8Array(3);const a=new DataView(l.buffer);a.setUint8(0,126),a.setUint16(1,i)}else{l=new Uint8Array(9);const a=new DataView(l.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(i))}e.data&&typeof e.data!="string"&&(l[0]|=128),t.enqueue(l),t.enqueue(n)})}})}let Nu;function Xr(e){return e.reduce((t,n)=>t+n.length,0)}function Qr(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let i=0;for(let l=0;l<t;l++)n[l]=e[0][i++],i===e[0].length&&(e.shift(),i=0);return e.length&&i<e[0].length&&(e[0]=e[0].slice(i)),n}function DT(e,t){Nu||(Nu=new TextDecoder);const n=[];let i=0,l=-1,a=!1;return new TransformStream({transform(r,s){for(n.push(r);;){if(i===0){if(Xr(n)<1)break;const u=Qr(n,1);a=(u[0]&128)===128,l=u[0]&127,l<126?i=3:l===126?i=1:i=2}else if(i===1){if(Xr(n)<2)break;const u=Qr(n,2);l=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),i=3}else if(i===2){if(Xr(n)<8)break;const u=Qr(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){s.enqueue(Yc);break}l=d*Math.pow(2,32)+c.getUint32(4),i=3}else{if(Xr(n)<l)break;const u=Qr(n,l);s.enqueue(kd(a?u:Nu.decode(u),t)),i=0}if(l===0||l>e){s.enqueue(Yc);break}}}})}const Zv=4;function Ue(e){if(e)return zT(e)}function zT(e){for(var t in Ue.prototype)e[t]=Ue.prototype[t];return e}Ue.prototype.on=Ue.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ue.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ue.prototype.off=Ue.prototype.removeListener=Ue.prototype.removeAllListeners=Ue.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var i,l=0;l<n.length;l++)if(i=n[l],i===t||i.fn===t){n.splice(l,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ue.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],i=1;i<arguments.length;i++)t[i-1]=arguments[i];if(n){n=n.slice(0);for(var i=0,l=n.length;i<l;++i)n[i].apply(this,t)}return this};Ue.prototype.emitReserved=Ue.prototype.emit;Ue.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ue.prototype.hasListeners=function(e){return!!this.listeners(e).length};const No=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),LT="arraybuffer";function Kv(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const MT=Bt.setTimeout,BT=Bt.clearTimeout;function wo(e,t){t.useNativeTimers?(e.setTimeoutFn=MT.bind(Bt),e.clearTimeoutFn=BT.bind(Bt)):(e.setTimeoutFn=Bt.setTimeout.bind(Bt),e.clearTimeoutFn=Bt.clearTimeout.bind(Bt))}const UT=1.33;function IT(e){return typeof e=="string"?HT(e):Math.ceil((e.byteLength||e.size)*UT)}function HT(e){let t=0,n=0;for(let i=0,l=e.length;i<l;i++)t=e.charCodeAt(i),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(i++,n+=4);return n}function $v(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function qT(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function FT(e){let t={},n=e.split("&");for(let i=0,l=n.length;i<l;i++){let a=n[i].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class GT extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Nd extends Ue{constructor(t){super(),this.writable=!1,wo(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,i){return super.emitReserved("error",new GT(t,n,i)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=kd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=qT(t);return n.length?"?"+n:""}}class VT extends Nd{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let i=0;this._polling&&(i++,this.once("pollComplete",function(){--i||n()})),this.writable||(i++,this.once("drain",function(){--i||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=i=>{if(this.readyState==="opening"&&i.type==="open"&&this.onOpen(),i.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(i)};RT(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,_T(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=$v()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Jv=!1;try{Jv=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const YT=Jv;function PT(){}class XT extends VT{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let i=location.port;i||(i=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||i!==t.port}}doWrite(t,n){const i=this.request({method:"POST",data:t});i.on("success",n),i.on("error",(l,a)=>{this.onError("xhr post error",l,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,i)=>{this.onError("xhr poll error",n,i)}),this.pollXhr=t}}class mn extends Ue{constructor(t,n,i){super(),this.createRequest=t,wo(this,i),this._opts=i,this._method=i.method||"GET",this._uri=n,this._data=i.data!==void 0?i.data:null,this._create()}_create(){var t;const n=Kv(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const i=this._xhr=this.createRequest(n);try{i.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){i.setDisableHeaderCheck&&i.setDisableHeaderCheck(!0);for(let l in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(l)&&i.setRequestHeader(l,this._opts.extraHeaders[l])}}catch{}if(this._method==="POST")try{i.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{i.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(i),"withCredentials"in i&&(i.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(i.timeout=this._opts.requestTimeout),i.onreadystatechange=()=>{var l;i.readyState===3&&((l=this._opts.cookieJar)===null||l===void 0||l.parseCookies(i.getResponseHeader("set-cookie"))),i.readyState===4&&(i.status===200||i.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof i.status=="number"?i.status:0)},0))},i.send(this._data)}catch(l){this.setTimeoutFn(()=>{this._onError(l)},0);return}typeof document<"u"&&(this._index=mn.requestsCount++,mn.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=PT,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete mn.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}mn.requestsCount=0;mn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",pm);else if(typeof addEventListener=="function"){const e="onpagehide"in Bt?"pagehide":"unload";addEventListener(e,pm,!1)}}function pm(){for(let e in mn.requests)mn.requests.hasOwnProperty(e)&&mn.requests[e].abort()}const QT=(function(){const e=Wv({xdomain:!1});return e&&e.responseType!==null})();class ZT extends XT{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=QT&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new mn(Wv,this.uri(),t)}}function Wv(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||YT))return new XMLHttpRequest}catch{}if(!t)try{return new Bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const eb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class KT extends Nd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=eb?{}:Kv(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(i.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,i)}catch(l){return this.emitReserved("error",l)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],l=n===t.length-1;Td(i,this.supportsBinary,a=>{try{this.doWrite(i,a)}catch{}l&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=$v()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const wu=Bt.WebSocket||Bt.MozWebSocket;class $T extends KT{createSocket(t,n,i){return eb?new wu(t,n,i):n?new wu(t,n):new wu(t)}doWrite(t,n){this.ws.send(n)}}class JT extends Nd{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=DT(Number.MAX_SAFE_INTEGER,this.socket.binaryType),i=t.readable.pipeThrough(n).getReader(),l=OT();l.readable.pipeTo(t.writable),this._writer=l.writable.getWriter();const a=()=>{i.read().then(({done:s,value:u})=>{s||(this.onPacket(u),a())}).catch(s=>{})};a();const r={type:"open"};this.query.sid&&(r.data=`{"sid":"${this.query.sid}"}`),this._writer.write(r).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const i=t[n],l=n===t.length-1;this._writer.write(i).then(()=>{l&&No(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const WT={websocket:$T,webtransport:JT,polling:ZT},ek=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,tk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pc(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),i=e.indexOf("]");n!=-1&&i!=-1&&(e=e.substring(0,n)+e.substring(n,i).replace(/:/g,";")+e.substring(i,e.length));let l=ek.exec(e||""),a={},r=14;for(;r--;)a[tk[r]]=l[r]||"";return n!=-1&&i!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=nk(a,a.path),a.queryKey=ik(a,a.query),a}function nk(e,t){const n=/\/{2,9}/g,i=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&i.splice(0,1),t.slice(-1)=="/"&&i.splice(i.length-1,1),i}function ik(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,l,a){l&&(n[l]=a)}),n}const Xc=typeof addEventListener=="function"&&typeof removeEventListener=="function",xs=[];Xc&&addEventListener("offline",()=>{xs.forEach(e=>e())},!1);class yi extends Ue{constructor(t,n){if(super(),this.binaryType=LT,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const i=Pc(t);n.hostname=i.host,n.secure=i.protocol==="https"||i.protocol==="wss",n.port=i.port,i.query&&(n.query=i.query)}else n.host&&(n.hostname=Pc(n.host).host);wo(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(i=>{const l=i.prototype.name;this.transports.push(l),this._transportsByName[l]=i}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=FT(this.opts.query)),Xc&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},xs.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Zv,n.transport=t,this.id&&(n.sid=this.id);const i=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](i)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&yi.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",yi.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let i=0;i<this.writeBuffer.length;i++){const l=this.writeBuffer[i].data;if(l&&(n+=IT(l)),i>0&&n>this._maxPayload)return this.writeBuffer.slice(0,i);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,No(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,i){return this._sendPacket("message",t,n,i),this}send(t,n,i){return this._sendPacket("message",t,n,i),this}_sendPacket(t,n,i,l){if(typeof n=="function"&&(l=n,n=void 0),typeof i=="function"&&(l=i,i=null),this.readyState==="closing"||this.readyState==="closed")return;i=i||{},i.compress=i.compress!==!1;const a={type:t,data:n,options:i};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),l&&this.once("flush",l),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},i=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?i():t()}):this.upgrading?i():t()),this}_onError(t){if(yi.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Xc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=xs.indexOf(this._offlineEventListener);i!==-1&&xs.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}yi.protocol=Zv;class lk extends yi{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),i=!1;yi.priorWebsocketSuccess=!1;const l=()=>{i||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!i)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;yi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{i||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function a(){i||(i=!0,d(),n.close(),n=null)}const r=f=>{const h=new Error("probe error: "+f);h.transport=n.name,a(),this.emitReserved("upgradeError",h)};function s(){r("transport closed")}function u(){r("socket closed")}function c(f){n&&f.name!==n.name&&a()}const d=()=>{n.removeListener("open",l),n.removeListener("error",r),n.removeListener("close",s),this.off("close",u),this.off("upgrading",c)};n.once("open",l),n.once("error",r),n.once("close",s),this.once("close",u),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{i||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}}let ak=class extends lk{constructor(t,n={}){const i=typeof t=="object"?t:n;(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(l=>WT[l]).filter(l=>!!l)),super(t,i)}};function rk(e,t="",n){let i=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),i=Pc(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const a=i.host.indexOf(":")!==-1?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+a+":"+i.port+t,i.href=i.protocol+"://"+a+(n&&n.port===i.port?"":":"+i.port),i}const sk=typeof ArrayBuffer=="function",ok=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,tb=Object.prototype.toString,uk=typeof Blob=="function"||typeof Blob<"u"&&tb.call(Blob)==="[object BlobConstructor]",ck=typeof File=="function"||typeof File<"u"&&tb.call(File)==="[object FileConstructor]";function wd(e){return sk&&(e instanceof ArrayBuffer||ok(e))||uk&&e instanceof Blob||ck&&e instanceof File}function vs(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(vs(e[n]))return!0;return!1}if(wd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vs(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vs(e[n]))return!0;return!1}function fk(e){const t=[],n=e.data,i=e;return i.data=Qc(n,t),i.attachments=t.length,{packet:i,buffers:t}}function Qc(e,t){if(!e)return e;if(wd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let i=0;i<e.length;i++)n[i]=Qc(e[i],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=Qc(e[i],t));return n}return e}function dk(e,t){return e.data=Zc(e.data,t),delete e.attachments,e}function Zc(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Zc(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Zc(e[n],t));return e}const hk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ae;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(ae||(ae={}));class pk{constructor(t){this.replacer=t}encode(t){return(t.type===ae.EVENT||t.type===ae.ACK)&&vs(t)?this.encodeAsBinary({type:t.type===ae.EVENT?ae.BINARY_EVENT:ae.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===ae.BINARY_EVENT||t.type===ae.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=fk(t),i=this.encodeAsString(n.packet),l=n.buffers;return l.unshift(i),l}}class Ad extends Ue{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const i=n.type===ae.BINARY_EVENT;i||n.type===ae.BINARY_ACK?(n.type=i?ae.EVENT:ae.ACK,this.reconstructor=new mk(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(wd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const i={type:Number(t.charAt(0))};if(ae[i.type]===void 0)throw new Error("unknown packet type "+i.type);if(i.type===ae.BINARY_EVENT||i.type===ae.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const r=t.substring(a,n);if(r!=Number(r)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const s=Number(r);if(!gk(s)||s<0)throw new Error("Illegal attachments");if(s>this.opts.maxAttachments)throw new Error("too many attachments");i.attachments=s}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););i.nsp=t.substring(a,n)}else i.nsp="/";const l=t.charAt(n+1);if(l!==""&&Number(l)==l){const a=n+1;for(;++n;){const r=t.charAt(n);if(r==null||Number(r)!=r){--n;break}if(n===t.length)break}i.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(Ad.isPayloadValid(i.type,a))i.data=a;else throw new Error("invalid payload")}return i}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case ae.CONNECT:return mm(n);case ae.DISCONNECT:return n===void 0;case ae.CONNECT_ERROR:return typeof n=="string"||mm(n);case ae.EVENT:case ae.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&hk.indexOf(n[0])===-1);case ae.ACK:case ae.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class mk{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=dk(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const gk=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function mm(e){return Object.prototype.toString.call(e)==="[object Object]"}const yk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ad,Encoder:pk,get PacketType(){return ae}},Symbol.toStringTag,{value:"Module"}));function Wt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const xk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class nb extends Ue{constructor(t,n,i){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,i&&i.auth&&(this.auth=i.auth),this._opts=Object.assign({},i),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Wt(t,"open",this.onopen.bind(this)),Wt(t,"packet",this.onpacket.bind(this)),Wt(t,"error",this.onerror.bind(this)),Wt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var i,l,a;if(xk.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const r={type:ae.EVENT,data:n};if(r.options={},r.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),r.id=d}const s=(l=(i=this.io.engine)===null||i===void 0?void 0:i.transport)===null||l===void 0?void 0:l.writable,u=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!s||(u?(this.notifyOutgoingListeners(r),this.packet(r)):this.sendBuffer.push(r)),this.flags={},this}_registerAckCallback(t,n){var i;const l=(i=this.flags.timeout)!==null&&i!==void 0?i:this._opts.ackTimeout;if(l===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},l),r=(...s)=>{this.io.clearTimeoutFn(a),n.apply(this,s)};r.withError=!0,this.acks[t]=r}emitWithAck(t,...n){return new Promise((i,l)=>{const a=(r,s)=>r?l(r):i(s);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const i={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((l,...a)=>(this._queue[0],l!==null?i.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(l)):(this._queue.shift(),n&&n(null,...a)),i.pending=!1,this._drainQueue())),this._queue.push(i),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:ae.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(i=>String(i.id)===t)){const i=this.acks[t];delete this.acks[t],i.withError&&i.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case ae.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ae.EVENT:case ae.BINARY_EVENT:this.onevent(t);break;case ae.ACK:case ae.BINARY_ACK:this.onack(t);break;case ae.DISCONNECT:this.ondisconnect();break;case ae.CONNECT_ERROR:this.destroy();const i=new Error(t.data.message);i.data=t.data.data,this.emitReserved("connect_error",i);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const i of n)i.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let i=!1;return function(...l){i||(i=!0,n.packet({type:ae.ACK,id:t,data:l}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ae.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let i=0;i<n.length;i++)if(t===n[i])return n.splice(i,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const i of n)i.apply(this,t.data)}}}function na(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}na.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};na.prototype.reset=function(){this.attempts=0};na.prototype.setMin=function(e){this.ms=e};na.prototype.setMax=function(e){this.max=e};na.prototype.setJitter=function(e){this.jitter=e};class Kc extends Ue{constructor(t,n){var i;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,wo(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((i=n.randomizationFactor)!==null&&i!==void 0?i:.5),this.backoff=new na({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const l=n.parser||yk;this.encoder=new l.Encoder,this.decoder=new l.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new ak(this.uri,this.opts);const n=this.engine,i=this;this._readyState="opening",this.skipReconnect=!1;const l=Wt(n,"open",function(){i.onopen(),t&&t()}),a=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},r=Wt(n,"error",a);if(this._timeout!==!1){const s=this._timeout,u=this.setTimeoutFn(()=>{l(),a(new Error("timeout")),n.close()},s);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(l),this.subs.push(r),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(Wt(t,"ping",this.onping.bind(this)),Wt(t,"data",this.ondata.bind(this)),Wt(t,"error",this.onerror.bind(this)),Wt(t,"close",this.onclose.bind(this)),Wt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){No(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let i=this.nsps[t];return i?this._autoConnect&&!i.active&&i.connect():(i=new nb(this,t,n),this.nsps[t]=i),i}_destroy(t){const n=Object.keys(this.nsps);for(const i of n)if(this.nsps[i].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let i=0;i<n.length;i++)this.engine.write(n[i],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var i;this.cleanup(),(i=this.engine)===null||i===void 0||i.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const i=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(l=>{l?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",l)):t.onreconnect()}))},n);this.opts.autoUnref&&i.unref(),this.subs.push(()=>{this.clearTimeoutFn(i)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ga={};function Ha(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=rk(e,t.path||"/socket.io"),i=n.source,l=n.id,a=n.path,r=ga[l]&&a in ga[l].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||r;let u;return s?u=new Kc(i,t):(ga[l]||(ga[l]=new Kc(i,t)),u=ga[l]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Ha,{Manager:Kc,Socket:nb,io:Ha,connect:Ha});const vk=Uv("/tasks"),ib=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null),[u,c]=b.useState(!1);b.useEffect(()=>(f(),h(),()=>{r&&r.disconnect()}),[]);const d=p=>[...p].sort((y,x)=>{const E=new Date(y.updatedAt).getTime();return new Date(x.updatedAt).getTime()-E}),f=async()=>{t(!0),i(null);try{const p=await en.tasksControllerListTasks();a(d(p.items))}catch(p){i(p instanceof Error?p.message:"Failed to load tasks")}finally{t(!1)}},h=()=>{const p=Ha(vk,{transports:["websocket","polling"],withCredentials:!0});return p.on("connect",()=>{console.log("Connected to websocket"),p.emit("tasks.subscribe",{},y=>{y.ok?(console.log(y),console.log("Subscribed to room:",y.room),c(!0)):(console.error("Failed to subscribe to room"),c(!1))}),f()}),p.on("disconnect",()=>{console.log("WebSocket disconnected"),c(!1)}),p.on("task.created",y=>{a(x=>x.some(E=>E.id===y.id)?x:d([y,...x]))}),p.on("task.updated",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),p.on("task.deleted",({taskId:y})=>{a(x=>x.filter(E=>E.id!==y))}),p.on("task.assigned",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),p.on("task.commented",async y=>{try{const x=await en.tasksControllerGetTask(y.taskId);a(E=>E.findIndex(m=>m.id===x.id)===-1?d([x,...E]):d(E.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after comment",x)}}),p.on("input.request.answered",async y=>{try{const x=await en.tasksControllerGetTask(y.taskId);a(E=>E.findIndex(m=>m.id===x.id)===-1?d([x,...E]):d(E.map(m=>m.id===x.id?x:m)))}catch(x){console.error("Failed to refresh task after input request answer",x)}}),p.on("task.status_changed",y=>{a(x=>d(x.map(E=>E.id===y.id?y:E)))}),s(p),()=>{p.close()}};return{isLoading:e,error:n,tasks:l,isConnected:u}};function bk(){const{tasks:e,isConnected:t}=ib(),[n,i]=b.useState(null),[l,a]=b.useState(!1);tl("Tasks");const r={[re.NOT_STARTED]:e.filter(s=>s.status===re.NOT_STARTED),[re.IN_PROGRESS]:e.filter(s=>s.status===re.IN_PROGRESS),[re.FOR_REVIEW]:e.filter(s=>s.status===re.FOR_REVIEW),[re.DONE]:e.filter(s=>s.status===re.DONE)};return o.jsxs("div",{className:"task-board",children:[o.jsxs("div",{className:"task-board-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Tasks"}),o.jsx("p",{className:"subtitle",children:"Manage and track your tasks across different stages"})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(rr,{}),o.jsx("span",{className:`status-indicator ${t?"connected":"disconnected"}`,children:t?"● Connected":"○ Disconnected"})]})]}),o.jsx("div",{className:"kanban-board",children:Object.entries(r).map(([s,u])=>o.jsxs("div",{className:`kanban-column column-${s.replace(" ","-")}`,children:[o.jsxs("div",{className:"column-header",children:[o.jsx("h2",{children:s.toUpperCase()}),o.jsx("span",{className:"task-count",children:u.length})]}),o.jsxs("div",{className:"column-content",children:[s===re.NOT_STARTED&&o.jsx("button",{onClick:()=>a(!0),className:"btn-add-task",children:"+ Add New Task"}),u.map(c=>o.jsx(ET,{task:c,onClick:()=>i(c)},c.id))]})]},s))}),l&&o.jsx(kT,{onClose:()=>a(!1)}),n&&o.jsx(Gv,{task:n,onClose:()=>i(null),onUpdate:s=>i(s)})]})}function Sk(){const[e,t]=b.useState(!1),n=rt(),i=()=>t(!e),l=()=>t(!1),a=[{name:"Home",path:"/",icon:o.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),o.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),color:"#8e8e93"},{name:"Tasks",path:"/tasks",icon:"📋",color:"#3b82f6"},{name:"Context",path:"/context",icon:"📚",color:"#10b981"},{name:"Tools",path:"/mcp-registry",icon:"🔧",color:"#8b5cf6"},{name:"Logout",path:"/logout",icon:"🔒"}];return o.jsxs(o.Fragment,{children:[o.jsx("button",{className:"hamburger-button",onClick:i,"aria-label":"Menu",children:o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),o.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),o.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),e&&o.jsx("div",{className:"hamburger-overlay",onClick:l}),o.jsxs("div",{className:`hamburger-drawer ${e?"open":""}`,children:[o.jsxs("div",{className:"hamburger-header",children:[o.jsx("h2",{children:"Menu"}),o.jsx("button",{className:"hamburger-close",onClick:l,"aria-label":"Close menu",children:o.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[o.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),o.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]}),o.jsx("nav",{className:"hamburger-nav",children:a.map(r=>{const s=n.pathname===r.path||r.path!=="/"&&n.pathname.startsWith(r.path);return o.jsxs(Pi,{to:r.path,className:`hamburger-nav-item ${s?"active":""}`,onClick:l,children:[o.jsx("div",{className:"hamburger-nav-icon",style:{color:r.color},children:typeof r.icon=="string"?o.jsx("span",{className:"hamburger-emoji",children:r.icon}):r.icon}),o.jsx("span",{className:"hamburger-nav-label",children:r.name}),s&&o.jsx("svg",{className:"hamburger-nav-check",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:o.jsx("polyline",{points:"20 6 9 17 4 12"})})]},r.path)})})]})]})}const Ek=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE],Zr={[re.NOT_STARTED]:{label:"Queued",icon:"○",sublabel:"Ideas + intake"},[re.IN_PROGRESS]:{label:"Building",icon:"▣",sublabel:"Actively running"},[re.FOR_REVIEW]:{label:"Review",icon:"◆",sublabel:"Needs eyeballs"},[re.DONE]:{label:"Shipped",icon:"▴",sublabel:"Mission complete"}};function Ck(){const{tasks:e,isConnected:t}=ib(),[n,i]=b.useState(null),[l,a]=b.useState(!1),[r,s]=b.useState(re.NOT_STARTED);tl("Tasks");const u=b.useMemo(()=>e.reduce((f,h)=>(f[h.status]=f[h.status]?[...f[h.status],h]:[h],f),{[re.NOT_STARTED]:[],[re.IN_PROGRESS]:[],[re.FOR_REVIEW]:[],[re.DONE]:[]}),[e]),c=u[r]??[],d=f=>{const h=new Date(f),y=Math.round((new Date().getTime()-h.getTime())/(1e3*60));if(y<60)return`${Math.max(y,1)}m ago`;const x=Math.round(y/60);return x<24?`${x}h ago`:h.toLocaleDateString("en-US",{month:"short",day:"numeric"})};return o.jsxs("div",{className:"task-board-mobile",children:[o.jsxs("div",{className:"matrix-frame",children:[o.jsxs("header",{className:"matrix-header",children:[o.jsx(Sk,{}),o.jsx("div",{className:"matrix-header-copy",children:o.jsx("h1",{children:"Tasks"})}),o.jsxs("div",{className:"matrix-connection",children:[o.jsx("span",{className:`matrix-connection-dot ${t?"online":"offline"}`,"aria-hidden":!0}),o.jsx("span",{children:t?"":"offline"})]})]}),o.jsxs("section",{className:"matrix-status-panel",children:[o.jsxs("div",{children:[o.jsx("h2",{children:Zr[r].label}),o.jsx("p",{className:"matrix-status-sub",children:Zr[r].sublabel})]}),o.jsxs("div",{className:"matrix-status-count",children:[o.jsx("span",{className:"matrix-count-number",children:c.length}),o.jsx("span",{className:"matrix-count-text",children:"tasks"})]})]}),o.jsxs("section",{className:"matrix-task-feed",children:[c.length===0&&o.jsxs("div",{className:"matrix-empty-state",children:[o.jsx("p",{children:"No entries in this lane."}),r===re.NOT_STARTED&&o.jsx("button",{type:"button",className:"matrix-link",onClick:()=>a(!0),children:"create the first task"})]}),c.map(f=>o.jsxs("article",{className:"matrix-task-card",onClick:()=>i(f),children:[o.jsxs("div",{className:"matrix-task-meta-row",children:[o.jsxs("span",{className:"matrix-task-id",children:["#",f.id.slice(0,6).toUpperCase()]}),o.jsx("span",{className:"matrix-task-updated",children:d(f.updatedAt)})]}),o.jsx("h3",{children:f.name}),o.jsx("p",{children:f.description}),f.tags&&f.tags.length>0&&o.jsx("div",{className:"matrix-task-tags",children:f.tags.map(h=>o.jsx(Hv,{tag:h,small:!0},h.name))}),o.jsxs("div",{className:"matrix-task-footer",children:[o.jsx("span",{children:f.assignee?`Assigned: ${f.assignee}`:"Unassigned"}),f.comments&&f.comments.length>0&&o.jsxs("span",{children:["💬 ",f.comments.length]})]})]},f.id))]})]}),o.jsx("nav",{className:"matrix-bottom-nav","aria-label":"Task status navigation",children:Ek.map(f=>o.jsxs("button",{className:`matrix-nav-item ${f===r?"active":""}`,onClick:()=>s(f),type:"button",children:[o.jsx("span",{className:"matrix-nav-icon",children:Zr[f].icon}),o.jsx("span",{className:"matrix-nav-label",children:Zr[f].label}),o.jsx("span",{className:"matrix-nav-count",children:u[f].length})]},f))}),o.jsx("button",{type:"button",className:"matrix-fab",onClick:()=>a(!0),"aria-label":"Create task",children:"➕"}),n&&o.jsx(Gv,{task:n,onClose:()=>i(null),onUpdate:f=>i(f)}),l&&o.jsx(Tk,{onClose:()=>a(!1)})]})}function Tk({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=qv(),[l,a]=b.useState(""),[r,s]=b.useState(""),[u,c]=b.useState(""),[d,f]=b.useState(""),[h,p]=b.useState([]),[y,x]=b.useState(""),[E,g]=b.useState(!1),m=async v=>{var C;if(v.preventDefault(),!l.trim()||!r.trim()){n("Name and description are required","error");return}g(!0);try{const A=y.split(",").map(N=>N.trim()).filter(Boolean);await en.tasksControllerCreateTask({name:l,description:r,...u&&{assignee:u},...d&&{sessionId:d},...h.length>0&&{tagNames:h},...A.length>0&&{dependsOnIds:A}}),e()}catch(A){const N=((C=A==null?void 0:A.body)==null?void 0:C.detail)||(A==null?void 0:A.message)||"Failed to create task";n(N,"error")}finally{g(!1)}};return o.jsx("div",{className:"mobile-create-overlay",onClick:e,children:o.jsxs("div",{className:"mobile-create-panel",onClick:v=>v.stopPropagation(),children:[o.jsxs("header",{className:"mobile-create-header",children:[o.jsxs("div",{children:[o.jsx("p",{className:"matrix-status-label",children:"New task payload"}),o.jsx("h2",{children:"Compose"})]}),o.jsx("button",{type:"button",className:"matrix-link",onClick:e,children:"close"})]}),o.jsxs("form",{className:"mobile-create-form",onSubmit:m,children:[o.jsxs("label",{children:[o.jsx("span",{children:"Title *"}),o.jsx("input",{type:"text",value:l,onChange:v=>a(v.target.value),placeholder:"Ship a feature",required:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Description *"}),o.jsx("textarea",{value:r,onChange:v=>s(v.target.value),placeholder:"Outline what needs to happen",rows:4,required:!0})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Assignee"}),o.jsx("input",{type:"text",value:u,onChange:v=>c(v.target.value),placeholder:"agent or human"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Session ID"}),o.jsx("input",{type:"text",value:d,onChange:v=>f(v.target.value),placeholder:"link a running session"})]}),o.jsxs("div",{className:"mobile-form-control",children:[o.jsx("span",{children:"Tags"}),o.jsx(Cd,{value:h,onChange:p,placeholder:"ops, agents, ui"})]}),o.jsxs("label",{children:[o.jsx("span",{children:"Depends on task IDs"}),o.jsx("input",{type:"text",value:y,onChange:v=>x(v.target.value),placeholder:"comma separated"})]}),o.jsx("button",{type:"submit",className:"matrix-submit",disabled:E,children:E?"Transmitting…":"Create Task"})]}),t.map(v=>o.jsx(Fv,{message:v.message,type:v.type,onClose:()=>i(v.id)},v.id))]})})}function lb(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>lb(n,t)):!1:!1}const kk=b.memo(function e({page:t,level:n,isActive:i,currentPageId:l,onPageClick:a,onAddChild:r}){const s=t.children&&t.children.length>0,u=s&&lb(t,l),[c,d]=b.useState(u);b.useEffect(()=>{u&&d(!0)},[u]);const f=x=>{x.stopPropagation(),d(!c)},h=x=>{x.preventDefault(),a(t.id)},p=x=>{x.preventDefault(),x.stopPropagation(),r(t.id)},y=b.useMemo(()=>s?[...t.children].sort((x,E)=>x.order-E.order):[],[s,t.children]);return o.jsxs("div",{className:"page-tree-item",children:[o.jsxs("div",{className:`tree-item-content ${i?"active":""}`,style:{paddingLeft:`${n*20}px`},children:[s?o.jsx("button",{className:"tree-toggle",onClick:f,"aria-label":c?"Collapse":"Expand","aria-expanded":c,children:c?"▼":"▶"}):o.jsx("span",{className:"tree-spacer"}),o.jsx("a",{href:"#",className:"tree-item-link",onClick:h,"aria-current":i?"page":void 0,children:t.title}),o.jsx("button",{className:"tree-item-add-child",onClick:p,"aria-label":`Add child page to ${t.title}`,title:"Add child page",children:"+"})]}),c&&s&&o.jsx("div",{className:"tree-item-children",children:y.map(x=>o.jsx(e,{page:x,level:n+1,isActive:x.id===l,currentPageId:l,onPageClick:a,onAddChild:r},x.id))})]})});function Nk({pages:e,currentPageId:t,onPageClick:n}){const i=Je(),l=b.useMemo(()=>[...e].sort((r,s)=>r.order-s.order),[e]),a=r=>{i(`/context/page/${r}/new`)};return o.jsx("div",{className:"page-tree",children:l.map(r=>o.jsx(kk,{page:r,level:0,isActive:r.id===t,currentPageId:t,onPageClick:n,onAddChild:a},r.id))})}B.BASE=el;const wk=Uv("/context"),Tr=()=>{const[e,t]=b.useState([]),[n,i]=b.useState(null),[l,a]=b.useState(!1),[r,s]=b.useState(!1),[u,c]=b.useState(!1),[d,f]=b.useState(!1),[h,p]=b.useState(!1),[y,x]=b.useState(null),[E,g]=b.useState(null),[m,v]=b.useState(!1),C=b.useCallback(async()=>{a(!0),x(null);try{const j=await Kt.contextControllerListBlocks();t(j.items)}catch(j){x(j instanceof Error?j.message:"Failed to load wiki pages")}finally{a(!1)}},[]),A=b.useCallback(async j=>{s(!0),x(null),i(null);try{const O=await Kt.contextControllerGetBlock(j);i(O)}catch(O){x(O instanceof Error?O.message:"Failed to fetch wiki page")}finally{s(!1)}},[]),N=b.useCallback(async j=>{c(!0),x(null);try{const O=await Kt.contextControllerCreateBlock(j);return t(w=>{const X=w.filter(S=>S.id!==O.id);return[{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt},...X]}),i(O),O}catch(O){throw x(O instanceof Error?O.message:"Failed to create wiki page"),O}finally{c(!1)}},[]),_=b.useCallback(j=>{A(j)},[A]),I=b.useCallback(async(j,O)=>{f(!0),x(null);try{const w=await Kt.contextControllerUpdateBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to update page"),w}finally{f(!1)}},[n]),D=b.useCallback(async j=>{p(!0),x(null);try{await Kt.contextControllerDeleteBlock(j),t(O=>O.filter(w=>w.id!==j)),(n==null?void 0:n.id)===j&&i(null)}catch(O){throw x(O instanceof Error?O.message:"Failed to delete page"),O}finally{p(!1)}},[n]),T=b.useCallback(async(j,O)=>{f(!0),x(null);try{const w=await Kt.contextControllerAppendToBlock(j,{content:O});return(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to append content"),w}finally{f(!1)}},[n]),M=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerAddTagToBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to add tag"),w}},[n]),q=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerRemoveTagFromBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to remove tag"),w}},[n]),P=b.useCallback(async()=>{x(null);try{return await Kt.contextControllerGetBlockTree()}catch(j){throw x(j instanceof Error?j.message:"Failed to fetch page tree"),j}},[]),F=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerReorderBlock(j,{newOrder:O});return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to reorder page"),w}},[n]),V=b.useCallback(async(j,O)=>{x(null);try{const w=await Kt.contextControllerMoveBlock(j,{newParentId:O});return t(X=>X.map(S=>S.id===j?{id:w.id,title:w.title,createdBy:w.createdBy,createdByActorId:w.createdByActorId,tags:w.tags,parentId:w.parentId,order:w.order,createdAt:w.createdAt,updatedAt:w.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(w),w}catch(w){throw x(w instanceof Error?w.message:"Failed to move page"),w}},[n]);return b.useEffect(()=>{const j=Ha(wk,{transports:["websocket","polling"],withCredentials:!0});return j.on("connect",()=>{console.log("Connected to Context websocket"),j.emit("context.subscribe",{},O=>{O.ok?(console.log(O),console.log("Subscribed to room:",O.room),v(!0)):(console.error("Failed to subscribe to room"),v(!1))}),v(!0),C()}),j.on("disconnect",()=>{console.log("Context WebSocket disconnected"),v(!1)}),j.on("page.created",O=>{t(w=>w.some(X=>X.id===O.id)?w:[{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt},...w])}),j.on("page.updated",O=>{t(w=>w.map(X=>X.id===O.id?{id:O.id,title:O.title,createdBy:O.createdBy,createdByActorId:O.createdByActorId,tags:O.tags,parentId:O.parentId,order:O.order,createdAt:O.createdAt,updatedAt:O.updatedAt}:X)),(n==null?void 0:n.id)===O.id&&i(O)}),j.on("page.deleted",({pageId:O})=>{t(w=>w.filter(X=>X.id!==O)),(n==null?void 0:n.id)===O&&i(null)}),g(j),()=>{j.disconnect()}},[C,n==null?void 0:n.id]),b.useEffect(()=>{C()},[C]),{pages:e,selectedPage:n,isLoadingList:l,isLoadingPage:r,isCreating:u,isUpdating:d,isDeleting:h,error:y,isConnected:m,socket:E,loadPages:C,createPage:N,selectPage:_,updatePage:I,appendToPage:T,deletePage:D,addTagToPage:M,removeTagFromPage:q,getPageTree:P,reorderPage:F,movePage:V}},gm="context-sidebar-collapsed";function Ak(){const{pageId:e}=Wi(),t=Je(),{getPageTree:n,isConnected:i,socket:l}=Tr(),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(()=>{const y=localStorage.getItem(gm);return y!==null?y==="true":ar()});b.useEffect(()=>{localStorage.setItem(gm,String(c))},[c]);const f=b.useCallback(async()=>{u(!0);try{const y=await n();r(y)}catch(y){console.error("Failed to load page tree:",y)}finally{u(!1)}},[n]);b.useEffect(()=>{f()},[f]),b.useEffect(()=>{if(!l)return;const y=()=>{f()},x=()=>{f()},E=()=>{f()};return l.on("page.created",y),l.on("page.updated",x),l.on("page.deleted",E),()=>{l.off("page.created",y),l.off("page.updated",x),l.off("page.deleted",E)}},[l,f]);const h=b.useCallback(y=>{t(`/context/page/${y}`)},[t]),p=()=>{d(!c)};return o.jsxs("div",{className:"context-with-sidebar",children:[o.jsxs("aside",{className:`sidebar-app-specific ${c?"collapsed":""}`,children:[o.jsxs("nav",{className:"sidebar-content",children:[c&&o.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"8px"},children:o.jsx("span",{className:`context-status-dot ${i?"connected":"disconnected"}`,title:i?"WebSocket connected":"WebSocket disconnected","aria-label":i?"WebSocket connected":"WebSocket disconnected"})}),!c&&o.jsxs("div",{children:[o.jsxs("div",{className:"context-sidebar-header",children:[o.jsxs("h2",{className:"context-sidebar-title",children:["📚 Context",o.jsx("span",{className:`context-status-dot ${i?"connected":"disconnected"}`,title:i?"WebSocket connected":"WebSocket disconnected","aria-label":i?"WebSocket connected":"WebSocket disconnected"})]}),o.jsx("button",{className:"context-button primary context-sidebar-new-page",type:"button",onClick:()=>t("/context/new"),title:"Create new page",children:"+ New page"})]}),s&&o.jsx("div",{className:"context-status",children:"Loading pages…"}),a.length>0&&o.jsx(Nk,{pages:a,currentPageId:e,onPageClick:h}),a.length===0&&!s&&o.jsx("div",{className:"context-empty-sidebar",children:o.jsx("span",{children:"No pages yet"})})]})]}),o.jsx("button",{className:"sidebar-toggle",onClick:p,"aria-label":c?"Expand sidebar":"Collapse sidebar",children:c?"→":"←"})]}),o.jsx("main",{className:"context-content",children:o.jsx(md,{})})]})}const ab=({tag:e,onRemove:t,small:n=!1})=>{const i=e.color||"#6B7280";return o.jsxs("span",{className:`tag-badge ${n?"tag-badge-small":""}`,style:{backgroundColor:i,color:"#ffffff",padding:n?"1px 4px":"2px 6px",borderRadius:"3px",fontSize:n?"0.65rem":"0.7rem",fontWeight:"500",display:"inline-flex",alignItems:"center",gap:"2px",marginRight:"4px",marginBottom:"4px"},children:[e.name,t&&o.jsx("button",{onClick:l=>{l.stopPropagation(),t()},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:n?"0.75rem":"0.85rem",lineHeight:"1"},"aria-label":`Remove ${e.name} tag`,children:"×"})]})};function jk(){const e=Je(),{pages:t,isLoadingList:n}=Tr();return n?o.jsx("div",{className:"context-welcome",children:o.jsx("p",{children:"Loading pages..."})}):t.length===0?o.jsxs("div",{className:"context-welcome",children:[o.jsx("h2",{children:"Context"}),o.jsx("br",{}),o.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}):o.jsxs("div",{className:"context-content",style:{padding:"24px"},children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[o.jsx("h2",{style:{margin:0},children:"All Pages"}),o.jsx("button",{className:"context-button primary",type:"button",onClick:()=>e("/context/new"),title:"Create new page",children:"+ New page"})]}),o.jsx("div",{className:"context-grid",children:t.map(i=>o.jsxs("div",{className:"context-card",onClick:()=>e(`/context/page/${i.id}`),style:{cursor:"pointer"},children:[o.jsx("h3",{children:i.title}),i.tags&&i.tags.length>0&&o.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:i.tags.map(l=>o.jsx(ab,{tag:l},l.name))}),o.jsxs("div",{className:"context-card-meta",children:[o.jsxs("span",{children:["By ",i.createdBy||"unknown"]}),o.jsxs("span",{children:["Created ",new Date(i.createdAt).toLocaleDateString()]}),i.updatedAt!==i.createdAt&&o.jsxs("span",{children:["Updated ",new Date(i.updatedAt).toLocaleDateString()]})]})]},i.id))})]})}const _k=({value:e,onChange:t,placeholder:n="Type to add tags..."})=>{const[i,l]=b.useState(""),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(-1),[f,h]=b.useState([]),p=b.useRef(null),y=b.useRef(null);b.useEffect(()=>{(async()=>{try{const v=await Mv.metaControllerGetAllTags();h(v)}catch(v){console.error("Failed to load tags:",v)}})()},[]),b.useEffect(()=>{const v=setTimeout(()=>{if(i.trim().length>0){const C=i.trim().toLowerCase(),A=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(A),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const m=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[]);const x=m=>{var C;const v=m.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=m=>{t(e.filter(v=>v!==m))},g=m=>{m.key==="Tab"&&i.trim()||m.key==="Enter"&&i.trim()?(m.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):m.key==="ArrowDown"?(m.preventDefault(),d(v=>v<a.length-1?v+1:v)):m.key==="ArrowUp"?(m.preventDefault(),d(v=>v>0?v-1:-1)):m.key==="Escape"?(u(!1),d(-1)):m.key==="Backspace"&&!i&&e.length>0&&t(e.slice(0,-1))};return o.jsxs("div",{ref:y,style:{position:"relative"},children:[o.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",padding:"6px",border:"1px solid #ddd",borderRadius:"4px",minHeight:"38px",cursor:"text"},onClick:()=>{var m;return(m=p.current)==null?void 0:m.focus()},children:[e.map(m=>{const v=f.find(A=>A.name===m),C=(v==null?void 0:v.color)||"#3B82F6";return o.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:"2px",backgroundColor:C,color:"white",padding:"2px 6px",borderRadius:"3px",fontSize:"0.7rem",fontWeight:"500"},children:[m,o.jsx("button",{type:"button",onClick:A=>{A.stopPropagation(),E(m)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},m)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:m=>l(m.target.value),onKeyDown:g,onFocus:()=>i&&u(!0),placeholder:e.length===0?n:"",style:{flex:"1",minWidth:"120px",border:"none",outline:"none",fontSize:"0.875rem",padding:"2px"}})]}),s&&a.length>0&&o.jsx("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",maxHeight:"200px",overflowY:"auto",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3},children:a.map((m,v)=>o.jsxs("div",{onClick:()=>x(m.name),style:{padding:"8px 12px",cursor:"pointer",backgroundColor:v===c?"#EFF6FF":"white",display:"flex",alignItems:"center",gap:"8px"},onMouseEnter:()=>d(v),children:[o.jsx("span",{style:{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:m.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:m.name})]},m.name))}),s&&i&&a.length===0&&o.jsxs("div",{style:{position:"absolute",top:"100%",left:0,right:0,backgroundColor:"white",border:"1px solid #ddd",borderRadius:"4px",marginTop:"2px",padding:"8px 12px",boxShadow:"0 4px 6px rgba(0, 0, 0, 0.1)",zIndex:1e3,fontSize:"0.875rem",color:"#6B7280"},children:['Press Tab or Enter to create "',i,'"']})]})};function Rk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Ok=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Dk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zk={};function ym(e,t){return(zk.jsx?Dk:Ok).test(e)}const Lk=/[ \t\n\f\r]/g;function Mk(e){return typeof e=="object"?e.type==="text"?xm(e.value):!1:xm(e)}function xm(e){return e.replace(Lk,"")===""}class kr{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}kr.prototype.normal={};kr.prototype.property={};kr.prototype.space=void 0;function rb(e,t){const n={},i={};for(const l of e)Object.assign(n,l.property),Object.assign(i,l.normal);return new kr(n,i,t)}function $c(e){return e.toLowerCase()}class yt{constructor(t,n){this.attribute=n,this.property=t}}yt.prototype.attribute="";yt.prototype.booleanish=!1;yt.prototype.boolean=!1;yt.prototype.commaOrSpaceSeparated=!1;yt.prototype.commaSeparated=!1;yt.prototype.defined=!1;yt.prototype.mustUseProperty=!1;yt.prototype.number=!1;yt.prototype.overloadedBoolean=!1;yt.prototype.property="";yt.prototype.spaceSeparated=!1;yt.prototype.space=void 0;let Bk=0;const W=nl(),De=nl(),Jc=nl(),H=nl(),ve=nl(),Rl=nl(),vt=nl();function nl(){return 2**++Bk}const Wc=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:De,commaOrSpaceSeparated:vt,commaSeparated:Rl,number:H,overloadedBoolean:Jc,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Au=Object.keys(Wc);class jd extends yt{constructor(t,n,i,l){let a=-1;if(super(t,n),vm(this,"space",l),typeof i=="number")for(;++a<Au.length;){const r=Au[a];vm(this,Au[a],(i&Wc[r])===Wc[r])}}}jd.prototype.defined=!0;function vm(e,t,n){n&&(e[t]=n)}function ia(e){const t={},n={};for(const[i,l]of Object.entries(e.properties)){const a=new jd(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,n[$c(i)]=i,n[$c(a.attribute)]=i}return new kr(t,n,e.space)}const sb=ia({properties:{ariaActiveDescendant:null,ariaAtomic:De,ariaAutoComplete:null,ariaBusy:De,ariaChecked:De,ariaColCount:H,ariaColIndex:H,ariaColSpan:H,ariaControls:ve,ariaCurrent:null,ariaDescribedBy:ve,ariaDetails:null,ariaDisabled:De,ariaDropEffect:ve,ariaErrorMessage:null,ariaExpanded:De,ariaFlowTo:ve,ariaGrabbed:De,ariaHasPopup:null,ariaHidden:De,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ve,ariaLevel:H,ariaLive:null,ariaModal:De,ariaMultiLine:De,ariaMultiSelectable:De,ariaOrientation:null,ariaOwns:ve,ariaPlaceholder:null,ariaPosInSet:H,ariaPressed:De,ariaReadOnly:De,ariaRelevant:null,ariaRequired:De,ariaRoleDescription:ve,ariaRowCount:H,ariaRowIndex:H,ariaRowSpan:H,ariaSelected:De,ariaSetSize:H,ariaSort:null,ariaValueMax:H,ariaValueMin:H,ariaValueNow:H,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function ob(e,t){return t in e?e[t]:t}function ub(e,t){return ob(e,t.toLowerCase())}const Uk=ia({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Rl,acceptCharset:ve,accessKey:ve,action:null,allow:null,allowFullScreen:W,allowPaymentRequest:W,allowUserMedia:W,alt:null,as:null,async:W,autoCapitalize:null,autoComplete:ve,autoFocus:W,autoPlay:W,blocking:ve,capture:null,charSet:null,checked:W,cite:null,className:ve,cols:H,colSpan:null,content:null,contentEditable:De,controls:W,controlsList:ve,coords:H|Rl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:Jc,draggable:De,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:W,formTarget:null,headers:ve,height:H,hidden:Jc,high:H,href:null,hrefLang:null,htmlFor:ve,httpEquiv:ve,id:null,imageSizes:null,imageSrcSet:null,inert:W,inputMode:null,integrity:null,is:null,isMap:W,itemId:null,itemProp:ve,itemRef:ve,itemScope:W,itemType:ve,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:W,low:H,manifest:null,max:null,maxLength:H,media:null,method:null,min:null,minLength:H,multiple:W,muted:W,name:null,nonce:null,noModule:W,noValidate:W,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:W,optimum:H,pattern:null,ping:ve,placeholder:null,playsInline:W,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:W,referrerPolicy:null,rel:ve,required:W,reversed:W,rows:H,rowSpan:H,sandbox:ve,scope:null,scoped:W,seamless:W,selected:W,shadowRootClonable:W,shadowRootDelegatesFocus:W,shadowRootMode:null,shape:null,size:H,sizes:null,slot:null,span:H,spellCheck:De,src:null,srcDoc:null,srcLang:null,srcSet:null,start:H,step:null,style:null,tabIndex:H,target:null,title:null,translate:null,type:null,typeMustMatch:W,useMap:null,value:De,width:H,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ve,axis:null,background:null,bgColor:null,border:H,borderColor:null,bottomMargin:H,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:W,declare:W,event:null,face:null,frame:null,frameBorder:null,hSpace:H,leftMargin:H,link:null,longDesc:null,lowSrc:null,marginHeight:H,marginWidth:H,noResize:W,noHref:W,noShade:W,noWrap:W,object:null,profile:null,prompt:null,rev:null,rightMargin:H,rules:null,scheme:null,scrolling:De,standby:null,summary:null,text:null,topMargin:H,valueType:null,version:null,vAlign:null,vLink:null,vSpace:H,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:W,disableRemotePlayback:W,prefix:null,property:null,results:H,security:null,unselectable:null},space:"html",transform:ub}),Ik=ia({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:vt,accentHeight:H,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:H,amplitude:H,arabicForm:null,ascent:H,attributeName:null,attributeType:null,azimuth:H,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:H,by:null,calcMode:null,capHeight:H,className:ve,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:H,diffuseConstant:H,direction:null,display:null,dur:null,divisor:H,dominantBaseline:null,download:W,dx:null,dy:null,edgeMode:null,editable:null,elevation:H,enableBackground:null,end:null,event:null,exponent:H,externalResourcesRequired:null,fill:null,fillOpacity:H,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:Rl,g2:Rl,glyphName:Rl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:H,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:H,horizOriginX:H,horizOriginY:H,id:null,ideographic:H,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:H,k:H,k1:H,k2:H,k3:H,k4:H,kernelMatrix:vt,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:H,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:H,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:H,overlineThickness:H,paintOrder:null,panose1:null,path:null,pathLength:H,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ve,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:H,pointsAtY:H,pointsAtZ:H,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vt,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vt,rev:vt,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vt,requiredFeatures:vt,requiredFonts:vt,requiredFormats:vt,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:H,specularExponent:H,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:H,strikethroughThickness:H,string:null,stroke:null,strokeDashArray:vt,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:H,strokeOpacity:H,strokeWidth:null,style:null,surfaceScale:H,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vt,tabIndex:H,tableValues:null,target:null,targetX:H,targetY:H,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vt,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:H,underlineThickness:H,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:H,values:null,vAlphabetic:H,vMathematical:H,vectorEffect:null,vHanging:H,vIdeographic:H,version:null,vertAdvY:H,vertOriginX:H,vertOriginY:H,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:H,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ob}),cb=ia({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()}}),fb=ia({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ub}),db=ia({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Hk={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"},qk=/[A-Z]/g,bm=/-[a-z]/g,Fk=/^data[-\w.:]+$/i;function Gk(e,t){const n=$c(t);let i=t,l=yt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Fk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(bm,Yk);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!bm.test(a)){let r=a.replace(qk,Vk);r.charAt(0)!=="-"&&(r="-"+r),t="data"+r}}l=jd}return new l(i,t)}function Vk(e){return"-"+e.toLowerCase()}function Yk(e){return e.charAt(1).toUpperCase()}const Pk=rb([sb,Uk,cb,fb,db],"html"),_d=rb([sb,Ik,cb,fb,db],"svg");function Xk(e){return e.join(" ").trim()}var Rd={},Sm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Qk=/\n/g,Zk=/^\s*/,Kk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,$k=/^:\s*/,Jk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Wk=/^[;\s]*/,eN=/^\s+|\s+$/g,tN=`
61
+ `,Em="/",Cm="*",zi="",nN="comment",iN="declaration";function lN(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function l(y){var x=y.match(Qk);x&&(n+=x.length);var E=y.lastIndexOf(tN);i=~E?y.length-E:i+y.length}function a(){var y={line:n,column:i};return function(x){return x.position=new r(y),c(),x}}function r(y){this.start=y,this.end={line:n,column:i},this.source=t.source}r.prototype.content=e;function s(y){var x=new Error(t.source+":"+n+":"+i+": "+y);if(x.reason=y,x.filename=t.source,x.line=n,x.column=i,x.source=e,!t.silent)throw x}function u(y){var x=y.exec(e);if(x){var E=x[0];return l(E),e=e.slice(E.length),x}}function c(){u(Zk)}function d(y){var x;for(y=y||[];x=f();)x!==!1&&y.push(x);return y}function f(){var y=a();if(!(Em!=e.charAt(0)||Cm!=e.charAt(1))){for(var x=2;zi!=e.charAt(x)&&(Cm!=e.charAt(x)||Em!=e.charAt(x+1));)++x;if(x+=2,zi===e.charAt(x-1))return s("End of comment missing");var E=e.slice(2,x-2);return i+=2,l(E),e=e.slice(x),i+=2,y({type:nN,comment:E})}}function h(){var y=a(),x=u(Kk);if(x){if(f(),!u($k))return s("property missing ':'");var E=u(Jk),g=y({type:iN,property:Tm(x[0].replace(Sm,zi)),value:E?Tm(E[0].replace(Sm,zi)):zi});return u(Wk),g}}function p(){var y=[];d(y);for(var x;x=h();)x!==!1&&(y.push(x),d(y));return y}return c(),p()}function Tm(e){return e?e.replace(eN,zi):zi}var aN=lN,rN=Es&&Es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Rd,"__esModule",{value:!0});Rd.default=oN;const sN=rN(aN);function oN(e,t){let n=null;if(!e||typeof e!="string")return n;const i=(0,sN.default)(e),l=typeof t=="function";return i.forEach(a=>{if(a.type!=="declaration")return;const{property:r,value:s}=a;l?t(r,s,a):s&&(n=n||{},n[r]=s)}),n}var Ao={};Object.defineProperty(Ao,"__esModule",{value:!0});Ao.camelCase=void 0;var uN=/^--[a-zA-Z0-9_-]+$/,cN=/-([a-z])/g,fN=/^[^-]+$/,dN=/^-(webkit|moz|ms|o|khtml)-/,hN=/^-(ms)-/,pN=function(e){return!e||fN.test(e)||uN.test(e)},mN=function(e,t){return t.toUpperCase()},km=function(e,t){return"".concat(t,"-")},gN=function(e,t){return t===void 0&&(t={}),pN(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(hN,km):e=e.replace(dN,km),e.replace(cN,mN))};Ao.camelCase=gN;var yN=Es&&Es.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},xN=yN(Rd),vN=Ao;function ef(e,t){var n={};return!e||typeof e!="string"||(0,xN.default)(e,function(i,l){i&&l&&(n[(0,vN.camelCase)(i,t)]=l)}),n}ef.default=ef;var bN=ef;const SN=mg(bN),hb=pb("end"),Od=pb("start");function pb(e){return t;function t(n){const i=n&&n.position&&n.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function EN(e){const t=Od(e),n=hb(e);if(t&&n)return{start:t,end:n}}function qa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Nm(e.position):"start"in e||"end"in e?Nm(e):"line"in e||"column"in e?tf(e):""}function tf(e){return wm(e&&e.line)+":"+wm(e&&e.column)}function Nm(e){return tf(e&&e.start)+"-"+tf(e&&e.end)}function wm(e){return e&&typeof e=="number"?e:1}class tt extends Error{constructor(t,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let l="",a={},r=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a={...n}),typeof t=="string"?l=t:!a.cause&&t&&(r=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const u=i.indexOf(":");u===-1?a.ruleId=i:(a.source=i.slice(0,u),a.ruleId=i.slice(u+1))}if(!a.place&&a.ancestors&&a.ancestors){const u=a.ancestors[a.ancestors.length-1];u&&(a.place=u.position)}const s=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=l,this.line=s?s.line:void 0,this.name=qa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=r&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tt.prototype.file="";tt.prototype.name="";tt.prototype.reason="";tt.prototype.message="";tt.prototype.stack="";tt.prototype.column=void 0;tt.prototype.line=void 0;tt.prototype.ancestors=void 0;tt.prototype.cause=void 0;tt.prototype.fatal=void 0;tt.prototype.place=void 0;tt.prototype.ruleId=void 0;tt.prototype.source=void 0;const Dd={}.hasOwnProperty,CN=new Map,TN=/[A-Z]/g,kN=new Set(["table","tbody","thead","tfoot","tr"]),NN=new Set(["td","th"]),mb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wN(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=LN(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");i=zN(n,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,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"?_d:Pk,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=gb(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function gb(e,t,n){if(t.type==="element")return AN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return jN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return RN(e,t,n);if(t.type==="mdxjsEsm")return _N(e,t);if(t.type==="root")return ON(e,t,n);if(t.type==="text")return DN(e,t)}function AN(e,t,n){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=_d,e.schema=l),e.ancestors.push(t);const a=xb(e,t.tagName,!1),r=MN(e,t);let s=Ld(e,t);return kN.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!Mk(u):!0})),yb(e,r,a,t),zd(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function jN(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}sr(e,t.position)}function _N(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);sr(e,t.position)}function RN(e,t,n){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=_d,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:xb(e,t.name,!0),r=BN(e,t),s=Ld(e,t);return yb(e,r,a,t),zd(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function ON(e,t,n){const i={};return zd(i,Ld(e,t)),e.create(t,e.Fragment,i,n)}function DN(e,t){return t.value}function yb(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function zd(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function zN(e,t,n){return i;function i(l,a,r,s){const c=Array.isArray(r.children)?n:t;return s?c(a,r,s):c(a,r)}}function LN(e,t){return n;function n(i,l,a,r){const s=Array.isArray(a.children),u=Od(i);return t(l,a,r,s,{columnNumber:u?u.column-1:void 0,fileName:e,lineNumber:u?u.line:void 0},void 0)}}function MN(e,t){const n={};let i,l;for(l in t.properties)if(l!=="children"&&Dd.call(t.properties,l)){const a=UN(e,l,t.properties[l]);if(a){const[r,s]=a;e.tableCellAlignToStyle&&r==="align"&&typeof s=="string"&&NN.has(t.tagName)?i=s:n[r]=s}}if(i){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function BN(e,t){const n={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const r=a.expression;r.type;const s=r.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else sr(e,t.position);else{const l=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const s=i.value.data.estree.body[0];s.type,a=e.evaluater.evaluateExpression(s.expression)}else sr(e,t.position);else a=i.value===null?!0:i.value;n[l]=a}return n}function Ld(e,t){const n=[];let i=-1;const l=e.passKeys?new Map:CN;for(;++i<t.children.length;){const a=t.children[i];let r;if(e.passKeys){const u=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(u){const c=l.get(u)||0;r=u+"-"+c,l.set(u,c+1)}}const s=gb(e,a,r);s!==void 0&&n.push(s)}return n}function UN(e,t,n){const i=Gk(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Rk(n):Xk(n)),i.property==="style"){let l=typeof n=="object"?n:IN(e,String(n));return e.stylePropertyNameCase==="css"&&(l=HN(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?Hk[i.property]||i.property:i.attribute,n]}}function IN(e,t){try{return SN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const i=n,l=new tt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=mb+"#cannot-parse-style-attribute",l}}function xb(e,t,n){let i;if(!n)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,r;for(;++a<l.length;){const s=ym(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};r=r?{type:"MemberExpression",object:r,property:s,computed:!!(a&&s.type==="Literal"),optional:!1}:s}i=r}else i=ym(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return Dd.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);sr(e)}function sr(e,t){const n=new tt("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=mb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function HN(e){const t={};let n;for(n in e)Dd.call(e,n)&&(t[qN(n)]=e[n]);return t}function qN(e){let t=e.replace(TN,FN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function FN(e){return"-"+e.toLowerCase()}const ju={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"]},GN={};function Md(e,t){const n=GN,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return vb(e,i,l)}function vb(e,t,n){if(VN(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 Am(e.children,t,n)}return Array.isArray(e)?Am(e,t,n):""}function Am(e,t,n){const i=[];let l=-1;for(;++l<e.length;)i[l]=vb(e[l],t,n);return i.join("")}function VN(e){return!!(e&&typeof e=="object")}const jm=document.createElement("i");function Bd(e){const t="&"+e+";";jm.innerHTML=t;const n=jm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function At(e,t,n,i){const l=e.length;let a=0,r;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,n=n>0?n:0,i.length<1e4)r=Array.from(i),r.unshift(t,n),e.splice(...r);else for(n&&e.splice(t,n);a<i.length;)r=i.slice(a,a+1e4),r.unshift(t,0),e.splice(...r),a+=1e4,t+=1e4}function Ut(e,t){return e.length>0?(At(e,e.length,0,t),e):t}const _m={}.hasOwnProperty;function bb(e){const t={};let n=-1;for(;++n<e.length;)YN(t,e[n]);return t}function YN(e,t){let n;for(n in t){const l=(_m.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let r;if(a)for(r in a){_m.call(l,r)||(l[r]=[]);const s=a[r];PN(l[r],Array.isArray(s)?s:s?[s]:[])}}}function PN(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);At(e,0,0,i)}function Sb(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 tn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const it=Ti(/[A-Za-z]/),et=Ti(/[\dA-Za-z]/),XN=Ti(/[#-'*+\--9=?A-Z^-~]/);function Ws(e){return e!==null&&(e<32||e===127)}const nf=Ti(/\d/),QN=Ti(/[\dA-Fa-f]/),ZN=Ti(/[!-/:-@[-`{-~]/);function Q(e){return e!==null&&e<-2}function xe(e){return e!==null&&(e<0||e===32)}function ne(e){return e===-2||e===-1||e===32}const jo=Ti(new RegExp("\\p{P}|\\p{S}","u")),Xi=Ti(/\s/);function Ti(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function la(e){const t=[];let n=-1,i=0,l=0;for(;++n<e.length;){const a=e.charCodeAt(n);let r="";if(a===37&&et(e.charCodeAt(n+1))&&et(e.charCodeAt(n+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(r=String.fromCharCode(a));else if(a>55295&&a<57344){const s=e.charCodeAt(n+1);a<56320&&s>56319&&s<57344?(r=String.fromCharCode(a,s),l=1):r="�"}else r=String.fromCharCode(a);r&&(t.push(e.slice(i,n),encodeURIComponent(r)),i=n+l+1,r=""),l&&(n+=l,l=0)}return t.join("")+e.slice(i)}function oe(e,t,n,i){const l=i?i-1:Number.POSITIVE_INFINITY;let a=0;return r;function r(u){return ne(u)?(e.enter(n),s(u)):t(u)}function s(u){return ne(u)&&a++<l?(e.consume(u),s):(e.exit(n),t(u))}}const KN={tokenize:$N};function $N(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let n;return t;function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),oe(e,t,"linePrefix")}function l(s){return e.enter("paragraph"),a(s)}function a(s){const u=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,r(s)}function r(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return Q(s)?(e.consume(s),e.exit("chunkText"),a):(e.consume(s),r)}}const JN={tokenize:WN},Rm={tokenize:ew};function WN(e){const t=this,n=[];let i=0,l,a,r;return s;function s(v){if(i<n.length){const C=n[i];return t.containerState=C[1],e.attempt(C[0].continuation,u,c)(v)}return c(v)}function u(v){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&m();const C=t.events.length;let A=C,N;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){N=t.events[A][1].end;break}g(i);let _=C;for(;_<t.events.length;)t.events[_][1].end={...N},_++;return At(t.events,A+1,0,t.events.slice(C)),t.events.length=_,c(v)}return s(v)}function c(v){if(i===n.length){if(!l)return h(v);if(l.currentConstruct&&l.currentConstruct.concrete)return y(v);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Rm,d,f)(v)}function d(v){return l&&m(),g(i),h(v)}function f(v){return t.parser.lazy[t.now().line]=i!==n.length,r=t.now().offset,y(v)}function h(v){return t.containerState={},e.attempt(Rm,p,y)(v)}function p(v){return i++,n.push([t.currentConstruct,t.containerState]),h(v)}function y(v){if(v===null){l&&m(),g(0),e.consume(v);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),x(v)}function x(v){if(v===null){E(e.exit("chunkFlow"),!0),g(0),e.consume(v);return}return Q(v)?(e.consume(v),E(e.exit("chunkFlow")),i=0,t.interrupt=void 0,s):(e.consume(v),x)}function E(v,C){const A=t.sliceStream(v);if(C&&A.push(null),v.previous=a,a&&(a.next=v),a=v,l.defineSkip(v.start),l.write(A),t.parser.lazy[v.start.line]){let N=l.events.length;for(;N--;)if(l.events[N][1].start.offset<r&&(!l.events[N][1].end||l.events[N][1].end.offset>r))return;const _=t.events.length;let I=_,D,T;for(;I--;)if(t.events[I][0]==="exit"&&t.events[I][1].type==="chunkFlow"){if(D){T=t.events[I][1].end;break}D=!0}for(g(i),N=_;N<t.events.length;)t.events[N][1].end={...T},N++;At(t.events,I+1,0,t.events.slice(_)),t.events.length=N}}function g(v){let C=n.length;for(;C-- >v;){const A=n[C];t.containerState=A[1],A[0].exit.call(t,e)}n.length=v}function m(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function ew(e,t,n){return oe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Vl(e){if(e===null||xe(e)||Xi(e))return 1;if(jo(e))return 2}function _o(e,t,n){const i=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!i.includes(a)&&(t=a(t,n),i.push(a))}return t}const lf={name:"attention",resolveAll:tw,tokenize:nw};function tw(e,t){let n=-1,i,l,a,r,s,u,c,d;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(i=n;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;u=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[i][1].end},h={...e[n][1].start};Om(f,-u),Om(h,u),r={type:u>1?"strongSequence":"emphasisSequence",start:f,end:{...e[i][1].end}},s={type:u>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:h},a={type:u>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[n][1].start}},l={type:u>1?"strong":"emphasis",start:{...r.start},end:{...s.end}},e[i][1].end={...r.start},e[n][1].start={...s.end},c=[],e[i][1].end.offset-e[i][1].start.offset&&(c=Ut(c,[["enter",e[i][1],t],["exit",e[i][1],t]])),c=Ut(c,[["enter",l,t],["enter",r,t],["exit",r,t],["enter",a,t]]),c=Ut(c,_o(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),c=Ut(c,[["exit",a,t],["enter",s,t],["exit",s,t],["exit",l,t]]),e[n][1].end.offset-e[n][1].start.offset?(d=2,c=Ut(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):d=0,At(e,i-1,n-i+3,c),n=i+c.length-d-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function nw(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Vl(i);let a;return r;function r(u){return a=u,e.enter("attentionSequence"),s(u)}function s(u){if(u===a)return e.consume(u),s;const c=e.exit("attentionSequence"),d=Vl(u),f=!d||d===2&&l||n.includes(u),h=!l||l===2&&d||n.includes(i);return c._open=!!(a===42?f:f&&(l||!h)),c._close=!!(a===42?h:h&&(d||!f)),t(u)}}function Om(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const iw={name:"autolink",tokenize:lw};function lw(e,t,n){let i=0;return l;function l(p){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(p){return it(p)?(e.consume(p),r):p===64?n(p):c(p)}function r(p){return p===43||p===45||p===46||et(p)?(i=1,s(p)):c(p)}function s(p){return p===58?(e.consume(p),i=0,u):(p===43||p===45||p===46||et(p))&&i++<32?(e.consume(p),s):(i=0,c(p))}function u(p){return p===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):p===null||p===32||p===60||Ws(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),d):XN(p)?(e.consume(p),c):n(p)}function d(p){return et(p)?f(p):n(p)}function f(p){return p===46?(e.consume(p),i=0,d):p===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(p),e.exit("autolinkMarker"),e.exit("autolink"),t):h(p)}function h(p){if((p===45||et(p))&&i++<63){const y=p===45?h:f;return e.consume(p),y}return n(p)}}const Nr={partial:!0,tokenize:aw};function aw(e,t,n){return i;function i(a){return ne(a)?oe(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||Q(a)?t(a):n(a)}}const Eb={continuation:{tokenize:sw},exit:ow,name:"blockQuote",tokenize:rw};function rw(e,t,n){const i=this;return l;function l(r){if(r===62){const s=i.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(r),e.exit("blockQuoteMarker"),a}return n(r)}function a(r){return ne(r)?(e.enter("blockQuotePrefixWhitespace"),e.consume(r),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(r))}}function sw(e,t,n){const i=this;return l;function l(r){return ne(r)?oe(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(r):a(r)}function a(r){return e.attempt(Eb,t,n)(r)}}function ow(e){e.exit("blockQuote")}const Cb={name:"characterEscape",tokenize:uw};function uw(e,t,n){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return ZN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const Tb={name:"characterReference",tokenize:cw};function cw(e,t,n){const i=this;let l=0,a,r;return s;function s(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),u}function u(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),a=31,r=et,d(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,r=QN,d):(e.enter("characterReferenceValue"),a=7,r=nf,d(f))}function d(f){if(f===59&&l){const h=e.exit("characterReferenceValue");return r===et&&!Bd(i.sliceSerialize(h))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return r(f)&&l++<a?(e.consume(f),d):n(f)}}const Dm={partial:!0,tokenize:dw},zm={concrete:!0,name:"codeFenced",tokenize:fw};function fw(e,t,n){const i=this,l={partial:!0,tokenize:A};let a=0,r=0,s;return u;function u(N){return c(N)}function c(N){const _=i.events[i.events.length-1];return a=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,s=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),d(N)}function d(N){return N===s?(r++,e.consume(N),d):r<3?n(N):(e.exit("codeFencedFenceSequence"),ne(N)?oe(e,f,"whitespace")(N):f(N))}function f(N){return N===null||Q(N)?(e.exit("codeFencedFence"),i.interrupt?t(N):e.check(Dm,x,C)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),h(N))}function h(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(N)):ne(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),oe(e,p,"whitespace")(N)):N===96&&N===s?n(N):(e.consume(N),h)}function p(N){return N===null||Q(N)?f(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),y(N))}function y(N){return N===null||Q(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(N)):N===96&&N===s?n(N):(e.consume(N),y)}function x(N){return e.attempt(l,C,E)(N)}function E(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),g}function g(N){return a>0&&ne(N)?oe(e,m,"linePrefix",a+1)(N):m(N)}function m(N){return N===null||Q(N)?e.check(Dm,x,C)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||Q(N)?(e.exit("codeFlowValue"),m(N)):(e.consume(N),v)}function C(N){return e.exit("codeFenced"),t(N)}function A(N,_,I){let D=0;return T;function T(V){return N.enter("lineEnding"),N.consume(V),N.exit("lineEnding"),M}function M(V){return N.enter("codeFencedFence"),ne(V)?oe(N,q,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):q(V)}function q(V){return V===s?(N.enter("codeFencedFenceSequence"),P(V)):I(V)}function P(V){return V===s?(D++,N.consume(V),P):D>=r?(N.exit("codeFencedFenceSequence"),ne(V)?oe(N,F,"whitespace")(V):F(V)):I(V)}function F(V){return V===null||Q(V)?(N.exit("codeFencedFence"),_(V)):I(V)}}}function dw(e,t,n){const i=this;return l;function l(r){return r===null?n(r):(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a)}function a(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}const _u={name:"codeIndented",tokenize:pw},hw={partial:!0,tokenize:mw};function pw(e,t,n){const i=this;return l;function l(c){return e.enter("codeIndented"),oe(e,a,"linePrefix",5)(c)}function a(c){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?r(c):n(c)}function r(c){return c===null?u(c):Q(c)?e.attempt(hw,r,u)(c):(e.enter("codeFlowValue"),s(c))}function s(c){return c===null||Q(c)?(e.exit("codeFlowValue"),r(c)):(e.consume(c),s)}function u(c){return e.exit("codeIndented"),t(c)}}function mw(e,t,n){const i=this;return l;function l(r){return i.parser.lazy[i.now().line]?n(r):Q(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),l):oe(e,a,"linePrefix",5)(r)}function a(r){const s=i.events[i.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(r):Q(r)?l(r):n(r)}}const gw={name:"codeText",previous:xw,resolve:yw,tokenize:vw};function yw(e){let t=e.length-4,n=3,i,l;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=n;++i<t;)if(e[i][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(i=n-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function xw(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function vw(e,t,n){let i=0,l,a;return r;function r(f){return e.enter("codeText"),e.enter("codeTextSequence"),s(f)}function s(f){return f===96?(e.consume(f),i++,s):(e.exit("codeTextSequence"),u(f))}function u(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),u):f===96?(a=e.enter("codeTextSequence"),l=0,d(f)):Q(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||Q(f)?(e.exit("codeTextData"),u(f)):(e.consume(f),c)}function d(f){return f===96?(e.consume(f),l++,d):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(a.type="codeTextData",c(f))}}class bw{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 i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,n,i){const l=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&ya(this.left,i),a.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),ya(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ya(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);ya(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ya(this.left,n.reverse())}}}function ya(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 kb(e){const t={};let n=-1,i,l,a,r,s,u,c;const d=new bw(e);for(;++n<d.length;){for(;n in t;)n=t[n];if(i=d.get(n),n&&i[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(u=i[1]._tokenizer.events,a=0,a<u.length&&u[a][1].type==="lineEndingBlank"&&(a+=2),a<u.length&&u[a][1].type==="content"))for(;++a<u.length&&u[a][1].type!=="content";)u[a][1].type==="chunkText"&&(u[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,Sw(d,n)),n=t[n],c=!0);else if(i[1]._container){for(a=n,l=void 0;a--;)if(r=d.get(a),r[1].type==="lineEnding"||r[1].type==="lineEndingBlank")r[0]==="enter"&&(l&&(d.get(l)[1].type="lineEndingBlank"),r[1].type="lineEnding",l=a);else if(!(r[1].type==="linePrefix"||r[1].type==="listItemIndent"))break;l&&(i[1].end={...d.get(l)[1].start},s=d.slice(l,n),s.unshift(i),d.splice(l,n-l+1,s))}}return At(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function Sw(e,t){const n=e.get(t)[1],i=e.get(t)[2];let l=t-1;const a=[];let r=n._tokenizer;r||(r=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(r._contentTypeTextTrailing=!0));const s=r.events,u=[],c={};let d,f,h=-1,p=n,y=0,x=0;const E=[x];for(;p;){for(;e.get(++l)[1]!==p;);a.push(l),p._tokenizer||(d=i.sliceStream(p),p.next||d.push(null),f&&r.defineSkip(p.start),p._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=!0),r.write(d),p._isInFirstContentOfListItem&&(r._gfmTasklistFirstContentOfListItem=void 0)),f=p,p=p.next}for(p=n;++h<s.length;)s[h][0]==="exit"&&s[h-1][0]==="enter"&&s[h][1].type===s[h-1][1].type&&s[h][1].start.line!==s[h][1].end.line&&(x=h+1,E.push(x),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(r.events=[],p?(p._tokenizer=void 0,p.previous=void 0):E.pop(),h=E.length;h--;){const g=s.slice(E[h],E[h+1]),m=a.pop();u.push([m,m+g.length-1]),e.splice(m,2,g)}for(u.reverse(),h=-1;++h<u.length;)c[y+u[h][0]]=y+u[h][1],y+=u[h][1]-u[h][0]-1;return c}const Ew={resolve:Tw,tokenize:kw},Cw={partial:!0,tokenize:Nw};function Tw(e){return kb(e),e}function kw(e,t){let n;return i;function i(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),l(s)}function l(s){return s===null?a(s):Q(s)?e.check(Cw,r,a)(s):(e.consume(s),l)}function a(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function r(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,l}}function Nw(e,t,n){const i=this;return l;function l(r){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),oe(e,a,"linePrefix")}function a(r){if(r===null||Q(r))return n(r);const s=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(r):e.interrupt(i.parser.constructs.flow,n,t)(r)}}function Nb(e,t,n,i,l,a,r,s,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(g){return g===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(g),e.exit(a),h):g===null||g===32||g===41||Ws(g)?n(g):(e.enter(i),e.enter(r),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(g))}function h(g){return g===62?(e.enter(a),e.consume(g),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(g))}function p(g){return g===62?(e.exit("chunkString"),e.exit(s),h(g)):g===null||g===60||Q(g)?n(g):(e.consume(g),g===92?y:p)}function y(g){return g===60||g===62||g===92?(e.consume(g),p):p(g)}function x(g){return!d&&(g===null||g===41||xe(g))?(e.exit("chunkString"),e.exit(s),e.exit(r),e.exit(i),t(g)):d<c&&g===40?(e.consume(g),d++,x):g===41?(e.consume(g),d--,x):g===null||g===32||g===40||Ws(g)?n(g):(e.consume(g),g===92?E:x)}function E(g){return g===40||g===41||g===92?(e.consume(g),x):x(g)}}function wb(e,t,n,i,l,a){const r=this;let s=0,u;return c;function c(p){return e.enter(i),e.enter(l),e.consume(p),e.exit(l),e.enter(a),d}function d(p){return s>999||p===null||p===91||p===93&&!u||p===94&&!s&&"_hiddenFootnoteSupport"in r.parser.constructs?n(p):p===93?(e.exit(a),e.enter(l),e.consume(p),e.exit(l),e.exit(i),t):Q(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("chunkString",{contentType:"string"}),f(p))}function f(p){return p===null||p===91||p===93||Q(p)||s++>999?(e.exit("chunkString"),d(p)):(e.consume(p),u||(u=!ne(p)),p===92?h:f)}function h(p){return p===91||p===92||p===93?(e.consume(p),s++,f):f(p)}}function Ab(e,t,n,i,l,a){let r;return s;function s(h){return h===34||h===39||h===40?(e.enter(i),e.enter(l),e.consume(h),e.exit(l),r=h===40?41:h,u):n(h)}function u(h){return h===r?(e.enter(l),e.consume(h),e.exit(l),e.exit(i),t):(e.enter(a),c(h))}function c(h){return h===r?(e.exit(a),u(r)):h===null?n(h):Q(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),oe(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===r||h===null||Q(h)?(e.exit("chunkString"),c(h)):(e.consume(h),h===92?f:d)}function f(h){return h===r||h===92?(e.consume(h),d):d(h)}}function Fa(e,t){let n;return i;function i(l){return Q(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),n=!0,i):ne(l)?oe(e,i,n?"linePrefix":"lineSuffix")(l):t(l)}}const ww={name:"definition",tokenize:jw},Aw={partial:!0,tokenize:_w};function jw(e,t,n){const i=this;let l;return a;function a(p){return e.enter("definition"),r(p)}function r(p){return wb.call(i,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return l=tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),u):n(p)}function u(p){return xe(p)?Fa(e,c)(p):c(p)}function c(p){return Nb(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(Aw,f,f)(p)}function f(p){return ne(p)?oe(e,h,"whitespace")(p):h(p)}function h(p){return p===null||Q(p)?(e.exit("definition"),i.parser.defined.push(l),t(p)):n(p)}}function _w(e,t,n){return i;function i(s){return xe(s)?Fa(e,l)(s):n(s)}function l(s){return Ab(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function a(s){return ne(s)?oe(e,r,"whitespace")(s):r(s)}function r(s){return s===null||Q(s)?t(s):n(s)}}const Rw={name:"hardBreakEscape",tokenize:Ow};function Ow(e,t,n){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return Q(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const Dw={name:"headingAtx",resolve:zw,tokenize:Lw};function zw(e,t){let n=e.length-2,i=3,l,a;return e[i][1].type==="whitespace"&&(i+=2),n-2>i&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&e[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[n][1].end},a={type:"chunkText",start:e[i][1].start,end:e[n][1].end,contentType:"text"},At(e,i,n-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function Lw(e,t,n){let i=0;return l;function l(d){return e.enter("atxHeading"),a(d)}function a(d){return e.enter("atxHeadingSequence"),r(d)}function r(d){return d===35&&i++<6?(e.consume(d),r):d===null||xe(d)?(e.exit("atxHeadingSequence"),s(d)):n(d)}function s(d){return d===35?(e.enter("atxHeadingSequence"),u(d)):d===null||Q(d)?(e.exit("atxHeading"),t(d)):ne(d)?oe(e,s,"whitespace")(d):(e.enter("atxHeadingText"),c(d))}function u(d){return d===35?(e.consume(d),u):(e.exit("atxHeadingSequence"),s(d))}function c(d){return d===null||d===35||xe(d)?(e.exit("atxHeadingText"),s(d)):(e.consume(d),c)}}const Mw=["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"],Lm=["pre","script","style","textarea"],Bw={concrete:!0,name:"htmlFlow",resolveTo:Hw,tokenize:qw},Uw={partial:!0,tokenize:Gw},Iw={partial:!0,tokenize:Fw};function Hw(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 qw(e,t,n){const i=this;let l,a,r,s,u;return c;function c(k){return d(k)}function d(k){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(k),f}function f(k){return k===33?(e.consume(k),h):k===47?(e.consume(k),a=!0,x):k===63?(e.consume(k),l=3,i.interrupt?t:S):it(k)?(e.consume(k),r=String.fromCharCode(k),E):n(k)}function h(k){return k===45?(e.consume(k),l=2,p):k===91?(e.consume(k),l=5,s=0,y):it(k)?(e.consume(k),l=4,i.interrupt?t:S):n(k)}function p(k){return k===45?(e.consume(k),i.interrupt?t:S):n(k)}function y(k){const _e="CDATA[";return k===_e.charCodeAt(s++)?(e.consume(k),s===_e.length?i.interrupt?t:q:y):n(k)}function x(k){return it(k)?(e.consume(k),r=String.fromCharCode(k),E):n(k)}function E(k){if(k===null||k===47||k===62||xe(k)){const _e=k===47,st=r.toLowerCase();return!_e&&!a&&Lm.includes(st)?(l=1,i.interrupt?t(k):q(k)):Mw.includes(r.toLowerCase())?(l=6,_e?(e.consume(k),g):i.interrupt?t(k):q(k)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(k):a?m(k):v(k))}return k===45||et(k)?(e.consume(k),r+=String.fromCharCode(k),E):n(k)}function g(k){return k===62?(e.consume(k),i.interrupt?t:q):n(k)}function m(k){return ne(k)?(e.consume(k),m):T(k)}function v(k){return k===47?(e.consume(k),T):k===58||k===95||it(k)?(e.consume(k),C):ne(k)?(e.consume(k),v):T(k)}function C(k){return k===45||k===46||k===58||k===95||et(k)?(e.consume(k),C):A(k)}function A(k){return k===61?(e.consume(k),N):ne(k)?(e.consume(k),A):v(k)}function N(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),u=k,_):ne(k)?(e.consume(k),N):I(k)}function _(k){return k===u?(e.consume(k),u=null,D):k===null||Q(k)?n(k):(e.consume(k),_)}function I(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||xe(k)?A(k):(e.consume(k),I)}function D(k){return k===47||k===62||ne(k)?v(k):n(k)}function T(k){return k===62?(e.consume(k),M):n(k)}function M(k){return k===null||Q(k)?q(k):ne(k)?(e.consume(k),M):n(k)}function q(k){return k===45&&l===2?(e.consume(k),j):k===60&&l===1?(e.consume(k),O):k===62&&l===4?(e.consume(k),we):k===63&&l===3?(e.consume(k),S):k===93&&l===5?(e.consume(k),X):Q(k)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(Uw,We,P)(k)):k===null||Q(k)?(e.exit("htmlFlowData"),P(k)):(e.consume(k),q)}function P(k){return e.check(Iw,F,We)(k)}function F(k){return e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),V}function V(k){return k===null||Q(k)?P(k):(e.enter("htmlFlowData"),q(k))}function j(k){return k===45?(e.consume(k),S):q(k)}function O(k){return k===47?(e.consume(k),r="",w):q(k)}function w(k){if(k===62){const _e=r.toLowerCase();return Lm.includes(_e)?(e.consume(k),we):q(k)}return it(k)&&r.length<8?(e.consume(k),r+=String.fromCharCode(k),w):q(k)}function X(k){return k===93?(e.consume(k),S):q(k)}function S(k){return k===62?(e.consume(k),we):k===45&&l===2?(e.consume(k),S):q(k)}function we(k){return k===null||Q(k)?(e.exit("htmlFlowData"),We(k)):(e.consume(k),we)}function We(k){return e.exit("htmlFlow"),t(k)}}function Fw(e,t,n){const i=this;return l;function l(r){return Q(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),a):n(r)}function a(r){return i.parser.lazy[i.now().line]?n(r):t(r)}}function Gw(e,t,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Nr,t,n)}}const Vw={name:"htmlText",tokenize:Yw};function Yw(e,t,n){const i=this;let l,a,r;return s;function s(S){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(S),u}function u(S){return S===33?(e.consume(S),c):S===47?(e.consume(S),A):S===63?(e.consume(S),v):it(S)?(e.consume(S),I):n(S)}function c(S){return S===45?(e.consume(S),d):S===91?(e.consume(S),a=0,y):it(S)?(e.consume(S),m):n(S)}function d(S){return S===45?(e.consume(S),p):n(S)}function f(S){return S===null?n(S):S===45?(e.consume(S),h):Q(S)?(r=f,O(S)):(e.consume(S),f)}function h(S){return S===45?(e.consume(S),p):f(S)}function p(S){return S===62?j(S):S===45?h(S):f(S)}function y(S){const we="CDATA[";return S===we.charCodeAt(a++)?(e.consume(S),a===we.length?x:y):n(S)}function x(S){return S===null?n(S):S===93?(e.consume(S),E):Q(S)?(r=x,O(S)):(e.consume(S),x)}function E(S){return S===93?(e.consume(S),g):x(S)}function g(S){return S===62?j(S):S===93?(e.consume(S),g):x(S)}function m(S){return S===null||S===62?j(S):Q(S)?(r=m,O(S)):(e.consume(S),m)}function v(S){return S===null?n(S):S===63?(e.consume(S),C):Q(S)?(r=v,O(S)):(e.consume(S),v)}function C(S){return S===62?j(S):v(S)}function A(S){return it(S)?(e.consume(S),N):n(S)}function N(S){return S===45||et(S)?(e.consume(S),N):_(S)}function _(S){return Q(S)?(r=_,O(S)):ne(S)?(e.consume(S),_):j(S)}function I(S){return S===45||et(S)?(e.consume(S),I):S===47||S===62||xe(S)?D(S):n(S)}function D(S){return S===47?(e.consume(S),j):S===58||S===95||it(S)?(e.consume(S),T):Q(S)?(r=D,O(S)):ne(S)?(e.consume(S),D):j(S)}function T(S){return S===45||S===46||S===58||S===95||et(S)?(e.consume(S),T):M(S)}function M(S){return S===61?(e.consume(S),q):Q(S)?(r=M,O(S)):ne(S)?(e.consume(S),M):D(S)}function q(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(e.consume(S),l=S,P):Q(S)?(r=q,O(S)):ne(S)?(e.consume(S),q):(e.consume(S),F)}function P(S){return S===l?(e.consume(S),l=void 0,V):S===null?n(S):Q(S)?(r=P,O(S)):(e.consume(S),P)}function F(S){return S===null||S===34||S===39||S===60||S===61||S===96?n(S):S===47||S===62||xe(S)?D(S):(e.consume(S),F)}function V(S){return S===47||S===62||xe(S)?D(S):n(S)}function j(S){return S===62?(e.consume(S),e.exit("htmlTextData"),e.exit("htmlText"),t):n(S)}function O(S){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(S),e.exit("lineEnding"),w}function w(S){return ne(S)?oe(e,X,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(S):X(S)}function X(S){return e.enter("htmlTextData"),r(S)}}const Ud={name:"labelEnd",resolveAll:Zw,resolveTo:Kw,tokenize:$w},Pw={tokenize:Jw},Xw={tokenize:Ww},Qw={tokenize:eA};function Zw(e){let t=-1;const n=[];for(;++t<e.length;){const i=e[t][1];if(n.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==n.length&&At(e,0,e.length,n),e}function Kw(e,t){let n=e.length,i=0,l,a,r,s;for(;n--;)if(l=e[n][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[n][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(r){if(e[n][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=n,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(r=n);const u={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[a][1].start},end:{...e[r][1].end}},d={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[r-2][1].start}};return s=[["enter",u,t],["enter",c,t]],s=Ut(s,e.slice(a+1,a+i+3)),s=Ut(s,[["enter",d,t]]),s=Ut(s,_o(t.parser.constructs.insideSpan.null,e.slice(a+i+4,r-3),t)),s=Ut(s,[["exit",d,t],e[r-2],e[r-1],["exit",c,t]]),s=Ut(s,e.slice(r+1)),s=Ut(s,[["exit",u,t]]),At(e,a,e.length,s),e}function $w(e,t,n){const i=this;let l=i.events.length,a,r;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){a=i.events[l][1];break}return s;function s(h){return a?a._inactive?f(h):(r=i.parser.defined.includes(tn(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(h),e.exit("labelMarker"),e.exit("labelEnd"),u):n(h)}function u(h){return h===40?e.attempt(Pw,d,r?d:f)(h):h===91?e.attempt(Xw,d,r?c:f)(h):r?d(h):f(h)}function c(h){return e.attempt(Qw,d,f)(h)}function d(h){return t(h)}function f(h){return a._balanced=!0,n(h)}}function Jw(e,t,n){return i;function i(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),l}function l(f){return xe(f)?Fa(e,a)(f):a(f)}function a(f){return f===41?d(f):Nb(e,r,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function r(f){return xe(f)?Fa(e,u)(f):d(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Ab(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return xe(f)?Fa(e,d)(f):d(f)}function d(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function Ww(e,t,n){const i=this;return l;function l(s){return wb.call(i,e,a,r,"reference","referenceMarker","referenceString")(s)}function a(s){return i.parser.defined.includes(tn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function r(s){return n(s)}}function eA(e,t,n){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const tA={name:"labelStartImage",resolveAll:Ud.resolveAll,tokenize:nA};function nA(e,t,n){const i=this;return l;function l(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),a}function a(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),r):n(s)}function r(s){return s===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(s):t(s)}}const iA={name:"labelStartLink",resolveAll:Ud.resolveAll,tokenize:lA};function lA(e,t,n){const i=this;return l;function l(r){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(r),e.exit("labelMarker"),e.exit("labelLink"),a}function a(r){return r===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(r):t(r)}}const Ru={name:"lineEnding",tokenize:aA};function aA(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const bs={name:"thematicBreak",tokenize:rA};function rA(e,t,n){let i=0,l;return a;function a(c){return e.enter("thematicBreak"),r(c)}function r(c){return l=c,s(c)}function s(c){return c===l?(e.enter("thematicBreakSequence"),u(c)):i>=3&&(c===null||Q(c))?(e.exit("thematicBreak"),t(c)):n(c)}function u(c){return c===l?(e.consume(c),i++,u):(e.exit("thematicBreakSequence"),ne(c)?oe(e,s,"whitespace")(c):s(c))}}const ft={continuation:{tokenize:cA},exit:dA,name:"list",tokenize:uA},sA={partial:!0,tokenize:hA},oA={partial:!0,tokenize:fA};function uA(e,t,n){const i=this,l=i.events[i.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,r=0;return s;function s(p){const y=i.containerState.type||(p===42||p===43||p===45?"listUnordered":"listOrdered");if(y==="listUnordered"?!i.containerState.marker||p===i.containerState.marker:nf(p)){if(i.containerState.type||(i.containerState.type=y,e.enter(y,{_container:!0})),y==="listUnordered")return e.enter("listItemPrefix"),p===42||p===45?e.check(bs,n,c)(p):c(p);if(!i.interrupt||p===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),u(p)}return n(p)}function u(p){return nf(p)&&++r<10?(e.consume(p),u):(!i.interrupt||r<2)&&(i.containerState.marker?p===i.containerState.marker:p===41||p===46)?(e.exit("listItemValue"),c(p)):n(p)}function c(p){return e.enter("listItemMarker"),e.consume(p),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||p,e.check(Nr,i.interrupt?n:d,e.attempt(sA,h,f))}function d(p){return i.containerState.initialBlankLine=!0,a++,h(p)}function f(p){return ne(p)?(e.enter("listItemPrefixWhitespace"),e.consume(p),e.exit("listItemPrefixWhitespace"),h):n(p)}function h(p){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(p)}}function cA(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Nr,l,a);function l(s){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,oe(e,t,"listItemIndent",i.containerState.size+1)(s)}function a(s){return i.containerState.furtherBlankLines||!ne(s)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,r(s)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(oA,t,r)(s))}function r(s){return i.containerState._closeFlow=!0,i.interrupt=void 0,oe(e,e.attempt(ft,t,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function fA(e,t,n){const i=this;return oe(e,l,"listItemIndent",i.containerState.size+1);function l(a){const r=i.events[i.events.length-1];return r&&r[1].type==="listItemIndent"&&r[2].sliceSerialize(r[1],!0).length===i.containerState.size?t(a):n(a)}}function dA(e){e.exit(this.containerState.type)}function hA(e,t,n){const i=this;return oe(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const r=i.events[i.events.length-1];return!ne(a)&&r&&r[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const Mm={name:"setextUnderline",resolveTo:pA,tokenize:mA};function pA(e,t){let n=e.length,i,l,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){i=n;break}e[n][1].type==="paragraph"&&(l=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const r={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",r,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=r,e.push(["exit",r,t]),e}function mA(e,t,n){const i=this;let l;return a;function a(c){let d=i.events.length,f;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){f=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||f)?(e.enter("setextHeadingLine"),l=c,r(c)):n(c)}function r(c){return e.enter("setextHeadingLineSequence"),s(c)}function s(c){return c===l?(e.consume(c),s):(e.exit("setextHeadingLineSequence"),ne(c)?oe(e,u,"lineSuffix")(c):u(c))}function u(c){return c===null||Q(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const gA={tokenize:yA};function yA(e){const t=this,n=e.attempt(Nr,i,e.attempt(this.parser.constructs.flowInitial,l,oe(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Ew,l)),"linePrefix")));return n;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const xA={resolveAll:_b()},vA=jb("string"),bA=jb("text");function jb(e){return{resolveAll:_b(e==="text"?SA:void 0),tokenize:t};function t(n){const i=this,l=this.parser.constructs[e],a=n.attempt(l,r,s);return r;function r(d){return c(d)?a(d):s(d)}function s(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),u}function u(d){return c(d)?(n.exit("data"),a(d)):(n.consume(d),u)}function c(d){if(d===null)return!0;const f=l[d];let h=-1;if(f)for(;++h<f.length;){const p=f[h];if(!p.previous||p.previous.call(i,i.previous))return!0}return!1}}}function _b(e){return t;function t(n,i){let l=-1,a;for(;++l<=n.length;)a===void 0?n[l]&&n[l][1].type==="data"&&(a=l,l++):(!n[l]||n[l][1].type!=="data")&&(l!==a+2&&(n[a][1].end=n[l-1][1].end,n.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(n,i):n}}function SA(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 i=e[n-1][1],l=t.sliceStream(i);let a=l.length,r=-1,s=0,u;for(;a--;){const c=l[a];if(typeof c=="string"){for(r=c.length;c.charCodeAt(r-1)===32;)s++,r--;if(r)break;r=-1}else if(c===-2)u=!0,s++;else if(c!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){const c={type:n===e.length||u||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?r:i.start._bufferIndex+r,_index:i.start._index+a,line:i.end.line,column:i.end.column-s,offset:i.end.offset-s},end:{...i.end}};i.end={...c.start},i.start.offset===i.end.offset?Object.assign(i,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const EA={42:ft,43:ft,45:ft,48:ft,49:ft,50:ft,51:ft,52:ft,53:ft,54:ft,55:ft,56:ft,57:ft,62:Eb},CA={91:ww},TA={[-2]:_u,[-1]:_u,32:_u},kA={35:Dw,42:bs,45:[Mm,bs],60:Bw,61:Mm,95:bs,96:zm,126:zm},NA={38:Tb,92:Cb},wA={[-5]:Ru,[-4]:Ru,[-3]:Ru,33:tA,38:Tb,42:lf,60:[iw,Vw],91:iA,92:[Rw,Cb],93:Ud,95:lf,96:gw},AA={null:[lf,xA]},jA={null:[42,95]},_A={null:[]},RA=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:jA,contentInitial:CA,disable:_A,document:EA,flow:kA,flowInitial:TA,insideSpan:AA,string:NA,text:wA},Symbol.toStringTag,{value:"Module"}));function OA(e,t,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const l={},a=[];let r=[],s=[];const u={attempt:_(A),check:_(N),consume:m,enter:v,exit:C,interrupt:_(N,{interrupt:!0})},c={code:null,containerState:{},defineSkip:x,events:[],now:y,parser:e,previous:null,sliceSerialize:h,sliceStream:p,write:f};let d=t.tokenize.call(c,u);return t.resolveAll&&a.push(t),c;function f(M){return r=Ut(r,M),E(),r[r.length-1]!==null?[]:(I(t,0),c.events=_o(a,c.events,c),c.events)}function h(M,q){return zA(p(M),q)}function p(M){return DA(r,M)}function y(){const{_bufferIndex:M,_index:q,line:P,column:F,offset:V}=i;return{_bufferIndex:M,_index:q,line:P,column:F,offset:V}}function x(M){l[M.line]=M.column,T()}function E(){let M;for(;i._index<r.length;){const q=r[i._index];if(typeof q=="string")for(M=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===M&&i._bufferIndex<q.length;)g(q.charCodeAt(i._bufferIndex));else g(q)}}function g(M){d=d(M)}function m(M){Q(M)?(i.line++,i.column=1,i.offset+=M===-3?2:1,T()):M!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===r[i._index].length&&(i._bufferIndex=-1,i._index++)),c.previous=M}function v(M,q){const P=q||{};return P.type=M,P.start=y(),c.events.push(["enter",P,c]),s.push(P),P}function C(M){const q=s.pop();return q.end=y(),c.events.push(["exit",q,c]),q}function A(M,q){I(M,q.from)}function N(M,q){q.restore()}function _(M,q){return P;function P(F,V,j){let O,w,X,S;return Array.isArray(F)?We(F):"tokenize"in F?We([F]):we(F);function we(Ie){return ki;function ki(ln){const Gn=ln!==null&&Ie[ln],Vn=ln!==null&&Ie.null,Ni=[...Array.isArray(Gn)?Gn:Gn?[Gn]:[],...Array.isArray(Vn)?Vn:Vn?[Vn]:[]];return We(Ni)(ln)}}function We(Ie){return O=Ie,w=0,Ie.length===0?j:k(Ie[w])}function k(Ie){return ki;function ki(ln){return S=D(),X=Ie,Ie.partial||(c.currentConstruct=Ie),Ie.name&&c.parser.constructs.disable.null.includes(Ie.name)?st():Ie.tokenize.call(q?Object.assign(Object.create(c),q):c,u,_e,st)(ln)}}function _e(Ie){return M(X,S),V}function st(Ie){return S.restore(),++w<O.length?k(O[w]):j}}}function I(M,q){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&At(c.events,q,c.events.length-q,M.resolve(c.events.slice(q),c)),M.resolveTo&&(c.events=M.resolveTo(c.events,c))}function D(){const M=y(),q=c.previous,P=c.currentConstruct,F=c.events.length,V=Array.from(s);return{from:F,restore:j};function j(){i=M,c.previous=q,c.currentConstruct=P,c.events.length=F,s=V,T()}}function T(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function DA(e,t){const n=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let r;if(n===l)r=[e[n].slice(i,a)];else{if(r=e.slice(n,l),i>-1){const s=r[0];typeof s=="string"?r[0]=s.slice(i):r.shift()}a>0&&r.push(e[l].slice(0,a))}return r}function zA(e,t){let n=-1;const i=[];let l;for(;++n<e.length;){const a=e[n];let r;if(typeof a=="string")r=a;else switch(a){case-5:{r="\r";break}case-4:{r=`
62
62
  `;break}case-3:{r=`\r
63
- `;break}case-2:{r=t?" ":" ";break}case-1:{if(!t&&l)continue;r=" ";break}default:r=String.fromCharCode(a)}l=a===-2,i.push(r)}return i.join("")}function DA(e){const i={constructs:xb([jA,...(e||{}).extensions||[]]),content:l(QN),defined:[],document:l(KN),flow:l(pA),lazy:{},string:l(yA),text:l(xA)};return i;function l(a){return r;function r(s){return _A(i,a,s)}}}function zA(e){for(;!Cb(e););return e}const Lm=/[\0\t\n\r]/g;function LA(){let e=1,t="",n=!0,i;return l;function l(a,r,s){const u=[];let c,d,f,h,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(r||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Lm.lastIndex=f,c=Lm.exec(a),h=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(h),!c){t=a.slice(f);break}if(p===10&&f===h&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),f<h&&(u.push(a.slice(f,h)),e+=h-f),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:i=!0,e=1}f=h+1}return s&&(i&&u.push(-5),t&&u.push(t),u.push(null)),u}}const MA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function BA(e){return e.replace(MA,UA)}function UA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),a=l===120||l===88;return vb(n.slice(a?2:1),a?16:10)}return Bd(n)||e}const jb={}.hasOwnProperty;function IA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),HA(n)(zA(DA(n).document().write(LA()(e,t,!0))))}function HA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ot),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(Ar),blockQuote:a(Vn),characterEscape:D,characterReference:D,codeFenced:a(Ni),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:a(Ni,r),codeText:a(zo,r),codeTextData:D,data:D,codeFlowValue:D,definition:a(Lo),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:a(Mo),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(G,r),htmlFlowData:D,htmlText:a(G,r),htmlTextData:D,image:a(He),label:r,link:a(Ot),listItem:a(h0),listItemValue:h,listOrdered:a(an,f),listUnordered:a(an),paragraph:a(p0),reference:k,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:a(Ar),strong:a(m0),thematicBreak:a(y0)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:Gn,autolinkProtocol:ln,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:Ie,characterReference:ki,codeFenced:u(E),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:u(g),codeText:u(V),codeTextData:T,data:T,definition:u(),definitionDestinationString:C,definitionLabelString:m,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u(P),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(O),label:X,labelText:w,lineEnding:M,link:u(j),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:_e,resourceDestinationString:S,resourceTitleString:we,resource:We,setextHeading:u(U),setextHeadingLineSequence:_,setextHeadingText:N,strong:u(),thematicBreak:u()}};_b(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(z){let Y={type:"root",children:[]};const K={stack:[Y],tokenStack:[],config:t,enter:s,exit:c,buffer:r,resume:d,data:n},le=[];let ge=-1;for(;++ge<z.length;)if(z[ge][1].type==="listOrdered"||z[ge][1].type==="listUnordered")if(z[ge][0]==="enter")le.push(ge);else{const Xt=le.pop();ge=l(z,Xt,ge)}for(ge=-1;++ge<z.length;){const Xt=t[z[ge][0]];jb.call(Xt,z[ge][1].type)&&Xt[z[ge][1].type].call(Object.assign({sliceSerialize:z[ge][2].sliceSerialize},K),z[ge][1])}if(K.tokenStack.length>0){const Xt=K.tokenStack[K.tokenStack.length-1];(Xt[1]||Mm).call(K,void 0,Xt[0])}for(Y.position={start:Xn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Xn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<t.transforms.length;)Y=t.transforms[ge](Y)||Y;return Y}function l(z,Y,K){let le=Y-1,ge=-1,Xt=!1,wi,bn,aa,ra;for(;++le<=K;){const xt=z[le];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?ge++:ge--,ra=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(wi&&!ra&&!ge&&!aa&&(aa=le),ra=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ra=void 0}if(!ge&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||ge===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(wi){let il=le;for(bn=void 0;il--;){const Sn=z[il];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;bn&&(z[bn][1].type="lineEndingBlank",Xt=!0),Sn[1].type="lineEnding",bn=il}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}aa&&(!bn||aa<bn)&&(wi._spread=!0),wi.end=Object.assign({},bn?z[bn][1].start:xt[1].end),z.splice(bn||le,0,["exit",wi,xt[2]]),le++,K++}if(xt[1].type==="listItemPrefix"){const il={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};wi=il,z.splice(le,0,["enter",il,xt[2]]),le++,K++,aa=void 0,ra=!0}}}return z[Y][1]._spread=Xt,K}function a(z,Y){return K;function K(le){s.call(this,z(le),le),Y&&Y.call(this,le)}}function r(){this.stack.push({type:"fragment",children:[]})}function s(z,Y,K){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([Y,K||void 0]),z.position={start:Xn(Y.start),end:void 0}}function u(z){return Y;function Y(K){z&&z.call(this,K),c.call(this,K)}}function c(z,Y){const K=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(Y?Y.call(this,z,le[0]):(le[1]||Mm).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+qa({start:z.start,end:z.end})+"): it’s not open");K.position.end=Xn(z.end)}function d(){return Md(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(z){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function p(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=z}function y(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/(\r?\n|\r)$/g,"")}function m(z){const Y=this.resume(),K=this.stack[this.stack.length-1];K.label=Y,K.identifier=tn(this.sliceSerialize(z)).toLowerCase()}function v(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function C(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function A(z){const Y=this.stack[this.stack.length-1];if(!Y.depth){const K=this.sliceSerialize(z).length;Y.depth=K}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function _(z){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function U(){this.data.setextHeadingSlurpLineEnding=void 0}function D(z){const K=this.stack[this.stack.length-1].children;let le=K[K.length-1];(!le||le.type!=="text")&&(le=g0(),le.position={start:Xn(z.start),end:void 0},K.push(le)),this.stack.push(le)}function T(z){const Y=this.stack.pop();Y.value+=this.sliceSerialize(z),Y.position.end=Xn(z.end)}function M(z){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=Y.children[Y.children.length-1];K.position.end=Xn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(D.call(this,z),T.call(this,z))}function q(){this.data.atHardBreak=!0}function P(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function F(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function V(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function j(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function O(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function w(z){const Y=this.sliceSerialize(z),K=this.stack[this.stack.length-2];K.label=BA(Y),K.identifier=tn(Y).toLowerCase()}function X(){const z=this.stack[this.stack.length-1],Y=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const le=z.children;K.children=le}else K.alt=Y}function S(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function we(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function We(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function _e(z){const Y=this.resume(),K=this.stack[this.stack.length-1];K.label=Y,K.identifier=tn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function st(z){this.data.characterReferenceType=z.type}function Ie(z){const Y=this.sliceSerialize(z),K=this.data.characterReferenceType;let le;K?(le=vb(Y,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Bd(Y);const ge=this.stack[this.stack.length-1];ge.value+=le}function ki(z){const Y=this.stack.pop();Y.position.end=Xn(z.end)}function ln(z){T.call(this,z);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(z)}function Gn(z){T.call(this,z);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(z)}function Vn(){return{type:"blockquote",children:[]}}function Ni(){return{type:"code",lang:null,meta:null,value:""}}function zo(){return{type:"inlineCode",value:""}}function Lo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mo(){return{type:"emphasis",children:[]}}function Ar(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function G(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function Ot(){return{type:"link",title:null,url:"",children:[]}}function an(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function h0(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function p0(){return{type:"paragraph",children:[]}}function m0(){return{type:"strong",children:[]}}function g0(){return{type:"text",value:""}}function y0(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function _b(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?_b(e,i):qA(e,i)}}function qA(e,t){let n;for(n in t)if(jb.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Mm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is still open")}function FA(e){const t=this;t.parser=n;function n(i){return IA(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function GA(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 VA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
64
- `}]}function YA(e,t){const n=t.value?t.value+`
65
- `:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function PA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function XA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function QA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=la(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let r,s=e.footnoteCounts.get(i);s===void 0?(s=0,e.footnoteOrder.push(i),r=e.footnoteOrder.length):r=a+1,s+=1,e.footnoteCounts.set(i,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function ZA(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 KA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Rb(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const r=l[l.length-1];return r&&r.type==="text"?r.value+=i:l.push({type:"text",value:i}),l}function $A(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Rb(e,t);const l={src:la(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function JA(e,t){const n={src:la(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function WA(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function ej(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Rb(e,t);const l={href:la(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function tj(e,t){const n={href:la(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function nj(e,t,n){const i=e.all(t),l=n?ij(n):Ob(t),a={},r=[];if(typeof t.checked=="boolean"){const d=i[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},i.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:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<i.length;){const d=i[s];(l||s!==0||d.type!=="element"||d.tagName!=="p")&&r.push({type:"text",value:`
63
+ `;break}case-2:{r=t?" ":" ";break}case-1:{if(!t&&l)continue;r=" ";break}default:r=String.fromCharCode(a)}l=a===-2,i.push(r)}return i.join("")}function LA(e){const i={constructs:bb([RA,...(e||{}).extensions||[]]),content:l(KN),defined:[],document:l(JN),flow:l(gA),lazy:{},string:l(vA),text:l(bA)};return i;function l(a){return r;function r(s){return OA(i,a,s)}}}function MA(e){for(;!kb(e););return e}const Bm=/[\0\t\n\r]/g;function BA(){let e=1,t="",n=!0,i;return l;function l(a,r,s){const u=[];let c,d,f,h,p;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(r||void 0).decode(a)),f=0,t="",n&&(a.charCodeAt(0)===65279&&f++,n=void 0);f<a.length;){if(Bm.lastIndex=f,c=Bm.exec(a),h=c&&c.index!==void 0?c.index:a.length,p=a.charCodeAt(h),!c){t=a.slice(f);break}if(p===10&&f===h&&i)u.push(-3),i=void 0;else switch(i&&(u.push(-5),i=void 0),f<h&&(u.push(a.slice(f,h)),e+=h-f),p){case 0:{u.push(65533),e++;break}case 9:{for(d=Math.ceil(e/4)*4,u.push(-2);e++<d;)u.push(-1);break}case 10:{u.push(-4),e=1;break}default:i=!0,e=1}f=h+1}return s&&(i&&u.push(-5),t&&u.push(t),u.push(null)),u}}const UA=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function IA(e){return e.replace(UA,HA)}function HA(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),a=l===120||l===88;return Sb(n.slice(a?2:1),a?16:10)}return Bd(n)||e}const Rb={}.hasOwnProperty;function qA(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),FA(n)(MA(LA(n).document().write(BA()(e,t,!0))))}function FA(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ot),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(Ar),blockQuote:a(Vn),characterEscape:D,characterReference:D,codeFenced:a(Ni),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:a(Ni,r),codeText:a(zo,r),codeTextData:D,data:D,codeFlowValue:D,definition:a(Lo),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:a(Mo),hardBreakEscape:a(R),hardBreakTrailing:a(R),htmlFlow:a(G,r),htmlFlowData:D,htmlText:a(G,r),htmlTextData:D,image:a(He),label:r,link:a(Ot),listItem:a(m0),listItemValue:h,listOrdered:a(an,f),listUnordered:a(an),paragraph:a(g0),reference:k,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:a(Ar),strong:a(y0),thematicBreak:a(v0)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:Gn,autolinkProtocol:ln,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:Ie,characterReference:ki,codeFenced:u(E),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:u(g),codeText:u(V),codeTextData:T,data:T,definition:u(),definitionDestinationString:C,definitionLabelString:m,definitionTitleString:v,emphasis:u(),hardBreakEscape:u(q),hardBreakTrailing:u(q),htmlFlow:u(P),htmlFlowData:T,htmlText:u(F),htmlTextData:T,image:u(O),label:X,labelText:w,lineEnding:M,link:u(j),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:_e,resourceDestinationString:S,resourceTitleString:we,resource:We,setextHeading:u(I),setextHeadingLineSequence:_,setextHeadingText:N,strong:u(),thematicBreak:u()}};Ob(t,(e||{}).mdastExtensions||[]);const n={};return i;function i(z){let Y={type:"root",children:[]};const K={stack:[Y],tokenStack:[],config:t,enter:s,exit:c,buffer:r,resume:d,data:n},le=[];let ge=-1;for(;++ge<z.length;)if(z[ge][1].type==="listOrdered"||z[ge][1].type==="listUnordered")if(z[ge][0]==="enter")le.push(ge);else{const Xt=le.pop();ge=l(z,Xt,ge)}for(ge=-1;++ge<z.length;){const Xt=t[z[ge][0]];Rb.call(Xt,z[ge][1].type)&&Xt[z[ge][1].type].call(Object.assign({sliceSerialize:z[ge][2].sliceSerialize},K),z[ge][1])}if(K.tokenStack.length>0){const Xt=K.tokenStack[K.tokenStack.length-1];(Xt[1]||Um).call(K,void 0,Xt[0])}for(Y.position={start:Xn(z.length>0?z[0][1].start:{line:1,column:1,offset:0}),end:Xn(z.length>0?z[z.length-2][1].end:{line:1,column:1,offset:0})},ge=-1;++ge<t.transforms.length;)Y=t.transforms[ge](Y)||Y;return Y}function l(z,Y,K){let le=Y-1,ge=-1,Xt=!1,wi,bn,aa,ra;for(;++le<=K;){const xt=z[le];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?ge++:ge--,ra=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(wi&&!ra&&!ge&&!aa&&(aa=le),ra=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ra=void 0}if(!ge&&xt[0]==="enter"&&xt[1].type==="listItemPrefix"||ge===-1&&xt[0]==="exit"&&(xt[1].type==="listUnordered"||xt[1].type==="listOrdered")){if(wi){let il=le;for(bn=void 0;il--;){const Sn=z[il];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;bn&&(z[bn][1].type="lineEndingBlank",Xt=!0),Sn[1].type="lineEnding",bn=il}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}aa&&(!bn||aa<bn)&&(wi._spread=!0),wi.end=Object.assign({},bn?z[bn][1].start:xt[1].end),z.splice(bn||le,0,["exit",wi,xt[2]]),le++,K++}if(xt[1].type==="listItemPrefix"){const il={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};wi=il,z.splice(le,0,["enter",il,xt[2]]),le++,K++,aa=void 0,ra=!0}}}return z[Y][1]._spread=Xt,K}function a(z,Y){return K;function K(le){s.call(this,z(le),le),Y&&Y.call(this,le)}}function r(){this.stack.push({type:"fragment",children:[]})}function s(z,Y,K){this.stack[this.stack.length-1].children.push(z),this.stack.push(z),this.tokenStack.push([Y,K||void 0]),z.position={start:Xn(Y.start),end:void 0}}function u(z){return Y;function Y(K){z&&z.call(this,K),c.call(this,K)}}function c(z,Y){const K=this.stack.pop(),le=this.tokenStack.pop();if(le)le[0].type!==z.type&&(Y?Y.call(this,z,le[0]):(le[1]||Um).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+qa({start:z.start,end:z.end})+"): it’s not open");K.position.end=Xn(z.end)}function d(){return Md(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function h(z){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(z),10),this.data.expectingFirstListItemValue=void 0}}function p(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=z}function y(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=z}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function E(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function g(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/(\r?\n|\r)$/g,"")}function m(z){const Y=this.resume(),K=this.stack[this.stack.length-1];K.label=Y,K.identifier=tn(this.sliceSerialize(z)).toLowerCase()}function v(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function C(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function A(z){const Y=this.stack[this.stack.length-1];if(!Y.depth){const K=this.sliceSerialize(z).length;Y.depth=K}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function _(z){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(z).codePointAt(0)===61?1:2}function I(){this.data.setextHeadingSlurpLineEnding=void 0}function D(z){const K=this.stack[this.stack.length-1].children;let le=K[K.length-1];(!le||le.type!=="text")&&(le=x0(),le.position={start:Xn(z.start),end:void 0},K.push(le)),this.stack.push(le)}function T(z){const Y=this.stack.pop();Y.value+=this.sliceSerialize(z),Y.position.end=Xn(z.end)}function M(z){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const K=Y.children[Y.children.length-1];K.position.end=Xn(z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Y.type)&&(D.call(this,z),T.call(this,z))}function q(){this.data.atHardBreak=!0}function P(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function F(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function V(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z}function j(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function O(){const z=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";z.type+="Reference",z.referenceType=Y,delete z.url,delete z.title}else delete z.identifier,delete z.label;this.data.referenceType=void 0}function w(z){const Y=this.sliceSerialize(z),K=this.stack[this.stack.length-2];K.label=IA(Y),K.identifier=tn(Y).toLowerCase()}function X(){const z=this.stack[this.stack.length-1],Y=this.resume(),K=this.stack[this.stack.length-1];if(this.data.inReference=!0,K.type==="link"){const le=z.children;K.children=le}else K.alt=Y}function S(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.url=z}function we(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.title=z}function We(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function _e(z){const Y=this.resume(),K=this.stack[this.stack.length-1];K.label=Y,K.identifier=tn(this.sliceSerialize(z)).toLowerCase(),this.data.referenceType="full"}function st(z){this.data.characterReferenceType=z.type}function Ie(z){const Y=this.sliceSerialize(z),K=this.data.characterReferenceType;let le;K?(le=Sb(Y,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Bd(Y);const ge=this.stack[this.stack.length-1];ge.value+=le}function ki(z){const Y=this.stack.pop();Y.position.end=Xn(z.end)}function ln(z){T.call(this,z);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(z)}function Gn(z){T.call(this,z);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(z)}function Vn(){return{type:"blockquote",children:[]}}function Ni(){return{type:"code",lang:null,meta:null,value:""}}function zo(){return{type:"inlineCode",value:""}}function Lo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Mo(){return{type:"emphasis",children:[]}}function Ar(){return{type:"heading",depth:0,children:[]}}function R(){return{type:"break"}}function G(){return{type:"html",value:""}}function He(){return{type:"image",title:null,url:"",alt:null}}function Ot(){return{type:"link",title:null,url:"",children:[]}}function an(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function m0(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function g0(){return{type:"paragraph",children:[]}}function y0(){return{type:"strong",children:[]}}function x0(){return{type:"text",value:""}}function v0(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function Ob(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Ob(e,i):GA(e,i)}}function GA(e,t){let n;for(n in t)if(Rb.call(t,n))switch(n){case"canContainEols":{const i=t[n];i&&e[n].push(...i);break}case"transforms":{const i=t[n];i&&e[n].push(...i);break}case"enter":case"exit":{const i=t[n];i&&Object.assign(e[n],i);break}}}function Um(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qa({start:t.start,end:t.end})+") is still open")}function VA(e){const t=this;t.parser=n;function n(i){return qA(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function YA(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 PA(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
64
+ `}]}function XA(e,t){const n=t.value?t.value+`
65
+ `:"",i={},l=t.lang?t.lang.split(/\s+/):[];l.length>0&&(i.className=["language-"+l[0]]);let a={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function QA(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZA(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KA(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=la(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let r,s=e.footnoteCounts.get(i);s===void 0?(s=0,e.footnoteOrder.push(i),r=e.footnoteOrder.length):r=a+1,s+=1,e.footnoteCounts.set(i,s);const u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+l,id:n+"fnref-"+l+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(r)}]};e.patch(t,u);const c={type:"element",tagName:"sup",properties:{},children:[u]};return e.patch(t,c),e.applyData(t,c)}function $A(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 JA(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Db(e,t){const n=t.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const r=l[l.length-1];return r&&r.type==="text"?r.value+=i:l.push({type:"text",value:i}),l}function WA(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Db(e,t);const l={src:la(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function ej(e,t){const n={src:la(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 i={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,i),e.applyData(t,i)}function tj(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,i),e.applyData(t,i)}function nj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Db(e,t);const l={href:la(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function ij(e,t){const n={href:la(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const i={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function lj(e,t,n){const i=e.all(t),l=n?aj(n):zb(t),a={},r=[];if(typeof t.checked=="boolean"){const d=i[0];let f;d&&d.type==="element"&&d.tagName==="p"?f=d:(f={type:"element",tagName:"p",properties:{},children:[]},i.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:[]}),a.className=["task-list-item"]}let s=-1;for(;++s<i.length;){const d=i[s];(l||s!==0||d.type!=="element"||d.tagName!=="p")&&r.push({type:"text",value:`
66
66
  `}),d.type==="element"&&d.tagName==="p"&&!l?r.push(...d.children):r.push(d)}const u=i[i.length-1];u&&(l||u.type!=="element"||u.tagName!=="p")&&r.push({type:"text",value:`
67
- `});const c={type:"element",tagName:"li",properties:a,children:r};return e.patch(t,c),e.applyData(t,c)}function ij(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=Ob(n[i])}return t}function Ob(e){const t=e.spread;return t??e.children.length>1}function lj(e,t){const n={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<i.length;){const r=i[l];if(r.type==="element"&&r.tagName==="li"&&r.properties&&Array.isArray(r.properties.className)&&r.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function aj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function rj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function sj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oj(e,t){const n=e.all(t),i=n.shift(),l=[];if(i){const r={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],r),l.push(r)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Od(t.children[1]),u=fb(t.children[t.children.length-1]);s&&u&&(r.position={start:s,end:u}),l.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function uj(e,t,n){const i=n?n.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",r=n&&n.type==="table"?n.align:void 0,s=r?r.length:t.children.length;let u=-1;const c=[];for(;++u<s;){const f=t.children[u],h={},p=r?r[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:a,properties:h,children:[]};f&&(y.children=e.all(f),e.patch(f,y),y=e.applyData(f,y)),c.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function cj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Bm=9,Um=32;function fj(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),l=0;const a=[];for(;i;)a.push(Im(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=n.exec(t);return a.push(Im(t.slice(l),l>0,!1)),a.join("")}function Im(e,t,n){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===Bm||a===Um;)i++,a=e.codePointAt(i)}if(n){let a=e.codePointAt(l-1);for(;a===Bm||a===Um;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function dj(e,t){const n={type:"text",value:fj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function hj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const pj={blockquote:GA,break:VA,code:YA,delete:PA,emphasis:XA,footnoteReference:QA,heading:ZA,html:KA,imageReference:$A,image:JA,inlineCode:WA,linkReference:ej,link:tj,listItem:nj,list:lj,paragraph:aj,root:rj,strong:sj,table:oj,tableCell:cj,tableRow:uj,text:dj,thematicBreak:hj,toml:Kr,yaml:Kr,definition:Kr,footnoteDefinition:Kr};function Kr(){}const Db=-1,Ro=0,Ga=1,eo=2,Id=3,Hd=4,qd=5,Fd=6,zb=7,Lb=8,Hm=typeof self=="object"?self:globalThis,mj=(e,t)=>{const n=(l,a)=>(e.set(a,l),l),i=l=>{if(e.has(l))return e.get(l);const[a,r]=t[l];switch(a){case Ro:case Db:return n(r,l);case Ga:{const s=n([],l);for(const u of r)s.push(i(u));return s}case eo:{const s=n({},l);for(const[u,c]of r)s[i(u)]=i(c);return s}case Id:return n(new Date(r),l);case Hd:{const{source:s,flags:u}=r;return n(new RegExp(s,u),l)}case qd:{const s=n(new Map,l);for(const[u,c]of r)s.set(i(u),i(c));return s}case Fd:{const s=n(new Set,l);for(const u of r)s.add(i(u));return s}case zb:{const{name:s,message:u}=r;return n(new Hm[s](u),l)}case Lb:return n(BigInt(r),l);case"BigInt":return n(Object(BigInt(r)),l);case"ArrayBuffer":return n(new Uint8Array(r).buffer,r);case"DataView":{const{buffer:s}=new Uint8Array(r);return n(new DataView(s),r)}}return n(new Hm[a](r),l)};return i},qm=e=>mj(new Map,e)(0),sl="",{toString:gj}={},{keys:yj}=Object,xa=e=>{const t=typeof e;if(t!=="object"||!e)return[Ro,t];const n=gj.call(e).slice(8,-1);switch(n){case"Array":return[Ga,sl];case"Object":return[eo,sl];case"Date":return[Id,sl];case"RegExp":return[Hd,sl];case"Map":return[qd,sl];case"Set":return[Fd,sl];case"DataView":return[Ga,n]}return n.includes("Array")?[Ga,n]:n.includes("Error")?[zb,n]:[eo,n]},$r=([e,t])=>e===Ro&&(t==="function"||t==="symbol"),xj=(e,t,n,i)=>{const l=(r,s)=>{const u=i.push(r)-1;return n.set(s,u),u},a=r=>{if(n.has(r))return n.get(r);let[s,u]=xa(r);switch(s){case Ro:{let d=r;switch(u){case"bigint":s=Lb,d=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return l([Db],r)}return l([s,d],r)}case Ga:{if(u){let h=r;return u==="DataView"?h=new Uint8Array(r.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(r)),l([u,[...h]],r)}const d=[],f=l([s,d],r);for(const h of r)d.push(a(h));return f}case eo:{if(u)switch(u){case"BigInt":return l([u,r.toString()],r);case"Boolean":case"Number":case"String":return l([u,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const d=[],f=l([s,d],r);for(const h of yj(r))(e||!$r(xa(r[h])))&&d.push([a(h),a(r[h])]);return f}case Id:return l([s,r.toISOString()],r);case Hd:{const{source:d,flags:f}=r;return l([s,{source:d,flags:f}],r)}case qd:{const d=[],f=l([s,d],r);for(const[h,p]of r)(e||!($r(xa(h))||$r(xa(p))))&&d.push([a(h),a(p)]);return f}case Fd:{const d=[],f=l([s,d],r);for(const h of r)(e||!$r(xa(h)))&&d.push(a(h));return f}}const{message:c}=r;return l([s,{name:u,message:c}],r)};return a},Fm=(e,{json:t,lossy:n}={})=>{const i=[];return xj(!(t||n),!!t,new Map,i)(e),i},to=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?qm(Fm(e,t)):structuredClone(e):(e,t)=>qm(Fm(e,t));function vj(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 bj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Sj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||vj,i=e.options.footnoteBackLabel||bj,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",r=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),h=la(f.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,p);typeof m=="string"&&(m={type:"text",value:m}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const E=d[d.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const m=E.children[E.children.length-1];m&&m.type==="text"?m.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...y)}else d.push(...y);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...to(r),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
67
+ `});const c={type:"element",tagName:"li",properties:a,children:r};return e.patch(t,c),e.applyData(t,c)}function aj(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let i=-1;for(;!t&&++i<n.length;)t=zb(n[i])}return t}function zb(e){const t=e.spread;return t??e.children.length>1}function rj(e,t){const n={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++l<i.length;){const r=i[l];if(r.type==="element"&&r.tagName==="li"&&r.properties&&Array.isArray(r.properties.className)&&r.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function sj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function oj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function uj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function cj(e,t){const n=e.all(t),i=n.shift(),l=[];if(i){const r={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],r),l.push(r)}if(n.length>0){const r={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Od(t.children[1]),u=hb(t.children[t.children.length-1]);s&&u&&(r.position={start:s,end:u}),l.push(r)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function fj(e,t,n){const i=n?n.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",r=n&&n.type==="table"?n.align:void 0,s=r?r.length:t.children.length;let u=-1;const c=[];for(;++u<s;){const f=t.children[u],h={},p=r?r[u]:void 0;p&&(h.align=p);let y={type:"element",tagName:a,properties:h,children:[]};f&&(y.children=e.all(f),e.patch(f,y),y=e.applyData(f,y)),c.push(y)}const d={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,d),e.applyData(t,d)}function dj(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Im=9,Hm=32;function hj(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),l=0;const a=[];for(;i;)a.push(qm(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=n.exec(t);return a.push(qm(t.slice(l),l>0,!1)),a.join("")}function qm(e,t,n){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===Im||a===Hm;)i++,a=e.codePointAt(i)}if(n){let a=e.codePointAt(l-1);for(;a===Im||a===Hm;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function pj(e,t){const n={type:"text",value:hj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function mj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const gj={blockquote:YA,break:PA,code:XA,delete:QA,emphasis:ZA,footnoteReference:KA,heading:$A,html:JA,imageReference:WA,image:ej,inlineCode:tj,linkReference:nj,link:ij,listItem:lj,list:rj,paragraph:sj,root:oj,strong:uj,table:cj,tableCell:dj,tableRow:fj,text:pj,thematicBreak:mj,toml:Kr,yaml:Kr,definition:Kr,footnoteDefinition:Kr};function Kr(){}const Lb=-1,Ro=0,Ga=1,eo=2,Id=3,Hd=4,qd=5,Fd=6,Mb=7,Bb=8,Fm=typeof self=="object"?self:globalThis,yj=(e,t)=>{const n=(l,a)=>(e.set(a,l),l),i=l=>{if(e.has(l))return e.get(l);const[a,r]=t[l];switch(a){case Ro:case Lb:return n(r,l);case Ga:{const s=n([],l);for(const u of r)s.push(i(u));return s}case eo:{const s=n({},l);for(const[u,c]of r)s[i(u)]=i(c);return s}case Id:return n(new Date(r),l);case Hd:{const{source:s,flags:u}=r;return n(new RegExp(s,u),l)}case qd:{const s=n(new Map,l);for(const[u,c]of r)s.set(i(u),i(c));return s}case Fd:{const s=n(new Set,l);for(const u of r)s.add(i(u));return s}case Mb:{const{name:s,message:u}=r;return n(new Fm[s](u),l)}case Bb:return n(BigInt(r),l);case"BigInt":return n(Object(BigInt(r)),l);case"ArrayBuffer":return n(new Uint8Array(r).buffer,r);case"DataView":{const{buffer:s}=new Uint8Array(r);return n(new DataView(s),r)}}return n(new Fm[a](r),l)};return i},Gm=e=>yj(new Map,e)(0),sl="",{toString:xj}={},{keys:vj}=Object,xa=e=>{const t=typeof e;if(t!=="object"||!e)return[Ro,t];const n=xj.call(e).slice(8,-1);switch(n){case"Array":return[Ga,sl];case"Object":return[eo,sl];case"Date":return[Id,sl];case"RegExp":return[Hd,sl];case"Map":return[qd,sl];case"Set":return[Fd,sl];case"DataView":return[Ga,n]}return n.includes("Array")?[Ga,n]:n.includes("Error")?[Mb,n]:[eo,n]},$r=([e,t])=>e===Ro&&(t==="function"||t==="symbol"),bj=(e,t,n,i)=>{const l=(r,s)=>{const u=i.push(r)-1;return n.set(s,u),u},a=r=>{if(n.has(r))return n.get(r);let[s,u]=xa(r);switch(s){case Ro:{let d=r;switch(u){case"bigint":s=Bb,d=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return l([Lb],r)}return l([s,d],r)}case Ga:{if(u){let h=r;return u==="DataView"?h=new Uint8Array(r.buffer):u==="ArrayBuffer"&&(h=new Uint8Array(r)),l([u,[...h]],r)}const d=[],f=l([s,d],r);for(const h of r)d.push(a(h));return f}case eo:{if(u)switch(u){case"BigInt":return l([u,r.toString()],r);case"Boolean":case"Number":case"String":return l([u,r.valueOf()],r)}if(t&&"toJSON"in r)return a(r.toJSON());const d=[],f=l([s,d],r);for(const h of vj(r))(e||!$r(xa(r[h])))&&d.push([a(h),a(r[h])]);return f}case Id:return l([s,r.toISOString()],r);case Hd:{const{source:d,flags:f}=r;return l([s,{source:d,flags:f}],r)}case qd:{const d=[],f=l([s,d],r);for(const[h,p]of r)(e||!($r(xa(h))||$r(xa(p))))&&d.push([a(h),a(p)]);return f}case Fd:{const d=[],f=l([s,d],r);for(const h of r)(e||!$r(xa(h)))&&d.push(a(h));return f}}const{message:c}=r;return l([s,{name:u,message:c}],r)};return a},Vm=(e,{json:t,lossy:n}={})=>{const i=[];return bj(!(t||n),!!t,new Map,i)(e),i},to=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gm(Vm(e,t)):structuredClone(e):(e,t)=>Gm(Vm(e,t));function Sj(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 Ej(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Cj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Sj,i=e.options.footnoteBackLabel||Ej,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",r=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[];let u=-1;for(;++u<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[u]);if(!c)continue;const d=e.all(c),f=String(c.identifier).toUpperCase(),h=la(f.toLowerCase());let p=0;const y=[],x=e.footnoteCounts.get(f);for(;x!==void 0&&++p<=x;){y.length>0&&y.push({type:"text",value:" "});let m=typeof n=="string"?n:n(u,p);typeof m=="string"&&(m={type:"text",value:m}),y.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+h+(p>1?"-"+p:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(u,p),className:["data-footnote-backref"]},children:Array.isArray(m)?m:[m]})}const E=d[d.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const m=E.children[E.children.length-1];m&&m.type==="text"?m.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...y)}else d.push(...y);const g={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,g),s.push(g)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...to(r),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
68
68
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
69
- `}]}}const Oo=(function(e){if(e==null)return kj;if(typeof e=="function")return Do(e);if(typeof e=="object")return Array.isArray(e)?Ej(e):Cj(e);if(typeof e=="string")return Tj(e);throw new Error("Expected function, string, or object as test")});function Ej(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Oo(e[n]);return Do(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function Cj(e){const t=e;return Do(n);function n(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function Tj(e){return Do(t);function t(n){return n&&n.type===e}}function Do(e){return t;function t(n,i,l){return!!(Nj(n)&&e.call(this,n,typeof i=="number"?i:void 0,l||void 0))}}function kj(){return!0}function Nj(e){return e!==null&&typeof e=="object"&&"type"in e}const Mb=[],wj=!0,af=!1,Aj="skip";function Bb(e,t,n,i){let l;typeof t=="function"&&typeof n!="function"?(i=n,n=t):l=t;const a=Oo(l),r=i?-1:1;s(e,void 0,[])();function s(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Mb,y,x,E;if((!t||a(u,c,d[d.length-1]||void 0))&&(p=jj(n(u,d)),p[0]===af))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==Aj)for(x=(i?g.children.length:-1)+r,E=d.concat(g);x>-1&&x<g.children.length;){const m=g.children[x];if(y=s(m,x,E)(),y[0]===af)return y;x=typeof y[1]=="number"?y[1]:x+r}}return p}}}function jj(e){return Array.isArray(e)?e:typeof e=="number"?[wj,e]:e==null?Mb:[e]}function Gd(e,t,n,i){let l,a,r;typeof t=="function"&&typeof n!="function"?(a=void 0,r=t,l=n):(a=t,r=n,l=i),Bb(e,a,s,l);function s(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return r(u,f,d)}}const rf={}.hasOwnProperty,_j={};function Rj(e,t){const n=t||_j,i=new Map,l=new Map,a=new Map,r={...pj,...n.handlers},s={all:c,applyData:Dj,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:r,one:u,options:n,patch:Oj,wrap:Lj};return Gd(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?i:l,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),s;function u(d,f){const h=d.type,p=s.handlers[h];if(rf.call(s.handlers,h)&&p)return p(s,d,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:x,...E}=d,g=to(E);return g.children=s.all(d),g}return to(d)}return(s.options.unknownHandler||zj)(s,d,f)}function c(d){const f=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const y=s.one(h[p],d);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Gm(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Gm(x.value))}Array.isArray(y)?f.push(...y):f.push(y)}}}return f}}function Oj(e,t){e.position&&(t.position=bN(e))}function Dj(e,t){let n=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const r="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:r}}n.type==="element"&&a&&Object.assign(n.properties,to(a)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function zj(e,t){const n=t.data||{},i="value"in t&&!(rf.call(n,"hProperties")||rf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Lj(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
69
+ `}]}}const Oo=(function(e){if(e==null)return wj;if(typeof e=="function")return Do(e);if(typeof e=="object")return Array.isArray(e)?Tj(e):kj(e);if(typeof e=="string")return Nj(e);throw new Error("Expected function, string, or object as test")});function Tj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Oo(e[n]);return Do(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function kj(e){const t=e;return Do(n);function n(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function Nj(e){return Do(t);function t(n){return n&&n.type===e}}function Do(e){return t;function t(n,i,l){return!!(Aj(n)&&e.call(this,n,typeof i=="number"?i:void 0,l||void 0))}}function wj(){return!0}function Aj(e){return e!==null&&typeof e=="object"&&"type"in e}const Ub=[],jj=!0,af=!1,_j="skip";function Ib(e,t,n,i){let l;typeof t=="function"&&typeof n!="function"?(i=n,n=t):l=t;const a=Oo(l),r=i?-1:1;s(e,void 0,[])();function s(u,c,d){const f=u&&typeof u=="object"?u:{};if(typeof f.type=="string"){const p=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(h,"name",{value:"node ("+(u.type+(p?"<"+p+">":""))+")"})}return h;function h(){let p=Ub,y,x,E;if((!t||a(u,c,d[d.length-1]||void 0))&&(p=Rj(n(u,d)),p[0]===af))return p;if("children"in u&&u.children){const g=u;if(g.children&&p[0]!==_j)for(x=(i?g.children.length:-1)+r,E=d.concat(g);x>-1&&x<g.children.length;){const m=g.children[x];if(y=s(m,x,E)(),y[0]===af)return y;x=typeof y[1]=="number"?y[1]:x+r}}return p}}}function Rj(e){return Array.isArray(e)?e:typeof e=="number"?[jj,e]:e==null?Ub:[e]}function Gd(e,t,n,i){let l,a,r;typeof t=="function"&&typeof n!="function"?(a=void 0,r=t,l=n):(a=t,r=n,l=i),Ib(e,a,s,l);function s(u,c){const d=c[c.length-1],f=d?d.children.indexOf(u):void 0;return r(u,f,d)}}const rf={}.hasOwnProperty,Oj={};function Dj(e,t){const n=t||Oj,i=new Map,l=new Map,a=new Map,r={...gj,...n.handlers},s={all:c,applyData:Lj,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:r,one:u,options:n,patch:zj,wrap:Bj};return Gd(e,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const f=d.type==="definition"?i:l,h=String(d.identifier).toUpperCase();f.has(h)||f.set(h,d)}}),s;function u(d,f){const h=d.type,p=s.handlers[h];if(rf.call(s.handlers,h)&&p)return p(s,d,f);if(s.options.passThrough&&s.options.passThrough.includes(h)){if("children"in d){const{children:x,...E}=d,g=to(E);return g.children=s.all(d),g}return to(d)}return(s.options.unknownHandler||Mj)(s,d,f)}function c(d){const f=[];if("children"in d){const h=d.children;let p=-1;for(;++p<h.length;){const y=s.one(h[p],d);if(y){if(p&&h[p-1].type==="break"&&(!Array.isArray(y)&&y.type==="text"&&(y.value=Ym(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=Ym(x.value))}Array.isArray(y)?f.push(...y):f.push(y)}}}return f}}function zj(e,t){e.position&&(t.position=EN(e))}function Lj(e,t){let n=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const r="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:r}}n.type==="element"&&a&&Object.assign(n.properties,to(a)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function Mj(e,t){const n=t.data||{},i="value"in t&&!(rf.call(n,"hProperties")||rf.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function Bj(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
70
70
  `});++i<e.length;)i&&n.push({type:"text",value:`
71
71
  `}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
72
- `}),n}function Gm(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Vm(e,t){const n=Rj(e,t),i=n.one(e,void 0),l=Sj(n),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
73
- `},l),a}function Mj(e,t){return e&&"run"in e?async function(n,i){const l=Vm(n,{file:i,...t});await e.run(l,i)}:function(n,i){return Vm(n,{file:i,...e||t})}}function Ym(e){if(e)throw e}var Ss=Object.prototype.hasOwnProperty,Ub=Object.prototype.toString,Pm=Object.defineProperty,Xm=Object.getOwnPropertyDescriptor,Qm=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Ub.call(t)==="[object Array]"},Zm=function(t){if(!t||Ub.call(t)!=="[object Object]")return!1;var n=Ss.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&Ss.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var l;for(l in t);return typeof l>"u"||Ss.call(t,l)},Km=function(t,n){Pm&&n.name==="__proto__"?Pm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},$m=function(t,n){if(n==="__proto__")if(Ss.call(t,n)){if(Xm)return Xm(t,n).value}else return;return t[n]},Bj=function e(){var t,n,i,l,a,r,s=arguments[0],u=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)i=$m(s,n),l=$m(t,n),s!==l&&(d&&l&&(Zm(l)||(a=Qm(l)))?(a?(a=!1,r=i&&Qm(i)?i:[]):r=i&&Zm(i)?i:{},Km(s,{name:n,newValue:e(d,r,l)})):typeof l<"u"&&Km(s,{name:n,newValue:l}));return s};const Ou=hg(Bj);function sf(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 Uj(){const e=[],t={run:n,use:i};return t;function n(...l){let a=-1;const r=l.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);s(null,...l);function s(u,...c){const d=e[++a];let f=-1;if(u){r(u);return}for(;++f<l.length;)(c[f]===null||c[f]===void 0)&&(c[f]=l[f]);l=c,d?Ij(d,s)(...c):r(null,...c)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function Ij(e,t){let n;return i;function i(...r){const s=e.length>r.length;let u;s&&r.push(l);try{u=e.apply(this,r)}catch(c){const d=c;if(s&&n)throw d;return l(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,l):u instanceof Error?l(u):a(u))}function l(r,...s){n||(n=!0,t(r,...s))}function a(r){l(null,r)}}const sn={basename:Hj,dirname:qj,extname:Fj,join:Gj,sep:"/"};function Hj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wr(e);let n=0,i=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){n=l+1;break}}else i<0&&(a=!0,i=l+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let r=-1,s=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){n=l+1;break}}else r<0&&(a=!0,r=l+1),s>-1&&(e.codePointAt(l)===t.codePointAt(s--)?s<0&&(i=l):(s=-1,i=r));return n===i?i=r:i<0&&(i=e.length),e.slice(n,i)}function qj(e){if(wr(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Fj(e){wr(e);let t=e.length,n=-1,i=0,l=-1,a=0,r;for(;t--;){const s=e.codePointAt(t);if(s===47){if(r){i=t+1;break}continue}n<0&&(r=!0,n=t+1),s===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||n<0||a===0||a===1&&l===n-1&&l===i+1?"":e.slice(l,n)}function Gj(...e){let t=-1,n;for(;++t<e.length;)wr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Vj(n)}function Vj(e){wr(e);const t=e.codePointAt(0)===47;let n=Yj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Yj(e,t){let n="",i=0,l=-1,a=0,r=-1,s,u;for(;++r<=e.length;){if(r<e.length)s=e.codePointAt(r);else{if(s===47)break;s=47}if(s===47){if(!(l===r-1||a===1))if(l!==r-1&&a===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",i=0):(n=n.slice(0,u),i=n.length-1-n.lastIndexOf("/")),l=r,a=0;continue}}else if(n.length>0){n="",i=0,l=r,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(l+1,r):n=e.slice(l+1,r),i=r-l-1;l=r,a=0}else s===46&&a>-1?a++:a=-1}return n}function wr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Pj={cwd:Xj};function Xj(){return"/"}function of(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Qj(e){if(typeof e=="string")e=new URL(e);else if(!of(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 Zj(e)}function Zj(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Du=["history","path","basename","stem","extname","dirname"];class Ib{constructor(t){let n;t?of(t)?n={path:t}:typeof t=="string"||Kj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Pj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Du.length;){const a=Du[i];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let l;for(l in n)Du.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?sn.basename(this.path):void 0}set basename(t){Lu(t,"basename"),zu(t,"basename"),this.path=sn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sn.dirname(this.path):void 0}set dirname(t){Jm(this.basename,"dirname"),this.path=sn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sn.extname(this.path):void 0}set extname(t){if(zu(t,"extname"),Jm(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=sn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){of(t)&&(t=Qj(t)),Lu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sn.basename(this.path,this.extname):void 0}set stem(t){Lu(t,"stem"),zu(t,"stem"),this.path=sn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const l=this.message(t,n,i);throw l.fatal=!0,l}info(t,n,i){const l=this.message(t,n,i);return l.fatal=void 0,l}message(t,n,i){const l=new tt(t,n,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zu(e,t){if(e&&e.includes(sn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sn.sep+"`")}function Lu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Jm(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Kj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const $j=(function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a}),Jj={}.hasOwnProperty;class Vd extends $j{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=Uj()}copy(){const t=new Vd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Ou(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Uu("data",this.frozen),this.namespace[t]=n,this):Jj.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Uu("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=n.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jr(t),i=this.parser||this.Parser;return Mu("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Mu("process",this.parser||this.Parser),Bu("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(a,r){const s=Jr(t),u=i.parse(s);i.run(u,s,function(d,f,h){if(d||!f||!h)return c(d);const p=f,y=i.stringify(p,h);t_(y)?h.value=y:h.result=y,c(d,h)});function c(d,f){d||!f?r(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,i;return this.freeze(),Mu("processSync",this.parser||this.Parser),Bu("processSync",this.compiler||this.Compiler),this.process(t,l),eg("processSync","process",n),i;function l(a,r){n=!0,Ym(a),i=r}}run(t,n,i){Wm(t),this.freeze();const l=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?a(void 0,i):new Promise(a);function a(r,s){const u=Jr(n);l.run(t,u,c);function c(d,f,h){const p=f||t;d?s(d):r?r(p):i(void 0,p,h)}}}runSync(t,n){let i=!1,l;return this.run(t,n,a),eg("runSync","run",i),l;function a(r,s){Ym(r),l=s,i=!0}}stringify(t,n){this.freeze();const i=Jr(n),l=this.compiler||this.Compiler;return Bu("stringify",l),Wm(t),l(t,i)}use(t,...n){const i=this.attachers,l=this.namespace;if(Uu("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):r(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else r(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function r(c){if(!("plugins"in c)&&!("settings"in c))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");s(c.plugins),c.settings&&(l.settings=Ou(!0,l.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,h=-1;for(;++f<i.length;)if(i[f][0]===c){h=f;break}if(h===-1)i.push([c,...d]);else if(d.length>0){let[p,...y]=d;const x=i[h][1];sf(x)&&sf(p)&&(p=Ou(!0,x,p)),i[h]=[c,p,...y]}}}}const Wj=new Vd().freeze();function Mu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uu(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 Wm(e){if(!sf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function eg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jr(e){return e_(e)?e:new Ib(e)}function e_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function t_(e){return typeof e=="string"||n_(e)}function n_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const i_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",tg=[],ng={allowDangerousHtml:!0},l_=/^(https?|ircs?|mailto|xmpp)$/i,a_=[{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 r_(e){const t=s_(e),n=o_(e);return u_(t.runSync(t.parse(n),n),e)}function s_(e){const t=e.rehypePlugins||tg,n=e.remarkPlugins||tg,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...ng}:ng;return Wj().use(FA).use(n).use(Mj,i).use(t)}function o_(e){const t=e.children||"",n=new Ib;return typeof t=="string"&&(n.value=t),n}function u_(e,t){const n=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,r=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||c_;for(const d of a_)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+i_+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Gd(e,c),kN(e,{Fragment:o.Fragment,components:l,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function c(d,f,h){if(d.type==="raw"&&h&&typeof f=="number")return r?h.children.splice(f,1):h.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let p;for(p in ju)if(Object.hasOwn(ju,p)&&Object.hasOwn(d.properties,p)){const y=d.properties[p],x=ju[p];(x===null||x.includes(d.tagName))&&(d.properties[p]=u(String(y||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!p&&i&&typeof f=="number"&&(p=!i(d,f,h)),p&&h&&typeof f=="number")return s&&d.children?h.children.splice(f,1,...d.children):h.children.splice(f,1),f}}}function c_(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||i!==-1&&t>i||l_.test(e.slice(0,t))?e:""}function ig(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=n.indexOf(t);for(;l!==-1;)i++,l=n.indexOf(t,l+t.length);return i}function f_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Hb(e,t,n){const l=Oo((n||{}).ignore||[]),a=d_(t);let r=-1;for(;++r<a.length;)Bb(e,"text",s);function s(c,d){let f=-1,h;for(;++f<d.length;){const p=d[f],y=h?h.children:void 0;if(l(p,y?y.indexOf(p):void 0,h))return;h=p}if(h)return u(c,d)}function u(c,d){const f=d[d.length-1],h=a[r][0],p=a[r][1];let y=0;const E=f.children.indexOf(c);let g=!1,m=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const C=v.index,A={index:v.index,input:v.input,stack:[...d,c]};let N=p(...v,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=C+1:(y!==C&&m.push({type:"text",value:c.value.slice(y,C)}),Array.isArray(N)?m.push(...N):N&&m.push(N),y=C+v[0].length,g=!0),!h.global)break;v=h.exec(c.value)}return g?(y<c.value.length&&m.push({type:"text",value:c.value.slice(y)}),f.children.splice(E,1,...m)):m=[c],E+m.length}}function d_(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 i=-1;for(;++i<n.length;){const l=n[i];t.push([h_(l[0]),p_(l[1])])}return t}function h_(e){return typeof e=="string"?new RegExp(f_(e),"g"):e}function p_(e){return typeof e=="function"?e:function(){return e}}const Iu="phrasing",Hu=["autolink","link","image","label"];function m_(){return{transforms:[E_],enter:{literalAutolink:y_,literalAutolinkEmail:qu,literalAutolinkHttp:qu,literalAutolinkWww:qu},exit:{literalAutolink:S_,literalAutolinkEmail:b_,literalAutolinkHttp:x_,literalAutolinkWww:v_}}}function g_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Iu,notInConstruct:Hu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Iu,notInConstruct:Hu},{character:":",before:"[ps]",after:"\\/",inConstruct:Iu,notInConstruct:Hu}]}}function y_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qu(e){this.config.enter.autolinkProtocol.call(this,e)}function x_(e){this.config.exit.autolinkProtocol.call(this,e)}function v_(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function b_(e){this.config.exit.autolinkEmail.call(this,e)}function S_(e){this.exit(e)}function E_(e){Hb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,C_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),T_]],{ignore:["link","linkReference"]})}function C_(e,t,n,i,l){let a="";if(!qb(l)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!k_(n)))return!1;const r=N_(n+i);if(!r[0])return!1;const s={type:"link",title:null,url:a+t+r[0],children:[{type:"text",value:t+r[0]}]};return r[1]?[s,{type:"text",value:r[1]}]:s}function T_(e,t,n,i){return!qb(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function k_(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 N_(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const l=ig(e,"(");let a=ig(e,")");for(;i!==-1&&l>a;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),a++;return[e,n]}function qb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||jo(n))&&(!t||n!==47)}Fb.peek=L_;function w_(){this.buffer()}function A_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function j_(){this.buffer()}function __(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function R_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function O_(e){this.exit(e)}function D_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z_(e){this.exit(e)}function L_(){return"["}function Fb(e,t,n,i){const l=n.createTracker(i);let a=l.move("[^");const r=n.enter("footnoteReference"),s=n.enter("reference");return a+=l.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),r(),a+=l.move("]"),a}function M_(){return{enter:{gfmFootnoteCallString:w_,gfmFootnoteCall:A_,gfmFootnoteDefinitionLabelString:j_,gfmFootnoteDefinition:__},exit:{gfmFootnoteCallString:R_,gfmFootnoteCall:O_,gfmFootnoteDefinitionLabelString:D_,gfmFootnoteDefinition:z_}}}function B_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Fb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,l,a,r){const s=a.createTracker(r);let u=s.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=s.move(a.safe(a.associationId(i),{before:u,after:"]"})),d(),u+=s.move("]:"),i.children&&i.children.length>0&&(s.shift(4),u+=s.move((t?`
74
- `:" ")+a.indentLines(a.containerFlow(i,s.current()),t?Gb:U_))),c(),u}}function U_(e,t,n){return t===0?e:Gb(e,t,n)}function Gb(e,t,n){return(n?"":" ")+e}const I_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Vb.peek=V_;function H_(){return{canContainEols:["delete"],enter:{strikethrough:F_},exit:{strikethrough:G_}}}function q_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:I_}],handlers:{delete:Vb}}}function F_(e){this.enter({type:"delete",children:[]},e)}function G_(e){this.exit(e)}function Vb(e,t,n,i){const l=n.createTracker(i),a=n.enter("strikethrough");let r=l.move("~~");return r+=n.containerPhrasing(e,{...l.current(),before:r,after:"~"}),r+=l.move("~~"),a(),r}function V_(){return"~"}function Y_(e){return e.length}function P_(e,t){const n=t||{},i=(n.align||[]).concat(),l=n.stringLength||Y_,a=[],r=[],s=[],u=[];let c=0,d=-1;for(;++d<e.length;){const x=[],E=[];let g=-1;for(e[d].length>c&&(c=e[d].length);++g<e[d].length;){const m=X_(e[d][g]);if(n.alignDelimiters!==!1){const v=l(m);E[g]=v,(u[g]===void 0||v>u[g])&&(u[g]=v)}x.push(m)}r[d]=x,s[d]=E}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<c;)a[f]=lg(i[f]);else{const x=lg(i);for(;++f<c;)a[f]=x}f=-1;const h=[],p=[];for(;++f<c;){const x=a[f];let E="",g="";x===99?(E=":",g=":"):x===108?E=":":x===114&&(g=":");let m=n.alignDelimiters===!1?1:Math.max(1,u[f]-E.length-g.length);const v=E+"-".repeat(m)+g;n.alignDelimiters!==!1&&(m=E.length+m+g.length,m>u[f]&&(u[f]=m),p[f]=m),h[f]=v}r.splice(1,0,h),s.splice(1,0,p),d=-1;const y=[];for(;++d<r.length;){const x=r[d],E=s[d];f=-1;const g=[];for(;++f<c;){const m=x[f]||"";let v="",C="";if(n.alignDelimiters!==!1){const A=u[f]-(E[f]||0),N=a[f];N===114?v=" ".repeat(A):N===99?A%2?(v=" ".repeat(A/2+.5),C=" ".repeat(A/2-.5)):(v=" ".repeat(A/2),C=v):C=" ".repeat(A)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(v),g.push(m),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&g.push("|")}y.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return y.join(`
75
- `)}function X_(e){return e==null?"":String(e)}function lg(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 Q_(e,t,n,i){const l=n.enter("blockquote"),a=n.createTracker(i);a.move("> "),a.shift(2);const r=n.indentLines(n.containerFlow(e,a.current()),Z_);return l(),r}function Z_(e,t,n){return">"+(n?"":" ")+e}function K_(e,t){return ag(e,t.inConstruct,!0)&&!ag(e,t.notInConstruct,!1)}function ag(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function rg(e,t,n,i){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
76
- `&&K_(n.stack,n.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
77
- `}function $_(e,t){const n=String(e);let i=n.indexOf(t),l=i,a=0,r=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++a>r&&(r=a):a=1,l=i+t.length,i=n.indexOf(t,l);return r}function J_(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 W_(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 e2(e,t,n,i){const l=W_(n),a=e.value||"",r=l==="`"?"GraveAccent":"Tilde";if(J_(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(a,t2);return f(),h}const s=n.createTracker(i),u=l.repeat(Math.max($_(a,l)+1,3)),c=n.enter("codeFenced");let d=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${r}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${r}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
72
+ `}),n}function Ym(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Pm(e,t){const n=Dj(e,t),i=n.one(e,void 0),l=Cj(n),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
73
+ `},l),a}function Uj(e,t){return e&&"run"in e?async function(n,i){const l=Pm(n,{file:i,...t});await e.run(l,i)}:function(n,i){return Pm(n,{file:i,...e||t})}}function Xm(e){if(e)throw e}var Ss=Object.prototype.hasOwnProperty,Hb=Object.prototype.toString,Qm=Object.defineProperty,Zm=Object.getOwnPropertyDescriptor,Km=function(t){return typeof Array.isArray=="function"?Array.isArray(t):Hb.call(t)==="[object Array]"},$m=function(t){if(!t||Hb.call(t)!=="[object Object]")return!1;var n=Ss.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&Ss.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var l;for(l in t);return typeof l>"u"||Ss.call(t,l)},Jm=function(t,n){Qm&&n.name==="__proto__"?Qm(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Wm=function(t,n){if(n==="__proto__")if(Ss.call(t,n)){if(Zm)return Zm(t,n).value}else return;return t[n]},Ij=function e(){var t,n,i,l,a,r,s=arguments[0],u=1,c=arguments.length,d=!1;for(typeof s=="boolean"&&(d=s,s=arguments[1]||{},u=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});u<c;++u)if(t=arguments[u],t!=null)for(n in t)i=Wm(s,n),l=Wm(t,n),s!==l&&(d&&l&&($m(l)||(a=Km(l)))?(a?(a=!1,r=i&&Km(i)?i:[]):r=i&&$m(i)?i:{},Jm(s,{name:n,newValue:e(d,r,l)})):typeof l<"u"&&Jm(s,{name:n,newValue:l}));return s};const Ou=mg(Ij);function sf(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 Hj(){const e=[],t={run:n,use:i};return t;function n(...l){let a=-1;const r=l.pop();if(typeof r!="function")throw new TypeError("Expected function as last argument, not "+r);s(null,...l);function s(u,...c){const d=e[++a];let f=-1;if(u){r(u);return}for(;++f<l.length;)(c[f]===null||c[f]===void 0)&&(c[f]=l[f]);l=c,d?qj(d,s)(...c):r(null,...c)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function qj(e,t){let n;return i;function i(...r){const s=e.length>r.length;let u;s&&r.push(l);try{u=e.apply(this,r)}catch(c){const d=c;if(s&&n)throw d;return l(d)}s||(u&&u.then&&typeof u.then=="function"?u.then(a,l):u instanceof Error?l(u):a(u))}function l(r,...s){n||(n=!0,t(r,...s))}function a(r){l(null,r)}}const sn={basename:Fj,dirname:Gj,extname:Vj,join:Yj,sep:"/"};function Fj(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');wr(e);let n=0,i=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){n=l+1;break}}else i<0&&(a=!0,i=l+1);return i<0?"":e.slice(n,i)}if(t===e)return"";let r=-1,s=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){n=l+1;break}}else r<0&&(a=!0,r=l+1),s>-1&&(e.codePointAt(l)===t.codePointAt(s--)?s<0&&(i=l):(s=-1,i=r));return n===i?i=r:i<0&&(i=e.length),e.slice(n,i)}function Gj(e){if(wr(e),e.length===0)return".";let t=-1,n=e.length,i;for(;--n;)if(e.codePointAt(n)===47){if(i){t=n;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function Vj(e){wr(e);let t=e.length,n=-1,i=0,l=-1,a=0,r;for(;t--;){const s=e.codePointAt(t);if(s===47){if(r){i=t+1;break}continue}n<0&&(r=!0,n=t+1),s===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||n<0||a===0||a===1&&l===n-1&&l===i+1?"":e.slice(l,n)}function Yj(...e){let t=-1,n;for(;++t<e.length;)wr(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Pj(n)}function Pj(e){wr(e);const t=e.codePointAt(0)===47;let n=Xj(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function Xj(e,t){let n="",i=0,l=-1,a=0,r=-1,s,u;for(;++r<=e.length;){if(r<e.length)s=e.codePointAt(r);else{if(s===47)break;s=47}if(s===47){if(!(l===r-1||a===1))if(l!==r-1&&a===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",i=0):(n=n.slice(0,u),i=n.length-1-n.lastIndexOf("/")),l=r,a=0;continue}}else if(n.length>0){n="",i=0,l=r,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+e.slice(l+1,r):n=e.slice(l+1,r),i=r-l-1;l=r,a=0}else s===46&&a>-1?a++:a=-1}return n}function wr(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const Qj={cwd:Zj};function Zj(){return"/"}function of(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function Kj(e){if(typeof e=="string")e=new URL(e);else if(!of(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 $j(e)}function $j(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const i=t.codePointAt(n+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Du=["history","path","basename","stem","extname","dirname"];class qb{constructor(t){let n;t?of(t)?n={path:t}:typeof t=="string"||Jj(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":Qj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Du.length;){const a=Du[i];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let l;for(l in n)Du.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?sn.basename(this.path):void 0}set basename(t){Lu(t,"basename"),zu(t,"basename"),this.path=sn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?sn.dirname(this.path):void 0}set dirname(t){eg(this.basename,"dirname"),this.path=sn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?sn.extname(this.path):void 0}set extname(t){if(zu(t,"extname"),eg(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=sn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){of(t)&&(t=Kj(t)),Lu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?sn.basename(this.path,this.extname):void 0}set stem(t){Lu(t,"stem"),zu(t,"stem"),this.path=sn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,i){const l=this.message(t,n,i);throw l.fatal=!0,l}info(t,n,i){const l=this.message(t,n,i);return l.fatal=void 0,l}message(t,n,i){const l=new tt(t,n,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function zu(e,t){if(e&&e.includes(sn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+sn.sep+"`")}function Lu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function eg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Jj(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const Wj=(function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a}),e_={}.hasOwnProperty;class Vd extends Wj{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=Hj()}copy(){const t=new Vd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Ou(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Uu("data",this.frozen),this.namespace[t]=n,this):e_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Uu("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,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=n.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Jr(t),i=this.parser||this.Parser;return Mu("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Mu("process",this.parser||this.Parser),Bu("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(a,r){const s=Jr(t),u=i.parse(s);i.run(u,s,function(d,f,h){if(d||!f||!h)return c(d);const p=f,y=i.stringify(p,h);i_(y)?h.value=y:h.result=y,c(d,h)});function c(d,f){d||!f?r(d):a?a(f):n(void 0,f)}}}processSync(t){let n=!1,i;return this.freeze(),Mu("processSync",this.parser||this.Parser),Bu("processSync",this.compiler||this.Compiler),this.process(t,l),ng("processSync","process",n),i;function l(a,r){n=!0,Xm(a),i=r}}run(t,n,i){tg(t),this.freeze();const l=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?a(void 0,i):new Promise(a);function a(r,s){const u=Jr(n);l.run(t,u,c);function c(d,f,h){const p=f||t;d?s(d):r?r(p):i(void 0,p,h)}}}runSync(t,n){let i=!1,l;return this.run(t,n,a),ng("runSync","run",i),l;function a(r,s){Xm(r),l=s,i=!0}}stringify(t,n){this.freeze();const i=Jr(n),l=this.compiler||this.Compiler;return Bu("stringify",l),tg(t),l(t,i)}use(t,...n){const i=this.attachers,l=this.namespace;if(Uu("use",this.frozen),t!=null)if(typeof t=="function")u(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):r(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(c){if(typeof c=="function")u(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[d,...f]=c;u(d,f)}else r(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function r(c){if(!("plugins"in c)&&!("settings"in c))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");s(c.plugins),c.settings&&(l.settings=Ou(!0,l.settings,c.settings))}function s(c){let d=-1;if(c!=null)if(Array.isArray(c))for(;++d<c.length;){const f=c[d];a(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function u(c,d){let f=-1,h=-1;for(;++f<i.length;)if(i[f][0]===c){h=f;break}if(h===-1)i.push([c,...d]);else if(d.length>0){let[p,...y]=d;const x=i[h][1];sf(x)&&sf(p)&&(p=Ou(!0,x,p)),i[h]=[c,p,...y]}}}}const t_=new Vd().freeze();function Mu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uu(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 tg(e){if(!sf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function ng(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Jr(e){return n_(e)?e:new qb(e)}function n_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function i_(e){return typeof e=="string"||l_(e)}function l_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const a_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ig=[],lg={allowDangerousHtml:!0},r_=/^(https?|ircs?|mailto|xmpp)$/i,s_=[{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 o_(e){const t=u_(e),n=c_(e);return f_(t.runSync(t.parse(n),n),e)}function u_(e){const t=e.rehypePlugins||ig,n=e.remarkPlugins||ig,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lg}:lg;return t_().use(VA).use(n).use(Uj,i).use(t)}function c_(e){const t=e.children||"",n=new qb;return typeof t=="string"&&(n.value=t),n}function f_(e,t){const n=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,r=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||d_;for(const d of s_)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+a_+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Gd(e,c),wN(e,{Fragment:o.Fragment,components:l,ignoreInvalidStyle:!0,jsx:o.jsx,jsxs:o.jsxs,passKeys:!0,passNode:!0});function c(d,f,h){if(d.type==="raw"&&h&&typeof f=="number")return r?h.children.splice(f,1):h.children[f]={type:"text",value:d.value},f;if(d.type==="element"){let p;for(p in ju)if(Object.hasOwn(ju,p)&&Object.hasOwn(d.properties,p)){const y=d.properties[p],x=ju[p];(x===null||x.includes(d.tagName))&&(d.properties[p]=u(String(y||""),p,d))}}if(d.type==="element"){let p=n?!n.includes(d.tagName):a?a.includes(d.tagName):!1;if(!p&&i&&typeof f=="number"&&(p=!i(d,f,h)),p&&h&&typeof f=="number")return s&&d.children?h.children.splice(f,1,...d.children):h.children.splice(f,1),f}}}function d_(e){const t=e.indexOf(":"),n=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||n!==-1&&t>n||i!==-1&&t>i||r_.test(e.slice(0,t))?e:""}function ag(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=n.indexOf(t);for(;l!==-1;)i++,l=n.indexOf(t,l+t.length);return i}function h_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Fb(e,t,n){const l=Oo((n||{}).ignore||[]),a=p_(t);let r=-1;for(;++r<a.length;)Ib(e,"text",s);function s(c,d){let f=-1,h;for(;++f<d.length;){const p=d[f],y=h?h.children:void 0;if(l(p,y?y.indexOf(p):void 0,h))return;h=p}if(h)return u(c,d)}function u(c,d){const f=d[d.length-1],h=a[r][0],p=a[r][1];let y=0;const E=f.children.indexOf(c);let g=!1,m=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const C=v.index,A={index:v.index,input:v.input,stack:[...d,c]};let N=p(...v,A);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=C+1:(y!==C&&m.push({type:"text",value:c.value.slice(y,C)}),Array.isArray(N)?m.push(...N):N&&m.push(N),y=C+v[0].length,g=!0),!h.global)break;v=h.exec(c.value)}return g?(y<c.value.length&&m.push({type:"text",value:c.value.slice(y)}),f.children.splice(E,1,...m)):m=[c],E+m.length}}function p_(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 i=-1;for(;++i<n.length;){const l=n[i];t.push([m_(l[0]),g_(l[1])])}return t}function m_(e){return typeof e=="string"?new RegExp(h_(e),"g"):e}function g_(e){return typeof e=="function"?e:function(){return e}}const Iu="phrasing",Hu=["autolink","link","image","label"];function y_(){return{transforms:[T_],enter:{literalAutolink:v_,literalAutolinkEmail:qu,literalAutolinkHttp:qu,literalAutolinkWww:qu},exit:{literalAutolink:C_,literalAutolinkEmail:E_,literalAutolinkHttp:b_,literalAutolinkWww:S_}}}function x_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Iu,notInConstruct:Hu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Iu,notInConstruct:Hu},{character:":",before:"[ps]",after:"\\/",inConstruct:Iu,notInConstruct:Hu}]}}function v_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qu(e){this.config.enter.autolinkProtocol.call(this,e)}function b_(e){this.config.exit.autolinkProtocol.call(this,e)}function S_(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 E_(e){this.config.exit.autolinkEmail.call(this,e)}function C_(e){this.exit(e)}function T_(e){Fb(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,k_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),N_]],{ignore:["link","linkReference"]})}function k_(e,t,n,i,l){let a="";if(!Gb(l)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!w_(n)))return!1;const r=A_(n+i);if(!r[0])return!1;const s={type:"link",title:null,url:a+t+r[0],children:[{type:"text",value:t+r[0]}]};return r[1]?[s,{type:"text",value:r[1]}]:s}function N_(e,t,n,i){return!Gb(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function w_(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 A_(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],i=n.indexOf(")");const l=ag(e,"(");let a=ag(e,")");for(;i!==-1&&l>a;)e+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),a++;return[e,n]}function Gb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||jo(n))&&(!t||n!==47)}Vb.peek=B_;function j_(){this.buffer()}function __(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function R_(){this.buffer()}function O_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function D_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function z_(e){this.exit(e)}function L_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=tn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function M_(e){this.exit(e)}function B_(){return"["}function Vb(e,t,n,i){const l=n.createTracker(i);let a=l.move("[^");const r=n.enter("footnoteReference"),s=n.enter("reference");return a+=l.move(n.safe(n.associationId(e),{after:"]",before:a})),s(),r(),a+=l.move("]"),a}function U_(){return{enter:{gfmFootnoteCallString:j_,gfmFootnoteCall:__,gfmFootnoteDefinitionLabelString:R_,gfmFootnoteDefinition:O_},exit:{gfmFootnoteCallString:D_,gfmFootnoteCall:z_,gfmFootnoteDefinitionLabelString:L_,gfmFootnoteDefinition:M_}}}function I_(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Vb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,l,a,r){const s=a.createTracker(r);let u=s.move("[^");const c=a.enter("footnoteDefinition"),d=a.enter("label");return u+=s.move(a.safe(a.associationId(i),{before:u,after:"]"})),d(),u+=s.move("]:"),i.children&&i.children.length>0&&(s.shift(4),u+=s.move((t?`
74
+ `:" ")+a.indentLines(a.containerFlow(i,s.current()),t?Yb:H_))),c(),u}}function H_(e,t,n){return t===0?e:Yb(e,t,n)}function Yb(e,t,n){return(n?"":" ")+e}const q_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Pb.peek=P_;function F_(){return{canContainEols:["delete"],enter:{strikethrough:V_},exit:{strikethrough:Y_}}}function G_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:q_}],handlers:{delete:Pb}}}function V_(e){this.enter({type:"delete",children:[]},e)}function Y_(e){this.exit(e)}function Pb(e,t,n,i){const l=n.createTracker(i),a=n.enter("strikethrough");let r=l.move("~~");return r+=n.containerPhrasing(e,{...l.current(),before:r,after:"~"}),r+=l.move("~~"),a(),r}function P_(){return"~"}function X_(e){return e.length}function Q_(e,t){const n=t||{},i=(n.align||[]).concat(),l=n.stringLength||X_,a=[],r=[],s=[],u=[];let c=0,d=-1;for(;++d<e.length;){const x=[],E=[];let g=-1;for(e[d].length>c&&(c=e[d].length);++g<e[d].length;){const m=Z_(e[d][g]);if(n.alignDelimiters!==!1){const v=l(m);E[g]=v,(u[g]===void 0||v>u[g])&&(u[g]=v)}x.push(m)}r[d]=x,s[d]=E}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<c;)a[f]=rg(i[f]);else{const x=rg(i);for(;++f<c;)a[f]=x}f=-1;const h=[],p=[];for(;++f<c;){const x=a[f];let E="",g="";x===99?(E=":",g=":"):x===108?E=":":x===114&&(g=":");let m=n.alignDelimiters===!1?1:Math.max(1,u[f]-E.length-g.length);const v=E+"-".repeat(m)+g;n.alignDelimiters!==!1&&(m=E.length+m+g.length,m>u[f]&&(u[f]=m),p[f]=m),h[f]=v}r.splice(1,0,h),s.splice(1,0,p),d=-1;const y=[];for(;++d<r.length;){const x=r[d],E=s[d];f=-1;const g=[];for(;++f<c;){const m=x[f]||"";let v="",C="";if(n.alignDelimiters!==!1){const A=u[f]-(E[f]||0),N=a[f];N===114?v=" ".repeat(A):N===99?A%2?(v=" ".repeat(A/2+.5),C=" ".repeat(A/2-.5)):(v=" ".repeat(A/2),C=v):C=" ".repeat(A)}n.delimiterStart!==!1&&!f&&g.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&m==="")&&(n.delimiterStart!==!1||f)&&g.push(" "),n.alignDelimiters!==!1&&g.push(v),g.push(m),n.alignDelimiters!==!1&&g.push(C),n.padding!==!1&&g.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&g.push("|")}y.push(n.delimiterEnd===!1?g.join("").replace(/ +$/,""):g.join(""))}return y.join(`
75
+ `)}function Z_(e){return e==null?"":String(e)}function rg(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 K_(e,t,n,i){const l=n.enter("blockquote"),a=n.createTracker(i);a.move("> "),a.shift(2);const r=n.indentLines(n.containerFlow(e,a.current()),$_);return l(),r}function $_(e,t,n){return">"+(n?"":" ")+e}function J_(e,t){return sg(e,t.inConstruct,!0)&&!sg(e,t.notInConstruct,!1)}function sg(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function og(e,t,n,i){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
76
+ `&&J_(n.stack,n.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
77
+ `}function W_(e,t){const n=String(e);let i=n.indexOf(t),l=i,a=0,r=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++a>r&&(r=a):a=1,l=i+t.length,i=n.indexOf(t,l);return r}function e2(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 t2(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 n2(e,t,n,i){const l=t2(n),a=e.value||"",r=l==="`"?"GraveAccent":"Tilde";if(e2(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(a,i2);return f(),h}const s=n.createTracker(i),u=l.repeat(Math.max(W_(a,l)+1,3)),c=n.enter("codeFenced");let d=s.move(u);if(e.lang){const f=n.enter(`codeFencedLang${r}`);d+=s.move(n.safe(e.lang,{before:d,after:" ",encode:["`"],...s.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${r}`);d+=s.move(" "),d+=s.move(n.safe(e.meta,{before:d,after:`
78
78
  `,encode:["`"],...s.current()})),f()}return d+=s.move(`
79
79
  `),a&&(d+=s.move(a+`
80
- `)),d+=s.move(u),c(),d}function t2(e,t,n){return(n?"":" ")+e}function Yd(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 n2(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.enter("definition");let s=n.enter("label");const u=n.createTracker(i);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(s=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
81
- `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=u.move(" "+l),c+=u.move(n.safe(e.title,{before:c,after:l,...u.current()})),c+=u.move(l),s()),r(),c}function i2(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 or(e){return"&#x"+e.toString(16).toUpperCase()+";"}function no(e,t,n){const i=Vl(e),l=Vl(t);return i===void 0?l===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Yb.peek=l2;function Yb(e,t,n,i){const l=i2(n),a=n.enter("emphasis"),r=n.createTracker(i),s=r.move(l);let u=r.move(n.containerPhrasing(e,{after:l,before:s,...r.current()}));const c=u.charCodeAt(0),d=no(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=or(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=no(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+or(f));const p=r.move(l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function l2(e,t,n){return n.options.emphasis||"*"}function a2(e,t){let n=!1;return Gd(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,af}),!!((!e.depth||e.depth<3)&&Md(e)&&(t.options.setext||n))}function r2(e,t,n,i){const l=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(i);if(a2(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
80
+ `)),d+=s.move(u),c(),d}function i2(e,t,n){return(n?"":" ")+e}function Yd(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 l2(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.enter("definition");let s=n.enter("label");const u=n.createTracker(i);let c=u.move("[");return c+=u.move(n.safe(n.associationId(e),{before:c,after:"]",...u.current()})),c+=u.move("]: "),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(s=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":`
81
+ `,...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=u.move(" "+l),c+=u.move(n.safe(e.title,{before:c,after:l,...u.current()})),c+=u.move(l),s()),r(),c}function a2(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 or(e){return"&#x"+e.toString(16).toUpperCase()+";"}function no(e,t,n){const i=Vl(e),l=Vl(t);return i===void 0?l===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Xb.peek=r2;function Xb(e,t,n,i){const l=a2(n),a=n.enter("emphasis"),r=n.createTracker(i),s=r.move(l);let u=r.move(n.containerPhrasing(e,{after:l,before:s,...r.current()}));const c=u.charCodeAt(0),d=no(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=or(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=no(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+or(f));const p=r.move(l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function r2(e,t,n){return n.options.emphasis||"*"}function s2(e,t){let n=!1;return Gd(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,af}),!!((!e.depth||e.depth<3)&&Md(e)&&(t.options.setext||n))}function o2(e,t,n,i){const l=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(i);if(s2(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
82
82
  `,after:`
83
83
  `});return f(),d(),h+`
84
84
  `+(l===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
85
85
  `))+1))}const r="#".repeat(l),s=n.enter("headingAtx"),u=n.enter("phrasing");a.move(r+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
86
- `,...a.current()});return/^[\t ]/.test(c)&&(c=or(c.charCodeAt(0))+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),u(),s(),c}Pb.peek=s2;function Pb(e){return e.value||""}function s2(){return"<"}Xb.peek=o2;function Xb(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.enter("image");let s=n.enter("label");const u=n.createTracker(i);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(s=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=u.move(" "+l),c+=u.move(n.safe(e.title,{before:c,after:l,...u.current()})),c+=u.move(l),s()),c+=u.move(")"),r(),c}function o2(){return"!"}Qb.peek=u2;function Qb(e,t,n,i){const l=e.referenceType,a=n.enter("imageReference");let r=n.enter("label");const s=n.createTracker(i);let u=s.move("![");const c=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(c+"]["),r();const d=n.stack;n.stack=[],r=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return r(),n.stack=d,a(),l==="full"||!c||c!==f?u+=s.move(f+"]"):l==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function u2(){return"!"}Zb.peek=c2;function Zb(e,t,n){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<n.unsafe.length;){const r=n.unsafe[a],s=n.compilePattern(r);let u;if(r.atBreak)for(;u=s.exec(i);){let c=u.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(u.index+1)}}return l+i+l}function c2(){return"`"}function Kb(e,t){const n=Md(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))}$b.peek=f2;function $b(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let s,u;if(Kb(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let f=r.move("<");return f+=r.move(n.containerPhrasing(e,{before:f,after:">",...r.current()})),f+=r.move(">"),s(),n.stack=d,f}s=n.enter("link"),u=n.enter("label");let c=r.move("[");return c+=r.move(n.containerPhrasing(e,{before:c,after:"](",...r.current()})),c+=r.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=r.move("<"),c+=r.move(n.safe(e.url,{before:c,after:">",...r.current()})),c+=r.move(">")):(u=n.enter("destinationRaw"),c+=r.move(n.safe(e.url,{before:c,after:e.title?" ":")",...r.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=r.move(" "+l),c+=r.move(n.safe(e.title,{before:c,after:l,...r.current()})),c+=r.move(l),u()),c+=r.move(")"),s(),c}function f2(e,t,n){return Kb(e,n)?"<":"["}Jb.peek=d2;function Jb(e,t,n,i){const l=e.referenceType,a=n.enter("linkReference");let r=n.enter("label");const s=n.createTracker(i);let u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(c+"]["),r();const d=n.stack;n.stack=[],r=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return r(),n.stack=d,a(),l==="full"||!c||c!==f?u+=s.move(f+"]"):l==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function d2(){return"["}function Pd(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 h2(e){const t=Pd(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 p2(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 Wb(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 m2(e,t,n,i){const l=n.enter("list"),a=n.bulletCurrent;let r=e.ordered?p2(n):Pd(n);const s=e.ordered?r==="."?")":".":h2(n);let u=t&&n.bulletLastUsed?r===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&d&&(!d.children||!d.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&&(u=!0),Wb(n)===r&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(r=s),n.bulletCurrent=r;const c=n.containerFlow(e,i);return n.bulletLastUsed=r,n.bulletCurrent=a,l(),c}function g2(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 y2(e,t,n,i){const l=g2(n);let a=n.bulletCurrent||Pd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let r=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(r=Math.ceil(r/4)*4);const s=n.createTracker(i);s.move(a+" ".repeat(r-a.length)),s.shift(r);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),d);return u(),c;function d(f,h,p){return h?(p?"":" ".repeat(r))+f:(p?a:a+" ".repeat(r-a.length))+f}}function x2(e,t,n,i){const l=n.enter("paragraph"),a=n.enter("phrasing"),r=n.containerPhrasing(e,i);return a(),l(),r}const v2=Oo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function b2(e,t,n,i){return(e.children.some(function(r){return v2(r)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function S2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}e0.peek=E2;function e0(e,t,n,i){const l=S2(n),a=n.enter("strong"),r=n.createTracker(i),s=r.move(l+l);let u=r.move(n.containerPhrasing(e,{after:l,before:s,...r.current()}));const c=u.charCodeAt(0),d=no(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=or(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=no(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+or(f));const p=r.move(l+l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function E2(e,t,n){return n.options.strong||"*"}function C2(e,t,n,i){return n.safe(e.value,i)}function T2(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 k2(e,t,n){const i=(Wb(n)+(n.options.ruleSpaces?" ":"")).repeat(T2(n));return n.options.ruleSpaces?i.slice(0,-1):i}const t0={blockquote:Q_,break:rg,code:e2,definition:n2,emphasis:Yb,hardBreak:rg,heading:r2,html:Pb,image:Xb,imageReference:Qb,inlineCode:Zb,link:$b,linkReference:Jb,list:m2,listItem:y2,paragraph:x2,root:b2,strong:e0,text:C2,thematicBreak:k2};function N2(){return{enter:{table:w2,tableData:sg,tableHeader:sg,tableRow:j2},exit:{codeText:_2,table:A2,tableData:Fu,tableHeader:Fu,tableRow:Fu}}}function w2(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 A2(e){this.exit(e),this.data.inTable=void 0}function j2(e){this.enter({type:"tableRow",children:[]},e)}function Fu(e){this.exit(e)}function sg(e){this.enter({type:"tableCell",children:[]},e)}function _2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,R2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function R2(e,t){return t==="|"?t:e}function O2(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
86
+ `,...a.current()});return/^[\t ]/.test(c)&&(c=or(c.charCodeAt(0))+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),u(),s(),c}Qb.peek=u2;function Qb(e){return e.value||""}function u2(){return"<"}Zb.peek=c2;function Zb(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.enter("image");let s=n.enter("label");const u=n.createTracker(i);let c=u.move("![");return c+=u.move(n.safe(e.alt,{before:c,after:"]",...u.current()})),c+=u.move("]("),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter("destinationLiteral"),c+=u.move("<"),c+=u.move(n.safe(e.url,{before:c,after:">",...u.current()})),c+=u.move(">")):(s=n.enter("destinationRaw"),c+=u.move(n.safe(e.url,{before:c,after:e.title?" ":")",...u.current()}))),s(),e.title&&(s=n.enter(`title${a}`),c+=u.move(" "+l),c+=u.move(n.safe(e.title,{before:c,after:l,...u.current()})),c+=u.move(l),s()),c+=u.move(")"),r(),c}function c2(){return"!"}Kb.peek=f2;function Kb(e,t,n,i){const l=e.referenceType,a=n.enter("imageReference");let r=n.enter("label");const s=n.createTracker(i);let u=s.move("![");const c=n.safe(e.alt,{before:u,after:"]",...s.current()});u+=s.move(c+"]["),r();const d=n.stack;n.stack=[],r=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return r(),n.stack=d,a(),l==="full"||!c||c!==f?u+=s.move(f+"]"):l==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function f2(){return"!"}$b.peek=d2;function $b(e,t,n){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<n.unsafe.length;){const r=n.unsafe[a],s=n.compilePattern(r);let u;if(r.atBreak)for(;u=s.exec(i);){let c=u.index;i.charCodeAt(c)===10&&i.charCodeAt(c-1)===13&&c--,i=i.slice(0,c)+" "+i.slice(u.index+1)}}return l+i+l}function d2(){return"`"}function Jb(e,t){const n=Md(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))}Wb.peek=h2;function Wb(e,t,n,i){const l=Yd(n),a=l==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let s,u;if(Jb(e,n)){const d=n.stack;n.stack=[],s=n.enter("autolink");let f=r.move("<");return f+=r.move(n.containerPhrasing(e,{before:f,after:">",...r.current()})),f+=r.move(">"),s(),n.stack=d,f}s=n.enter("link"),u=n.enter("label");let c=r.move("[");return c+=r.move(n.containerPhrasing(e,{before:c,after:"](",...r.current()})),c+=r.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),c+=r.move("<"),c+=r.move(n.safe(e.url,{before:c,after:">",...r.current()})),c+=r.move(">")):(u=n.enter("destinationRaw"),c+=r.move(n.safe(e.url,{before:c,after:e.title?" ":")",...r.current()}))),u(),e.title&&(u=n.enter(`title${a}`),c+=r.move(" "+l),c+=r.move(n.safe(e.title,{before:c,after:l,...r.current()})),c+=r.move(l),u()),c+=r.move(")"),s(),c}function h2(e,t,n){return Jb(e,n)?"<":"["}e0.peek=p2;function e0(e,t,n,i){const l=e.referenceType,a=n.enter("linkReference");let r=n.enter("label");const s=n.createTracker(i);let u=s.move("[");const c=n.containerPhrasing(e,{before:u,after:"]",...s.current()});u+=s.move(c+"]["),r();const d=n.stack;n.stack=[],r=n.enter("reference");const f=n.safe(n.associationId(e),{before:u,after:"]",...s.current()});return r(),n.stack=d,a(),l==="full"||!c||c!==f?u+=s.move(f+"]"):l==="shortcut"?u=u.slice(0,-1):u+=s.move("]"),u}function p2(){return"["}function Pd(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 m2(e){const t=Pd(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 g2(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 t0(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 y2(e,t,n,i){const l=n.enter("list"),a=n.bulletCurrent;let r=e.ordered?g2(n):Pd(n);const s=e.ordered?r==="."?")":".":m2(n);let u=t&&n.bulletLastUsed?r===n.bulletLastUsed:!1;if(!e.ordered){const d=e.children?e.children[0]:void 0;if((r==="*"||r==="-")&&d&&(!d.children||!d.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&&(u=!0),t0(n)===r&&d){let f=-1;for(;++f<e.children.length;){const h=e.children[f];if(h&&h.type==="listItem"&&h.children&&h.children[0]&&h.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(r=s),n.bulletCurrent=r;const c=n.containerFlow(e,i);return n.bulletLastUsed=r,n.bulletCurrent=a,l(),c}function x2(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 v2(e,t,n,i){const l=x2(n);let a=n.bulletCurrent||Pd(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let r=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(r=Math.ceil(r/4)*4);const s=n.createTracker(i);s.move(a+" ".repeat(r-a.length)),s.shift(r);const u=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,s.current()),d);return u(),c;function d(f,h,p){return h?(p?"":" ".repeat(r))+f:(p?a:a+" ".repeat(r-a.length))+f}}function b2(e,t,n,i){const l=n.enter("paragraph"),a=n.enter("phrasing"),r=n.containerPhrasing(e,i);return a(),l(),r}const S2=Oo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function E2(e,t,n,i){return(e.children.some(function(r){return S2(r)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function C2(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}n0.peek=T2;function n0(e,t,n,i){const l=C2(n),a=n.enter("strong"),r=n.createTracker(i),s=r.move(l+l);let u=r.move(n.containerPhrasing(e,{after:l,before:s,...r.current()}));const c=u.charCodeAt(0),d=no(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=or(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=no(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+or(f));const p=r.move(l+l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function T2(e,t,n){return n.options.strong||"*"}function k2(e,t,n,i){return n.safe(e.value,i)}function N2(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 w2(e,t,n){const i=(t0(n)+(n.options.ruleSpaces?" ":"")).repeat(N2(n));return n.options.ruleSpaces?i.slice(0,-1):i}const i0={blockquote:K_,break:og,code:n2,definition:l2,emphasis:Xb,hardBreak:og,heading:o2,html:Qb,image:Zb,imageReference:Kb,inlineCode:$b,link:Wb,linkReference:e0,list:y2,listItem:v2,paragraph:b2,root:E2,strong:n0,text:k2,thematicBreak:w2};function A2(){return{enter:{table:j2,tableData:ug,tableHeader:ug,tableRow:R2},exit:{codeText:O2,table:_2,tableData:Fu,tableHeader:Fu,tableRow:Fu}}}function j2(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 _2(e){this.exit(e),this.data.inTable=void 0}function R2(e){this.enter({type:"tableRow",children:[]},e)}function Fu(e){this.exit(e)}function ug(e){this.enter({type:"tableCell",children:[]},e)}function O2(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,D2));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function D2(e,t){return t==="|"?t:e}function z2(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
87
87
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:h,table:r,tableCell:u,tableRow:s}};function r(p,y,x,E){return c(d(p,x,E),p.align)}function s(p,y,x,E){const g=f(p,x,E),m=c([g]);return m.slice(0,m.indexOf(`
88
- `))}function u(p,y,x,E){const g=x.enter("tableCell"),m=x.enter("phrasing"),v=x.containerPhrasing(p,{...E,before:a,after:a});return m(),g(),v}function c(p,y){return P_(p,{align:y,alignDelimiters:i,padding:n,stringLength:l})}function d(p,y,x){const E=p.children;let g=-1;const m=[],v=y.enter("table");for(;++g<E.length;)m[g]=f(E[g],y,x);return v(),m}function f(p,y,x){const E=p.children;let g=-1;const m=[],v=y.enter("tableRow");for(;++g<E.length;)m[g]=u(E[g],p,y,x);return v(),m}function h(p,y,x){let E=t0.inlineCode(p,y,x);return x.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function D2(){return{exit:{taskListCheckValueChecked:og,taskListCheckValueUnchecked:og,paragraph:L2}}}function z2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:M2}}}function og(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function L2(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 i=n.children[0];if(i&&i.type==="text"){const l=t.children;let a=-1,r;for(;++a<l.length;){const s=l[a];if(s.type==="paragraph"){r=s;break}}r===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function M2(e,t,n,i){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",s=n.createTracker(i);a&&s.move(r);let u=t0.listItem(e,t,n,{...i,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+r}}function B2(){return[m_(),M_(),H_(),N2(),D2()]}function U2(e){return{extensions:[g_(),B_(e),q_(),O2(e),z2()]}}const I2={tokenize:Y2,partial:!0},n0={tokenize:P2,partial:!0},i0={tokenize:X2,partial:!0},l0={tokenize:Q2,partial:!0},H2={tokenize:Z2,partial:!0},a0={name:"wwwAutolink",tokenize:G2,previous:s0},r0={name:"protocolAutolink",tokenize:V2,previous:o0},Fn={name:"emailAutolink",tokenize:F2,previous:u0},vn={};function q2(){return{text:vn}}let ji=48;for(;ji<123;)vn[ji]=Fn,ji++,ji===58?ji=65:ji===91&&(ji=97);vn[43]=Fn;vn[45]=Fn;vn[46]=Fn;vn[95]=Fn;vn[72]=[Fn,r0];vn[104]=[Fn,r0];vn[87]=[Fn,a0];vn[119]=[Fn,a0];function F2(e,t,n){const i=this;let l,a;return r;function r(f){return!uf(f)||!u0.call(i,i.previous)||Xd(i.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return uf(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(H2,d,c)(f):f===45||f===95||et(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),l=!0,u}function d(f){return a&&l&&it(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function G2(e,t,n){const i=this;return l;function l(r){return r!==87&&r!==119||!s0.call(i,i.previous)||Xd(i.events)?n(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(I2,e.attempt(n0,e.attempt(i0,a),n),n)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}}function V2(e,t,n){const i=this;let l="",a=!1;return r;function r(f){return(f===72||f===104)&&o0.call(i,i.previous)&&!Xd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(it(f)&&l.length<5)return l+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=l.toLowerCase();if(h==="http"||h==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||Ws(f)||xe(f)||Xi(f)||jo(f)?n(f):e.attempt(n0,e.attempt(i0,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Y2(e,t,n){let i=0;return l;function l(r){return(r===87||r===119)&&i<3?(i++,e.consume(r),l):r===46&&i===3?(e.consume(r),a):n(r)}function a(r){return r===null?n(r):t(r)}}function P2(e,t,n){let i,l,a;return r;function r(c){return c===46||c===95?e.check(l0,u,s)(c):c===null||xe(c)||Xi(c)||c!==45&&jo(c)?u(c):(a=!0,e.consume(c),r)}function s(c){return c===95?i=!0:(l=i,i=void 0),e.consume(c),r}function u(c){return l||i||!a?n(c):t(c)}}function X2(e,t){let n=0,i=0;return l;function l(r){return r===40?(n++,e.consume(r),l):r===41&&i<n?a(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(l0,t,a)(r):r===null||xe(r)||Xi(r)?t(r):(e.consume(r),l)}function a(r){return r===41&&i++,e.consume(r),l}}function Q2(e,t,n){return i;function i(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),i):s===38?(e.consume(s),a):s===93?(e.consume(s),l):s===60||s===null||xe(s)||Xi(s)?t(s):n(s)}function l(s){return s===null||s===40||s===91||xe(s)||Xi(s)?t(s):i(s)}function a(s){return it(s)?r(s):n(s)}function r(s){return s===59?(e.consume(s),i):it(s)?(e.consume(s),r):n(s)}}function Z2(e,t,n){return i;function i(a){return e.consume(a),l}function l(a){return et(a)?n(a):t(a)}}function s0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function o0(e){return!it(e)}function u0(e){return!(e===47||uf(e))}function uf(e){return e===43||e===45||e===46||e===95||et(e)}function Xd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const K2={tokenize:lR,partial:!0};function $2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tR,continuation:{tokenize:nR},exit:iR}},text:{91:{name:"gfmFootnoteCall",tokenize:eR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:J2,resolveTo:W2}}}}function J2(e,t,n){const i=this;let l=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let r;for(;l--;){const u=i.events[l][1];if(u.type==="labelImage"){r=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!r||!r._balanced)return n(u);const c=tn(i.sliceSerialize({start:r.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function W2(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 i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",r,t],["exit",r,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...s),e}function eR(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,r;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!r||f===null||f===91||xe(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return l.includes(tn(i.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return xe(f)||(r=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function tR(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,r=0,s;return u;function u(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(r>999||y===93&&!s||y===null||y===91||xe(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=tn(i.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return xe(y)||(s=!0),r++,e.consume(y),y===92?f:d}function f(y){return y===91||y===92||y===93?(e.consume(y),r++,d):d(y)}function h(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),l.includes(a)||l.push(a),oe(e,p,"gfmFootnoteDefinitionWhitespace")):n(y)}function p(y){return t(y)}}function nR(e,t,n){return e.check(Nr,t,e.attempt(K2,t,n))}function iR(e){e.exit("gfmFootnoteDefinition")}function lR(e,t,n){const i=this;return oe(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?t(a):n(a)}}function aR(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:l};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(r,s){let u=-1;for(;++u<r.length;)if(r[u][0]==="enter"&&r[u][1].type==="strikethroughSequenceTemporary"&&r[u][1]._close){let c=u;for(;c--;)if(r[c][0]==="exit"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._open&&r[u][1].end.offset-r[u][1].start.offset===r[c][1].end.offset-r[c][1].start.offset){r[u][1].type="strikethroughSequence",r[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},r[c][1].start),end:Object.assign({},r[u][1].end)},f={type:"strikethroughText",start:Object.assign({},r[c][1].end),end:Object.assign({},r[u][1].start)},h=[["enter",d,s],["enter",r[c][1],s],["exit",r[c][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&At(h,h.length,0,_o(p,r.slice(c+1,u),s)),At(h,h.length,0,[["exit",f,s],["enter",r[u][1],s],["exit",r[u][1],s],["exit",d,s]]),At(r,c-1,u-c+3,h),u=c+h.length-2;break}}for(u=-1;++u<r.length;)r[u][1].type==="strikethroughSequenceTemporary"&&(r[u][1].type="data");return r}function a(r,s,u){const c=this.previous,d=this.events;let f=0;return h;function h(y){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(y):(r.enter("strikethroughSequenceTemporary"),p(y))}function p(y){const x=Vl(c);if(y===126)return f>1?u(y):(r.consume(y),f++,p);if(f<2&&!n)return u(y);const E=r.exit("strikethroughSequenceTemporary"),g=Vl(y);return E._open=!g||g===2&&!!x,E._close=!x||x===2&&!!g,s(y)}}}class rR{constructor(){this.map=[]}add(t,n,i){sR(this,t,n,i)}consume(t){if(this.map.sort(function(a,r){return a[0]-r[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const a of l)t.push(a);l=i.pop()}this.map.length=0}}function sR(e,t,n,i){let l=0;if(!(n===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...i);return}l+=1}e.map.push([t,n,i])}}function oR(e,t){let n=!1;const i=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function uR(){return{flow:{null:{name:"table",tokenize:cR,resolveAll:fR}}}}function cR(e,t,n){const i=this;let l=0,a=0,r;return s;function s(T){let M=i.events.length-1;for(;M>-1;){const F=i.events[M][1].type;if(F==="lineEnding"||F==="linePrefix")M--;else break}const q=M>-1?i.events[M][1].type:null,P=q==="tableHead"||q==="tableRow"?N:u;return P===N&&i.parser.lazy[i.now().line]?n(T):P(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(r=!0,a+=1),d(T)}function d(T){return T===null?n(T):Q(T)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):n(T):ne(T)?oe(e,d,"whitespace")(T):(a+=1,r&&(r=!1,l+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),r=!0,d):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||xe(T)?(e.exit("data"),d(T)):(e.consume(T),T===92?h:f)}function h(T){return T===92||T===124?(e.consume(T),f):f(T)}function p(T){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(T):(e.enter("tableDelimiterRow"),r=!1,ne(T)?oe(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):y(T))}function y(T){return T===45||T===58?E(T):T===124?(r=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),x):A(T)}function x(T){return ne(T)?oe(e,E,"whitespace")(T):E(T)}function E(T){return T===58?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),g):T===45?(a+=1,g(T)):T===null||Q(T)?C(T):A(T)}function g(T){return T===45?(e.enter("tableDelimiterFiller"),m(T)):A(T)}function m(T){return T===45?(e.consume(T),m):T===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(T))}function v(T){return ne(T)?oe(e,C,"whitespace")(T):C(T)}function C(T){return T===124?y(T):T===null||Q(T)?!r||l!==a?A(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):A(T)}function A(T){return n(T)}function N(T){return e.enter("tableRow"),_(T)}function _(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),_):T===null||Q(T)?(e.exit("tableRow"),t(T)):ne(T)?oe(e,_,"whitespace")(T):(e.enter("data"),U(T))}function U(T){return T===null||T===124||xe(T)?(e.exit("data"),_(T)):(e.consume(T),T===92?D:U)}function D(T){return T===92||T===124?(e.consume(T),U):U(T)}}function fR(e,t){let n=-1,i=!0,l=0,a=[0,0,0,0],r=[0,0,0,0],s=!1,u=0,c,d,f;const h=new rR;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(s=!1,u!==0&&(ug(h,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(i=!0,f=void 0,a=[0,0,0,0],r=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",d,t]])),l=y.type==="tableDelimiterRow"?2:d?3:1):l&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(a[1]!==0&&(r[0]=r[1],f=Wr(h,t,a,l,void 0,f),a=[0,0,0,0]),r[2]=n)):y.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(r[0]=r[1],f=Wr(h,t,a,l,void 0,f)),a=r,r=[a[1],n,0,0])):y.type==="tableHead"?(s=!0,u=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(u=n,a[1]!==0?(r[0]=r[1],f=Wr(h,t,a,l,n,f)):r[1]!==0&&(f=Wr(h,t,r,l,n,f)),l=0):l&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(r[3]=n)}for(u!==0&&ug(h,t,u,c,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=oR(t.events,n))}return e}function Wr(e,t,n,i,l,a){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},fl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=fl(t.events,n[1]);if(a={type:r,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=fl(t.events,n[2]),d=fl(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),i!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return l!==void 0&&(a.end=Object.assign({},fl(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function ug(e,t,n,i,l){const a=[],r=fl(t.events,n);l&&(l.end=Object.assign({},r),a.push(["exit",l,t])),i.end=Object.assign({},r),a.push(["exit",i,t]),e.add(n+1,0,a)}function fl(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const dR={name:"tasklistCheck",tokenize:pR};function hR(){return{text:{91:dR}}}function pR(e,t,n){const i=this;return l;function l(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return xe(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),r):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),r):n(u)}function r(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Q(u)?t(u):ne(u)?e.check({tokenize:mR},t,n)(u):n(u)}}function mR(e,t,n){return oe(e,i,"whitespace");function i(l){return l===null?n(l):t(l)}}function gR(e){return xb([q2(),$2(),aR(e),uR(),hR()])}const yR={};function xR(e){const t=this,n=e||yR,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(gR(n)),a.push(B2()),r.push(U2(n))}function vR(e){Hb(e,[/\r?\n|\r/g,bR])}function bR(){return{type:"break"}}function SR(){return function(e){vR(e)}}function c0({content:e}){return o.jsx("div",{className:"context-markdownXXX",children:o.jsx(r_,{remarkPlugins:[xR,SR],children:e.replace(/\\n/g,`
89
- `)})})}function ER({commands:e,selectedIndex:t,position:n,onSelect:i,onCancel:l}){const a=b.useRef(null);return b.useEffect(()=>{const r=s=>{a.current&&!a.current.contains(s.target)&&l()};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[l]),e.length===0?null:o.jsx("div",{ref:a,className:"slash-command-menu",style:{left:`${n.x}px`,top:`${n.y}px`},role:"listbox","aria-label":"Slash commands",children:e.map((r,s)=>o.jsxs("button",{type:"button",className:`slash-command-item ${s===t?"selected":""}`,onClick:()=>i(r),role:"option","aria-selected":s===t,children:[o.jsx("div",{className:"slash-command-label",children:r.label}),o.jsx("div",{className:"slash-command-description",children:r.description})]},r.id))})}const CR=[{id:"h1",label:"/h1",trigger:"h1",markdown:{before:"# "},description:"Heading 1"},{id:"h2",label:"/h2",trigger:"h2",markdown:{before:"## "},description:"Heading 2"},{id:"h3",label:"/h3",trigger:"h3",markdown:{before:"### "},description:"Heading 3"},{id:"h4",label:"/h4",trigger:"h4",markdown:{before:"#### "},description:"Heading 4"},{id:"h5",label:"/h5",trigger:"h5",markdown:{before:"##### "},description:"Heading 5"},{id:"h6",label:"/h6",trigger:"h6",markdown:{before:"###### "},description:"Heading 6"},{id:"bold",label:"/bold",trigger:"bold",markdown:{before:"**",after:"**"},description:"Bold text"},{id:"italic",label:"/italic",trigger:"italic",markdown:{before:"_",after:"_"},description:"Italic text"},{id:"code",label:"/code",trigger:"code",markdown:{before:"`",after:"`"},description:"Inline code"},{id:"codeblock",label:"/codeblock",trigger:"codeblock",markdown:{before:"```\n",after:"\n```"},description:"Code block"},{id:"table",label:"/table",trigger:"table",markdown:{before:`| Column 1 | Column 2 |
88
+ `))}function u(p,y,x,E){const g=x.enter("tableCell"),m=x.enter("phrasing"),v=x.containerPhrasing(p,{...E,before:a,after:a});return m(),g(),v}function c(p,y){return Q_(p,{align:y,alignDelimiters:i,padding:n,stringLength:l})}function d(p,y,x){const E=p.children;let g=-1;const m=[],v=y.enter("table");for(;++g<E.length;)m[g]=f(E[g],y,x);return v(),m}function f(p,y,x){const E=p.children;let g=-1;const m=[],v=y.enter("tableRow");for(;++g<E.length;)m[g]=u(E[g],p,y,x);return v(),m}function h(p,y,x){let E=i0.inlineCode(p,y,x);return x.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function L2(){return{exit:{taskListCheckValueChecked:cg,taskListCheckValueUnchecked:cg,paragraph:B2}}}function M2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:U2}}}function cg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function B2(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 i=n.children[0];if(i&&i.type==="text"){const l=t.children;let a=-1,r;for(;++a<l.length;){const s=l[a];if(s.type==="paragraph"){r=s;break}}r===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function U2(e,t,n,i){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",r="["+(e.checked?"x":" ")+"] ",s=n.createTracker(i);a&&s.move(r);let u=i0.listItem(e,t,n,{...i,...s.current()});return a&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),u;function c(d){return d+r}}function I2(){return[y_(),U_(),F_(),A2(),L2()]}function H2(e){return{extensions:[x_(),I_(e),G_(),z2(e),M2()]}}const q2={tokenize:X2,partial:!0},l0={tokenize:Q2,partial:!0},a0={tokenize:Z2,partial:!0},r0={tokenize:K2,partial:!0},F2={tokenize:$2,partial:!0},s0={name:"wwwAutolink",tokenize:Y2,previous:u0},o0={name:"protocolAutolink",tokenize:P2,previous:c0},Fn={name:"emailAutolink",tokenize:V2,previous:f0},vn={};function G2(){return{text:vn}}let ji=48;for(;ji<123;)vn[ji]=Fn,ji++,ji===58?ji=65:ji===91&&(ji=97);vn[43]=Fn;vn[45]=Fn;vn[46]=Fn;vn[95]=Fn;vn[72]=[Fn,o0];vn[104]=[Fn,o0];vn[87]=[Fn,s0];vn[119]=[Fn,s0];function V2(e,t,n){const i=this;let l,a;return r;function r(f){return!uf(f)||!f0.call(i,i.previous)||Xd(i.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return uf(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(F2,d,c)(f):f===45||f===95||et(f)?(a=!0,e.consume(f),u):d(f)}function c(f){return e.consume(f),l=!0,u}function d(f){return a&&l&&it(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Y2(e,t,n){const i=this;return l;function l(r){return r!==87&&r!==119||!u0.call(i,i.previous)||Xd(i.events)?n(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(q2,e.attempt(l0,e.attempt(a0,a),n),n)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}}function P2(e,t,n){const i=this;let l="",a=!1;return r;function r(f){return(f===72||f===104)&&c0.call(i,i.previous)&&!Xd(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(f),e.consume(f),s):n(f)}function s(f){if(it(f)&&l.length<5)return l+=String.fromCodePoint(f),e.consume(f),s;if(f===58){const h=l.toLowerCase();if(h==="http"||h==="https")return e.consume(f),u}return n(f)}function u(f){return f===47?(e.consume(f),a?c:(a=!0,u)):n(f)}function c(f){return f===null||Ws(f)||xe(f)||Xi(f)||jo(f)?n(f):e.attempt(l0,e.attempt(a0,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function X2(e,t,n){let i=0;return l;function l(r){return(r===87||r===119)&&i<3?(i++,e.consume(r),l):r===46&&i===3?(e.consume(r),a):n(r)}function a(r){return r===null?n(r):t(r)}}function Q2(e,t,n){let i,l,a;return r;function r(c){return c===46||c===95?e.check(r0,u,s)(c):c===null||xe(c)||Xi(c)||c!==45&&jo(c)?u(c):(a=!0,e.consume(c),r)}function s(c){return c===95?i=!0:(l=i,i=void 0),e.consume(c),r}function u(c){return l||i||!a?n(c):t(c)}}function Z2(e,t){let n=0,i=0;return l;function l(r){return r===40?(n++,e.consume(r),l):r===41&&i<n?a(r):r===33||r===34||r===38||r===39||r===41||r===42||r===44||r===46||r===58||r===59||r===60||r===63||r===93||r===95||r===126?e.check(r0,t,a)(r):r===null||xe(r)||Xi(r)?t(r):(e.consume(r),l)}function a(r){return r===41&&i++,e.consume(r),l}}function K2(e,t,n){return i;function i(s){return s===33||s===34||s===39||s===41||s===42||s===44||s===46||s===58||s===59||s===63||s===95||s===126?(e.consume(s),i):s===38?(e.consume(s),a):s===93?(e.consume(s),l):s===60||s===null||xe(s)||Xi(s)?t(s):n(s)}function l(s){return s===null||s===40||s===91||xe(s)||Xi(s)?t(s):i(s)}function a(s){return it(s)?r(s):n(s)}function r(s){return s===59?(e.consume(s),i):it(s)?(e.consume(s),r):n(s)}}function $2(e,t,n){return i;function i(a){return e.consume(a),l}function l(a){return et(a)?n(a):t(a)}}function u0(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function c0(e){return!it(e)}function f0(e){return!(e===47||uf(e))}function uf(e){return e===43||e===45||e===46||e===95||et(e)}function Xd(e){let t=e.length,n=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const J2={tokenize:rR,partial:!0};function W2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:iR,continuation:{tokenize:lR},exit:aR}},text:{91:{name:"gfmFootnoteCall",tokenize:nR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:eR,resolveTo:tR}}}}function eR(e,t,n){const i=this;let l=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let r;for(;l--;){const u=i.events[l][1];if(u.type==="labelImage"){r=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return s;function s(u){if(!r||!r._balanced)return n(u);const c=tn(i.sliceSerialize({start:r.end,end:i.now()}));return c.codePointAt(0)!==94||!a.includes(c.slice(1))?n(u):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),t(u))}}function tR(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 i={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},r={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],["enter",i,t],e[n+3],e[n+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",r,t],["exit",r,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(n,e.length-n+1,...s),e}function nR(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,r;return s;function s(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),u}function u(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(a>999||f===93&&!r||f===null||f===91||xe(f))return n(f);if(f===93){e.exit("chunkString");const h=e.exit("gfmFootnoteCallString");return l.includes(tn(i.sliceSerialize(h)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return xe(f)||(r=!0),a++,e.consume(f),f===92?d:c}function d(f){return f===91||f===92||f===93?(e.consume(f),a++,c):c(f)}}function iR(e,t,n){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,r=0,s;return u;function u(y){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(y){return y===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",d):n(y)}function d(y){if(r>999||y===93&&!s||y===null||y===91||xe(y))return n(y);if(y===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=tn(i.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(y),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),h}return xe(y)||(s=!0),r++,e.consume(y),y===92?f:d}function f(y){return y===91||y===92||y===93?(e.consume(y),r++,d):d(y)}function h(y){return y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),l.includes(a)||l.push(a),oe(e,p,"gfmFootnoteDefinitionWhitespace")):n(y)}function p(y){return t(y)}}function lR(e,t,n){return e.check(Nr,t,e.attempt(J2,t,n))}function aR(e){e.exit("gfmFootnoteDefinition")}function rR(e,t,n){const i=this;return oe(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const r=i.events[i.events.length-1];return r&&r[1].type==="gfmFootnoteDefinitionIndent"&&r[2].sliceSerialize(r[1],!0).length===4?t(a):n(a)}}function sR(e){let n=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:l};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(r,s){let u=-1;for(;++u<r.length;)if(r[u][0]==="enter"&&r[u][1].type==="strikethroughSequenceTemporary"&&r[u][1]._close){let c=u;for(;c--;)if(r[c][0]==="exit"&&r[c][1].type==="strikethroughSequenceTemporary"&&r[c][1]._open&&r[u][1].end.offset-r[u][1].start.offset===r[c][1].end.offset-r[c][1].start.offset){r[u][1].type="strikethroughSequence",r[c][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},r[c][1].start),end:Object.assign({},r[u][1].end)},f={type:"strikethroughText",start:Object.assign({},r[c][1].end),end:Object.assign({},r[u][1].start)},h=[["enter",d,s],["enter",r[c][1],s],["exit",r[c][1],s],["enter",f,s]],p=s.parser.constructs.insideSpan.null;p&&At(h,h.length,0,_o(p,r.slice(c+1,u),s)),At(h,h.length,0,[["exit",f,s],["enter",r[u][1],s],["exit",r[u][1],s],["exit",d,s]]),At(r,c-1,u-c+3,h),u=c+h.length-2;break}}for(u=-1;++u<r.length;)r[u][1].type==="strikethroughSequenceTemporary"&&(r[u][1].type="data");return r}function a(r,s,u){const c=this.previous,d=this.events;let f=0;return h;function h(y){return c===126&&d[d.length-1][1].type!=="characterEscape"?u(y):(r.enter("strikethroughSequenceTemporary"),p(y))}function p(y){const x=Vl(c);if(y===126)return f>1?u(y):(r.consume(y),f++,p);if(f<2&&!n)return u(y);const E=r.exit("strikethroughSequenceTemporary"),g=Vl(y);return E._open=!g||g===2&&!!x,E._close=!x||x===2&&!!g,s(y)}}}class oR{constructor(){this.map=[]}add(t,n,i){uR(this,t,n,i)}consume(t){if(this.map.sort(function(a,r){return a[0]-r[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const a of l)t.push(a);l=i.pop()}this.map.length=0}}function uR(e,t,n,i){let l=0;if(!(n===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=n,e.map[l][2].push(...i);return}l+=1}e.map.push([t,n,i])}}function cR(e,t){let n=!1;const i=[];for(;t<e.length;){const l=e[t];if(n){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return i}function fR(){return{flow:{null:{name:"table",tokenize:dR,resolveAll:hR}}}}function dR(e,t,n){const i=this;let l=0,a=0,r;return s;function s(T){let M=i.events.length-1;for(;M>-1;){const F=i.events[M][1].type;if(F==="lineEnding"||F==="linePrefix")M--;else break}const q=M>-1?i.events[M][1].type:null,P=q==="tableHead"||q==="tableRow"?N:u;return P===N&&i.parser.lazy[i.now().line]?n(T):P(T)}function u(T){return e.enter("tableHead"),e.enter("tableRow"),c(T)}function c(T){return T===124||(r=!0,a+=1),d(T)}function d(T){return T===null?n(T):Q(T)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):n(T):ne(T)?oe(e,d,"whitespace")(T):(a+=1,r&&(r=!1,l+=1),T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),r=!0,d):(e.enter("data"),f(T)))}function f(T){return T===null||T===124||xe(T)?(e.exit("data"),d(T)):(e.consume(T),T===92?h:f)}function h(T){return T===92||T===124?(e.consume(T),f):f(T)}function p(T){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(T):(e.enter("tableDelimiterRow"),r=!1,ne(T)?oe(e,y,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):y(T))}function y(T){return T===45||T===58?E(T):T===124?(r=!0,e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),x):A(T)}function x(T){return ne(T)?oe(e,E,"whitespace")(T):E(T)}function E(T){return T===58?(a+=1,r=!0,e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),g):T===45?(a+=1,g(T)):T===null||Q(T)?C(T):A(T)}function g(T){return T===45?(e.enter("tableDelimiterFiller"),m(T)):A(T)}function m(T){return T===45?(e.consume(T),m):T===58?(r=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(T),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(T))}function v(T){return ne(T)?oe(e,C,"whitespace")(T):C(T)}function C(T){return T===124?y(T):T===null||Q(T)?!r||l!==a?A(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):A(T)}function A(T){return n(T)}function N(T){return e.enter("tableRow"),_(T)}function _(T){return T===124?(e.enter("tableCellDivider"),e.consume(T),e.exit("tableCellDivider"),_):T===null||Q(T)?(e.exit("tableRow"),t(T)):ne(T)?oe(e,_,"whitespace")(T):(e.enter("data"),I(T))}function I(T){return T===null||T===124||xe(T)?(e.exit("data"),_(T)):(e.consume(T),T===92?D:I)}function D(T){return T===92||T===124?(e.consume(T),I):I(T)}}function hR(e,t){let n=-1,i=!0,l=0,a=[0,0,0,0],r=[0,0,0,0],s=!1,u=0,c,d,f;const h=new oR;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(s=!1,u!==0&&(fg(h,t,u,c,d),d=void 0,u=0),c={type:"table",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",c,t]])):y.type==="tableRow"||y.type==="tableDelimiterRow"?(i=!0,f=void 0,a=[0,0,0,0],r=[0,n+1,0,0],s&&(s=!1,d={type:"tableBody",start:Object.assign({},y.start),end:Object.assign({},y.end)},h.add(n,0,[["enter",d,t]])),l=y.type==="tableDelimiterRow"?2:d?3:1):l&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")?(i=!1,r[2]===0&&(a[1]!==0&&(r[0]=r[1],f=Wr(h,t,a,l,void 0,f),a=[0,0,0,0]),r[2]=n)):y.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(r[0]=r[1],f=Wr(h,t,a,l,void 0,f)),a=r,r=[a[1],n,0,0])):y.type==="tableHead"?(s=!0,u=n):y.type==="tableRow"||y.type==="tableDelimiterRow"?(u=n,a[1]!==0?(r[0]=r[1],f=Wr(h,t,a,l,n,f)):r[1]!==0&&(f=Wr(h,t,r,l,n,f)),l=0):l&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(r[3]=n)}for(u!==0&&fg(h,t,u,c,d),h.consume(t.events),n=-1;++n<t.events.length;){const p=t.events[n];p[0]==="enter"&&p[1].type==="table"&&(p[1]._align=cR(t.events,n))}return e}function Wr(e,t,n,i,l,a){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},fl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=fl(t.events,n[1]);if(a={type:r,start:Object.assign({},u),end:Object.assign({},u)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const c=fl(t.events,n[2]),d=fl(t.events,n[3]),f={type:s,start:Object.assign({},c),end:Object.assign({},d)};if(e.add(n[2],0,[["enter",f,t]]),i!==2){const h=t.events[n[2]],p=t.events[n[3]];if(h[1].end=Object.assign({},p[1].end),h[1].type="chunkText",h[1].contentType="text",n[3]>n[2]+1){const y=n[2]+1,x=n[3]-n[2]-1;e.add(y,x,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return l!==void 0&&(a.end=Object.assign({},fl(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function fg(e,t,n,i,l){const a=[],r=fl(t.events,n);l&&(l.end=Object.assign({},r),a.push(["exit",l,t])),i.end=Object.assign({},r),a.push(["exit",i,t]),e.add(n+1,0,a)}function fl(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const pR={name:"tasklistCheck",tokenize:gR};function mR(){return{text:{91:pR}}}function gR(e,t,n){const i=this;return l;function l(u){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(u):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),a)}function a(u){return xe(u)?(e.enter("taskListCheckValueUnchecked"),e.consume(u),e.exit("taskListCheckValueUnchecked"),r):u===88||u===120?(e.enter("taskListCheckValueChecked"),e.consume(u),e.exit("taskListCheckValueChecked"),r):n(u)}function r(u){return u===93?(e.enter("taskListCheckMarker"),e.consume(u),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),s):n(u)}function s(u){return Q(u)?t(u):ne(u)?e.check({tokenize:yR},t,n)(u):n(u)}}function yR(e,t,n){return oe(e,i,"whitespace");function i(l){return l===null?n(l):t(l)}}function xR(e){return bb([G2(),W2(),sR(e),fR(),mR()])}const vR={};function bR(e){const t=this,n=e||vR,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(xR(n)),a.push(I2()),r.push(H2(n))}function SR(e){Fb(e,[/\r?\n|\r/g,ER])}function ER(){return{type:"break"}}function CR(){return function(e){SR(e)}}function d0({content:e}){return o.jsx("div",{className:"context-markdownXXX",children:o.jsx(o_,{remarkPlugins:[bR,CR],children:e.replace(/\\n/g,`
89
+ `)})})}function TR({commands:e,selectedIndex:t,position:n,onSelect:i,onCancel:l}){const a=b.useRef(null);return b.useEffect(()=>{const r=s=>{a.current&&!a.current.contains(s.target)&&l()};return document.addEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[l]),e.length===0?null:o.jsx("div",{ref:a,className:"slash-command-menu",style:{left:`${n.x}px`,top:`${n.y}px`},role:"listbox","aria-label":"Slash commands",children:e.map((r,s)=>o.jsxs("button",{type:"button",className:`slash-command-item ${s===t?"selected":""}`,onClick:()=>i(r),role:"option","aria-selected":s===t,children:[o.jsx("div",{className:"slash-command-label",children:r.label}),o.jsx("div",{className:"slash-command-description",children:r.description})]},r.id))})}const kR=[{id:"h1",label:"/h1",trigger:"h1",markdown:{before:"# "},description:"Heading 1"},{id:"h2",label:"/h2",trigger:"h2",markdown:{before:"## "},description:"Heading 2"},{id:"h3",label:"/h3",trigger:"h3",markdown:{before:"### "},description:"Heading 3"},{id:"h4",label:"/h4",trigger:"h4",markdown:{before:"#### "},description:"Heading 4"},{id:"h5",label:"/h5",trigger:"h5",markdown:{before:"##### "},description:"Heading 5"},{id:"h6",label:"/h6",trigger:"h6",markdown:{before:"###### "},description:"Heading 6"},{id:"bold",label:"/bold",trigger:"bold",markdown:{before:"**",after:"**"},description:"Bold text"},{id:"italic",label:"/italic",trigger:"italic",markdown:{before:"_",after:"_"},description:"Italic text"},{id:"code",label:"/code",trigger:"code",markdown:{before:"`",after:"`"},description:"Inline code"},{id:"codeblock",label:"/codeblock",trigger:"codeblock",markdown:{before:"```\n",after:"\n```"},description:"Code block"},{id:"table",label:"/table",trigger:"table",markdown:{before:`| Column 1 | Column 2 |
90
90
  | --- | --- |
91
91
  | | |`},description:"Insert table"},{id:"list",label:"/list",trigger:"list",markdown:{before:"- "},description:"Bullet list"},{id:"numbered",label:"/numbered",trigger:"numbered",markdown:{before:"1. "},description:"Numbered list"},{id:"quote",label:"/quote",trigger:"quote",markdown:{before:"> "},description:"Block quote"},{id:"divider",label:"/divider",trigger:"div",markdown:{before:`
92
92
  ---
93
- `},description:"Horizontal divider"},{id:"link",label:"/link",trigger:"link",markdown:{before:"[",after:"](url)"},description:"Insert link"}];function TR(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function kR(e){return CR.map(t=>TR(t,e))}function NR({value:e,onChange:t,placeholder:n,disabled:i}){const l=b.useRef(null),[a,r]=b.useState({active:!1,query:"",position:{x:0,y:0},selectedIndex:0,startPosition:0}),u=kR((y,x="")=>{if(!l.current)return;const E=l.current,g=a.startPosition,m=E.selectionEnd,v=e.substring(0,g),C=e.substring(m),A=v+y+x+C;t(A),r({...a,active:!1}),setTimeout(()=>{const N=g+y.length;E.focus(),E.setSelectionRange(N,N)},0)}),c=a.query?u.filter(y=>y.label.toLowerCase().includes(a.query.toLowerCase())):u,d=y=>{if(!a.active){if(y.key==="/"){const x=l.current;if(!x)return;const E=x.selectionStart,g=e.substring(0,E);if(E===0||g[E-1].match(/\s/)){const m=x.getBoundingClientRect(),v=24,C=g.split(`
94
- `).length;r({active:!0,query:"",position:{x:m.left+16,y:m.top+C*v+40},selectedIndex:0,startPosition:E})}}return}switch(y.key){case"Escape":y.preventDefault(),r({...a,active:!1});break;case"ArrowDown":y.preventDefault(),r({...a,selectedIndex:(a.selectedIndex+1)%c.length});break;case"ArrowUp":y.preventDefault(),r({...a,selectedIndex:a.selectedIndex===0?c.length-1:a.selectedIndex-1});break;case"Enter":case"Tab":y.preventDefault(),c[a.selectedIndex]&&c[a.selectedIndex].action();break;case"Backspace":const x=l.current;x&&x.selectionStart<=a.startPosition&&r({...a,active:!1});break}},f=y=>{const x=y.target.value;if(t(x),a.active&&l.current){const E=l.current.selectionStart,g=x.substring(a.startPosition+1,E);r({...a,query:g,selectedIndex:0})}},h=y=>{y.action()},p=()=>{r({...a,active:!1})};return o.jsx("div",{className:"rich-editor",children:o.jsxs("div",{className:"rich-editor-panes",children:[o.jsxs("div",{className:"rich-editor-pane rich-editor-edit",children:[o.jsx("div",{className:"rich-editor-label",children:"Edit"}),o.jsx("textarea",{ref:l,className:"rich-editor-textarea",value:e,onChange:f,onKeyDown:d,placeholder:n||"Write in markdown...",disabled:i,"aria-label":"Markdown editor"}),a.active&&o.jsx(ER,{commands:c,selectedIndex:a.selectedIndex,position:a.position,onSelect:h,onCancel:p})]}),o.jsxs("div",{className:"rich-editor-pane rich-editor-preview",children:[o.jsx("div",{className:"rich-editor-label",children:"Preview"}),o.jsx("div",{className:"rich-editor-preview-content",children:e?o.jsx(c0,{content:e}):o.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function wR(e,t){const n=new Set,i=[e];for(;i.length>0;){const l=i.shift();n.add(l),t.filter(r=>{const s=r.parentId;return typeof s=="string"&&s===l}).forEach(r=>i.push(r.id))}return n}function f0({mode:e,page:t,pages:n,onSubmit:i,onCancel:l,isSubmitting:a,defaultParentId:r}){var v;const[s,u]=b.useState((t==null?void 0:t.title)||""),[c,d]=b.useState((t==null?void 0:t.content)||""),[f,h]=b.useState(((v=t==null?void 0:t.tags)==null?void 0:v.map(C=>C.name))||[]),[p,y]=b.useState(()=>{if(e==="create"&&r)return r;const C=t==null?void 0:t.parentId;return typeof C=="string"?C:null}),[x,E]=b.useState(""),g=b.useMemo(()=>{if(e==="create")return n;{const C=wR(t.id,n);return n.filter(A=>!C.has(A.id))}},[e,n,t]);b.useEffect(()=>{const C=A=>{A.key==="Escape"&&l()};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[l]);const m=async C=>{var A,N;C.preventDefault();try{if(e==="create"){const _={title:s.trim(),content:c.trim(),...f.length>0&&{tagNames:f},...p&&{parentId:p}};await i(_)}else{const _={};let U=!1;s!==t.title&&(_.title=s,U=!0),c!==t.content&&(_.content=c,U=!0);const D=((A=t.tags)==null?void 0:A.map(q=>q.name))||[];JSON.stringify(f.sort())!==JSON.stringify(D.sort())&&(_.tagNames=f,U=!0);const M=typeof t.parentId=="string"?t.parentId:null;if(p!==M&&(_.parentId=p,U=!0),!U){E("No changes to save");return}await i(_)}E("")}catch(_){const U=((N=_==null?void 0:_.body)==null?void 0:N.detail)||(_==null?void 0:_.message)||`Failed to ${e==="create"?"create":"update"} page`;E(U)}};return o.jsxs("form",{className:"context-form",onSubmit:m,children:[x&&o.jsx("div",{className:"context-error",style:{margin:"0 0 16px 0"},children:x}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-title`,children:"Title *"}),o.jsx("input",{id:`${e}-title`,type:"text",value:s,onChange:C=>u(C.target.value),placeholder:"Give your page a headline",required:!0,disabled:a})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-parent`,children:"Parent Page"}),o.jsxs("select",{id:`${e}-parent`,value:p??"",onChange:C=>y(C.target.value||null),disabled:a,children:[o.jsx("option",{value:"",children:"None (top level)"}),g.map(C=>o.jsx("option",{value:C.id,children:C.title},C.id))]})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-content`,children:"Content *"}),o.jsx(NR,{value:c,onChange:d,placeholder:"Write in markdown or use / for commands",disabled:a})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-tags`,children:"Tags"}),o.jsx(Ak,{value:f,onChange:h,placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"context-form-actions",children:[o.jsx("button",{type:"button",className:"context-button secondary",onClick:l,disabled:a,children:"Cancel"}),o.jsx("button",{type:"submit",className:"context-button primary",disabled:a,children:a?"Saving…":e==="create"?"Create page":"Save Changes"})]})]})}function cg(){const e=Je(),{pageId:t}=Wi(),{pages:n,isCreating:i,createPage:l,getPageTree:a}=Tr(),r=async s=>{const u=await l(s);await a(),e(`/context/page/${u.id}`)};return o.jsxs("div",{className:"context-edit-container",children:[o.jsxs("div",{className:"context-edit-header",children:[o.jsx("h2",{children:"New Page"}),o.jsx("button",{onClick:()=>e("/context"),className:"context-button secondary",children:"Close"})]}),o.jsx(f0,{mode:"create",pages:n,onSubmit:r,onCancel:()=>e("/context"),isSubmitting:i,defaultParentId:t})]})}function Qd({message:e,onConfirm:t,onCancel:n,confirmText:i="Confirm",cancelText:l="Cancel"}){return o.jsx("div",{className:"confirm-overlay",onClick:n,children:o.jsxs("div",{className:"confirm-dialog",onClick:a=>a.stopPropagation(),children:[o.jsx("div",{className:"confirm-message",children:e}),o.jsxs("div",{className:"confirm-actions",children:[o.jsx("button",{onClick:n,className:"btn-secondary",children:l}),o.jsx("button",{onClick:t,className:"btn-danger",children:i})]})]})})}function AR(e,t){const n=[];let i=e;for(;i;){const l=t.find(r=>r.id===i);if(!l)break;n.unshift(l);const a=l.parentId;i=typeof a=="string"?a:null}return n}function jR({pageId:e,pages:t}){const n=AR(e,t);return o.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[o.jsx(Pi,{to:"/context",className:"breadcrumb-link",children:"Home"}),n.map((i,l)=>o.jsxs("span",{className:"breadcrumb-item",children:[o.jsx("span",{className:"breadcrumb-separator",children:" > "}),l===n.length-1?o.jsx("span",{className:"breadcrumb-current",children:i.title}):o.jsx(Pi,{to:`/context/page/${i.id}`,className:"breadcrumb-link",children:i.title})]},i.id))]})}function fg(e){try{return new Date(e).toLocaleString()}catch{return e}}function _R(){const{pageId:e}=Wi(),t=Je(),{pages:n,selectedPage:i,isLoadingPage:l,isUpdating:a,isDeleting:r,error:s,selectPage:u,deletePage:c,getPageTree:d}=Tr(),[f,h]=b.useState(!1),[p,y]=b.useState("");tl(i!=null&&i.title?`Context — ${i.title}`:"Context"),b.useEffect(()=>{e&&u(e)},[e,u]);const x=b.useCallback(()=>{h(!0)},[]),E=b.useCallback(async()=>{var g;if(e)try{await c(e),h(!1),await d(),t("/context")}catch(m){const v=((g=m==null?void 0:m.body)==null?void 0:g.detail)||(m==null?void 0:m.message)||"Failed to delete page";y(v),h(!1)}},[e,c,t,d]);return o.jsxs(o.Fragment,{children:[l&&o.jsx("div",{className:"context-status",children:"Loading page…"}),s&&o.jsx("div",{className:"context-error",children:s}),p&&o.jsx("div",{className:"context-error",children:p}),i&&e&&o.jsxs("div",{className:"context-page-detail",children:[o.jsx(jR,{pageId:e,pages:n}),o.jsxs("div",{className:"context-page-detail-header",children:[o.jsx("h1",{className:"context-page-detail-title",children:i.title}),o.jsxs("div",{className:"context-page-detail-meta",children:[o.jsxs("span",{children:["By ",i.createdBy||"unknown"]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["Created ",fg(i.createdAt)]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["Last edited ",fg(i.updatedAt)]})]})]}),i.tags&&i.tags.length>0&&o.jsx("div",{className:"context-page-detail-tags",children:i.tags.map(g=>o.jsx(ib,{tag:g},g.name))}),o.jsx("div",{className:"context-page-detail-content",children:o.jsx(c0,{content:i.content})}),o.jsxs("div",{className:"context-page-detail-actions",children:[o.jsx("button",{className:"context-button",type:"button",onClick:()=>t(`/context/page/${e}/edit`),disabled:a||r,children:"Edit"}),o.jsx("button",{className:"context-button context-button-danger",type:"button",onClick:x,disabled:a||r,children:"Delete"})]})]}),f&&o.jsx(Qd,{message:"Are you sure you want to delete this page? This action cannot be undone.",onConfirm:E,onCancel:()=>h(!1),confirmText:"Delete",cancelText:"Cancel"})]})}function RR(){const{pageId:e}=Wi(),t=Je(),{selectedPage:n,pages:i,isUpdating:l,updatePage:a,getPageTree:r,selectPage:s}=Tr();b.useEffect(()=>{e&&s(e)},[e,s]);const u=b.useCallback(async c=>{e&&(await a(e,c),await r(),t(`/context/page/${e}`))},[e,a,r,t]);return n?o.jsxs("div",{className:"context-edit-container",children:[o.jsxs("div",{className:"context-edit-header",children:[o.jsx("h2",{children:"Edit Page"}),o.jsx("button",{onClick:()=>t(`/context/page/${e}`),className:"context-button secondary",children:"Close"})]}),o.jsx(f0,{mode:"edit",page:n,pages:i,onSubmit:u,onCancel:()=>t(`/context/page/${e}`),isSubmitting:l})]}):o.jsx("div",{className:"context-status",children:"Loading..."})}B.BASE=el;const d0=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null),[u,c]=b.useState([]),[d,f]=b.useState([]),[h,p]=b.useState([]);b.useEffect(()=>{y()},[]);const y=async()=>{t(!0),i(null);try{const D=await ct.mcpRegistryControllerListServers();a(D.items||[])}catch(D){i(D instanceof Error?D.message:"Failed to load servers")}finally{t(!1)}},x=async D=>{t(!0),i(null);try{const[T,M,q]=await Promise.all([ct.mcpRegistryControllerGetServer(D),ct.mcpRegistryControllerListScopes(D),ct.mcpRegistryControllerListConnections(D)]);if(s(T),c(M||[]),f(q||[]),M&&M.length>0){const P=[];for(const F of M)try{const V=await ct.mcpRegistryControllerListMappings(D,F.id);V&&P.push(...V)}catch(V){console.error(`Failed to load mappings for scope ${F.id}`,V)}p(P)}}catch(T){i(T instanceof Error?T.message:"Failed to load server details")}finally{t(!1)}};return{isLoading:e,error:n,servers:l,selectedServer:r,scopes:u,connections:d,mappings:h,loadServers:y,loadServerDetails:x,createServer:async D=>{t(!0),i(null);try{const T=await ct.mcpRegistryControllerCreateServer({...D,type:D.type??Gc.type.HTTP});return await y(),T}catch(T){throw i(T instanceof Error?T.message:"Failed to create server"),T}finally{t(!1)}},updateServer:async(D,T)=>{t(!0),i(null);try{const M=await ct.mcpRegistryControllerUpdateServer(D,T);return(r==null?void 0:r.id)===D&&s(M),await y(),M}catch(M){throw i(M instanceof Error?M.message:"Failed to update server"),M}finally{t(!1)}},createScope:async(D,T,M)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateScopes(D,[{id:T,description:M}]),(r==null?void 0:r.id)===D&&await x(D)}catch(q){throw i(q instanceof Error?q.message:"Failed to create scope"),q}finally{t(!1)}},createConnection:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateConnection(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to create connection"),M}finally{t(!1)}},updateConnection:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerUpdateConnection(D,T),r&&await x(r.id)}catch(M){throw i(M instanceof Error?M.message:"Failed to update connection"),M}finally{t(!1)}},createMapping:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateMapping(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to create mapping"),M}finally{t(!1)}},deleteScope:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteScope(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to delete scope"),M}finally{t(!1)}},deleteConnection:async D=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteConnection(D),r&&await x(r.id)}catch(T){throw i(T instanceof Error?T.message:"Failed to delete connection"),T}finally{t(!1)}},deleteMapping:async D=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteMapping(D),r&&await x(r.id)}catch(T){throw i(T instanceof Error?T.message:"Failed to delete mapping"),T}finally{t(!1)}}}};function OR(){tl("Tools");const{servers:e,isLoading:t,error:n,createServer:i}=d0(),l=Je(),[a,r]=b.useState(!1),[s,u]=b.useState({providedId:"",name:"",description:"",url:""}),c=async d=>{d.preventDefault();try{const f={...s,url:s.url||void 0},h=await i(f);r(!1),u({providedId:"",name:"",description:"",url:""}),h&&l(`/mcp-registry/${h.id}`)}catch(f){console.error("Failed to create server",f)}};return o.jsxs("div",{className:"mcp-registry",children:[o.jsxs("div",{className:"mcp-registry-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Tools"}),o.jsx("p",{className:"subtitle",children:"Manage Model Context Protocol servers and their configurations"})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(rr,{}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"+ Add Server"})]})]}),n&&o.jsx("div",{className:"error-message",children:n}),t?o.jsx("div",{className:"loading",children:"Loading servers..."}):o.jsx("div",{className:"servers-grid",children:e.length===0?o.jsxs("div",{className:"empty-state",children:[o.jsx("p",{children:"No MCP servers registered yet."}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"Create your first server"})]}):e.map(d=>o.jsxs("div",{className:"server-card",onClick:()=>l(`/mcp-registry/${d.id}`),children:[o.jsx("h3",{children:d.name}),o.jsxs("p",{className:"server-id",children:["ID: ",d.providedId]}),o.jsx("p",{className:"server-description",children:d.description})]},d.id))}),a&&o.jsx("div",{className:"modal-overlay",onClick:()=>r(!1),children:o.jsxs("div",{className:"modal-content",onClick:d=>d.stopPropagation(),children:[o.jsx("h2",{children:"Create MCP Server"}),o.jsxs("form",{onSubmit:c,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"providedId",children:"Server ID"}),o.jsx("input",{type:"text",id:"providedId",value:s.providedId,onChange:d=>u({...s,providedId:d.target.value}),placeholder:"e.g., my-mcp-server",required:!0}),o.jsx("small",{children:"Unique identifier for this server"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:s.name,onChange:d=>u({...s,name:d.target.value}),placeholder:"e.g., My MCP Server",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:s.description,onChange:d=>u({...s,description:d.target.value}),placeholder:"Brief description of this server",rows:3,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"url",children:"Server URL (optional)"}),o.jsx("input",{type:"url",id:"url",value:s.url,onChange:d=>u({...s,url:d.target.value}),placeholder:"e.g., http://localhost:3000/api/v1/tasks/tasks/mcp"}),o.jsx("small",{children:"URL that MCP clients will use to connect to this server"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>r(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Server"})]})]})]})})]})}const DR=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState(null),[r,s]=b.useState(null),[u,c]=b.useState(null);async function d(h,p){t(!0),i(null);try{const y=Lv(),x=await fetch(`${y}/.well-known/oauth-authorization-server/mcp/issuer`);if(!x.ok)throw new Error("Failed to fetch authorization server issuer URL");const{issuer:E}=await x.json(),g=new URL(`${E}/mcp/${h}/${p}`);a(g);const m=new URL(`${g.origin}/.well-known/oauth-authorization-server${g.pathname}`);s(m),await f(m)}catch(y){i(y instanceof Error?y.message:"Failed to load authorization server configuration"),t(!1)}}async function f(h){t(!0),i(null);try{const y=await(await fetch(h.toString())).json();c(y)}catch(p){i(p instanceof Error?p.message:"Failed to load metadata"),c({})}finally{t(!1)}}return{isLoading:e,error:n,authorizationServerUrl:l,authorizationServerMetadataUrl:r,metadata:u,loadMetadata:d}};function zR(){const{serverId:e}=Wi(),t=Je(),{selectedServer:n,scopes:i,connections:l,mappings:a,isLoading:r,error:s,loadServerDetails:u,createScope:c,createConnection:d,updateServer:f,updateConnection:h,createMapping:p,deleteScope:y,deleteConnection:x,deleteMapping:E}=d0(),{metadata:g,authorizationServerMetadataUrl:m,loadMetadata:v}=DR(),[C,A]=b.useState([]),[N,_]=b.useState(null),[U,D]=b.useState(null),[T,M]=b.useState(null),[q,P]=b.useState(!1),[F,V]=b.useState({name:"",description:"",url:""}),[j,O]=b.useState({scopeId:"",description:""}),[w,X]=b.useState({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""}),[S,we]=b.useState({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]});tl(n?`${n.name} - Tools`:"Tools"),b.useEffect(()=>{e&&(u(e),cT.authJourneysControllerGetAuthJourneys(e).then(A).catch(()=>A([])))},[e]),b.useEffect(()=>{n&&v(n.providedId,"0.0.0")},[n]);const We=()=>{n&&(V({name:n.name,description:n.description,url:n.url||""}),_("edit-server"))},k=async R=>{if(R.preventDefault(),!!e)try{const G={};F.name&&(G.name=F.name),F.description&&(G.description=F.description),F.url&&(G.url=F.url),await f(e,G),_(null),V({name:"",description:"",url:""})}catch(G){console.error("Failed to update server",G)}},_e=async R=>{if(R.preventDefault(),!!e)try{await c(e,j.scopeId,j.description),_(null),O({scopeId:"",description:""})}catch(G){console.error("Failed to create scope",G)}},st=async R=>{if(R.preventDefault(),!!e)try{await d(e,w),_(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(G){console.error("Failed to create connection",G)}},Ie=R=>{const G=l.find(He=>He.id===R);G&&(M(R),X({clientId:G.clientId,clientSecret:"",authorizeUrl:G.authorizeUrl,tokenUrl:G.tokenUrl,friendlyName:G.friendlyName,providedId:G.providedId||""}),_("edit-connection"))},ki=async R=>{if(R.preventDefault(),!!T)try{const G={};w.friendlyName&&(G.friendlyName=w.friendlyName),w.providedId&&(G.providedId=w.providedId),w.clientId&&(G.clientId=w.clientId),w.clientSecret&&(G.clientSecret=w.clientSecret),w.authorizeUrl&&(G.authorizeUrl=w.authorizeUrl),w.tokenUrl&&(G.tokenUrl=w.tokenUrl),await h(T,G),_(null),M(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(G){console.error("Failed to update connection",G)}},ln=async R=>{if(R.preventDefault(),!!e)try{for(const G of S.mappings)await p(e,{scopeId:S.scopeId,connectionId:G.connectionId,downstreamScope:G.downstreamScope});_(null),we({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]})}catch(G){console.error("Failed to create mapping",G)}},Gn=()=>{const R=S.mappings[S.mappings.length-1];we({...S,mappings:[...S.mappings,{connectionId:R.connectionId,downstreamScope:""}]})},Vn=R=>{S.mappings.length!==1&&we({...S,mappings:S.mappings.filter((G,He)=>He!==R)})},Ni=(R,G,He)=>{const Ot=[...S.mappings];Ot[R]={...Ot[R],[G]:He},we({...S,mappings:Ot})},zo=async R=>{e&&D({message:"Are you sure you want to delete this scope?",onConfirm:async()=>{try{await y(e,R),D(null)}catch(G){console.error("Failed to delete scope",G),D(null)}}})},Lo=async R=>{D({message:"Are you sure you want to delete this connection?",onConfirm:async()=>{try{await x(R),D(null)}catch(G){console.error("Failed to delete connection",G),D(null)}}})},Mo=async R=>{D({message:"Are you sure you want to delete this mapping?",onConfirm:async()=>{try{await E(R),D(null)}catch(G){console.error("Failed to delete mapping",G),D(null)}}})},Ar=b.useMemo(()=>{const R={};return a.forEach(G=>{const He=i.find(an=>an.id===G.scopeId),Ot=l.find(an=>an.id===G.connectionId);!He||!Ot||(R[G.scopeId]||(R[G.scopeId]={scope:He,connections:{}}),R[G.scopeId].connections[G.connectionId]||(R[G.scopeId].connections[G.connectionId]={connection:Ot,mappings:[]}),R[G.scopeId].connections[G.connectionId].mappings.push(G))}),R},[a,i,l]);return r&&!n?o.jsx("div",{className:"loading",children:"Loading server details..."}):n?o.jsxs("div",{className:"mcp-registry",children:[o.jsxs("div",{className:"mcp-registry-header",children:[o.jsxs("div",{children:[o.jsx("button",{onClick:()=>t("/mcp-registry"),className:"btn-back",children:"← Back to Registry"}),o.jsx("h1",{children:n.name}),o.jsx("p",{className:"subtitle",children:n.description}),o.jsxs("p",{className:"server-id",children:["ID: ",n.providedId]})]}),o.jsx("div",{className:"header-actions",children:o.jsx(rr,{})})]}),s&&o.jsx("div",{className:"error-message",children:s}),o.jsxs("div",{className:"info-section",children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o.jsx("h2",{className:"section-title",children:"Information"}),o.jsx("button",{onClick:We,className:"btn-secondary btn-sm",children:"Edit"})]}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"info-grid",children:[o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Name"}),o.jsx("span",{className:"info-value",children:n.name})]}),o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"ID"}),o.jsx("span",{className:"info-value mono",children:n.providedId})]}),l.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Connections"}),o.jsx("span",{className:"info-value",children:l.map(R=>R.friendlyName).join(", ")})]}),i.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Scopes"}),o.jsx("span",{className:"info-value",children:i.map(R=>R.id).join(", ")})]}),n.url&&o.jsxs("div",{className:"info-item inspector-command-item",children:[o.jsx("span",{className:"info-label",children:"Inspector Command"}),o.jsxs("div",{className:"inspector-command",children:[o.jsxs("code",{className:"inspector-code",children:["npx @modelcontextprotocol/inspector --transport http --server-url ",n.url]}),o.jsx("button",{className:"btn-secondary btn-sm copy-btn",onClick:()=>{navigator.clipboard.writeText(`npx @modelcontextprotocol/inspector --transport http --server-url ${n.url}`)},title:"Copy to clipboard",children:"Copy"})]})]})]}),g?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"metadata-section",children:[o.jsxs("div",{className:"metadata-header",children:[o.jsx("span",{className:"metadata-status",children:"✓ Authorization Server Metadata found"}),o.jsx("button",{onClick:()=>P(!q),className:"btn-link",children:q?"Hide":"Show"})]}),q&&o.jsxs("div",{className:"metadata-content",children:[o.jsx("p",{className:"metadata-url",children:m==null?void 0:m.toString()}),o.jsx("pre",{className:"metadata-json",children:JSON.stringify(g,null,2)})]})]})]}):null]}),o.jsxs("div",{className:"admin-section",children:[o.jsx("h2",{className:"section-title",children:"Administration"}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Permissions"})}),o.jsx("p",{className:"subsection-description",children:"Define the scopes (permissions) that will be available for MCP clients to request when connecting to this server."}),i.length===0?o.jsx("div",{className:"proper-table",children:o.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add permission..."})})})}):o.jsxs("div",{className:"proper-table",children:[o.jsxs("div",{className:"table-header",children:[o.jsx("div",{className:"table-col-name",children:"Scope Name"}),o.jsx("div",{className:"table-col-description",children:"Description"}),o.jsx("div",{className:"table-col-actions"})]}),i.map(R=>o.jsxs("div",{className:"table-body-row",children:[o.jsx("div",{className:"table-col-name",children:R.id}),o.jsx("div",{className:"table-col-description",children:R.description}),o.jsx("div",{className:"table-col-actions",children:o.jsx("button",{onClick:()=>zo(R.id),className:"btn-delete-small",children:"Delete"})})]},R.id)),o.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add permission..."})})})]})]}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Connections"})}),o.jsx("p",{className:"subsection-description",children:"Configure connections to downstream systems that support OAuth. The MCP server acts as a secure proxy, managing authentication and authorization on behalf of clients."}),l.length===0?o.jsx("div",{className:"proper-table",children:o.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add connection..."})})})}):o.jsxs("div",{className:"proper-table",children:[o.jsxs("div",{className:"table-header",children:[o.jsx("div",{className:"table-col-name",children:"Connection Name"}),o.jsx("div",{className:"table-col-description",children:"Description"}),o.jsx("div",{className:"table-col-actions"})]}),l.map(R=>o.jsxs("div",{className:"table-body-row",children:[o.jsx("div",{className:"table-col-name",children:R.friendlyName}),o.jsx("div",{className:"table-col-description",children:R.providedId&&o.jsx("span",{className:"mono",children:R.providedId})}),o.jsxs("div",{className:"table-col-actions",children:[o.jsx("button",{onClick:()=>Ie(R.id),className:"btn-secondary btn-sm",children:"Edit"}),o.jsx("button",{onClick:()=>Lo(R.id),className:"btn-delete-small",children:"Delete"})]})]},R.id)),o.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add connection..."})})})]})]}),l.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Scope Mappings"})}),o.jsx("p",{className:"subsection-description",children:"Map MCP server scopes to downstream connection scopes. When a client requests an MCP scope, the server will request the corresponding downstream scopes from the configured connections."}),a.length===0?o.jsx("div",{className:"mapping-group",children:o.jsx("div",{className:"table-add-row",onClick:()=>i.length>0&&_("mapping"),style:{opacity:i.length===0?.5:1,cursor:i.length===0?"not-allowed":"pointer"},children:o.jsx("span",{className:"add-row-text",children:i.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})}):o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Object.entries(Ar).map(([R,G])=>o.jsxs("div",{className:"mapping-group",children:[o.jsxs("div",{className:"mapping-group-header",children:[G.scope.id," → ",Object.keys(G.connections).length," connection",Object.keys(G.connections).length!==1?"s":""]}),o.jsx("div",{className:"mapping-items",children:Object.entries(G.connections).map(([He,Ot])=>Ot.mappings.map(an=>o.jsxs("div",{className:"mapping-item",children:[o.jsxs("div",{children:[o.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#1a202c",marginBottom:"4px"},children:Ot.connection.friendlyName}),o.jsx("div",{className:"mapping-item-scope",children:an.downstreamScope})]}),o.jsx("button",{onClick:()=>Mo(an.id),className:"btn-delete-small",title:"Delete mapping",children:"Delete"})]},an.id)))})]},R)),o.jsx("div",{className:"mapping-group",children:o.jsx("div",{className:"table-add-row",onClick:()=>i.length>0&&_("mapping"),style:{opacity:i.length===0?.5:1,cursor:i.length===0?"not-allowed":"pointer"},children:o.jsx("span",{className:"add-row-text",children:i.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})})]})]})]})]}),o.jsxs("div",{className:"admin-section",children:[o.jsx("h2",{className:"section-title",children:"Authorizations"}),o.jsx("div",{className:"section-divider"}),o.jsx("p",{className:"subsection-description",style:{marginBottom:"16px"},children:"Live monitoring of MCP client authorizations and their authentication state"}),C.length===0?o.jsx("p",{style:{color:"#888",fontSize:"14px"},children:"No active authorizations"}):o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:C.sort((R,G)=>new Date(G.updatedAt).getTime()-new Date(R.updatedAt).getTime()).map(R=>o.jsxs("div",{style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:"8px",padding:"16px"},children:[o.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px"},children:o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[o.jsx("h3",{style:{margin:0,fontSize:"16px",fontWeight:600},children:R.mcpAuthorizationFlow.clientName??"Unknown Client"}),o.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:R.status===rn.status.AUTHORIZATION_CODE_EXCHANGED?"#d4edda":R.status===rn.status.MCP_AUTH_FLOW_STARTED?"#cfe2ff":R.status===rn.status.CONNECTIONS_FLOW_STARTED?"#fff3cd":R.status===rn.status.USER_CONSENT_REJECTED?"#f8d7da":"#e2e3e5",color:R.status===rn.status.AUTHORIZATION_CODE_EXCHANGED?"#155724":R.status===rn.status.MCP_AUTH_FLOW_STARTED?"#084298":R.status===rn.status.CONNECTIONS_FLOW_STARTED?"#664d03":R.status===rn.status.USER_CONSENT_REJECTED?"#842029":"#383d41"},children:R.status.replace(/_/g," ").toUpperCase()})]}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[R.actor&&o.jsxs("div",{style:{marginBottom:"4px"},children:[o.jsx("strong",{children:"User:"})," ",R.actor.displayName," (",R.actor.slug,")"]}),o.jsxs("div",{children:["Journey ID: ",R.id]}),o.jsxs("div",{children:["Started: ",new Date(R.createdAt).toLocaleString()]}),o.jsxs("div",{children:["Last Update: ",new Date(R.updatedAt).toLocaleString()]})]})]})}),o.jsxs("div",{style:{marginBottom:"12px",paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[o.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"4px"},children:"MCP Authorization"}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[o.jsxs("div",{children:["Status: ",o.jsx("span",{style:{fontWeight:500,color:R.mcpAuthorizationFlow.status===Ia.status.AUTHORIZATION_CODE_EXCHANGED?"#28a745":R.mcpAuthorizationFlow.status===Ia.status.CLIENT_REGISTERED?"#007bff":R.mcpAuthorizationFlow.status===Ia.status.USER_CONSENT_REJECTED?"#dc3545":"#6c757d"},children:R.mcpAuthorizationFlow.status.replace(/_/g," ")})]}),R.mcpAuthorizationFlow.scope&&o.jsxs("div",{children:["Scopes: ",R.mcpAuthorizationFlow.scope]}),R.mcpAuthorizationFlow.authorizationCodeExpiresAt&&o.jsxs("div",{children:["Code Expires: ",new Date(R.mcpAuthorizationFlow.authorizationCodeExpiresAt).toLocaleString()]}),o.jsxs("div",{children:["Code Used: ",R.mcpAuthorizationFlow.authorizationCodeUsed?"Yes":"No"]})]})]}),R.connectionAuthorizationFlows.length>0&&o.jsxs("div",{style:{paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[o.jsxs("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"8px"},children:["Downstream Connections (",R.connectionAuthorizationFlows.length,")"]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:R.connectionAuthorizationFlows.map(G=>o.jsxs("div",{style:{backgroundColor:"#ffffff",borderRadius:"4px",padding:"12px"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[o.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:G.connectionName??"Unknown Connection"}),o.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:G.status===Kn.status.AUTHORIZED?"#d4edda":G.status===Kn.status.PENDING?"#fff3cd":(G.status===Kn.status.FAILED,"#f8d7da"),color:G.status===Kn.status.AUTHORIZED?"#155724":G.status===Kn.status.PENDING?"#664d03":G.status===Kn.status.FAILED?"#842029":"#721c24"},children:G.status})]}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[G.tokenExpiresAt&&o.jsxs("div",{children:["Token Expires: ",new Date(G.tokenExpiresAt).toLocaleString()]}),o.jsxs("div",{children:["Created: ",new Date(G.createdAt).toLocaleString()]})]})]},G.id))})]})]},R.id))})]}),N==="scope"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Permission"}),o.jsxs("form",{onSubmit:_e,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"scopeId",children:"Scope ID"}),o.jsx("input",{type:"text",id:"scopeId",value:j.scopeId,onChange:R=>O({...j,scopeId:R.target.value}),placeholder:"e.g., tool:read",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"scopeDescription",children:"Description"}),o.jsx("textarea",{id:"scopeDescription",value:j.description,onChange:R=>O({...j,description:R.target.value}),placeholder:"What does this scope provide?",rows:3,required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Scope"})]})]})]})}),N==="connection"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Connection"}),o.jsxs("form",{onSubmit:st,autoComplete:"off",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"friendlyName",children:"Friendly Name"}),o.jsx("input",{type:"text",id:"friendlyName",value:w.friendlyName,onChange:R=>X({...w,friendlyName:R.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"providedId",children:["Provided ID ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"text",id:"providedId",value:w.providedId,onChange:R=>X({...w,providedId:R.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),o.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"clientId",children:"Client ID"}),o.jsx("input",{type:"text",id:"clientId",value:w.clientId,onChange:R=>X({...w,clientId:R.target.value}),autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"clientSecret",children:"Client Secret"}),o.jsx("input",{type:"password",id:"clientSecret",value:w.clientSecret,onChange:R=>X({...w,clientSecret:R.target.value}),autoComplete:"new-password",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"authorizeUrl",children:"Authorize URL"}),o.jsx("input",{type:"url",id:"authorizeUrl",value:w.authorizeUrl,onChange:R=>X({...w,authorizeUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"tokenUrl",children:"Token URL"}),o.jsx("input",{type:"url",id:"tokenUrl",value:w.tokenUrl,onChange:R=>X({...w,tokenUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Connection"})]})]})]})}),N==="edit-connection"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Edit Connection"}),o.jsxs("form",{onSubmit:ki,autoComplete:"off",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editFriendlyName",children:"Friendly Name"}),o.jsx("input",{type:"text",id:"editFriendlyName",value:w.friendlyName,onChange:R=>X({...w,friendlyName:R.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"editProvidedId",children:["Provided ID ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"text",id:"editProvidedId",value:w.providedId,onChange:R=>X({...w,providedId:R.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),o.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editClientId",children:"Client ID"}),o.jsx("input",{type:"text",id:"editClientId",value:w.clientId,onChange:R=>X({...w,clientId:R.target.value}),autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editClientSecret",children:"Client Secret (leave blank to keep current)"}),o.jsx("input",{type:"password",id:"editClientSecret",value:w.clientSecret,onChange:R=>X({...w,clientSecret:R.target.value}),placeholder:"Enter new secret or leave blank",autoComplete:"new-password"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editAuthorizeUrl",children:"Authorize URL"}),o.jsx("input",{type:"url",id:"editAuthorizeUrl",value:w.authorizeUrl,onChange:R=>X({...w,authorizeUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editTokenUrl",children:"Token URL"}),o.jsx("input",{type:"url",id:"editTokenUrl",value:w.tokenUrl,onChange:R=>X({...w,tokenUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>{_(null),M(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})},className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Update Connection"})]})]})]})}),N==="edit-server"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Edit Server"}),o.jsxs("form",{onSubmit:k,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editServerName",children:"Name"}),o.jsx("input",{type:"text",id:"editServerName",value:F.name,onChange:R=>V({...F,name:R.target.value}),placeholder:"e.g., GitHub Integration",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editServerDescription",children:"Description"}),o.jsx("textarea",{id:"editServerDescription",value:F.description,onChange:R=>V({...F,description:R.target.value}),placeholder:"What does this server provide?",rows:3,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"editServerUrl",children:["URL ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"url",id:"editServerUrl",value:F.url,onChange:R=>V({...F,url:R.target.value}),placeholder:"http://localhost:3000/api/v1/mcp"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>{_(null),V({name:"",description:"",url:""})},className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Update Server"})]})]})]})}),N==="mapping"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Scope Mapping"}),o.jsxs("form",{onSubmit:ln,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"mappingScopeId",children:"MCP Scope"}),o.jsxs("select",{id:"mappingScopeId",value:S.scopeId,onChange:R=>we({...S,scopeId:R.target.value}),required:!0,children:[o.jsx("option",{value:"",children:"Select a scope"}),i.map(R=>o.jsx("option",{value:R.id,children:R.id},R.id))]})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{children:"Connection & Downstream Scope Mappings"}),S.mappings.map((R,G)=>o.jsxs("div",{className:"mapping-row",children:[o.jsxs("select",{value:R.connectionId,onChange:He=>Ni(G,"connectionId",He.target.value),required:!0,className:"mapping-connection-select",children:[o.jsx("option",{value:"",children:"Select a connection"}),l.map(He=>o.jsx("option",{value:He.id,children:He.friendlyName},He.id))]}),o.jsx("input",{type:"text",value:R.downstreamScope,onChange:He=>Ni(G,"downstreamScope",He.target.value),placeholder:"e.g., repo:read",required:!0,className:"mapping-scope-input"}),S.mappings.length>1&&o.jsx("button",{type:"button",onClick:()=>Vn(G),className:"btn-remove","aria-label":"Remove mapping",children:"×"})]},G)),o.jsx("button",{type:"button",onClick:Gn,className:"btn-add-mapping",children:"+ Add Entry"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Mapping"})]})]})]})}),U&&o.jsx(Qd,{message:U.message,onConfirm:U.onConfirm,onCancel:()=>D(null)})]}):o.jsx("div",{className:"error-message",children:"Server not found"})}B.BASE=el;function LR(){tl("Authorization Consent - taico");const[e]=YC(),t=e.get("flow"),[n,i]=b.useState(null),[l,a]=b.useState(!0),[r,s]=b.useState(null),[u,c]=b.useState(!1);b.useEffect(()=>{if(!t){s("No authorization flow ID provided"),a(!1);return}d()},[t]);const d=async()=>{if(t){a(!0),s(null);try{const y=await fT.authorizationControllerGetConsentMetadata(t);i(y)}catch(y){s(y instanceof Error?y.message:"Failed to load authorization details")}finally{a(!1)}}},f=async y=>{if(!(!n||!t)){c(!0),s(null);try{const x={flow_id:t,approved:y},E=B.BASE??"",g=document.createElement("form");g.method="POST",g.action=`${E}/api/v1/auth/authorize/mcp/${n.server.providedId}/0.0.0`,Object.entries(x).forEach(([m,v])=>{const C=document.createElement("input");C.type="hidden",C.name=m,C.value=String(v),g.appendChild(C)}),document.body.appendChild(g),g.submit()}catch(x){s(x instanceof Error?x.message:"Failed to submit consent decision"),c(!1)}}},h=()=>{n&&f(!0)},p=()=>{n&&f(!1)};return l?o.jsx("div",{className:"consent-page",children:o.jsx("div",{className:"consent-container",children:o.jsxs("div",{className:"loading-state",children:[o.jsx("div",{className:"spinner"}),o.jsx("p",{children:"Loading authorization details..."})]})})}):r||!n?o.jsx("div",{className:"consent-page",children:o.jsx("div",{className:"consent-container",children:o.jsxs("div",{className:"error-state",children:[o.jsx("h1",{children:"Authorization Error"}),o.jsx("p",{className:"error-message",children:r||"Invalid authorization request"}),o.jsx(rr,{})]})})}):o.jsx("div",{className:"consent-page",children:o.jsxs("div",{className:"consent-container",children:[o.jsxs("div",{className:"consent-header",children:[o.jsx("div",{className:"oauth-icon",children:"🔐"}),o.jsx("h1",{children:"Authorization Request"}),o.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}),o.jsxs("div",{className:"consent-details",children:[o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHO is requesting access"}),o.jsxs("div",{className:"client-info",children:[o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Client Name:"}),o.jsx("span",{className:"value",children:n.client.clientName})]}),o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Client ID:"}),o.jsx("span",{className:"value",children:o.jsx("code",{children:n.client.clientId})})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHAT access is requested"}),n.scopes&&n.scopes.length>0?o.jsxs(o.Fragment,{children:[o.jsx("ul",{className:"scopes-list",children:n.scopes.map(y=>o.jsx("li",{children:o.jsx("span",{className:"scope-badge",children:y})},y))}),o.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):o.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHERE access is granted"}),o.jsxs("div",{className:"server-info",children:[o.jsx("div",{className:"server-name",children:n.server.name}),o.jsxs("div",{className:"server-id",children:["Server ID: ",n.server.providedId]})]}),o.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[o.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),o.jsx("code",{children:n.resource})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Redirect Information"}),o.jsx("div",{className:"client-info",children:o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Redirect URI:"}),o.jsx("span",{className:"value",children:o.jsx("code",{children:n.redirectUri})})]})}),o.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]}),r&&o.jsx("div",{className:"error-banner",children:r}),o.jsxs("div",{className:"consent-actions",children:[o.jsx("button",{type:"button",className:"btn-deny",onClick:p,disabled:u,children:"Deny"}),o.jsx("button",{type:"button",className:"btn-approve",onClick:h,disabled:u,children:u?"Approving...":"Approve"})]}),o.jsxs("div",{className:"consent-footer",children:[o.jsxs("p",{children:["By approving, you authorize ",o.jsx("strong",{children:n.client.clientName})," to access the specified resources with the requested permissions."]}),o.jsx(rr,{})]})]})})}const dg="agents-sidebar-collapsed";function MR(){const{agentId:e,sessionId:t}=Wi(),n=Je(),[i,l]=b.useState(()=>{const u=localStorage.getItem(dg);return u!==null?u==="true":ar()});b.useEffect(()=>{localStorage.setItem(dg,String(i))},[i]);const a=()=>{l(!i)},r=window.location.pathname.includes("/agents/admin"),s=window.location.pathname==="/agents"||window.location.pathname==="/agents/";return o.jsxs("div",{className:"agents-with-sidebar",children:[o.jsxs("aside",{className:`sidebar-app-specific ${i?"collapsed":""}`,children:[o.jsx("nav",{className:"sidebar-content",children:!i&&o.jsxs("div",{children:[o.jsx("div",{className:"agents-sidebar-header",children:o.jsxs("h2",{className:"agents-sidebar-title",children:["🤖 Agents",o.jsx("span",{className:"agents-status-dot disconnected",title:"WebSocket disconnected"})]})}),o.jsx("div",{className:"agents-sidebar-section",children:o.jsxs("div",{className:"agents-nav-list",children:[o.jsx("div",{className:`agents-nav-item ${s?"active":""}`,onClick:()=>n("/agents"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents")},title:"Agents",children:"🤖 Agents"}),o.jsx("div",{className:`agents-nav-item ${r?"active":""}`,onClick:()=>n("/agents/admin"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents/admin")},title:"Admin",children:"⚙️ Admin"})]})}),o.jsxs("div",{className:"agents-sidebar-section",children:[o.jsx("h3",{className:"agents-sidebar-section-title",children:"History"}),o.jsxs("div",{className:"agents-history-list",children:[o.jsx("div",{className:"agents-history-item",children:"Loading sessions..."}),!1,!1]})]})]})}),o.jsx("button",{className:"sidebar-toggle",onClick:a,"aria-label":i?"Expand sidebar":"Collapse sidebar",children:i?"→":"←"})]}),o.jsx("main",{className:"agents-content",children:o.jsx(md,{})})]})}B.BASE=el;const Zd=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null);b.useEffect(()=>{u()},[]);const u=async()=>{t(!0),i(null);try{const f=await Tu.agentsControllerListAgents();a(f.items||[])}catch(f){i(f instanceof Error?f.message:"Failed to load agents")}finally{t(!1)}};return{agents:l,selectedAgent:r,isLoading:e,error:n,loadAgents:u,loadAgentDetails:async f=>{t(!0),i(null);try{const h=await Tu.agentsControllerGetAgentBySlug(f);s(h)}catch(h){i(h instanceof Error?h.message:"Failed to load agent details")}finally{t(!1)}},createAgent:async f=>{t(!0),i(null);try{const h=await Tu.agentsControllerCreateAgent(f);return await u(),h}catch(h){return i(h instanceof Error?h.message:"Failed to create agent"),null}finally{t(!1)}}}};function BR(){const e=Je(),{agents:t,isLoading:n,error:i}=Zd();return o.jsxs("div",{className:"agents-home",children:[o.jsxs("div",{className:"agents-home-header",children:[o.jsx("h2",{children:"Available Agents"}),o.jsx("p",{children:"Select an agent to start a new conversation"})]}),n&&o.jsx("div",{className:"agents-loading",children:"Loading agents..."}),i&&o.jsxs("div",{className:"agents-error",children:["Error: ",i]}),!n&&!i&&t.length===0&&o.jsx("div",{className:"agents-empty",children:"No agents available. Create one in the admin panel."}),o.jsx("div",{className:"agents-admin-grid",children:t.map(l=>o.jsxs("div",{className:"agent-admin-card",onClick:()=>e(`/agents/${l.slug||l.actorId}/session/new`),role:"button",tabIndex:0,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&e(`/agents/${l.slug||l.actorId}/session/new`)},children:[o.jsxs("div",{className:"agent-admin-card-header",children:[o.jsx("h3",{children:l.name}),o.jsx("span",{className:`agent-status ${l.isActive?"active":"inactive"}`,children:l.isActive?"Active":"Inactive"})]}),o.jsxs("p",{className:"agent-slug",children:["@",l.slug]}),o.jsx("p",{className:"agent-description",children:typeof l.description=="string"?l.description:l.description?JSON.stringify(l.description):"No description available"}),o.jsxs("p",{className:"agent-tools",children:["Tools: ",l.allowedTools.length>0?l.allowedTools.join(", "):"None"]})]},l.actorId))})]})}function UR(){const{agents:e,isLoading:t,error:n,createAgent:i}=Zd(),l=Je(),[a,r]=b.useState(!1),[s,u]=b.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),c=async d=>{d.preventDefault();try{const f=await i({slug:s.slug,name:s.name,description:s.description,systemPrompt:s.systemPrompt,allowedTools:s.allowedTools.split(",").map(h=>h.trim()).filter(Boolean),statusTriggers:s.statusTriggers.split(",").map(h=>h.trim()).filter(Boolean),isActive:s.isActive});r(!1),u({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),f&&l(`/agents/${f.actorId}/admin`)}catch(f){console.error("Failed to create agent",f)}};return o.jsxs("div",{className:"agents-admin-list",children:[o.jsxs("div",{className:"agents-admin-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Agents Admin"}),o.jsx("p",{className:"subtitle",children:"Manage agents and their configurations"})]}),o.jsx("div",{className:"header-actions",children:o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"+ Create Agent"})})]}),n&&o.jsx("div",{className:"error-message",children:n}),t?o.jsx("div",{className:"loading",children:"Loading agents..."}):o.jsx("div",{className:"agents-admin-grid",children:e.length===0?o.jsxs("div",{className:"empty-state",children:[o.jsx("p",{children:"No agents created yet."}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"Create your first agent"})]}):e.map(d=>o.jsxs("div",{className:"agent-admin-card",onClick:()=>l(`/agents/${d.actorId}/admin`),children:[o.jsxs("div",{className:"agent-admin-card-header",children:[o.jsx("h3",{children:d.name}),o.jsx("span",{className:`agent-status ${d.isActive?"active":"inactive"}`,children:d.isActive?"Active":"Inactive"})]}),o.jsxs("p",{className:"agent-slug",children:["@",d.slug]}),o.jsx("p",{className:"agent-description",children:typeof d.description=="string"?d.description:"No description"}),o.jsxs("p",{className:"agent-tools",children:["Tools: ",d.allowedTools.length>0?d.allowedTools.join(", "):"None"]})]},d.actorId))}),a&&o.jsx("div",{className:"modal-overlay",onClick:()=>r(!1),children:o.jsxs("div",{className:"modal-content",onClick:d=>d.stopPropagation(),children:[o.jsx("h2",{children:"Create Agent"}),o.jsxs("form",{onSubmit:c,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"slug",children:"Slug"}),o.jsx("input",{type:"text",id:"slug",value:s.slug,onChange:d=>u({...s,slug:d.target.value}),placeholder:"e.g., code-assistant",required:!0}),o.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:s.name,onChange:d=>u({...s,name:d.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:s.description,onChange:d=>u({...s,description:d.target.value}),placeholder:"Brief description of this agent",rows:2})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),o.jsx("textarea",{id:"systemPrompt",value:s.systemPrompt,onChange:d=>u({...s,systemPrompt:d.target.value}),placeholder:"Core instructions/persona for this agent",rows:5,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),o.jsx("input",{type:"text",id:"allowedTools",value:s.allowedTools,onChange:d=>u({...s,allowedTools:d.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"statusTriggers",children:"Status triggers"}),o.jsx("input",{type:"text",id:"statusTriggers",value:s.statusTriggers,onChange:d=>u({...s,statusTriggers:d.target.value}),placeholder:"e.g., NOT_STARTED, IN_PROGRESS, FOR_REVIEW, DONE (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsx("div",{className:"form-group",children:o.jsxs("label",{className:"checkbox-label",children:[o.jsx("input",{type:"checkbox",checked:s.isActive,onChange:d=>u({...s,isActive:d.target.checked})}),o.jsx("span",{children:"Active (available for assignment)"})]})}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>r(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Agent"})]})]})]})})]})}function IR(){var y;const{agentId:e}=Wi(),t=Je(),{selectedAgent:n,isLoading:i,error:l,loadAgentDetails:a}=Zd(),[r,s]=b.useState(!1),[u,c]=b.useState(null),[d,f]=b.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",isActive:!0});b.useEffect(()=>{e&&a(e)},[e]),b.useEffect(()=>{var x;n&&f({slug:n.slug,name:n.name,description:((x=n.description)==null?void 0:x.toString())||"",systemPrompt:n.systemPrompt,allowedTools:n.allowedTools.join(", "),isActive:n.isActive})},[n]);const h=async x=>{if(x.preventDefault(),!!e)try{throw new Error("update agent not implemented in the backend")}catch(E){console.error("Failed to update agent",E)}},p=async()=>{e&&c({message:"Are you sure you want to delete this agent? This action cannot be undone.",onConfirm:async()=>{try{throw new Error("delete agent not implemented in the backend")}catch(x){console.error("Failed to delete agent",x),c(null)}}})};return i&&!n?o.jsx("div",{className:"loading",children:"Loading agent details..."}):n?(console.log(n.statusTriggers),o.jsxs("div",{className:"agent-admin-detail",children:[o.jsxs("div",{className:"agent-admin-detail-header",children:[o.jsxs("div",{children:[o.jsx("button",{onClick:()=>t("/agents/admin"),className:"btn-back",children:"← Back to Agents"}),o.jsx("h1",{children:n.name}),o.jsxs("p",{className:"agent-slug",children:["@",n.slug]}),o.jsx("span",{className:`agent-status ${n.isActive?"active":"inactive"}`,children:n.isActive?"Active":"Inactive"})]}),o.jsx("div",{className:"header-actions",children:r?o.jsx("button",{onClick:()=>s(!1),className:"btn-secondary",children:"Cancel Edit"}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>s(!0),className:"btn-secondary",children:"Edit Agent"}),o.jsx("button",{onClick:p,className:"btn-delete",children:"Delete Agent"})]})})]}),l&&o.jsx("div",{className:"error-message",children:l}),r?o.jsxs("form",{onSubmit:h,className:"agent-edit-form",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"slug",children:"Slug"}),o.jsx("input",{type:"text",id:"slug",value:d.slug,onChange:x=>f({...d,slug:x.target.value}),placeholder:"e.g., code-assistant",required:!0}),o.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:d.name,onChange:x=>f({...d,name:x.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:d.description,onChange:x=>f({...d,description:x.target.value}),placeholder:"Brief description of this agent",rows:2})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),o.jsx("textarea",{id:"systemPrompt",value:d.systemPrompt,onChange:x=>f({...d,systemPrompt:x.target.value}),placeholder:"Core instructions/persona for this agent",rows:10,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),o.jsx("input",{type:"text",id:"allowedTools",value:d.allowedTools,onChange:x=>f({...d,allowedTools:x.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsx("div",{className:"form-group",children:o.jsxs("label",{className:"checkbox-label",children:[o.jsx("input",{type:"checkbox",checked:d.isActive,onChange:x=>f({...d,isActive:x.target.checked})}),o.jsx("span",{children:"Active (available for assignment)"})]})}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Save Changes"})]})]}):o.jsxs("div",{className:"agent-detail-sections",children:[o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Basic Information"}),o.jsxs("div",{className:"detail-content",children:[o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Name"}),o.jsx("p",{children:n.name})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Slug"}),o.jsxs("p",{children:["@",n.slug]})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Description"}),o.jsx("p",{children:((y=n.description)==null?void 0:y.toString())||"No description"})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Status"}),o.jsx("p",{children:n.isActive?"Active":"Inactive"})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"System Prompt"}),o.jsx("div",{className:"detail-content",children:o.jsx("pre",{className:"system-prompt-display",children:n.systemPrompt})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Status Triggers"}),o.jsx("div",{className:"detail-content",children:n.statusTriggers.length>0?o.jsx("div",{className:"tools-list",children:n.statusTriggers.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No status triggers configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Tag Triggers"}),o.jsx("div",{className:"detail-content",children:n.tagTriggers.length>0?o.jsx("div",{className:"tools-list",children:n.tagTriggers.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No tag triggers configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Allowed Tools"}),o.jsx("div",{className:"detail-content",children:n.allowedTools.length>0?o.jsx("div",{className:"tools-list",children:n.allowedTools.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No tools configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Metadata"}),o.jsxs("div",{className:"detail-content",children:[o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Created At"}),o.jsx("p",{children:new Date(n.createdAt).toLocaleString()})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Last Updated"}),o.jsx("p",{children:new Date(n.updatedAt).toLocaleString()})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Row Version"}),o.jsx("p",{children:n.rowVersion})]})]})]})]}),u&&o.jsx(Qd,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):o.jsx("div",{className:"error-message",children:"Agent not found"})}function HR(){const{logout:e}=Ed(),t=Je();return rt(),b.useEffect(()=>{(async()=>{await e(),t("/login",{replace:!0})})()},[e,t]),o.jsx("div",{className:"logout-page",children:o.jsx("div",{className:"logout-container",children:o.jsx("div",{className:"logout-card",children:o.jsxs("div",{className:"logout-header",children:[o.jsx("h1",{className:"logout-title",children:"Logging Out..."}),o.jsx("p",{className:"logout-subtitle",children:"You are being logged out. Please wait."})]})})})})}function qR(){return yT()?o.jsx(Sk,{}):o.jsx(xk,{})}function FR(){return o.jsx(qC,{basename:$C,children:o.jsx(dT,{children:o.jsxs(gC,{children:[o.jsx(qe,{path:"/login",element:o.jsx(pT,{})}),o.jsx(qe,{path:"/logout",element:o.jsx(HR,{})}),o.jsxs(qe,{element:o.jsx(hT,{children:o.jsx(xT,{})}),children:[o.jsx(qe,{index:!0,element:o.jsx(vT,{})}),o.jsx(qe,{path:"tasks",element:o.jsx(qR,{})}),o.jsx(qe,{path:"mcp-registry",element:o.jsx(OR,{})}),o.jsx(qe,{path:"mcp-registry/:serverId",element:o.jsx(zR,{})}),o.jsx(qe,{path:"consent",element:o.jsx(LR,{})}),o.jsxs(qe,{path:"context",element:o.jsx(Nk,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(wk,{})}),o.jsx(qe,{path:"new",element:o.jsx(cg,{})}),o.jsx(qe,{path:"page/:pageId",element:o.jsx(_R,{})}),o.jsx(qe,{path:"page/:pageId/edit",element:o.jsx(RR,{})}),o.jsx(qe,{path:"page/:pageId/new",element:o.jsx(cg,{})})]}),o.jsxs(qe,{path:"agents",element:o.jsx(MR,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(BR,{})}),o.jsx(qe,{path:"admin",element:o.jsx(UR,{})}),o.jsx(qe,{path:":agentId/admin",element:o.jsx(IR,{})})]})]})]})})})}gE.createRoot(document.getElementById("root")).render(o.jsx(b.StrictMode,{children:o.jsx("div",{className:"app-shell",children:o.jsx(FR,{})})}));
93
+ `},description:"Horizontal divider"},{id:"link",label:"/link",trigger:"link",markdown:{before:"[",after:"](url)"},description:"Insert link"}];function NR(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function wR(e){return kR.map(t=>NR(t,e))}function AR({value:e,onChange:t,placeholder:n,disabled:i}){const l=b.useRef(null),[a,r]=b.useState({active:!1,query:"",position:{x:0,y:0},selectedIndex:0,startPosition:0}),u=wR((y,x="")=>{if(!l.current)return;const E=l.current,g=a.startPosition,m=E.selectionEnd,v=e.substring(0,g),C=e.substring(m),A=v+y+x+C;t(A),r({...a,active:!1}),setTimeout(()=>{const N=g+y.length;E.focus(),E.setSelectionRange(N,N)},0)}),c=a.query?u.filter(y=>y.label.toLowerCase().includes(a.query.toLowerCase())):u,d=y=>{if(!a.active){if(y.key==="/"){const x=l.current;if(!x)return;const E=x.selectionStart,g=e.substring(0,E);if(E===0||g[E-1].match(/\s/)){const m=x.getBoundingClientRect(),v=24,C=g.split(`
94
+ `).length;r({active:!0,query:"",position:{x:m.left+16,y:m.top+C*v+40},selectedIndex:0,startPosition:E})}}return}switch(y.key){case"Escape":y.preventDefault(),r({...a,active:!1});break;case"ArrowDown":y.preventDefault(),r({...a,selectedIndex:(a.selectedIndex+1)%c.length});break;case"ArrowUp":y.preventDefault(),r({...a,selectedIndex:a.selectedIndex===0?c.length-1:a.selectedIndex-1});break;case"Enter":case"Tab":y.preventDefault(),c[a.selectedIndex]&&c[a.selectedIndex].action();break;case"Backspace":const x=l.current;x&&x.selectionStart<=a.startPosition&&r({...a,active:!1});break}},f=y=>{const x=y.target.value;if(t(x),a.active&&l.current){const E=l.current.selectionStart,g=x.substring(a.startPosition+1,E);r({...a,query:g,selectedIndex:0})}},h=y=>{y.action()},p=()=>{r({...a,active:!1})};return o.jsx("div",{className:"rich-editor",children:o.jsxs("div",{className:"rich-editor-panes",children:[o.jsxs("div",{className:"rich-editor-pane rich-editor-edit",children:[o.jsx("div",{className:"rich-editor-label",children:"Edit"}),o.jsx("textarea",{ref:l,className:"rich-editor-textarea",value:e,onChange:f,onKeyDown:d,placeholder:n||"Write in markdown...",disabled:i,"aria-label":"Markdown editor"}),a.active&&o.jsx(TR,{commands:c,selectedIndex:a.selectedIndex,position:a.position,onSelect:h,onCancel:p})]}),o.jsxs("div",{className:"rich-editor-pane rich-editor-preview",children:[o.jsx("div",{className:"rich-editor-label",children:"Preview"}),o.jsx("div",{className:"rich-editor-preview-content",children:e?o.jsx(d0,{content:e}):o.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function jR(e,t){const n=new Set,i=[e];for(;i.length>0;){const l=i.shift();n.add(l),t.filter(r=>{const s=r.parentId;return typeof s=="string"&&s===l}).forEach(r=>i.push(r.id))}return n}function h0({mode:e,page:t,pages:n,onSubmit:i,onCancel:l,isSubmitting:a,defaultParentId:r}){var v;const[s,u]=b.useState((t==null?void 0:t.title)||""),[c,d]=b.useState((t==null?void 0:t.content)||""),[f,h]=b.useState(((v=t==null?void 0:t.tags)==null?void 0:v.map(C=>C.name))||[]),[p,y]=b.useState(()=>{if(e==="create"&&r)return r;const C=t==null?void 0:t.parentId;return typeof C=="string"?C:null}),[x,E]=b.useState(""),g=b.useMemo(()=>{if(e==="create")return n;{const C=jR(t.id,n);return n.filter(A=>!C.has(A.id))}},[e,n,t]);b.useEffect(()=>{const C=A=>{A.key==="Escape"&&l()};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[l]);const m=async C=>{var A,N;C.preventDefault();try{if(e==="create"){const _={title:s.trim(),content:c.trim(),...f.length>0&&{tagNames:f},...p&&{parentId:p}};await i(_)}else{const _={};let I=!1;s!==t.title&&(_.title=s,I=!0),c!==t.content&&(_.content=c,I=!0);const D=((A=t.tags)==null?void 0:A.map(q=>q.name))||[];JSON.stringify(f.sort())!==JSON.stringify(D.sort())&&(_.tagNames=f,I=!0);const M=typeof t.parentId=="string"?t.parentId:null;if(p!==M&&(_.parentId=p,I=!0),!I){E("No changes to save");return}await i(_)}E("")}catch(_){const I=((N=_==null?void 0:_.body)==null?void 0:N.detail)||(_==null?void 0:_.message)||`Failed to ${e==="create"?"create":"update"} page`;E(I)}};return o.jsxs("form",{className:"context-form",onSubmit:m,children:[x&&o.jsx("div",{className:"context-error",style:{margin:"0 0 16px 0"},children:x}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-title`,children:"Title *"}),o.jsx("input",{id:`${e}-title`,type:"text",value:s,onChange:C=>u(C.target.value),placeholder:"Give your page a headline",required:!0,disabled:a})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-parent`,children:"Parent Page"}),o.jsxs("select",{id:`${e}-parent`,value:p??"",onChange:C=>y(C.target.value||null),disabled:a,children:[o.jsx("option",{value:"",children:"None (top level)"}),g.map(C=>o.jsx("option",{value:C.id,children:C.title},C.id))]})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-content`,children:"Content *"}),o.jsx(AR,{value:c,onChange:d,placeholder:"Write in markdown or use / for commands",disabled:a})]}),o.jsxs("div",{className:"context-form-group",children:[o.jsx("label",{htmlFor:`${e}-tags`,children:"Tags"}),o.jsx(_k,{value:f,onChange:h,placeholder:"Type to add tags..."})]}),o.jsxs("div",{className:"context-form-actions",children:[o.jsx("button",{type:"button",className:"context-button secondary",onClick:l,disabled:a,children:"Cancel"}),o.jsx("button",{type:"submit",className:"context-button primary",disabled:a,children:a?"Saving…":e==="create"?"Create page":"Save Changes"})]})]})}function dg(){const e=Je(),{pageId:t}=Wi(),{pages:n,isCreating:i,createPage:l,getPageTree:a}=Tr(),r=async s=>{const u=await l(s);await a(),e(`/context/page/${u.id}`)};return o.jsxs("div",{className:"context-edit-container",children:[o.jsxs("div",{className:"context-edit-header",children:[o.jsx("h2",{children:"New Page"}),o.jsx("button",{onClick:()=>e("/context"),className:"context-button secondary",children:"Close"})]}),o.jsx(h0,{mode:"create",pages:n,onSubmit:r,onCancel:()=>e("/context"),isSubmitting:i,defaultParentId:t})]})}function Qd({message:e,onConfirm:t,onCancel:n,confirmText:i="Confirm",cancelText:l="Cancel"}){return o.jsx("div",{className:"confirm-overlay",onClick:n,children:o.jsxs("div",{className:"confirm-dialog",onClick:a=>a.stopPropagation(),children:[o.jsx("div",{className:"confirm-message",children:e}),o.jsxs("div",{className:"confirm-actions",children:[o.jsx("button",{onClick:n,className:"btn-secondary",children:l}),o.jsx("button",{onClick:t,className:"btn-danger",children:i})]})]})})}function _R(e,t){const n=[];let i=e;for(;i;){const l=t.find(r=>r.id===i);if(!l)break;n.unshift(l);const a=l.parentId;i=typeof a=="string"?a:null}return n}function RR({pageId:e,pages:t}){const n=_R(e,t);return o.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[o.jsx(Pi,{to:"/context",className:"breadcrumb-link",children:"Home"}),n.map((i,l)=>o.jsxs("span",{className:"breadcrumb-item",children:[o.jsx("span",{className:"breadcrumb-separator",children:" > "}),l===n.length-1?o.jsx("span",{className:"breadcrumb-current",children:i.title}):o.jsx(Pi,{to:`/context/page/${i.id}`,className:"breadcrumb-link",children:i.title})]},i.id))]})}function hg(e){try{return new Date(e).toLocaleString()}catch{return e}}function OR(){const{pageId:e}=Wi(),t=Je(),{pages:n,selectedPage:i,isLoadingPage:l,isUpdating:a,isDeleting:r,error:s,selectPage:u,deletePage:c,getPageTree:d}=Tr(),[f,h]=b.useState(!1),[p,y]=b.useState("");tl(i!=null&&i.title?`Context — ${i.title}`:"Context"),b.useEffect(()=>{e&&u(e)},[e,u]);const x=b.useCallback(()=>{h(!0)},[]),E=b.useCallback(async()=>{var g;if(e)try{await c(e),h(!1),await d(),t("/context")}catch(m){const v=((g=m==null?void 0:m.body)==null?void 0:g.detail)||(m==null?void 0:m.message)||"Failed to delete page";y(v),h(!1)}},[e,c,t,d]);return o.jsxs(o.Fragment,{children:[l&&o.jsx("div",{className:"context-status",children:"Loading page…"}),s&&o.jsx("div",{className:"context-error",children:s}),p&&o.jsx("div",{className:"context-error",children:p}),i&&e&&o.jsxs("div",{className:"context-page-detail",children:[o.jsx(RR,{pageId:e,pages:n}),o.jsxs("div",{className:"context-page-detail-header",children:[o.jsx("h1",{className:"context-page-detail-title",children:i.title}),o.jsxs("div",{className:"context-page-detail-meta",children:[o.jsxs("span",{children:["By ",i.createdBy||"unknown"]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["Created ",hg(i.createdAt)]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["Last edited ",hg(i.updatedAt)]})]})]}),i.tags&&i.tags.length>0&&o.jsx("div",{className:"context-page-detail-tags",children:i.tags.map(g=>o.jsx(ab,{tag:g},g.name))}),o.jsx("div",{className:"context-page-detail-content",children:o.jsx(d0,{content:i.content})}),o.jsxs("div",{className:"context-page-detail-actions",children:[o.jsx("button",{className:"context-button",type:"button",onClick:()=>t(`/context/page/${e}/edit`),disabled:a||r,children:"Edit"}),o.jsx("button",{className:"context-button context-button-danger",type:"button",onClick:x,disabled:a||r,children:"Delete"})]})]}),f&&o.jsx(Qd,{message:"Are you sure you want to delete this page? This action cannot be undone.",onConfirm:E,onCancel:()=>h(!1),confirmText:"Delete",cancelText:"Cancel"})]})}function DR(){const{pageId:e}=Wi(),t=Je(),{selectedPage:n,pages:i,isUpdating:l,updatePage:a,getPageTree:r,selectPage:s}=Tr();b.useEffect(()=>{e&&s(e)},[e,s]);const u=b.useCallback(async c=>{e&&(await a(e,c),await r(),t(`/context/page/${e}`))},[e,a,r,t]);return n?o.jsxs("div",{className:"context-edit-container",children:[o.jsxs("div",{className:"context-edit-header",children:[o.jsx("h2",{children:"Edit Page"}),o.jsx("button",{onClick:()=>t(`/context/page/${e}`),className:"context-button secondary",children:"Close"})]}),o.jsx(h0,{mode:"edit",page:n,pages:i,onSubmit:u,onCancel:()=>t(`/context/page/${e}`),isSubmitting:l})]}):o.jsx("div",{className:"context-status",children:"Loading..."})}B.BASE=el;const p0=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null),[u,c]=b.useState([]),[d,f]=b.useState([]),[h,p]=b.useState([]);b.useEffect(()=>{y()},[]);const y=async()=>{t(!0),i(null);try{const D=await ct.mcpRegistryControllerListServers();a(D.items||[])}catch(D){i(D instanceof Error?D.message:"Failed to load servers")}finally{t(!1)}},x=async D=>{t(!0),i(null);try{const[T,M,q]=await Promise.all([ct.mcpRegistryControllerGetServer(D),ct.mcpRegistryControllerListScopes(D),ct.mcpRegistryControllerListConnections(D)]);if(s(T),c(M||[]),f(q||[]),M&&M.length>0){const P=[];for(const F of M)try{const V=await ct.mcpRegistryControllerListMappings(D,F.id);V&&P.push(...V)}catch(V){console.error(`Failed to load mappings for scope ${F.id}`,V)}p(P)}}catch(T){i(T instanceof Error?T.message:"Failed to load server details")}finally{t(!1)}};return{isLoading:e,error:n,servers:l,selectedServer:r,scopes:u,connections:d,mappings:h,loadServers:y,loadServerDetails:x,createServer:async D=>{t(!0),i(null);try{const T=await ct.mcpRegistryControllerCreateServer({...D,type:D.type??Gc.type.HTTP});return await y(),T}catch(T){throw i(T instanceof Error?T.message:"Failed to create server"),T}finally{t(!1)}},updateServer:async(D,T)=>{t(!0),i(null);try{const M=await ct.mcpRegistryControllerUpdateServer(D,T);return(r==null?void 0:r.id)===D&&s(M),await y(),M}catch(M){throw i(M instanceof Error?M.message:"Failed to update server"),M}finally{t(!1)}},createScope:async(D,T,M)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateScopes(D,[{id:T,description:M}]),(r==null?void 0:r.id)===D&&await x(D)}catch(q){throw i(q instanceof Error?q.message:"Failed to create scope"),q}finally{t(!1)}},createConnection:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateConnection(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to create connection"),M}finally{t(!1)}},updateConnection:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerUpdateConnection(D,T),r&&await x(r.id)}catch(M){throw i(M instanceof Error?M.message:"Failed to update connection"),M}finally{t(!1)}},createMapping:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerCreateMapping(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to create mapping"),M}finally{t(!1)}},deleteScope:async(D,T)=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteScope(D,T),(r==null?void 0:r.id)===D&&await x(D)}catch(M){throw i(M instanceof Error?M.message:"Failed to delete scope"),M}finally{t(!1)}},deleteConnection:async D=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteConnection(D),r&&await x(r.id)}catch(T){throw i(T instanceof Error?T.message:"Failed to delete connection"),T}finally{t(!1)}},deleteMapping:async D=>{t(!0),i(null);try{await ct.mcpRegistryControllerDeleteMapping(D),r&&await x(r.id)}catch(T){throw i(T instanceof Error?T.message:"Failed to delete mapping"),T}finally{t(!1)}}}};function zR(){tl("Tools");const{servers:e,isLoading:t,error:n,createServer:i}=p0(),l=Je(),[a,r]=b.useState(!1),[s,u]=b.useState({providedId:"",name:"",description:"",url:""}),c=async d=>{d.preventDefault();try{const f={...s,url:s.url||void 0},h=await i(f);r(!1),u({providedId:"",name:"",description:"",url:""}),h&&l(`/mcp-registry/${h.id}`)}catch(f){console.error("Failed to create server",f)}};return o.jsxs("div",{className:"mcp-registry",children:[o.jsxs("div",{className:"mcp-registry-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Tools"}),o.jsx("p",{className:"subtitle",children:"Manage Model Context Protocol servers and their configurations"})]}),o.jsxs("div",{className:"header-actions",children:[o.jsx(rr,{}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"+ Add Server"})]})]}),n&&o.jsx("div",{className:"error-message",children:n}),t?o.jsx("div",{className:"loading",children:"Loading servers..."}):o.jsx("div",{className:"servers-grid",children:e.length===0?o.jsxs("div",{className:"empty-state",children:[o.jsx("p",{children:"No MCP servers registered yet."}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"Create your first server"})]}):e.map(d=>o.jsxs("div",{className:"server-card",onClick:()=>l(`/mcp-registry/${d.id}`),children:[o.jsx("h3",{children:d.name}),o.jsxs("p",{className:"server-id",children:["ID: ",d.providedId]}),o.jsx("p",{className:"server-description",children:d.description})]},d.id))}),a&&o.jsx("div",{className:"modal-overlay",onClick:()=>r(!1),children:o.jsxs("div",{className:"modal-content",onClick:d=>d.stopPropagation(),children:[o.jsx("h2",{children:"Create MCP Server"}),o.jsxs("form",{onSubmit:c,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"providedId",children:"Server ID"}),o.jsx("input",{type:"text",id:"providedId",value:s.providedId,onChange:d=>u({...s,providedId:d.target.value}),placeholder:"e.g., my-mcp-server",required:!0}),o.jsx("small",{children:"Unique identifier for this server"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:s.name,onChange:d=>u({...s,name:d.target.value}),placeholder:"e.g., My MCP Server",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:s.description,onChange:d=>u({...s,description:d.target.value}),placeholder:"Brief description of this server",rows:3,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"url",children:"Server URL (optional)"}),o.jsx("input",{type:"url",id:"url",value:s.url,onChange:d=>u({...s,url:d.target.value}),placeholder:"e.g., http://localhost:3000/api/v1/tasks/tasks/mcp"}),o.jsx("small",{children:"URL that MCP clients will use to connect to this server"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>r(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Server"})]})]})]})})]})}const LR=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState(null),[r,s]=b.useState(null),[u,c]=b.useState(null);async function d(h,p){t(!0),i(null);try{const y=Bv(),x=await fetch(`${y}/.well-known/oauth-authorization-server/mcp/issuer`);if(!x.ok)throw new Error("Failed to fetch authorization server issuer URL");const{issuer:E}=await x.json(),g=new URL(`${E}/mcp/${h}/${p}`);a(g);const m=new URL(`${g.origin}/.well-known/oauth-authorization-server${g.pathname}`);s(m),await f(m)}catch(y){i(y instanceof Error?y.message:"Failed to load authorization server configuration"),t(!1)}}async function f(h){t(!0),i(null);try{const y=await(await fetch(h.toString())).json();c(y)}catch(p){i(p instanceof Error?p.message:"Failed to load metadata"),c({})}finally{t(!1)}}return{isLoading:e,error:n,authorizationServerUrl:l,authorizationServerMetadataUrl:r,metadata:u,loadMetadata:d}};function MR(){const{serverId:e}=Wi(),t=Je(),{selectedServer:n,scopes:i,connections:l,mappings:a,isLoading:r,error:s,loadServerDetails:u,createScope:c,createConnection:d,updateServer:f,updateConnection:h,createMapping:p,deleteScope:y,deleteConnection:x,deleteMapping:E}=p0(),{metadata:g,authorizationServerMetadataUrl:m,loadMetadata:v}=LR(),[C,A]=b.useState([]),[N,_]=b.useState(null),[I,D]=b.useState(null),[T,M]=b.useState(null),[q,P]=b.useState(!1),[F,V]=b.useState({name:"",description:"",url:""}),[j,O]=b.useState({scopeId:"",description:""}),[w,X]=b.useState({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""}),[S,we]=b.useState({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]});tl(n?`${n.name} - Tools`:"Tools"),b.useEffect(()=>{e&&(u(e),dT.authJourneysControllerGetAuthJourneys(e).then(A).catch(()=>A([])))},[e]),b.useEffect(()=>{n&&v(n.providedId,"0.0.0")},[n]);const We=()=>{n&&(V({name:n.name,description:n.description,url:n.url||""}),_("edit-server"))},k=async R=>{if(R.preventDefault(),!!e)try{const G={};F.name&&(G.name=F.name),F.description&&(G.description=F.description),F.url&&(G.url=F.url),await f(e,G),_(null),V({name:"",description:"",url:""})}catch(G){console.error("Failed to update server",G)}},_e=async R=>{if(R.preventDefault(),!!e)try{await c(e,j.scopeId,j.description),_(null),O({scopeId:"",description:""})}catch(G){console.error("Failed to create scope",G)}},st=async R=>{if(R.preventDefault(),!!e)try{await d(e,w),_(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(G){console.error("Failed to create connection",G)}},Ie=R=>{const G=l.find(He=>He.id===R);G&&(M(R),X({clientId:G.clientId,clientSecret:"",authorizeUrl:G.authorizeUrl,tokenUrl:G.tokenUrl,friendlyName:G.friendlyName,providedId:G.providedId||""}),_("edit-connection"))},ki=async R=>{if(R.preventDefault(),!!T)try{const G={};w.friendlyName&&(G.friendlyName=w.friendlyName),w.providedId&&(G.providedId=w.providedId),w.clientId&&(G.clientId=w.clientId),w.clientSecret&&(G.clientSecret=w.clientSecret),w.authorizeUrl&&(G.authorizeUrl=w.authorizeUrl),w.tokenUrl&&(G.tokenUrl=w.tokenUrl),await h(T,G),_(null),M(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(G){console.error("Failed to update connection",G)}},ln=async R=>{if(R.preventDefault(),!!e)try{for(const G of S.mappings)await p(e,{scopeId:S.scopeId,connectionId:G.connectionId,downstreamScope:G.downstreamScope});_(null),we({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]})}catch(G){console.error("Failed to create mapping",G)}},Gn=()=>{const R=S.mappings[S.mappings.length-1];we({...S,mappings:[...S.mappings,{connectionId:R.connectionId,downstreamScope:""}]})},Vn=R=>{S.mappings.length!==1&&we({...S,mappings:S.mappings.filter((G,He)=>He!==R)})},Ni=(R,G,He)=>{const Ot=[...S.mappings];Ot[R]={...Ot[R],[G]:He},we({...S,mappings:Ot})},zo=async R=>{e&&D({message:"Are you sure you want to delete this scope?",onConfirm:async()=>{try{await y(e,R),D(null)}catch(G){console.error("Failed to delete scope",G),D(null)}}})},Lo=async R=>{D({message:"Are you sure you want to delete this connection?",onConfirm:async()=>{try{await x(R),D(null)}catch(G){console.error("Failed to delete connection",G),D(null)}}})},Mo=async R=>{D({message:"Are you sure you want to delete this mapping?",onConfirm:async()=>{try{await E(R),D(null)}catch(G){console.error("Failed to delete mapping",G),D(null)}}})},Ar=b.useMemo(()=>{const R={};return a.forEach(G=>{const He=i.find(an=>an.id===G.scopeId),Ot=l.find(an=>an.id===G.connectionId);!He||!Ot||(R[G.scopeId]||(R[G.scopeId]={scope:He,connections:{}}),R[G.scopeId].connections[G.connectionId]||(R[G.scopeId].connections[G.connectionId]={connection:Ot,mappings:[]}),R[G.scopeId].connections[G.connectionId].mappings.push(G))}),R},[a,i,l]);return r&&!n?o.jsx("div",{className:"loading",children:"Loading server details..."}):n?o.jsxs("div",{className:"mcp-registry",children:[o.jsxs("div",{className:"mcp-registry-header",children:[o.jsxs("div",{children:[o.jsx("button",{onClick:()=>t("/mcp-registry"),className:"btn-back",children:"← Back to Registry"}),o.jsx("h1",{children:n.name}),o.jsx("p",{className:"subtitle",children:n.description}),o.jsxs("p",{className:"server-id",children:["ID: ",n.providedId]})]}),o.jsx("div",{className:"header-actions",children:o.jsx(rr,{})})]}),s&&o.jsx("div",{className:"error-message",children:s}),o.jsxs("div",{className:"info-section",children:[o.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[o.jsx("h2",{className:"section-title",children:"Information"}),o.jsx("button",{onClick:We,className:"btn-secondary btn-sm",children:"Edit"})]}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"info-grid",children:[o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Name"}),o.jsx("span",{className:"info-value",children:n.name})]}),o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"ID"}),o.jsx("span",{className:"info-value mono",children:n.providedId})]}),l.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Connections"}),o.jsx("span",{className:"info-value",children:l.map(R=>R.friendlyName).join(", ")})]}),i.length>0&&o.jsxs("div",{className:"info-item",children:[o.jsx("span",{className:"info-label",children:"Scopes"}),o.jsx("span",{className:"info-value",children:i.map(R=>R.id).join(", ")})]}),n.url&&o.jsxs("div",{className:"info-item inspector-command-item",children:[o.jsx("span",{className:"info-label",children:"Inspector Command"}),o.jsxs("div",{className:"inspector-command",children:[o.jsxs("code",{className:"inspector-code",children:["npx @modelcontextprotocol/inspector --transport http --server-url ",n.url]}),o.jsx("button",{className:"btn-secondary btn-sm copy-btn",onClick:()=>{navigator.clipboard.writeText(`npx @modelcontextprotocol/inspector --transport http --server-url ${n.url}`)},title:"Copy to clipboard",children:"Copy"})]})]})]}),g?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"metadata-section",children:[o.jsxs("div",{className:"metadata-header",children:[o.jsx("span",{className:"metadata-status",children:"✓ Authorization Server Metadata found"}),o.jsx("button",{onClick:()=>P(!q),className:"btn-link",children:q?"Hide":"Show"})]}),q&&o.jsxs("div",{className:"metadata-content",children:[o.jsx("p",{className:"metadata-url",children:m==null?void 0:m.toString()}),o.jsx("pre",{className:"metadata-json",children:JSON.stringify(g,null,2)})]})]})]}):null]}),o.jsxs("div",{className:"admin-section",children:[o.jsx("h2",{className:"section-title",children:"Administration"}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Permissions"})}),o.jsx("p",{className:"subsection-description",children:"Define the scopes (permissions) that will be available for MCP clients to request when connecting to this server."}),i.length===0?o.jsx("div",{className:"proper-table",children:o.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add permission..."})})})}):o.jsxs("div",{className:"proper-table",children:[o.jsxs("div",{className:"table-header",children:[o.jsx("div",{className:"table-col-name",children:"Scope Name"}),o.jsx("div",{className:"table-col-description",children:"Description"}),o.jsx("div",{className:"table-col-actions"})]}),i.map(R=>o.jsxs("div",{className:"table-body-row",children:[o.jsx("div",{className:"table-col-name",children:R.id}),o.jsx("div",{className:"table-col-description",children:R.description}),o.jsx("div",{className:"table-col-actions",children:o.jsx("button",{onClick:()=>zo(R.id),className:"btn-delete-small",children:"Delete"})})]},R.id)),o.jsx("div",{className:"table-add-row",onClick:()=>_("scope"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add permission..."})})})]})]}),o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Connections"})}),o.jsx("p",{className:"subsection-description",children:"Configure connections to downstream systems that support OAuth. The MCP server acts as a secure proxy, managing authentication and authorization on behalf of clients."}),l.length===0?o.jsx("div",{className:"proper-table",children:o.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add connection..."})})})}):o.jsxs("div",{className:"proper-table",children:[o.jsxs("div",{className:"table-header",children:[o.jsx("div",{className:"table-col-name",children:"Connection Name"}),o.jsx("div",{className:"table-col-description",children:"Description"}),o.jsx("div",{className:"table-col-actions"})]}),l.map(R=>o.jsxs("div",{className:"table-body-row",children:[o.jsx("div",{className:"table-col-name",children:R.friendlyName}),o.jsx("div",{className:"table-col-description",children:R.providedId&&o.jsx("span",{className:"mono",children:R.providedId})}),o.jsxs("div",{className:"table-col-actions",children:[o.jsx("button",{onClick:()=>Ie(R.id),className:"btn-secondary btn-sm",children:"Edit"}),o.jsx("button",{onClick:()=>Lo(R.id),className:"btn-delete-small",children:"Delete"})]})]},R.id)),o.jsx("div",{className:"table-add-row",onClick:()=>_("connection"),children:o.jsx("div",{className:"add-row-cell",children:o.jsx("span",{className:"add-row-text",children:"Add connection..."})})})]})]}),l.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"section-divider"}),o.jsxs("div",{className:"admin-subsection",children:[o.jsx("div",{className:"subsection-header",children:o.jsx("h3",{children:"Scope Mappings"})}),o.jsx("p",{className:"subsection-description",children:"Map MCP server scopes to downstream connection scopes. When a client requests an MCP scope, the server will request the corresponding downstream scopes from the configured connections."}),a.length===0?o.jsx("div",{className:"mapping-group",children:o.jsx("div",{className:"table-add-row",onClick:()=>i.length>0&&_("mapping"),style:{opacity:i.length===0?.5:1,cursor:i.length===0?"not-allowed":"pointer"},children:o.jsx("span",{className:"add-row-text",children:i.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})}):o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[Object.entries(Ar).map(([R,G])=>o.jsxs("div",{className:"mapping-group",children:[o.jsxs("div",{className:"mapping-group-header",children:[G.scope.id," → ",Object.keys(G.connections).length," connection",Object.keys(G.connections).length!==1?"s":""]}),o.jsx("div",{className:"mapping-items",children:Object.entries(G.connections).map(([He,Ot])=>Ot.mappings.map(an=>o.jsxs("div",{className:"mapping-item",children:[o.jsxs("div",{children:[o.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#1a202c",marginBottom:"4px"},children:Ot.connection.friendlyName}),o.jsx("div",{className:"mapping-item-scope",children:an.downstreamScope})]}),o.jsx("button",{onClick:()=>Mo(an.id),className:"btn-delete-small",title:"Delete mapping",children:"Delete"})]},an.id)))})]},R)),o.jsx("div",{className:"mapping-group",children:o.jsx("div",{className:"table-add-row",onClick:()=>i.length>0&&_("mapping"),style:{opacity:i.length===0?.5:1,cursor:i.length===0?"not-allowed":"pointer"},children:o.jsx("span",{className:"add-row-text",children:i.length===0?"Add permissions first to create mappings...":"Add scope mapping..."})})})]})]})]})]}),o.jsxs("div",{className:"admin-section",children:[o.jsx("h2",{className:"section-title",children:"Authorizations"}),o.jsx("div",{className:"section-divider"}),o.jsx("p",{className:"subsection-description",style:{marginBottom:"16px"},children:"Live monitoring of MCP client authorizations and their authentication state"}),C.length===0?o.jsx("p",{style:{color:"#888",fontSize:"14px"},children:"No active authorizations"}):o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:C.sort((R,G)=>new Date(G.updatedAt).getTime()-new Date(R.updatedAt).getTime()).map(R=>o.jsxs("div",{style:{backgroundColor:"#f8f9fa",border:"1px solid #e9ecef",borderRadius:"8px",padding:"16px"},children:[o.jsx("div",{style:{display:"flex",alignItems:"flex-start",justifyContent:"space-between",marginBottom:"12px"},children:o.jsxs("div",{style:{flex:1},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"4px"},children:[o.jsx("h3",{style:{margin:0,fontSize:"16px",fontWeight:600},children:R.mcpAuthorizationFlow.clientName??"Unknown Client"}),o.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:R.status===rn.status.AUTHORIZATION_CODE_EXCHANGED?"#d4edda":R.status===rn.status.MCP_AUTH_FLOW_STARTED?"#cfe2ff":R.status===rn.status.CONNECTIONS_FLOW_STARTED?"#fff3cd":R.status===rn.status.USER_CONSENT_REJECTED?"#f8d7da":"#e2e3e5",color:R.status===rn.status.AUTHORIZATION_CODE_EXCHANGED?"#155724":R.status===rn.status.MCP_AUTH_FLOW_STARTED?"#084298":R.status===rn.status.CONNECTIONS_FLOW_STARTED?"#664d03":R.status===rn.status.USER_CONSENT_REJECTED?"#842029":"#383d41"},children:R.status.replace(/_/g," ").toUpperCase()})]}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[R.actor&&o.jsxs("div",{style:{marginBottom:"4px"},children:[o.jsx("strong",{children:"User:"})," ",R.actor.displayName," (",R.actor.slug,")"]}),o.jsxs("div",{children:["Journey ID: ",R.id]}),o.jsxs("div",{children:["Started: ",new Date(R.createdAt).toLocaleString()]}),o.jsxs("div",{children:["Last Update: ",new Date(R.updatedAt).toLocaleString()]})]})]})}),o.jsxs("div",{style:{marginBottom:"12px",paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[o.jsx("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"4px"},children:"MCP Authorization"}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[o.jsxs("div",{children:["Status: ",o.jsx("span",{style:{fontWeight:500,color:R.mcpAuthorizationFlow.status===Ia.status.AUTHORIZATION_CODE_EXCHANGED?"#28a745":R.mcpAuthorizationFlow.status===Ia.status.CLIENT_REGISTERED?"#007bff":R.mcpAuthorizationFlow.status===Ia.status.USER_CONSENT_REJECTED?"#dc3545":"#6c757d"},children:R.mcpAuthorizationFlow.status.replace(/_/g," ")})]}),R.mcpAuthorizationFlow.scope&&o.jsxs("div",{children:["Scopes: ",R.mcpAuthorizationFlow.scope]}),R.mcpAuthorizationFlow.authorizationCodeExpiresAt&&o.jsxs("div",{children:["Code Expires: ",new Date(R.mcpAuthorizationFlow.authorizationCodeExpiresAt).toLocaleString()]}),o.jsxs("div",{children:["Code Used: ",R.mcpAuthorizationFlow.authorizationCodeUsed?"Yes":"No"]})]})]}),R.connectionAuthorizationFlows.length>0&&o.jsxs("div",{style:{paddingLeft:"16px",borderLeft:"2px solid #dee2e6"},children:[o.jsxs("div",{style:{fontSize:"14px",fontWeight:500,color:"#495057",marginBottom:"8px"},children:["Downstream Connections (",R.connectionAuthorizationFlows.length,")"]}),o.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:R.connectionAuthorizationFlows.map(G=>o.jsxs("div",{style:{backgroundColor:"#ffffff",borderRadius:"4px",padding:"12px"},children:[o.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"4px"},children:[o.jsx("span",{style:{fontSize:"14px",fontWeight:500},children:G.connectionName??"Unknown Connection"}),o.jsx("span",{style:{fontSize:"11px",padding:"2px 8px",borderRadius:"4px",backgroundColor:G.status===Kn.status.AUTHORIZED?"#d4edda":G.status===Kn.status.PENDING?"#fff3cd":(G.status===Kn.status.FAILED,"#f8d7da"),color:G.status===Kn.status.AUTHORIZED?"#155724":G.status===Kn.status.PENDING?"#664d03":G.status===Kn.status.FAILED?"#842029":"#721c24"},children:G.status})]}),o.jsxs("div",{style:{fontSize:"11px",color:"#6c757d",lineHeight:"1.5"},children:[G.tokenExpiresAt&&o.jsxs("div",{children:["Token Expires: ",new Date(G.tokenExpiresAt).toLocaleString()]}),o.jsxs("div",{children:["Created: ",new Date(G.createdAt).toLocaleString()]})]})]},G.id))})]})]},R.id))})]}),N==="scope"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Permission"}),o.jsxs("form",{onSubmit:_e,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"scopeId",children:"Scope ID"}),o.jsx("input",{type:"text",id:"scopeId",value:j.scopeId,onChange:R=>O({...j,scopeId:R.target.value}),placeholder:"e.g., tool:read",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"scopeDescription",children:"Description"}),o.jsx("textarea",{id:"scopeDescription",value:j.description,onChange:R=>O({...j,description:R.target.value}),placeholder:"What does this scope provide?",rows:3,required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Scope"})]})]})]})}),N==="connection"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Connection"}),o.jsxs("form",{onSubmit:st,autoComplete:"off",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"friendlyName",children:"Friendly Name"}),o.jsx("input",{type:"text",id:"friendlyName",value:w.friendlyName,onChange:R=>X({...w,friendlyName:R.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"providedId",children:["Provided ID ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"text",id:"providedId",value:w.providedId,onChange:R=>X({...w,providedId:R.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),o.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"clientId",children:"Client ID"}),o.jsx("input",{type:"text",id:"clientId",value:w.clientId,onChange:R=>X({...w,clientId:R.target.value}),autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"clientSecret",children:"Client Secret"}),o.jsx("input",{type:"password",id:"clientSecret",value:w.clientSecret,onChange:R=>X({...w,clientSecret:R.target.value}),autoComplete:"new-password",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"authorizeUrl",children:"Authorize URL"}),o.jsx("input",{type:"url",id:"authorizeUrl",value:w.authorizeUrl,onChange:R=>X({...w,authorizeUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"tokenUrl",children:"Token URL"}),o.jsx("input",{type:"url",id:"tokenUrl",value:w.tokenUrl,onChange:R=>X({...w,tokenUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Connection"})]})]})]})}),N==="edit-connection"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Edit Connection"}),o.jsxs("form",{onSubmit:ki,autoComplete:"off",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editFriendlyName",children:"Friendly Name"}),o.jsx("input",{type:"text",id:"editFriendlyName",value:w.friendlyName,onChange:R=>X({...w,friendlyName:R.target.value}),placeholder:"e.g., GitHub OAuth",autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"editProvidedId",children:["Provided ID ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"text",id:"editProvidedId",value:w.providedId,onChange:R=>X({...w,providedId:R.target.value}),placeholder:"e.g., google-oauth, github-integration",pattern:"[a-zA-Z0-9_-]+",title:"Only alphanumeric characters, dashes, and underscores are allowed",autoComplete:"off"}),o.jsx("small",{style:{color:"#888",fontSize:"0.85em",marginTop:"4px",display:"block"},children:"Unique identifier for token exchange (alphanumeric, dash, underscore only)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editClientId",children:"Client ID"}),o.jsx("input",{type:"text",id:"editClientId",value:w.clientId,onChange:R=>X({...w,clientId:R.target.value}),autoComplete:"off",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editClientSecret",children:"Client Secret (leave blank to keep current)"}),o.jsx("input",{type:"password",id:"editClientSecret",value:w.clientSecret,onChange:R=>X({...w,clientSecret:R.target.value}),placeholder:"Enter new secret or leave blank",autoComplete:"new-password"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editAuthorizeUrl",children:"Authorize URL"}),o.jsx("input",{type:"url",id:"editAuthorizeUrl",value:w.authorizeUrl,onChange:R=>X({...w,authorizeUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editTokenUrl",children:"Token URL"}),o.jsx("input",{type:"url",id:"editTokenUrl",value:w.tokenUrl,onChange:R=>X({...w,tokenUrl:R.target.value}),placeholder:"https://...",required:!0})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>{_(null),M(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})},className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Update Connection"})]})]})]})}),N==="edit-server"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Edit Server"}),o.jsxs("form",{onSubmit:k,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editServerName",children:"Name"}),o.jsx("input",{type:"text",id:"editServerName",value:F.name,onChange:R=>V({...F,name:R.target.value}),placeholder:"e.g., GitHub Integration",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"editServerDescription",children:"Description"}),o.jsx("textarea",{id:"editServerDescription",value:F.description,onChange:R=>V({...F,description:R.target.value}),placeholder:"What does this server provide?",rows:3,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsxs("label",{htmlFor:"editServerUrl",children:["URL ",o.jsx("span",{style:{color:"#888",fontWeight:"normal"},children:"(optional)"})]}),o.jsx("input",{type:"url",id:"editServerUrl",value:F.url,onChange:R=>V({...F,url:R.target.value}),placeholder:"http://localhost:3000/api/v1/mcp"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>{_(null),V({name:"",description:"",url:""})},className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Update Server"})]})]})]})}),N==="mapping"&&o.jsx("div",{className:"modal-overlay",onClick:()=>_(null),children:o.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[o.jsx("h2",{children:"Create Scope Mapping"}),o.jsxs("form",{onSubmit:ln,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"mappingScopeId",children:"MCP Scope"}),o.jsxs("select",{id:"mappingScopeId",value:S.scopeId,onChange:R=>we({...S,scopeId:R.target.value}),required:!0,children:[o.jsx("option",{value:"",children:"Select a scope"}),i.map(R=>o.jsx("option",{value:R.id,children:R.id},R.id))]})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{children:"Connection & Downstream Scope Mappings"}),S.mappings.map((R,G)=>o.jsxs("div",{className:"mapping-row",children:[o.jsxs("select",{value:R.connectionId,onChange:He=>Ni(G,"connectionId",He.target.value),required:!0,className:"mapping-connection-select",children:[o.jsx("option",{value:"",children:"Select a connection"}),l.map(He=>o.jsx("option",{value:He.id,children:He.friendlyName},He.id))]}),o.jsx("input",{type:"text",value:R.downstreamScope,onChange:He=>Ni(G,"downstreamScope",He.target.value),placeholder:"e.g., repo:read",required:!0,className:"mapping-scope-input"}),S.mappings.length>1&&o.jsx("button",{type:"button",onClick:()=>Vn(G),className:"btn-remove","aria-label":"Remove mapping",children:"×"})]},G)),o.jsx("button",{type:"button",onClick:Gn,className:"btn-add-mapping",children:"+ Add Entry"})]}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>_(null),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Mapping"})]})]})]})}),I&&o.jsx(Qd,{message:I.message,onConfirm:I.onConfirm,onCancel:()=>D(null)})]}):o.jsx("div",{className:"error-message",children:"Server not found"})}B.BASE=el;function BR(){tl("Authorization Consent - taico");const[e]=XC(),t=e.get("flow"),[n,i]=b.useState(null),[l,a]=b.useState(!0),[r,s]=b.useState(null),[u,c]=b.useState(!1);b.useEffect(()=>{if(!t){s("No authorization flow ID provided"),a(!1);return}d()},[t]);const d=async()=>{if(t){a(!0),s(null);try{const y=await hT.authorizationControllerGetConsentMetadata(t);i(y)}catch(y){s(y instanceof Error?y.message:"Failed to load authorization details")}finally{a(!1)}}},f=async y=>{if(!(!n||!t)){c(!0),s(null);try{const x={flow_id:t,approved:y},E=B.BASE??"",g=document.createElement("form");g.method="POST",g.action=`${E}/api/v1/auth/authorize/mcp/${n.server.providedId}/0.0.0`,Object.entries(x).forEach(([m,v])=>{const C=document.createElement("input");C.type="hidden",C.name=m,C.value=String(v),g.appendChild(C)}),document.body.appendChild(g),g.submit()}catch(x){s(x instanceof Error?x.message:"Failed to submit consent decision"),c(!1)}}},h=()=>{n&&f(!0)},p=()=>{n&&f(!1)};return l?o.jsx("div",{className:"consent-page",children:o.jsx("div",{className:"consent-container",children:o.jsxs("div",{className:"loading-state",children:[o.jsx("div",{className:"spinner"}),o.jsx("p",{children:"Loading authorization details..."})]})})}):r||!n?o.jsx("div",{className:"consent-page",children:o.jsx("div",{className:"consent-container",children:o.jsxs("div",{className:"error-state",children:[o.jsx("h1",{children:"Authorization Error"}),o.jsx("p",{className:"error-message",children:r||"Invalid authorization request"}),o.jsx(rr,{})]})})}):o.jsx("div",{className:"consent-page",children:o.jsxs("div",{className:"consent-container",children:[o.jsxs("div",{className:"consent-header",children:[o.jsx("div",{className:"oauth-icon",children:"🔐"}),o.jsx("h1",{children:"Authorization Request"}),o.jsx("p",{className:"subtitle",children:"Review the following authorization request carefully"})]}),o.jsxs("div",{className:"consent-details",children:[o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHO is requesting access"}),o.jsxs("div",{className:"client-info",children:[o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Client Name:"}),o.jsx("span",{className:"value",children:n.client.clientName})]}),o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Client ID:"}),o.jsx("span",{className:"value",children:o.jsx("code",{children:n.client.clientId})})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHAT access is requested"}),n.scopes&&n.scopes.length>0?o.jsxs(o.Fragment,{children:[o.jsx("ul",{className:"scopes-list",children:n.scopes.map(y=>o.jsx("li",{children:o.jsx("span",{className:"scope-badge",children:y})},y))}),o.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"These permissions determine what the client can do on your behalf."})]}):o.jsx("p",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"No specific permissions requested."})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"WHERE access is granted"}),o.jsxs("div",{className:"server-info",children:[o.jsx("div",{className:"server-name",children:n.server.name}),o.jsxs("div",{className:"server-id",children:["Server ID: ",n.server.providedId]})]}),o.jsxs("div",{className:"resource-info",style:{marginTop:"16px"},children:[o.jsx("div",{style:{fontSize:"13px",color:"#7f8c8d",marginBottom:"8px"},children:"Resource:"}),o.jsx("code",{children:n.resource})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Redirect Information"}),o.jsx("div",{className:"client-info",children:o.jsxs("div",{className:"info-row",children:[o.jsx("span",{className:"label",children:"Redirect URI:"}),o.jsx("span",{className:"value",children:o.jsx("code",{children:n.redirectUri})})]})}),o.jsx("p",{style:{marginTop:"12px",fontSize:"13px",color:"#7f8c8d",marginBottom:0},children:"After authorization, you will be redirected to this URL."})]})]}),r&&o.jsx("div",{className:"error-banner",children:r}),o.jsxs("div",{className:"consent-actions",children:[o.jsx("button",{type:"button",className:"btn-deny",onClick:p,disabled:u,children:"Deny"}),o.jsx("button",{type:"button",className:"btn-approve",onClick:h,disabled:u,children:u?"Approving...":"Approve"})]}),o.jsxs("div",{className:"consent-footer",children:[o.jsxs("p",{children:["By approving, you authorize ",o.jsx("strong",{children:n.client.clientName})," to access the specified resources with the requested permissions."]}),o.jsx(rr,{})]})]})})}const pg="agents-sidebar-collapsed";function UR(){const{agentId:e,sessionId:t}=Wi(),n=Je(),[i,l]=b.useState(()=>{const u=localStorage.getItem(pg);return u!==null?u==="true":ar()});b.useEffect(()=>{localStorage.setItem(pg,String(i))},[i]);const a=()=>{l(!i)},r=window.location.pathname.includes("/agents/admin"),s=window.location.pathname==="/agents"||window.location.pathname==="/agents/";return o.jsxs("div",{className:"agents-with-sidebar",children:[o.jsxs("aside",{className:`sidebar-app-specific ${i?"collapsed":""}`,children:[o.jsx("nav",{className:"sidebar-content",children:!i&&o.jsxs("div",{children:[o.jsx("div",{className:"agents-sidebar-header",children:o.jsxs("h2",{className:"agents-sidebar-title",children:["🤖 Agents",o.jsx("span",{className:"agents-status-dot disconnected",title:"WebSocket disconnected"})]})}),o.jsx("div",{className:"agents-sidebar-section",children:o.jsxs("div",{className:"agents-nav-list",children:[o.jsx("div",{className:`agents-nav-item ${s?"active":""}`,onClick:()=>n("/agents"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents")},title:"Agents",children:"🤖 Agents"}),o.jsx("div",{className:`agents-nav-item ${r?"active":""}`,onClick:()=>n("/agents/admin"),role:"button",tabIndex:0,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&n("/agents/admin")},title:"Admin",children:"⚙️ Admin"})]})}),o.jsxs("div",{className:"agents-sidebar-section",children:[o.jsx("h3",{className:"agents-sidebar-section-title",children:"History"}),o.jsxs("div",{className:"agents-history-list",children:[o.jsx("div",{className:"agents-history-item",children:"Loading sessions..."}),!1,!1]})]})]})}),o.jsx("button",{className:"sidebar-toggle",onClick:a,"aria-label":i?"Expand sidebar":"Collapse sidebar",children:i?"→":"←"})]}),o.jsx("main",{className:"agents-content",children:o.jsx(md,{})})]})}B.BASE=el;const Zd=()=>{const[e,t]=b.useState(!1),[n,i]=b.useState(null),[l,a]=b.useState([]),[r,s]=b.useState(null);b.useEffect(()=>{u()},[]);const u=async()=>{t(!0),i(null);try{const f=await Tu.agentsControllerListAgents();a(f.items||[])}catch(f){i(f instanceof Error?f.message:"Failed to load agents")}finally{t(!1)}};return{agents:l,selectedAgent:r,isLoading:e,error:n,loadAgents:u,loadAgentDetails:async f=>{t(!0),i(null);try{const h=await Tu.agentsControllerGetAgentBySlug(f);s(h)}catch(h){i(h instanceof Error?h.message:"Failed to load agent details")}finally{t(!1)}},createAgent:async f=>{t(!0),i(null);try{const h=await Tu.agentsControllerCreateAgent(f);return await u(),h}catch(h){return i(h instanceof Error?h.message:"Failed to create agent"),null}finally{t(!1)}}}};function IR(){const e=Je(),{agents:t,isLoading:n,error:i}=Zd();return o.jsxs("div",{className:"agents-home",children:[o.jsxs("div",{className:"agents-home-header",children:[o.jsx("h2",{children:"Available Agents"}),o.jsx("p",{children:"Select an agent to start a new conversation"})]}),n&&o.jsx("div",{className:"agents-loading",children:"Loading agents..."}),i&&o.jsxs("div",{className:"agents-error",children:["Error: ",i]}),!n&&!i&&t.length===0&&o.jsx("div",{className:"agents-empty",children:"No agents available. Create one in the admin panel."}),o.jsx("div",{className:"agents-admin-grid",children:t.map(l=>o.jsxs("div",{className:"agent-admin-card",onClick:()=>e(`/agents/${l.slug||l.actorId}/session/new`),role:"button",tabIndex:0,onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&e(`/agents/${l.slug||l.actorId}/session/new`)},children:[o.jsxs("div",{className:"agent-admin-card-header",children:[o.jsx("h3",{children:l.name}),o.jsx("span",{className:`agent-status ${l.isActive?"active":"inactive"}`,children:l.isActive?"Active":"Inactive"})]}),o.jsxs("p",{className:"agent-slug",children:["@",l.slug]}),o.jsx("p",{className:"agent-description",children:typeof l.description=="string"?l.description:l.description?JSON.stringify(l.description):"No description available"}),o.jsxs("p",{className:"agent-tools",children:["Tools: ",l.allowedTools.length>0?l.allowedTools.join(", "):"None"]})]},l.actorId))})]})}function HR(){const{agents:e,isLoading:t,error:n,createAgent:i}=Zd(),l=Je(),[a,r]=b.useState(!1),[s,u]=b.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),c=async d=>{d.preventDefault();try{const f=await i({slug:s.slug,name:s.name,description:s.description,systemPrompt:s.systemPrompt,allowedTools:s.allowedTools.split(",").map(h=>h.trim()).filter(Boolean),statusTriggers:s.statusTriggers.split(",").map(h=>h.trim()).filter(Boolean),isActive:s.isActive});r(!1),u({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",statusTriggers:"",isActive:!0}),f&&l(`/agents/${f.actorId}/admin`)}catch(f){console.error("Failed to create agent",f)}};return o.jsxs("div",{className:"agents-admin-list",children:[o.jsxs("div",{className:"agents-admin-header",children:[o.jsxs("div",{children:[o.jsx("h1",{children:"Agents Admin"}),o.jsx("p",{className:"subtitle",children:"Manage agents and their configurations"})]}),o.jsx("div",{className:"header-actions",children:o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"+ Create Agent"})})]}),n&&o.jsx("div",{className:"error-message",children:n}),t?o.jsx("div",{className:"loading",children:"Loading agents..."}):o.jsx("div",{className:"agents-admin-grid",children:e.length===0?o.jsxs("div",{className:"empty-state",children:[o.jsx("p",{children:"No agents created yet."}),o.jsx("button",{onClick:()=>r(!0),className:"btn-primary",children:"Create your first agent"})]}):e.map(d=>o.jsxs("div",{className:"agent-admin-card",onClick:()=>l(`/agents/${d.actorId}/admin`),children:[o.jsxs("div",{className:"agent-admin-card-header",children:[o.jsx("h3",{children:d.name}),o.jsx("span",{className:`agent-status ${d.isActive?"active":"inactive"}`,children:d.isActive?"Active":"Inactive"})]}),o.jsxs("p",{className:"agent-slug",children:["@",d.slug]}),o.jsx("p",{className:"agent-description",children:typeof d.description=="string"?d.description:"No description"}),o.jsxs("p",{className:"agent-tools",children:["Tools: ",d.allowedTools.length>0?d.allowedTools.join(", "):"None"]})]},d.actorId))}),a&&o.jsx("div",{className:"modal-overlay",onClick:()=>r(!1),children:o.jsxs("div",{className:"modal-content",onClick:d=>d.stopPropagation(),children:[o.jsx("h2",{children:"Create Agent"}),o.jsxs("form",{onSubmit:c,children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"slug",children:"Slug"}),o.jsx("input",{type:"text",id:"slug",value:s.slug,onChange:d=>u({...s,slug:d.target.value}),placeholder:"e.g., code-assistant",required:!0}),o.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:s.name,onChange:d=>u({...s,name:d.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:s.description,onChange:d=>u({...s,description:d.target.value}),placeholder:"Brief description of this agent",rows:2})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),o.jsx("textarea",{id:"systemPrompt",value:s.systemPrompt,onChange:d=>u({...s,systemPrompt:d.target.value}),placeholder:"Core instructions/persona for this agent",rows:5,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),o.jsx("input",{type:"text",id:"allowedTools",value:s.allowedTools,onChange:d=>u({...s,allowedTools:d.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"statusTriggers",children:"Status triggers"}),o.jsx("input",{type:"text",id:"statusTriggers",value:s.statusTriggers,onChange:d=>u({...s,statusTriggers:d.target.value}),placeholder:"e.g., NOT_STARTED, IN_PROGRESS, FOR_REVIEW, DONE (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsx("div",{className:"form-group",children:o.jsxs("label",{className:"checkbox-label",children:[o.jsx("input",{type:"checkbox",checked:s.isActive,onChange:d=>u({...s,isActive:d.target.checked})}),o.jsx("span",{children:"Active (available for assignment)"})]})}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>r(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Create Agent"})]})]})]})})]})}function qR(){var y;const{agentId:e}=Wi(),t=Je(),{selectedAgent:n,isLoading:i,error:l,loadAgentDetails:a}=Zd(),[r,s]=b.useState(!1),[u,c]=b.useState(null),[d,f]=b.useState({slug:"",name:"",description:"",systemPrompt:"",allowedTools:"",isActive:!0});b.useEffect(()=>{e&&a(e)},[e]),b.useEffect(()=>{var x;n&&f({slug:n.slug,name:n.name,description:((x=n.description)==null?void 0:x.toString())||"",systemPrompt:n.systemPrompt,allowedTools:n.allowedTools.join(", "),isActive:n.isActive})},[n]);const h=async x=>{if(x.preventDefault(),!!e)try{throw new Error("update agent not implemented in the backend")}catch(E){console.error("Failed to update agent",E)}},p=async()=>{e&&c({message:"Are you sure you want to delete this agent? This action cannot be undone.",onConfirm:async()=>{try{throw new Error("delete agent not implemented in the backend")}catch(x){console.error("Failed to delete agent",x),c(null)}}})};return i&&!n?o.jsx("div",{className:"loading",children:"Loading agent details..."}):n?(console.log(n.statusTriggers),o.jsxs("div",{className:"agent-admin-detail",children:[o.jsxs("div",{className:"agent-admin-detail-header",children:[o.jsxs("div",{children:[o.jsx("button",{onClick:()=>t("/agents/admin"),className:"btn-back",children:"← Back to Agents"}),o.jsx("h1",{children:n.name}),o.jsxs("p",{className:"agent-slug",children:["@",n.slug]}),o.jsx("span",{className:`agent-status ${n.isActive?"active":"inactive"}`,children:n.isActive?"Active":"Inactive"})]}),o.jsx("div",{className:"header-actions",children:r?o.jsx("button",{onClick:()=>s(!1),className:"btn-secondary",children:"Cancel Edit"}):o.jsxs(o.Fragment,{children:[o.jsx("button",{onClick:()=>s(!0),className:"btn-secondary",children:"Edit Agent"}),o.jsx("button",{onClick:p,className:"btn-delete",children:"Delete Agent"})]})})]}),l&&o.jsx("div",{className:"error-message",children:l}),r?o.jsxs("form",{onSubmit:h,className:"agent-edit-form",children:[o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"slug",children:"Slug"}),o.jsx("input",{type:"text",id:"slug",value:d.slug,onChange:x=>f({...d,slug:x.target.value}),placeholder:"e.g., code-assistant",required:!0}),o.jsx("small",{children:"Unique identifier (lowercase, hyphens allowed)"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"name",children:"Name"}),o.jsx("input",{type:"text",id:"name",value:d.name,onChange:x=>f({...d,name:x.target.value}),placeholder:"e.g., Code Assistant",required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"description",children:"Description"}),o.jsx("textarea",{id:"description",value:d.description,onChange:x=>f({...d,description:x.target.value}),placeholder:"Brief description of this agent",rows:2})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"systemPrompt",children:"System Prompt"}),o.jsx("textarea",{id:"systemPrompt",value:d.systemPrompt,onChange:x=>f({...d,systemPrompt:x.target.value}),placeholder:"Core instructions/persona for this agent",rows:10,required:!0})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"allowedTools",children:"Allowed Tools"}),o.jsx("input",{type:"text",id:"allowedTools",value:d.allowedTools,onChange:x=>f({...d,allowedTools:x.target.value}),placeholder:"e.g., filesystem, browser, calculator (comma-separated)"}),o.jsx("small",{children:"Comma-separated list of tool identifiers"})]}),o.jsx("div",{className:"form-group",children:o.jsxs("label",{className:"checkbox-label",children:[o.jsx("input",{type:"checkbox",checked:d.isActive,onChange:x=>f({...d,isActive:x.target.checked})}),o.jsx("span",{children:"Active (available for assignment)"})]})}),o.jsxs("div",{className:"form-actions",children:[o.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-secondary",children:"Cancel"}),o.jsx("button",{type:"submit",className:"btn-primary",children:"Save Changes"})]})]}):o.jsxs("div",{className:"agent-detail-sections",children:[o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Basic Information"}),o.jsxs("div",{className:"detail-content",children:[o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Name"}),o.jsx("p",{children:n.name})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Slug"}),o.jsxs("p",{children:["@",n.slug]})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Description"}),o.jsx("p",{children:((y=n.description)==null?void 0:y.toString())||"No description"})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Status"}),o.jsx("p",{children:n.isActive?"Active":"Inactive"})]})]})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"System Prompt"}),o.jsx("div",{className:"detail-content",children:o.jsx("pre",{className:"system-prompt-display",children:n.systemPrompt})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Status Triggers"}),o.jsx("div",{className:"detail-content",children:n.statusTriggers.length>0?o.jsx("div",{className:"tools-list",children:n.statusTriggers.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No status triggers configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Tag Triggers"}),o.jsx("div",{className:"detail-content",children:n.tagTriggers.length>0?o.jsx("div",{className:"tools-list",children:n.tagTriggers.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No tag triggers configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Allowed Tools"}),o.jsx("div",{className:"detail-content",children:n.allowedTools.length>0?o.jsx("div",{className:"tools-list",children:n.allowedTools.map((x,E)=>o.jsx("span",{className:"tool-badge",children:x},E))}):o.jsx("p",{className:"empty-text",children:"No tools configured"})})]}),o.jsxs("div",{className:"detail-section",children:[o.jsx("h2",{children:"Metadata"}),o.jsxs("div",{className:"detail-content",children:[o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Created At"}),o.jsx("p",{children:new Date(n.createdAt).toLocaleString()})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Last Updated"}),o.jsx("p",{children:new Date(n.updatedAt).toLocaleString()})]}),o.jsxs("div",{className:"detail-field",children:[o.jsx("label",{children:"Row Version"}),o.jsx("p",{children:n.rowVersion})]})]})]})]}),u&&o.jsx(Qd,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):o.jsx("div",{className:"error-message",children:"Agent not found"})}function FR(){const{logout:e}=Ed(),t=Je();return rt(),b.useEffect(()=>{(async()=>{await e(),t("/login",{replace:!0})})()},[e,t]),o.jsx("div",{className:"logout-page",children:o.jsx("div",{className:"logout-container",children:o.jsx("div",{className:"logout-card",children:o.jsxs("div",{className:"logout-header",children:[o.jsx("h1",{className:"logout-title",children:"Logging Out..."}),o.jsx("p",{className:"logout-subtitle",children:"You are being logged out. Please wait."})]})})})})}function GR(){return vT()?o.jsx(Ck,{}):o.jsx(bk,{})}function VR(){return o.jsx(GC,{basename:WC,children:o.jsx(pT,{children:o.jsxs(xC,{children:[o.jsx(qe,{path:"/login",element:o.jsx(gT,{})}),o.jsx(qe,{path:"/logout",element:o.jsx(FR,{})}),o.jsxs(qe,{element:o.jsx(mT,{children:o.jsx(bT,{})}),children:[o.jsx(qe,{index:!0,element:o.jsx(ST,{})}),o.jsx(qe,{path:"tasks",element:o.jsx(GR,{})}),o.jsx(qe,{path:"mcp-registry",element:o.jsx(zR,{})}),o.jsx(qe,{path:"mcp-registry/:serverId",element:o.jsx(MR,{})}),o.jsx(qe,{path:"consent",element:o.jsx(BR,{})}),o.jsxs(qe,{path:"context",element:o.jsx(Ak,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(jk,{})}),o.jsx(qe,{path:"new",element:o.jsx(dg,{})}),o.jsx(qe,{path:"page/:pageId",element:o.jsx(OR,{})}),o.jsx(qe,{path:"page/:pageId/edit",element:o.jsx(DR,{})}),o.jsx(qe,{path:"page/:pageId/new",element:o.jsx(dg,{})})]}),o.jsxs(qe,{path:"agents",element:o.jsx(UR,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(IR,{})}),o.jsx(qe,{path:"admin",element:o.jsx(HR,{})}),o.jsx(qe,{path:":agentId/admin",element:o.jsx(qR,{})})]})]})]})})})}xE.createRoot(document.getElementById("root")).render(o.jsx(b.StrictMode,{children:o.jsx("div",{className:"app-shell",children:o.jsx(VR,{})})}));