@taico/taico 0.8.5 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/access-requests/access-request.entity.d.ts +16 -0
- package/dist/access-requests/access-request.entity.js +87 -0
- package/dist/access-requests/access-request.entity.js.map +1 -0
- package/dist/access-requests/access-request.limits.d.ts +3 -0
- package/dist/access-requests/access-request.limits.js +7 -0
- package/dist/access-requests/access-request.limits.js.map +1 -0
- package/dist/access-requests/access-requests.controller.d.ts +16 -0
- package/dist/access-requests/access-requests.controller.js +129 -0
- package/dist/access-requests/access-requests.controller.js.map +1 -0
- package/dist/access-requests/access-requests.module.d.ts +2 -0
- package/dist/access-requests/access-requests.module.js +26 -0
- package/dist/access-requests/access-requests.module.js.map +1 -0
- package/dist/access-requests/access-requests.service.d.ts +14 -0
- package/dist/access-requests/access-requests.service.js +106 -0
- package/dist/access-requests/access-requests.service.js.map +1 -0
- package/dist/access-requests/dto/http/access-request-admin.dto.d.ts +26 -0
- package/dist/access-requests/dto/http/access-request-admin.dto.js +130 -0
- package/dist/access-requests/dto/http/access-request-admin.dto.js.map +1 -0
- package/dist/access-requests/dto/http/create-access-request.dto.d.ts +11 -0
- package/dist/access-requests/dto/http/create-access-request.dto.js +78 -0
- package/dist/access-requests/dto/http/create-access-request.dto.js.map +1 -0
- package/dist/access-requests/dto/service/access-requests.service.types.d.ts +29 -0
- package/dist/access-requests/dto/service/access-requests.service.types.js +3 -0
- package/dist/access-requests/dto/service/access-requests.service.types.js.map +1 -0
- package/dist/access-requests/enums/access-request-heard-from.enum.d.ts +7 -0
- package/dist/access-requests/enums/access-request-heard-from.enum.js +12 -0
- package/dist/access-requests/enums/access-request-heard-from.enum.js.map +1 -0
- package/dist/access-requests/enums/access-request-status.enum.d.ts +4 -0
- package/dist/access-requests/enums/access-request-status.enum.js +9 -0
- package/dist/access-requests/enums/access-request-status.enum.js.map +1 -0
- package/dist/access-requests/enums/index.d.ts +2 -0
- package/dist/access-requests/enums/index.js +8 -0
- package/dist/access-requests/enums/index.js.map +1 -0
- package/dist/access-requests/errors/access-requests.errors.d.ts +8 -0
- package/dist/access-requests/errors/access-requests.errors.js +21 -0
- package/dist/access-requests/errors/access-requests.errors.js.map +1 -0
- package/dist/access-requests/submission-ceiling.d.ts +7 -0
- package/dist/access-requests/submission-ceiling.js +21 -0
- package/dist/access-requests/submission-ceiling.js.map +1 -0
- package/dist/access-requests/submission-ceiling.spec.d.ts +1 -0
- package/dist/access-requests/submission-ceiling.spec.js +18 -0
- package/dist/access-requests/submission-ceiling.spec.js.map +1 -0
- package/dist/app.module.js +10 -0
- package/dist/app.module.js.map +1 -1
- package/dist/common/postgres-io.adapter.js +2 -1
- package/dist/common/postgres-io.adapter.js.map +1 -1
- package/dist/errors/http/error-catalog.js +18 -0
- package/dist/errors/http/error-catalog.js.map +1 -1
- package/dist/executions/events/execution-traces-changed.event.d.ts +5 -0
- package/dist/executions/events/execution-traces-changed.event.js +12 -0
- package/dist/executions/events/execution-traces-changed.event.js.map +1 -0
- package/dist/executions/executions-worker.gateway.d.ts +17 -2
- package/dist/executions/executions-worker.gateway.js +29 -1
- package/dist/executions/executions-worker.gateway.js.map +1 -1
- package/dist/executions/executions.gateway.d.ts +12 -0
- package/dist/executions/executions.gateway.js +39 -0
- package/dist/executions/executions.gateway.js.map +1 -1
- package/dist/executions/executions.module.js +6 -0
- package/dist/executions/executions.module.js.map +1 -1
- package/dist/executions/staleness/stale-active-task-execution-pruner.service.js +3 -0
- package/dist/executions/staleness/stale-active-task-execution-pruner.service.js.map +1 -1
- package/dist/executions/staleness/stale-active-task-execution-pruner.service.spec.js +3 -0
- package/dist/executions/staleness/stale-active-task-execution-pruner.service.spec.js.map +1 -1
- package/dist/executions/traces/dto/http/execution-traces-response.dto.d.ts +17 -0
- package/dist/executions/traces/dto/http/execution-traces-response.dto.js +86 -0
- package/dist/executions/traces/dto/http/execution-traces-response.dto.js.map +1 -0
- package/dist/executions/traces/dto/http/list-execution-traces-query.dto.d.ts +6 -0
- package/dist/executions/traces/dto/http/list-execution-traces-query.dto.js +63 -0
- package/dist/executions/traces/dto/http/list-execution-traces-query.dto.js.map +1 -0
- package/dist/executions/traces/execution-trace.entity.d.ts +9 -0
- package/dist/executions/traces/execution-trace.entity.js +55 -0
- package/dist/executions/traces/execution-trace.entity.js.map +1 -0
- package/dist/executions/traces/execution-traces.controller.d.ts +8 -0
- package/dist/executions/traces/execution-traces.controller.js +68 -0
- package/dist/executions/traces/execution-traces.controller.js.map +1 -0
- package/dist/executions/traces/execution-traces.errors.d.ts +9 -0
- package/dist/executions/traces/execution-traces.errors.js +20 -0
- package/dist/executions/traces/execution-traces.errors.js.map +1 -0
- package/dist/executions/traces/execution-traces.service.d.ts +20 -0
- package/dist/executions/traces/execution-traces.service.js +133 -0
- package/dist/executions/traces/execution-traces.service.js.map +1 -0
- package/dist/executions/traces/execution-traces.service.spec.d.ts +1 -0
- package/dist/executions/traces/execution-traces.service.spec.js +131 -0
- package/dist/executions/traces/execution-traces.service.spec.js.map +1 -0
- package/dist/migrations/1762300000000-AccessRequests.d.ts +6 -0
- package/dist/migrations/1762300000000-AccessRequests.js +29 -0
- package/dist/migrations/1762300000000-AccessRequests.js.map +1 -0
- package/dist/migrations/1762400000000-AccessRequestHeardFrom.d.ts +6 -0
- package/dist/migrations/1762400000000-AccessRequestHeardFrom.js +23 -0
- package/dist/migrations/1762400000000-AccessRequestHeardFrom.js.map +1 -0
- package/dist/migrations/1762500000000-ExecutionTraces.d.ts +6 -0
- package/dist/migrations/1762500000000-ExecutionTraces.js +24 -0
- package/dist/migrations/1762500000000-ExecutionTraces.js.map +1 -0
- package/dist/migrations/1762500000001-ExecutionTraceJson.d.ts +6 -0
- package/dist/migrations/1762500000001-ExecutionTraceJson.js +14 -0
- package/dist/migrations/1762500000001-ExecutionTraceJson.js.map +1 -0
- package/dist/public/android-chrome-192x192.png +0 -0
- package/dist/public/android-chrome-512x512.png +0 -0
- package/dist/public/apple-touch-icon.png +0 -0
- package/dist/public/assets/index-G5Ht4law.js +118 -0
- package/dist/public/assets/index-NjAtMwFI.css +1 -0
- package/dist/public/avatar/angus.png +0 -0
- package/dist/public/avatar/bruce.png +0 -0
- package/dist/public/avatar/claude.webp +0 -0
- package/dist/public/avatar/cockatoo.png +0 -0
- package/dist/public/avatar/gemini.png +0 -0
- package/dist/public/avatar/grace.png +0 -0
- package/dist/public/avatar/gustav.png +0 -0
- package/dist/public/avatar/openai.svg +15 -0
- package/dist/public/avatar/opencode.svg +1 -0
- package/dist/public/avatar/qwen.png +0 -0
- package/dist/public/avatar/stacy.png +0 -0
- package/dist/public/avatar/taico.png +0 -0
- package/dist/public/beta/assets/index-BO6PlAsO.js +94 -0
- package/dist/public/beta/assets/index-DIzh0pTC.css +1 -0
- package/dist/public/beta/index.html +27 -0
- package/dist/public/beta/manifest.webmanifest +27 -0
- package/dist/public/beta/roo-favicon.svg +13 -0
- package/dist/public/favicon-16x16.png +0 -0
- package/dist/public/favicon-32x32.png +0 -0
- package/dist/public/favicon.ico +0 -0
- package/dist/public/favicon.svg +9 -0
- package/dist/public/icons/OpenAI-black-monoblossom.svg +15 -0
- package/dist/public/icons/OpenAI-white-monoblossom.svg +15 -0
- package/dist/public/icons/agent-development-kit.png +0 -0
- package/dist/public/icons/claude-ai-icon.webp +0 -0
- package/dist/public/icons/cockatoo.png +0 -0
- package/dist/public/icons/opencode-logo-dark.svg +1 -0
- package/dist/public/icons/qwen.png +0 -0
- package/dist/public/index.html +30 -0
- package/dist/public/manifest.webmanifest +22 -0
- package/dist/public/package.json +40 -0
- package/dist/public/vite.svg +1 -0
- package/dist/threads/agent/thread-agent-tools.factory.d.ts +3 -1
- package/dist/threads/agent/thread-agent-tools.factory.js +17 -2
- package/dist/threads/agent/thread-agent-tools.factory.js.map +1 -1
- package/dist/threads/agent/thread-agent.prompts.d.ts +1 -0
- package/dist/threads/agent/thread-agent.prompts.js +2 -1
- package/dist/threads/agent/thread-agent.prompts.js.map +1 -1
- package/dist/threads/dto/update-thread.dto.js +3 -0
- package/dist/threads/dto/update-thread.dto.js.map +1 -1
- package/dist/threads/errors/threads.errors.d.ts +4 -0
- package/dist/threads/errors/threads.errors.js +10 -1
- package/dist/threads/errors/threads.errors.js.map +1 -1
- package/dist/threads/thread-rename.service.d.ts +12 -0
- package/dist/threads/thread-rename.service.js +70 -0
- package/dist/threads/thread-rename.service.js.map +1 -0
- package/dist/threads/thread-rename.service.spec.d.ts +1 -0
- package/dist/threads/thread-rename.service.spec.js +47 -0
- package/dist/threads/thread-rename.service.spec.js.map +1 -0
- package/dist/threads/threads.module.js +2 -0
- package/dist/threads/threads.module.js.map +1 -1
- package/dist/threads/threads.service.d.ts +3 -1
- package/dist/threads/threads.service.js +6 -3
- package/dist/threads/threads.service.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
var BS=Object.defineProperty;var th=e=>{throw TypeError(e)};var US=(e,t,n)=>t in e?BS(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ll=(e,t,n)=>US(e,typeof t!="symbol"?t+"":t,n),nh=(e,t,n)=>t.has(e)||th("Cannot "+n);var fe=(e,t,n)=>(nh(e,t,"read from private field"),n?n.call(e):t.get(e)),Yn=(e,t,n)=>t.has(e)?th("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Qt=(e,t,n,i)=>(nh(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 Ts=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jg={exports:{}},ao={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var IS=Symbol.for("react.transitional.element"),HS=Symbol.for("react.fragment");function _g(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:IS,type:e,key:i,ref:t!==void 0?t:null,props:n}}ao.Fragment=HS;ao.jsx=_g;ao.jsxs=_g;jg.exports=ao;var o=jg.exports,Rg={exports:{}},J={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var hf=Symbol.for("react.transitional.element"),qS=Symbol.for("react.portal"),FS=Symbol.for("react.fragment"),GS=Symbol.for("react.strict_mode"),VS=Symbol.for("react.profiler"),YS=Symbol.for("react.consumer"),PS=Symbol.for("react.context"),XS=Symbol.for("react.forward_ref"),QS=Symbol.for("react.suspense"),ZS=Symbol.for("react.memo"),Og=Symbol.for("react.lazy"),KS=Symbol.for("react.activity"),ih=Symbol.iterator;function JS(e){return e===null||typeof e!="object"?null:(e=ih&&e[ih]||e["@@iterator"],typeof e=="function"?e:null)}var Dg={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},zg=Object.assign,Lg={};function Xl(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Dg}Xl.prototype.isReactComponent={};Xl.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")};Xl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Mg(){}Mg.prototype=Xl.prototype;function pf(e,t,n){this.props=e,this.context=t,this.refs=Lg,this.updater=n||Dg}var mf=pf.prototype=new Mg;mf.constructor=pf;zg(mf,Xl.prototype);mf.isPureReactComponent=!0;var lh=Array.isArray;function Xu(){}var Ce={H:null,A:null,T:null,S:null},Bg=Object.prototype.hasOwnProperty;function gf(e,t,n){var i=n.ref;return{$$typeof:hf,type:e,key:t,ref:i!==void 0?i:null,props:n}}function $S(e,t){return gf(e.type,t,e.props)}function yf(e){return typeof e=="object"&&e!==null&&e.$$typeof===hf}function WS(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ah=/\/+/g;function Ho(e,t){return typeof e=="object"&&e!==null&&e.key!=null?WS(""+e.key):t.toString(36)}function e0(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Xu,Xu):(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 hf:case qS:r=!0;break;case Og:return r=e._init,ol(r(e._payload),t,n,i,l)}}if(r)return l=l(e),r=i===""?"."+Ho(e,0):i,lh(l)?(n="",r!=null&&(n=r.replace(ah,"$&/")+"/"),ol(l,t,n,"",function(c){return c})):l!=null&&(yf(l)&&(l=$S(l,n+(l.key==null||e&&e.key===l.key?"":(""+l.key).replace(ah,"$&/")+"/")+r)),t.push(l)),1;r=0;var s=i===""?".":i+":";if(lh(e))for(var u=0;u<e.length;u++)i=e[u],a=s+Ho(i,u),r+=ol(i,t,n,a,l);else if(u=JS(e),typeof u=="function")for(e=u.call(e),u=0;!(i=e.next()).done;)i=i.value,a=s+Ho(i,u++),r+=ol(i,t,n,a,l);else if(a==="object"){if(typeof e.then=="function")return ol(e0(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 _r(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 t0(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 rh=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)},n0={map:_r,forEach:function(e,t,n){_r(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return _r(e,function(){t++}),t},toArray:function(e){return _r(e,function(t){return t})||[]},only:function(e){if(!yf(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};J.Activity=KS;J.Children=n0;J.Component=Xl;J.Fragment=FS;J.Profiler=VS;J.PureComponent=pf;J.StrictMode=GS;J.Suspense=QS;J.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ce;J.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ce.H.useMemoCache(e)}};J.cache=function(e){return function(){return e.apply(null,arguments)}};J.cacheSignal=function(){return null};J.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var i=zg({},e.props),l=e.key;if(t!=null)for(a in t.key!==void 0&&(l=""+t.key),t)!Bg.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 gf(e.type,l,i)};J.createContext=function(e){return e={$$typeof:PS,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:YS,_context:e},e};J.createElement=function(e,t,n){var i,l={},a=null;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)Bg.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 gf(e,a,l)};J.createRef=function(){return{current:null}};J.forwardRef=function(e){return{$$typeof:XS,render:e}};J.isValidElement=yf;J.lazy=function(e){return{$$typeof:Og,_payload:{_status:-1,_result:e},_init:t0}};J.memo=function(e,t){return{$$typeof:ZS,type:e,compare:t===void 0?null:t}};J.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(Xu,rh)}catch(a){rh(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ce.T=t}};J.unstable_useCacheRefresh=function(){return Ce.H.useCacheRefresh()};J.use=function(e){return Ce.H.use(e)};J.useActionState=function(e,t,n){return Ce.H.useActionState(e,t,n)};J.useCallback=function(e,t){return Ce.H.useCallback(e,t)};J.useContext=function(e){return Ce.H.useContext(e)};J.useDebugValue=function(){};J.useDeferredValue=function(e,t){return Ce.H.useDeferredValue(e,t)};J.useEffect=function(e,t){return Ce.H.useEffect(e,t)};J.useEffectEvent=function(e){return Ce.H.useEffectEvent(e)};J.useId=function(){return Ce.H.useId()};J.useImperativeHandle=function(e,t,n){return Ce.H.useImperativeHandle(e,t,n)};J.useInsertionEffect=function(e,t){return Ce.H.useInsertionEffect(e,t)};J.useLayoutEffect=function(e,t){return Ce.H.useLayoutEffect(e,t)};J.useMemo=function(e,t){return Ce.H.useMemo(e,t)};J.useOptimistic=function(e,t){return Ce.H.useOptimistic(e,t)};J.useReducer=function(e,t,n){return Ce.H.useReducer(e,t,n)};J.useRef=function(e){return Ce.H.useRef(e)};J.useState=function(e){return Ce.H.useState(e)};J.useSyncExternalStore=function(e,t,n){return Ce.H.useSyncExternalStore(e,t,n)};J.useTransition=function(){return Ce.H.useTransition()};J.version="19.2.5";Rg.exports=J;var b=Rg.exports,Ug={exports:{}},ro={},Ig={exports:{}},Hg={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
+
*
|
|
23
|
+
* This source code is licensed under the MIT license found in the
|
|
24
|
+
* LICENSE file in the root directory of this source tree.
|
|
25
|
+
*/(function(e){function t(j,O){var A=j.length;j.push(O);e:for(;0<A;){var X=A-1>>>1,S=j[X];if(0<l(S,O))j[X]=O,j[A]=S,A=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],A=j.pop();if(A!==O){j[0]=A;e:for(var X=0,S=j.length,Ae=S>>>1;X<Ae;){var We=2*(X+1)-1,k=j[We],_e=We+1,st=j[_e];if(0>l(k,A))_e<S&&0>l(st,k)?(j[X]=st,j[_e]=A,X=_e):(j[X]=k,j[We]=A,X=We);else if(_e<S&&0>l(st,A))j[X]=st,j[_e]=A,X=_e;else break e}}return O}function l(j,O){var A=j.sortIndex-O.sortIndex;return A!==0?A: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,m=typeof setTimeout=="function"?setTimeout:null,g=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 w(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(w,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,g(_),_=-1),p=!0;var A=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 Ae=n(c);Ae!==null&&V(w,Ae.startTime-j),O=!1}}break e}finally{f=null,h=A,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(){m(M,0)};function V(j,O){_=m(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 A=h;h=O;try{return j()}finally{h=A}},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 A=h;h=j;try{return O()}finally{h=A}},e.unstable_scheduleCallback=function(j,O,A){var X=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?X+A:X):A=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=A+S,j={id:d++,callback:O,priorityLevel:j,startTime:A,expirationTime:S,sortIndex:-1},A>X?(j.sortIndex=A,t(c,j),n(u)===null&&j===n(c)&&(x?(g(_),_=-1):x=!0,V(w,A-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 A=h;h=O;try{return j.apply(this,arguments)}finally{h=A}}}})(Hg);Ig.exports=Hg;var i0=Ig.exports,qg={exports:{}},at={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
+
*
|
|
31
|
+
* This source code is licensed under the MIT license found in the
|
|
32
|
+
* LICENSE file in the root directory of this source tree.
|
|
33
|
+
*/var l0=b;function Fg(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(Fg(522))},D:Pn,C:Pn,L:Pn,m:Pn,X:Pn,S:Pn,M:Pn},p:0,findDOMNode:null},a0=Symbol.for("react.portal");function r0(e,t,n){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a0,key:i==null?null:""+i,children:e,containerInfo:t,implementation:n}}var Aa=l0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function so(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(Fg(299));return r0(e,t,null,n)};at.flushSync=function(e){var t=Aa.T,n=lt.p;try{if(Aa.T=null,lt.p=2,e)return e()}finally{Aa.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"&<.d.D(e)};at.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,i=so(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"&<.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=so(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&<.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=so(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=so(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 Aa.H.useFormState(e,t,n)};at.useFormStatus=function(){return Aa.H.useHostTransitionStatus()};at.version="19.2.5";function Gg(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gg)}catch(e){console.error(e)}}Gg(),qg.exports=at;var s0=qg.exports;/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var Ge=i0,Vg=b,o0=s0;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 Yg(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cr(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function Pg(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 Xg(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 sh(e){if(cr(e)!==e)throw Error(L(188))}function u0(e){var t=e.alternate;if(!t){if(t=cr(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 sh(l),e;if(a===i)return sh(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 Qg(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Qg(e),t!==null)return t;e=e.sibling}return null}var Te=Object.assign,c0=Symbol.for("react.element"),Rr=Symbol.for("react.transitional.element"),Sa=Symbol.for("react.portal"),hl=Symbol.for("react.fragment"),Zg=Symbol.for("react.strict_mode"),Qu=Symbol.for("react.profiler"),Kg=Symbol.for("react.consumer"),jn=Symbol.for("react.context"),xf=Symbol.for("react.forward_ref"),Zu=Symbol.for("react.suspense"),Ku=Symbol.for("react.suspense_list"),vf=Symbol.for("react.memo"),Qn=Symbol.for("react.lazy"),Ju=Symbol.for("react.activity"),f0=Symbol.for("react.memo_cache_sentinel"),oh=Symbol.iterator;function ua(e){return e===null||typeof e!="object"?null:(e=oh&&e[oh]||e["@@iterator"],typeof e=="function"?e:null)}var d0=Symbol.for("react.client.reference");function $u(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===d0?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hl:return"Fragment";case Qu:return"Profiler";case Zg:return"StrictMode";case Zu:return"Suspense";case Ku:return"SuspenseList";case Ju:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Sa:return"Portal";case jn:return e.displayName||"Context";case Kg:return(e._context.displayName||"Context")+".Consumer";case xf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case vf:return t=e.displayName||null,t!==null?t:$u(e.type)||"Memo";case Qn:t=e._payload,e=e._init;try{return $u(e(t))}catch{}}return null}var Ea=Array.isArray,Z=Vg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=o0.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Li={pending:!1,data:null,method:null,action:null},Wu=[],pl=-1;function yn(e){return{current:e}}function Pe(e){0>pl||(e.current=Wu[pl],Wu[pl]=null,pl--)}function be(e,t){pl++,Wu[pl]=e.current,e.current=t}var pn=yn(null),Pa=yn(null),oi=yn(null),ks=yn(null);function Ns(e,t){switch(be(oi,t),be(Pa,e),be(pn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=pp(t),e=gv(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Pe(pn),be(pn,e)}function zl(){Pe(pn),Pe(Pa),Pe(oi)}function ec(e){e.memoizedState!==null&&be(ks,e);var t=pn.current,n=gv(t,e.type);t!==n&&(be(Pa,e),be(pn,n))}function As(e){Pa.current===e&&(Pe(pn),Pe(Pa)),ks.current===e&&(Pe(ks),ir._currentValue=Li)}var qo,uh;function ji(e){if(qo===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);qo=t&&t[1]||"",uh=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+qo+e+uh}var Fo=!1;function Go(e,t){if(!e||Fo)return"";Fo=!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
|
+
`),c=s.split(`
|
|
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{Fo=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ji(n):""}function h0(e,t){switch(e.tag){case 26:case 27:case 5:return ji(e.type);case 16:return ji("Lazy");case 13:return e.child!==t&&t!==null?ji("Suspense Fallback"):ji("Suspense");case 19:return ji("SuspenseList");case 0:case 15:return Go(e.type,!1);case 11:return Go(e.type.render,!1);case 1:return Go(e.type,!0);case 31:return ji("Activity");default:return""}}function ch(e){try{var t="",n=null;do t+=h0(e,n),n=e,e=e.return;while(e);return t}catch(i){return`
|
|
47
|
+
Error generating stack: `+i.message+`
|
|
48
|
+
`+i.stack}}var tc=Object.prototype.hasOwnProperty,bf=Ge.unstable_scheduleCallback,Vo=Ge.unstable_cancelCallback,p0=Ge.unstable_shouldYield,m0=Ge.unstable_requestPaint,Tt=Ge.unstable_now,g0=Ge.unstable_getCurrentPriorityLevel,Jg=Ge.unstable_ImmediatePriority,$g=Ge.unstable_UserBlockingPriority,ws=Ge.unstable_NormalPriority,y0=Ge.unstable_LowPriority,Wg=Ge.unstable_IdlePriority,x0=Ge.log,v0=Ge.unstable_setDisableYieldValue,fr=null,kt=null;function ii(e){if(typeof x0=="function"&&v0(e),kt&&typeof kt.setStrictMode=="function")try{kt.setStrictMode(fr,e)}catch{}}var Nt=Math.clz32?Math.clz32:E0,b0=Math.log,S0=Math.LN2;function E0(e){return e>>>=0,e===0?32:31-(b0(e)/S0|0)|0}var Or=256,Dr=262144,zr=4194304;function _i(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 oo(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=_i(i):(r&=s,r!==0?l=_i(r):n||(n=s&~e,n!==0&&(l=_i(n))))):(s=i&~a,s!==0?l=_i(s):r!==0?l=_i(r):n||(n=i&~e,n!==0&&(l=_i(n)))),l===0?0:t!==0&&t!==l&&!(t&a)&&(a=l&-l,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:l}function dr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function C0(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 ey(){var e=zr;return zr<<=1,!(zr&62914560)&&(zr=4194304),e}function Yo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hr(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function T0(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&&ty(e,i,0),a!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=a&~(r&~t))}function ty(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 ny(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 iy(e,t){var n=t&-t;return n=n&42?1:Sf(n),n&(e.suspendedLanes|t)?0:n}function Sf(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 Ef(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function ly(){var e=ce.p;return e!==0?e:(e=window.event,e===void 0?32:Av(e.type))}function fh(e,t){var n=ce.p;try{return ce.p=e,t()}finally{ce.p=n}}var Si=Math.random().toString(36).slice(2),Qe="__reactFiber$"+Si,mt="__reactProps$"+Si,Ql="__reactContainer$"+Si,nc="__reactEvents$"+Si,k0="__reactListeners$"+Si,N0="__reactHandles$"+Si,dh="__reactResources$"+Si,pr="__reactMarker$"+Si;function Cf(e){delete e[Qe],delete e[mt],delete e[nc],delete e[k0],delete e[N0]}function ml(e){var t=e[Qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ql]||n[Qe]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=vp(e);e!==null;){if(n=e[Qe])return n;e=vp(e)}return t}e=n,n=e.parentNode}return null}function Zl(e){if(e=e[Qe]||e[Ql]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ca(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(L(33))}function kl(e){var t=e[dh];return t||(t=e[dh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ye(e){e[pr]=!0}var ay=new Set,ry={};function Qi(e,t){Ll(e,t),Ll(e+"Capture",t)}function Ll(e,t){for(ry[e]=t,e=0;e<t.length;e++)ay.add(t[e])}var A0=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]*$"),hh={},ph={};function w0(e){return tc.call(ph,e)?!0:tc.call(hh,e)?!1:A0.test(e)?ph[e]=!0:(hh[e]=!0,!1)}function ts(e,t,n){if(w0(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 Lr(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 sy(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function j0(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 ic(e){if(!e._valueTracker){var t=sy(e)?"checked":"value";e._valueTracker=j0(e,t,""+e[t])}}function oy(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),i="";return e&&(i=sy(e)?e.checked?"true":"false":e.value),e=i,e!==n?(t.setValue(e),!0):!1}function js(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 _0=/[\n"\\]/g;function It(e){return e.replace(_0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function lc(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?ac(e,r,zt(t)):n!=null?ac(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 uy(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)){ic(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),ic(e)}function ac(e,t,n){t==="number"&&js(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Nl(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 cy(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 fy(e,t,n,i){if(t==null){if(i!=null){if(n!=null)throw Error(L(92));if(Ea(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),ic(e)}function Ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var R0=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 mh(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||R0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function dy(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&&mh(e,l,i)}else for(var a in t)t.hasOwnProperty(a)&&mh(e,a,t[a])}function Tf(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 O0=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"]]),D0=/^[\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 ns(e){return D0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _n(){}var rc=null;function kf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gl=null,Al=null;function gh(e){var t=Zl(e);if(t&&(e=t.stateNode)){var n=e[mt]||null;e:switch(e=t.stateNode,t.type){case"input":if(lc(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));lc(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&&oy(i)}break e;case"textarea":cy(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Nl(e,!!n.multiple,t,!1)}}}var Po=!1;function hy(e,t,n){if(Po)return e(t,n);Po=!0;try{var i=e(t);return i}finally{if(Po=!1,(gl!==null||Al!==null)&&(So(),gl&&(t=gl,e=Al,Al=gl=null,gh(t),e)))for(t=0;t<e.length;t++)gh(e[t])}}function Xa(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"),sc=!1;if(Ln)try{var ca={};Object.defineProperty(ca,"passive",{get:function(){sc=!0}}),window.addEventListener("test",ca,ca),window.removeEventListener("test",ca,ca)}catch{sc=!1}var li=null,Nf=null,is=null;function py(){if(is)return is;var e,t=Nf,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 is=l.slice(e,1<i?1-i:void 0)}function ls(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 Mr(){return!0}function yh(){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)?Mr:yh,this.isPropagationStopped=yh,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=Mr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Mr)},persist:function(){},isPersistent:Mr}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},uo=gt(Zi),mr=Te({},Zi,{view:0,detail:0}),z0=gt(mr),Xo,Qo,fa,co=Te({},mr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Af,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!==fa&&(fa&&e.type==="mousemove"?(Xo=e.screenX-fa.screenX,Qo=e.screenY-fa.screenY):Qo=Xo=0,fa=e),Xo)},movementY:function(e){return"movementY"in e?e.movementY:Qo}}),xh=gt(co),L0=Te({},co,{dataTransfer:0}),M0=gt(L0),B0=Te({},mr,{relatedTarget:0}),Zo=gt(B0),U0=Te({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),I0=gt(U0),H0=Te({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),q0=gt(H0),F0=Te({},Zi,{data:0}),vh=gt(F0),G0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},V0={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"},Y0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function P0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Y0[e])?!!t[e]:!1}function Af(){return P0}var X0=Te({},mr,{key:function(e){if(e.key){var t=G0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ls(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?V0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Af,charCode:function(e){return e.type==="keypress"?ls(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ls(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Q0=gt(X0),Z0=Te({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bh=gt(Z0),K0=Te({},mr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Af}),J0=gt(K0),$0=Te({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),W0=gt($0),e1=Te({},co,{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}),t1=gt(e1),n1=Te({},Zi,{newState:0,oldState:0}),i1=gt(n1),l1=[9,13,27,32],wf=Ln&&"CompositionEvent"in window,wa=null;Ln&&"documentMode"in document&&(wa=document.documentMode);var a1=Ln&&"TextEvent"in window&&!wa,my=Ln&&(!wf||wa&&8<wa&&11>=wa),Sh=" ",Eh=!1;function gy(e,t){switch(e){case"keyup":return l1.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yy(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yl=!1;function r1(e,t){switch(e){case"compositionend":return yy(t);case"keypress":return t.which!==32?null:(Eh=!0,Sh);case"textInput":return e=t.data,e===Sh&&Eh?null:e;default:return null}}function s1(e,t){if(yl)return e==="compositionend"||!wf&&gy(e,t)?(e=py(),is=Nf=li=null,yl=!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 my&&t.locale!=="ko"?null:t.data;default:return null}}var o1={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 Ch(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!o1[e.type]:t==="textarea"}function xy(e,t,n,i){gl?Al?Al.push(i):Al=[i]:gl=i,t=Xs(t,"onChange"),0<t.length&&(n=new uo("onChange","change",null,n,i),e.push({event:n,listeners:t}))}var ja=null,Qa=null;function u1(e){hv(e,0)}function fo(e){var t=Ca(e);if(oy(t))return e}function Th(e,t){if(e==="change")return t}var vy=!1;if(Ln){var Ko;if(Ln){var Jo="oninput"in document;if(!Jo){var kh=document.createElement("div");kh.setAttribute("oninput","return;"),Jo=typeof kh.oninput=="function"}Ko=Jo}else Ko=!1;vy=Ko&&(!document.documentMode||9<document.documentMode)}function Nh(){ja&&(ja.detachEvent("onpropertychange",by),Qa=ja=null)}function by(e){if(e.propertyName==="value"&&fo(Qa)){var t=[];xy(t,Qa,e,kf(e)),hy(u1,t)}}function c1(e,t,n){e==="focusin"?(Nh(),ja=t,Qa=n,ja.attachEvent("onpropertychange",by)):e==="focusout"&&Nh()}function f1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(Qa)}function d1(e,t){if(e==="click")return fo(t)}function h1(e,t){if(e==="input"||e==="change")return fo(t)}function p1(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var jt=typeof Object.is=="function"?Object.is:p1;function Za(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(!tc.call(t,l)||!jt(e[l],t[l]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wh(e,t){var n=Ah(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=Ah(n)}}function Sy(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sy(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ey(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=js(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=js(e.document)}return t}function jf(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 m1=Ln&&"documentMode"in document&&11>=document.documentMode,xl=null,oc=null,_a=null,uc=!1;function jh(e,t,n){var i=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;uc||xl==null||xl!==js(i)||(i=xl,"selectionStart"in i&&jf(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}),_a&&Za(_a,i)||(_a=i,i=Xs(oc,"onSelect"),0<i.length&&(t=new uo("onSelect","select",null,t,n),e.push({event:t,listeners:i}),t.target=xl)))}function Ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vl={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")},$o={},Cy={};Ln&&(Cy=document.createElement("div").style,"AnimationEvent"in window||(delete vl.animationend.animation,delete vl.animationiteration.animation,delete vl.animationstart.animation),"TransitionEvent"in window||delete vl.transitionend.transition);function Ki(e){if($o[e])return $o[e];if(!vl[e])return e;var t=vl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Cy)return $o[e]=t[n];return e}var Ty=Ki("animationend"),ky=Ki("animationiteration"),Ny=Ki("animationstart"),g1=Ki("transitionrun"),y1=Ki("transitionstart"),x1=Ki("transitioncancel"),Ay=Ki("transitionend"),wy=new Map,cc="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(" ");cc.push("scrollEnd");function ln(e,t){wy.set(e,t),Qi(t,[e])}var _s=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=[],bl=0,_f=0;function ho(){for(var e=bl,t=_f=bl=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&&jy(n,l,a)}}function po(e,t,n,i){Dt[bl++]=e,Dt[bl++]=t,Dt[bl++]=n,Dt[bl++]=i,_f|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function Rf(e,t,n,i){return po(e,t,n,i),Rs(e)}function Ji(e,t){return po(e,null,null,t),Rs(e)}function jy(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 Rs(e){if(50<Ia)throw Ia=0,Rc=null,Error(L(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Sl={};function v1(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 v1(e,t,n,i)}function Of(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 _y(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 as(e,t,n,i,l,a){var r=0;if(i=e,typeof e=="function")Of(e)&&(r=1);else if(typeof e=="string")r=TE(e,n,pn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ju:return e=Et(31,n,t,l),e.elementType=Ju,e.lanes=a,e;case hl:return Mi(n.children,l,a,t);case Zg:r=8,l|=24;break;case Qu:return e=Et(12,n,t,l|2),e.elementType=Qu,e.lanes=a,e;case Zu:return e=Et(13,n,t,l),e.elementType=Zu,e.lanes=a,e;case Ku:return e=Et(19,n,t,l),e.elementType=Ku,e.lanes=a,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case jn:r=10;break e;case Kg:r=9;break e;case xf:r=11;break e;case vf: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 Mi(e,t,n,i){return e=Et(7,e,i,t),e.lanes=n,e}function Wo(e,t,n){return e=Et(6,e,null,t),e.lanes=n,e}function Ry(e){var t=Et(18,null,null,0);return t.stateNode=e,t}function eu(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 _h=new WeakMap;function Ht(e,t){if(typeof e=="object"&&e!==null){var n=_h.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ch(t)},_h.set(e,t),t)}return{value:e,source:t,stack:ch(t)}}var El=[],Cl=0,Os=null,Ka=0,Lt=[],Mt=0,yi=null,fn=1,dn="";function An(e,t){El[Cl++]=Ka,El[Cl++]=Os,Os=e,Ka=t}function Oy(e,t,n){Lt[Mt++]=fn,Lt[Mt++]=dn,Lt[Mt++]=yi,yi=e;var i=fn;e=dn;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,fn=1<<32-Nt(t)+l|n<<l|i,dn=a+e}else fn=1<<a|n<<l|i,dn=e}function Df(e){e.return!==null&&(An(e,1),Oy(e,1,0))}function zf(e){for(;e===Os;)Os=El[--Cl],El[Cl]=null,Ka=El[--Cl],El[Cl]=null;for(;e===yi;)yi=Lt[--Mt],Lt[Mt]=null,dn=Lt[--Mt],Lt[Mt]=null,fn=Lt[--Mt],Lt[Mt]=null}function Dy(e,t){Lt[Mt++]=fn,Lt[Mt++]=dn,Lt[Mt++]=yi,fn=t.id,dn=t.overflow,yi=e}var Ze=null,Ee=null,se=!1,ui=null,qt=!1,fc=Error(L(519));function xi(e){var t=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ja(Ht(t,e)),fc}function Rh(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<tr.length;n++)ee(tr[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),uy(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),fy(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||mv(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||xi(e,!0)}function Oh(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 Oh(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")||Mc(e.type,e.memoizedProps)),n=!n),n&&Ee&&xi(e),Oh(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=xp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ee=xp(e)}else t===27?(t=Ee,Ei(e.type)?(e=Hc,Hc=null,Ee=e):Ee=t):Ee=Ze?Gt(e.stateNode.nextSibling):null;return!0}function Hi(){Ee=Ze=null,se=!1}function tu(){var e=ui;return e!==null&&(ht===null?ht=e:ht.push.apply(ht,e),ui=null),e}function Ja(e){ui===null?ui=[e]:ui.push(e)}var dc=yn(null),$i=null,Rn=null;function Jn(e,t,n){be(dc,t._currentValue),t._currentValue=n}function Dn(e){e._currentValue=dc.current,Pe(dc)}function hc(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 pc(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),hc(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),hc(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 Kl(e,t,n,i){e=null;for(var l=t,a=!1;l!==null;){if(!a){if(l.flags&524288)a=!0;else if(l.flags&262144)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===ks.current){if(r=l.alternate,r===null)throw Error(L(387));r.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(ir):e=[ir])}l=l.return}e!==null&&pc(t,e,n,i),t.flags|=262144}function Ds(e){for(e=e.firstContext;e!==null;){if(!jt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function qi(e){$i=e,Rn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ke(e){return zy($i,e)}function Br(e,t){return $i===null&&qi(e),zy(e,t)}function zy(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 b1=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()})}},S1=Ge.unstable_scheduleCallback,E1=Ge.unstable_NormalPriority,Me={$$typeof:jn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lf(){return{controller:new b1,data:new Map,refCount:0}}function gr(e){e.refCount--,e.refCount===0&&S1(E1,function(){e.controller.abort()})}var Ra=null,mc=0,Bl=0,wl=null;function C1(e,t){if(Ra===null){var n=Ra=[];mc=0,Bl=rd(),wl={status:"pending",value:void 0,then:function(i){n.push(i)}}}return mc++,t.then(Dh,Dh),t}function Dh(){if(--mc===0&&Ra!==null){wl!==null&&(wl.status="fulfilled");var e=Ra;Ra=null,Bl=0,wl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function T1(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 zh=Z.S;Z.S=function(e,t){Qx=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&C1(e,t),zh!==null&&zh(e,t)};var Bi=yn(null);function Mf(){var e=Bi.current;return e!==null?e:ye.pooledCache}function rs(e,t){t===null?be(Bi,Bi.current):be(Bi,t.pool)}function Ly(){var e=Mf();return e===null?null:{parent:Me._currentValue,pool:e}}var Jl=Error(L(460)),Bf=Error(L(474)),mo=Error(L(542)),zs={then:function(){}};function Lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function My(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,Bh(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,Bh(e),e}throw Ui=t,Jl}}function Ri(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ui=n,Jl):n}}var Ui=null;function Mh(){if(Ui===null)throw Error(L(459));var e=Ui;return Ui=null,e}function Bh(e){if(e===Jl||e===mo)throw Error(L(483))}var jl=null,$a=0;function Ur(e){var t=$a;return $a+=1,jl===null&&(jl=[]),My(jl,e,t)}function da(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ir(e,t){throw t.$$typeof===c0?Error(L(525)):(e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function By(e){function t(m,g){if(e){var v=m.deletions;v===null?(m.deletions=[g],m.flags|=16):v.push(g)}}function n(m,g){if(!e)return null;for(;g!==null;)t(m,g),g=g.sibling;return null}function i(m){for(var g=new Map;m!==null;)m.key!==null?g.set(m.key,m):g.set(m.index,m),m=m.sibling;return g}function l(m,g){return m=On(m,g),m.index=0,m.sibling=null,m}function a(m,g,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<g?(m.flags|=67108866,g):v):(m.flags|=67108866,g)):(m.flags|=1048576,g)}function r(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function s(m,g,v,C){return g===null||g.tag!==6?(g=Wo(v,m.mode,C),g.return=m,g):(g=l(g,v),g.return=m,g)}function u(m,g,v,C){var w=v.type;return w===hl?d(m,g,v.props.children,C,v.key):g!==null&&(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Qn&&Ri(w)===g.type)?(g=l(g,v.props),da(g,v),g.return=m,g):(g=as(v.type,v.key,v.props,null,m.mode,C),da(g,v),g.return=m,g)}function c(m,g,v,C){return g===null||g.tag!==4||g.stateNode.containerInfo!==v.containerInfo||g.stateNode.implementation!==v.implementation?(g=eu(v,m.mode,C),g.return=m,g):(g=l(g,v.children||[]),g.return=m,g)}function d(m,g,v,C,w){return g===null||g.tag!==7?(g=Mi(v,m.mode,C,w),g.return=m,g):(g=l(g,v),g.return=m,g)}function f(m,g,v){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Wo(""+g,m.mode,v),g.return=m,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Rr:return v=as(g.type,g.key,g.props,null,m.mode,v),da(v,g),v.return=m,v;case Sa:return g=eu(g,m.mode,v),g.return=m,g;case Qn:return g=Ri(g),f(m,g,v)}if(Ea(g)||ua(g))return g=Mi(g,m.mode,v,null),g.return=m,g;if(typeof g.then=="function")return f(m,Ur(g),v);if(g.$$typeof===jn)return f(m,Br(m,g),v);Ir(m,g)}return null}function h(m,g,v,C){var w=g!==null?g.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return w!==null?null:s(m,g,""+v,C);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Rr:return v.key===w?u(m,g,v,C):null;case Sa:return v.key===w?c(m,g,v,C):null;case Qn:return v=Ri(v),h(m,g,v,C)}if(Ea(v)||ua(v))return w!==null?null:d(m,g,v,C,null);if(typeof v.then=="function")return h(m,g,Ur(v),C);if(v.$$typeof===jn)return h(m,g,Br(m,v),C);Ir(m,v)}return null}function p(m,g,v,C,w){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return m=m.get(v)||null,s(g,m,""+C,w);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Rr:return m=m.get(C.key===null?v:C.key)||null,u(g,m,C,w);case Sa:return m=m.get(C.key===null?v:C.key)||null,c(g,m,C,w);case Qn:return C=Ri(C),p(m,g,v,C,w)}if(Ea(C)||ua(C))return m=m.get(v)||null,d(g,m,C,w,null);if(typeof C.then=="function")return p(m,g,v,Ur(C),w);if(C.$$typeof===jn)return p(m,g,v,Br(g,C),w);Ir(g,C)}return null}function y(m,g,v,C){for(var w=null,N=null,_=g,I=g=0,D=null;_!==null&&I<v.length;I++){_.index>I?(D=_,_=null):D=_.sibling;var T=h(m,_,v[I],C);if(T===null){_===null&&(_=D);break}e&&_&&T.alternate===null&&t(m,_),g=a(T,g,I),N===null?w=T:N.sibling=T,N=T,_=D}if(I===v.length)return n(m,_),se&&An(m,I),w;if(_===null){for(;I<v.length;I++)_=f(m,v[I],C),_!==null&&(g=a(_,g,I),N===null?w=_:N.sibling=_,N=_);return se&&An(m,I),w}for(_=i(_);I<v.length;I++)D=p(_,m,I,v[I],C),D!==null&&(e&&D.alternate!==null&&_.delete(D.key===null?I:D.key),g=a(D,g,I),N===null?w=D:N.sibling=D,N=D);return e&&_.forEach(function(M){return t(m,M)}),se&&An(m,I),w}function x(m,g,v,C){if(v==null)throw Error(L(151));for(var w=null,N=null,_=g,I=g=0,D=null,T=v.next();_!==null&&!T.done;I++,T=v.next()){_.index>I?(D=_,_=null):D=_.sibling;var M=h(m,_,T.value,C);if(M===null){_===null&&(_=D);break}e&&_&&M.alternate===null&&t(m,_),g=a(M,g,I),N===null?w=M:N.sibling=M,N=M,_=D}if(T.done)return n(m,_),se&&An(m,I),w;if(_===null){for(;!T.done;I++,T=v.next())T=f(m,T.value,C),T!==null&&(g=a(T,g,I),N===null?w=T:N.sibling=T,N=T);return se&&An(m,I),w}for(_=i(_);!T.done;I++,T=v.next())T=p(_,m,I,T.value,C),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?I:T.key),g=a(T,g,I),N===null?w=T:N.sibling=T,N=T);return e&&_.forEach(function(q){return t(m,q)}),se&&An(m,I),w}function E(m,g,v,C){if(typeof v=="object"&&v!==null&&v.type===hl&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Rr:e:{for(var w=v.key;g!==null;){if(g.key===w){if(w=v.type,w===hl){if(g.tag===7){n(m,g.sibling),C=l(g,v.props.children),C.return=m,m=C;break e}}else if(g.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===Qn&&Ri(w)===g.type){n(m,g.sibling),C=l(g,v.props),da(C,v),C.return=m,m=C;break e}n(m,g);break}else t(m,g);g=g.sibling}v.type===hl?(C=Mi(v.props.children,m.mode,C,v.key),C.return=m,m=C):(C=as(v.type,v.key,v.props,null,m.mode,C),da(C,v),C.return=m,m=C)}return r(m);case Sa:e:{for(w=v.key;g!==null;){if(g.key===w)if(g.tag===4&&g.stateNode.containerInfo===v.containerInfo&&g.stateNode.implementation===v.implementation){n(m,g.sibling),C=l(g,v.children||[]),C.return=m,m=C;break e}else{n(m,g);break}else t(m,g);g=g.sibling}C=eu(v,m.mode,C),C.return=m,m=C}return r(m);case Qn:return v=Ri(v),E(m,g,v,C)}if(Ea(v))return y(m,g,v,C);if(ua(v)){if(w=ua(v),typeof w!="function")throw Error(L(150));return v=w.call(v),x(m,g,v,C)}if(typeof v.then=="function")return E(m,g,Ur(v),C);if(v.$$typeof===jn)return E(m,g,Br(m,v),C);Ir(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,g!==null&&g.tag===6?(n(m,g.sibling),C=l(g,v),C.return=m,m=C):(n(m,g),C=Wo(v,m.mode,C),C.return=m,m=C),r(m)):n(m,g)}return function(m,g,v,C){try{$a=0;var w=E(m,g,v,C);return jl=null,w}catch(_){if(_===Jl||_===mo)throw _;var N=Et(29,_,null,m.mode);return N.lanes=C,N.return=m,N}finally{}}}var Fi=By(!0),Uy=By(!1),Zn=!1;function Uf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function gc(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){var l=i.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),i.pending=t,t=Rs(e),jy(e,null,n),t}return po(e,i,t,n),Rs(e)}function Oa(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,ny(e,n)}}function nu(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 yc=!1;function Da(){if(yc){var e=wl;if(e!==null)throw e}}function za(e,t,n,i){yc=!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===Bl&&(yc=!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),bi|=r,e.lanes=r,e.memoizedState=f}}function Iy(e,t){if(typeof e!="function")throw Error(L(191,e));e.call(t)}function Hy(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Iy(n[e],t)}var Ul=yn(null),Ls=yn(0);function Uh(e,t){e=In,be(Ls,e),be(Ul,t),In=e|t.baseLanes}function xc(){be(Ls,In),be(Ul,Ul.current)}function If(){In=Ls.current,Pe(Ul),Pe(Ls)}var _t=yn(null),Ft=null;function $n(e){var t=e.alternate;be(Re,Re.current&1),be(_t,e),Ft===null&&(t===null||Ul.current!==null||t.memoizedState!==null)&&(Ft=e)}function vc(e){be(Re,Re.current),be(_t,e),Ft===null&&(Ft=e)}function qy(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 Ms(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Ic(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)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,$=null,me=null,ze=null,Bs=!1,_l=!1,Gi=!1,Us=0,Wa=0,Rl=null,k1=0;function we(){throw Error(L(321))}function Hf(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 qf(e,t,n,i,l,a){return Mn=a,$=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Z.H=e===null||e.memoizedState===null?xx:$f,Gi=!1,a=n(i,l),Gi=!1,_l&&(a=Gy(t,n,i,l)),Fy(e),a}function Fy(e){Z.H=er;var t=me!==null&&me.next!==null;if(Mn=0,ze=me=$=null,Bs=!1,Wa=0,Rl=null,t)throw Error(L(300));e===null||Be||(e=e.dependencies,e!==null&&Ds(e)&&(Be=!0))}function Gy(e,t,n,i){$=e;var l=0;do{if(_l&&(Rl=null),Wa=0,_l=!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=vx,a=t(n,i)}while(_l);return a}function N1(){var e=Z.H,t=e.useState()[0];return t=typeof t.then=="function"?yr(t):t,e=e.useState()[0],(me!==null?me.memoizedState:null)!==e&&($.flags|=1024),t}function Ff(){var e=Us!==0;return Us=0,e}function Gf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Vf(e){if(Bs){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bs=!1}Mn=0,ze=me=$=null,_l=!1,Wa=Us=0,Rl=null}function nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ze===null?$.memoizedState=ze=e:ze=ze.next=e,ze}function Oe(){if(me===null){var e=$.alternate;e=e!==null?e.memoizedState:null}else e=me.next;var t=ze===null?$.memoizedState:ze.next;if(t!==null)ze=t,me=e;else{if(e===null)throw $.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?$.memoizedState=ze=e:ze=ze.next=e}return ze}function go(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function yr(e){var t=Wa;return Wa+=1,Rl===null&&(Rl=[]),e=My(Rl,e,t),t=$,(ze===null?t.memoizedState:ze.next)===null&&(t=t.alternate,Z.H=t===null||t.memoizedState===null?xx:$f),e}function yo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return yr(e);if(e.$$typeof===jn)return Ke(e)}throw Error(L(438,String(e)))}function Yf(e){var t=null,n=$.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var i=$.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=go(),$.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]=f0;return t.index++,n}function Bn(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=Oe();return Pf(t,me,e)}function Pf(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===Bl&&(d=!0);else if((Mn&h)===h){c=c.next,h===Bl&&(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,$.lanes|=h,bi|=h;f=c.action,Gi&&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,$.lanes|=f,bi|=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 iu(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 Vy(e,t,n){var i=$,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,Xf(Xy.bind(null,i,l,e),[e]),l.getSnapshot!==t||r||ze!==null&&ze.memoizedState.tag&1){if(i.flags|=2048,Il(9,{destroy:void 0},Py.bind(null,i,l,n,t),null),ye===null)throw Error(L(349));a||Mn&127||Yy(i,t,n)}return n}function Yy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$.updateQueue,t===null?(t=go(),$.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Py(e,t,n,i){t.value=n,t.getSnapshot=i,Qy(t)&&Zy(e)}function Xy(e,t,n){return n(function(){Qy(t)&&Zy(e)})}function Qy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jt(e,n)}catch{return!0}}function Zy(e){var t=Ji(e,2);t!==null&&pt(t,e,2)}function bc(e){var t=nt();if(typeof e=="function"){var n=e;if(e=n(),Gi){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 Ky(e,t,n,i){return e.baseState=n,Pf(e,me,typeof i=="function"?i:Bn)}function A1(e,t,n,i,l){if(vo(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,Jy(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Jy(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),Ih(e,t,s)}catch(c){Sc(e,t,c)}finally{a!==null&&r.types!==null&&(a.types=r.types),Z.T=a}}else try{a=n(l,i),Ih(e,t,a)}catch(c){Sc(e,t,c)}}function Ih(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(i){Hh(e,t,i)},function(i){return Sc(e,t,i)}):Hh(e,t,n)}function Hh(e,t,n){t.status="fulfilled",t.value=n,$y(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Jy(e,n)))}function Sc(e,t,n){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=n,$y(t),t=t.next;while(t!==i)}e.action=null}function $y(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wy(e,t){return t}function qh(e,t){if(se){var n=ye.formState;if(n!==null){e:{var i=$;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}}xi(i)}i=!1}i&&(t=n[0])}}return n=nt(),n.memoizedState=n.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wy,lastRenderedState:t},n.queue=i,n=mx.bind(null,$,i),i.dispatch=n,i=bc(!1),a=Jf.bind(null,$,!1,i.queue),i=nt(),l={state:t,dispatch:null,action:e,pending:null},i.queue=l,n=A1.bind(null,$,l,a,n),l.dispatch=n,i.memoizedState=e,[t,n,!1]}function Fh(e){var t=Oe();return ex(t,me,e)}function ex(e,t,n){if(t=Pf(e,t,Wy)[0],e=ss(Bn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=yr(t)}catch(r){throw r===Jl?mo:r}else i=t;t=Oe();var l=t.queue,a=l.dispatch;return n!==t.memoizedState&&($.flags|=2048,Il(9,{destroy:void 0},w1.bind(null,l,n),null)),[i,a,e]}function w1(e,t){e.action=t}function Gh(e){var t=Oe(),n=me;if(n!==null)return ex(t,n,e);Oe(),t=t.memoizedState,n=Oe();var i=n.queue.dispatch;return n.memoizedState=e,[t,i,!1]}function Il(e,t,n,i){return e={tag:e,create:n,deps:i,inst:t,next:null},t=$.updateQueue,t===null&&(t=go(),$.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 tx(){return Oe().memoizedState}function os(e,t,n,i){var l=nt();$.flags|=e,l.memoizedState=Il(1|t,{destroy:void 0},n,i===void 0?null:i)}function xo(e,t,n,i){var l=Oe();i=i===void 0?null:i;var a=l.memoizedState.inst;me!==null&&i!==null&&Hf(i,me.memoizedState.deps)?l.memoizedState=Il(t,a,n,i):($.flags|=e,l.memoizedState=Il(1|t,a,n,i))}function Vh(e,t){os(8390656,8,e,t)}function Xf(e,t){xo(2048,8,e,t)}function j1(e){$.flags|=4;var t=$.updateQueue;if(t===null)t=go(),$.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function nx(e){var t=Oe().memoizedState;return j1({ref:t,nextImpl:e}),function(){if(ue&2)throw Error(L(440));return t.impl.apply(void 0,arguments)}}function ix(e,t){return xo(4,2,e,t)}function lx(e,t){return xo(4,4,e,t)}function ax(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 rx(e,t,n){n=n!=null?n.concat([e]):null,xo(4,4,ax.bind(null,t,e),n)}function Qf(){}function sx(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;return t!==null&&Hf(t,i[1])?i[0]:(n.memoizedState=[e,t],e)}function ox(e,t){var n=Oe();t=t===void 0?null:t;var i=n.memoizedState;if(t!==null&&Hf(t,i[1]))return i[0];if(i=e(),Gi){ii(!0);try{e()}finally{ii(!1)}}return n.memoizedState=[i,t],i}function Zf(e,t,n){return n===void 0||Mn&1073741824&&!(ie&261930)?e.memoizedState=t:(e.memoizedState=n,e=Kx(),$.lanes|=e,bi|=e,n)}function ux(e,t,n,i){return jt(n,t)?n:Ul.current!==null?(e=Zf(e,n,i),jt(e,t)||(Be=!0),e):!(Mn&42)||Mn&1073741824&&!(ie&261930)?(Be=!0,e.memoizedState=n):(e=Kx(),$.lanes|=e,bi|=e,t)}function cx(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,Jf(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=T1(u,i);La(e,t,d,At(e))}else La(e,t,i,At(e))}catch(f){La(e,t,{then:function(){},status:"rejected",reason:f},At())}finally{ce.p=a,r!==null&&s.types!==null&&(r.types=s.types),Z.T=r}}function _1(){}function Ec(e,t,n,i){if(e.tag!==5)throw Error(L(476));var l=fx(e).queue;cx(e,l,t,Li,n===null?_1:function(){return dx(e),n(i)})}function fx(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Li,baseState:Li,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bn,lastRenderedState:Li},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 dx(e){var t=fx(e);t.next===null&&(t=e.alternate.memoizedState),La(e,t.next.queue,{},At())}function Kf(){return Ke(ir)}function hx(){return Oe().memoizedState}function px(){return Oe().memoizedState}function R1(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=At();e=ci(n);var i=fi(t,e,n);i!==null&&(pt(i,t,n),Oa(i,t,n)),t={cache:Lf()},e.payload=t;return}t=t.return}}function O1(e,t,n){var i=At();n={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},vo(e)?gx(t,n):(n=Rf(e,t,n,i),n!==null&&(pt(n,e,i),yx(n,t,i)))}function mx(e,t,n){var i=At();La(e,t,n,i)}function La(e,t,n,i){var l={lane:i,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(vo(e))gx(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 po(e,t,l,0),ye===null&&ho(),!1}catch{}finally{}if(n=Rf(e,t,l,i),n!==null)return pt(n,e,i),yx(n,t,i),!0}return!1}function Jf(e,t,n,i){if(i={lane:2,revertLane:rd(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},vo(e)){if(t)throw Error(L(479))}else t=Rf(e,n,i,2),t!==null&&pt(t,e,2)}function vo(e){var t=e.alternate;return e===$||t!==null&&t===$}function gx(e,t){_l=Bs=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function yx(e,t,n){if(n&4194048){var i=t.lanes;i&=e.pendingLanes,n|=i,t.lanes=n,ny(e,n)}}var er={readContext:Ke,use:yo,useCallback:we,useContext:we,useEffect:we,useImperativeHandle:we,useLayoutEffect:we,useInsertionEffect:we,useMemo:we,useReducer:we,useRef:we,useState:we,useDebugValue:we,useDeferredValue:we,useTransition:we,useSyncExternalStore:we,useId:we,useHostTransitionStatus:we,useFormState:we,useActionState:we,useOptimistic:we,useMemoCache:we,useCacheRefresh:we};er.useEffectEvent=we;var xx={readContext:Ke,use:yo,useCallback:function(e,t){return nt().memoizedState=[e,t===void 0?null:t],e},useContext:Ke,useEffect:Vh,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,os(4194308,4,ax.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=nt();t=t===void 0?null:t;var i=e();if(Gi){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(Gi){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=O1.bind(null,$,e),[i.memoizedState,e]},useRef:function(e){var t=nt();return e={current:e},t.memoizedState=e},useState:function(e){e=bc(e);var t=e.queue,n=mx.bind(null,$,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qf,useDeferredValue:function(e,t){var n=nt();return Zf(n,e,t)},useTransition:function(){var e=bc(!1);return e=cx.bind(null,$,e.queue,!0,!1),nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var i=$,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||Yy(i,t,n)}l.memoizedState=n;var a={value:n,getSnapshot:t};return l.queue=a,Vh(Xy.bind(null,i,a,e),[e]),i.flags|=2048,Il(9,{destroy:void 0},Py.bind(null,i,a,n,t),null),n},useId:function(){var e=nt(),t=ye.identifierPrefix;if(se){var n=dn,i=fn;n=(i&~(1<<32-Nt(i)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Us++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=k1++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Kf,useFormState:qh,useActionState:qh,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=Jf.bind(null,$,!0,n),n.dispatch=t,[e,t]},useMemoCache:Yf,useCacheRefresh:function(){return nt().memoizedState=R1.bind(null,$)},useEffectEvent:function(e){var t=nt(),n={impl:e};return t.memoizedState=n,function(){if(ue&2)throw Error(L(440));return n.impl.apply(void 0,arguments)}}},$f={readContext:Ke,use:yo,useCallback:sx,useContext:Ke,useEffect:Xf,useImperativeHandle:rx,useInsertionEffect:ix,useLayoutEffect:lx,useMemo:ox,useReducer:ss,useRef:tx,useState:function(){return ss(Bn)},useDebugValue:Qf,useDeferredValue:function(e,t){var n=Oe();return ux(n,me.memoizedState,e,t)},useTransition:function(){var e=ss(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Vy,useId:hx,useHostTransitionStatus:Kf,useFormState:Fh,useActionState:Fh,useOptimistic:function(e,t){var n=Oe();return Ky(n,me,e,t)},useMemoCache:Yf,useCacheRefresh:px};$f.useEffectEvent=nx;var vx={readContext:Ke,use:yo,useCallback:sx,useContext:Ke,useEffect:Xf,useImperativeHandle:rx,useInsertionEffect:ix,useLayoutEffect:lx,useMemo:ox,useReducer:iu,useRef:tx,useState:function(){return iu(Bn)},useDebugValue:Qf,useDeferredValue:function(e,t){var n=Oe();return me===null?Zf(n,e,t):ux(n,me.memoizedState,e,t)},useTransition:function(){var e=iu(Bn)[0],t=Oe().memoizedState;return[typeof e=="boolean"?e:yr(e),t]},useSyncExternalStore:Vy,useId:hx,useHostTransitionStatus:Kf,useFormState:Gh,useActionState:Gh,useOptimistic:function(e,t){var n=Oe();return me!==null?Ky(n,me,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Yf,useCacheRefresh:px};vx.useEffectEvent=nx;function lu(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 Cc={enqueueSetState:function(e,t,n){e=e._reactInternals;var i=At(),l=ci(i);l.payload=t,n!=null&&(l.callback=n),t=fi(e,l,i),t!==null&&(pt(t,e,i),Oa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var i=At(),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),Oa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=At(),i=ci(n);i.tag=2,t!=null&&(i.callback=t),t=fi(e,i,n),t!==null&&(pt(t,e,n),Oa(t,e,n))}};function Yh(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?!Za(n,i)||!Za(l,a):!0}function Ph(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&&Cc.enqueueReplaceState(t,t.state,null)}function Vi(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 bx(e){_s(e)}function Sx(e){console.error(e)}function Ex(e){_s(e)}function Is(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Xh(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 Tc(e,t,n){return n=ci(n),n.tag=3,n.payload={element:null},n.callback=function(){Is(e,t)},n}function Cx(e){return e=ci(e),e.tag=3,e}function Tx(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(){Xh(t,n,i)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Xh(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 D1(e,t,n,i,l){if(n.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=n.alternate,t!==null&&Kl(t,n,l,!0),n=_t.current,n!==null){switch(n.tag){case 31:case 13:return Ft===null?Vs():n.alternate===null&&je===0&&(je=3),n.flags&=-257,n.flags|=65536,n.lanes=l,i===zs?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([i]):t.add(i),mu(e,i,l)),!1;case 22:return n.flags|=65536,i===zs?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)),mu(e,i,l)),!1}throw Error(L(435,n.tag))}return mu(e,i,l),Vs(),!1}if(se)return t=_t.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=l,i!==fc&&(e=Error(L(422),{cause:i}),Ja(Ht(e,n)))):(i!==fc&&(t=Error(L(423),{cause:i}),Ja(Ht(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,i=Ht(i,n),l=Tc(e.stateNode,i,l),nu(e,l),je!==4&&(je=2)),!1;var a=Error(L(520),{cause:i});if(a=Ht(a,n),Ua===null?Ua=[a]:Ua.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=Tc(n.stateNode,i,e),nu(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),Tx(l,e,n,i),nu(n,l),!1}n=n.return}while(n!==null);return!1}var Wf=Error(L(461)),Be=!1;function Xe(e,t,n,i){t.child=e===null?Uy(t,null,n,i):Fi(t,e.child,n,i)}function Qh(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 qi(t),i=qf(e,t,n,r,a,l),s=Ff(),e!==null&&!Be?(Gf(e,t,l),Un(e,t,l)):(se&&s&&Df(t),t.flags|=1,Xe(e,t,i,l),t.child)}function Zh(e,t,n,i,l){if(e===null){var a=n.type;return typeof a=="function"&&!Of(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,kx(e,t,a,i,l)):(e=as(n.type,null,i,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!ed(e,l)){var r=a.memoizedProps;if(n=n.compare,n=n!==null?n:Za,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 kx(e,t,n,i,l){if(e!==null){var a=e.memoizedProps;if(Za(a,i)&&e.ref===t.ref)if(Be=!1,t.pendingProps=i=a,ed(e,l))e.flags&131072&&(Be=!0);else return t.lanes=e.lanes,Un(e,t,l)}return kc(e,t,n,i,l)}function Nx(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){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 Kh(e,t,a,n,i)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&rs(t,a!==null?a.cachePool:null),a!==null?Uh(t,a):xc(),qy(t);else return i=t.lanes=536870912,Kh(e,t,a!==null?a.baseLanes|n:n,n,i)}else a!==null?(rs(t,a.cachePool),Uh(t,a),Wn(),t.memoizedState=null):(e!==null&&rs(t,null),xc(),Wn());return Xe(e,t,l,n),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Kh(e,t,n,i,l){var a=Mf();return a=a===null?null:{parent:Me._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&rs(t,null),xc(),qy(t),e!==null&&Kl(e,t,i,!0),t.childLanes=l,null}function us(e,t){return t=Hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jh(e,t,n){return Fi(t,e.child,null,n),e=us(t,t.pendingProps),e.flags|=2,St(t),t.memoizedState=null,e}function z1(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=us(t,i),t.lanes=536870912,Ta(null,e);if(vc(t),(e=Ee)?(e=xv(e,qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},n=Ry(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw xi(t);return t.lanes=536870912,null}return us(t,i)}var a=e.memoizedState;if(a!==null){var r=a.dehydrated;if(vc(t),l)if(t.flags&256)t.flags&=-257,t=Jh(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||Kl(e,t,n,!1),l=(n&e.childLanes)!==0,Be||l){if(i=ye,i!==null&&(r=iy(i,n),r!==0&&r!==a.retryLane))throw a.retryLane=r,Ji(e,r),pt(i,e,r),Wf;Vs(),t=Jh(e,t,n)}else e=a.treeContext,Ee=Gt(r.nextSibling),Ze=t,se=!0,ui=null,qt=!1,e!==null&&Dy(t,e),t=us(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 cs(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 kc(e,t,n,i,l){return qi(t),n=qf(e,t,n,i,void 0,l),i=Ff(),e!==null&&!Be?(Gf(e,t,l),Un(e,t,l)):(se&&i&&Df(t),t.flags|=1,Xe(e,t,n,l),t.child)}function $h(e,t,n,i,l,a){return qi(t),t.updateQueue=null,n=Gy(t,i,n,l),Fy(e),i=Ff(),e!==null&&!Be?(Gf(e,t,a),Un(e,t,a)):(se&&i&&Df(t),t.flags|=1,Xe(e,t,n,a),t.child)}function Wh(e,t,n,i,l){if(qi(t),t.stateNode===null){var a=Sl,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=Cc,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=i,a.state=t.memoizedState,a.refs={},Uf(t),r=n.contextType,a.context=typeof r=="object"&&r!==null?Ke(r):Sl,a.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(lu(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&&Cc.enqueueReplaceState(a,a.state,null),za(t,i,a,l),Da(),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=Vi(n,s);a.props=u;var c=a.context,d=n.contextType;r=Sl,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)&&Ph(t,a,i,r),Zn=!1;var h=t.memoizedState;a.state=h,za(t,i,a,l),Da(),c=t.memoizedState,s||h!==c||Zn?(typeof f=="function"&&(lu(t,n,f,i),c=t.memoizedState),(u=Zn||Yh(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,gc(e,t),r=t.memoizedProps,d=Vi(n,r),a.props=d,f=t.pendingProps,h=a.context,c=n.contextType,u=Sl,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)&&Ph(t,a,i,u),Zn=!1,h=t.memoizedState,a.state=h,za(t,i,a,l),Da();var p=t.memoizedState;r!==f||h!==p||Zn||e!==null&&e.dependencies!==null&&Ds(e.dependencies)?(typeof s=="function"&&(lu(t,n,s,i),p=t.memoizedState),(d=Zn||Yh(t,n,d,i,h,p,u)||e!==null&&e.dependencies!==null&&Ds(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,cs(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=Fi(t,e.child,null,l),t.child=Fi(t,null,n,l)):Xe(e,t,n,l),t.memoizedState=a.state,e=t.child):e=Un(e,t,l),e}function ep(e,t,n,i){return Hi(),t.flags|=256,Xe(e,t,n,i),t.child}var au={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ru(e){return{baseLanes:e,cachePool:Ly()}}function su(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Ct),e}function Ax(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?$n(t):Wn(),(e=Ee)?(e=xv(e,qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:yi!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},n=Ry(e),n.return=t,t.child=n,Ze=t,Ee=null)):e=null,e===null)throw xi(t);return Ic(e)?t.lanes=32:t.lanes=536870912,null}var s=i.children;return i=i.fallback,l?(Wn(),l=t.mode,s=Hs({mode:"hidden",children:s},l),i=Mi(i,l,n,null),s.return=t,i.return=t,s.sibling=i,t.child=s,i=t.child,i.memoizedState=ru(n),i.childLanes=su(e,r,n),t.memoizedState=au,Ta(null,i)):($n(t),Nc(t,s))}var u=e.memoizedState;if(u!==null&&(s=u.dehydrated,s!==null)){if(a)t.flags&256?($n(t),t.flags&=-257,t=ou(e,t,n)):t.memoizedState!==null?(Wn(),t.child=e.child,t.flags|=128,t=null):(Wn(),s=i.fallback,l=t.mode,i=Hs({mode:"visible",children:i.children},l),s=Mi(s,l,n,null),s.flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,Fi(t,e.child,null,n),i=t.child,i.memoizedState=ru(n),i.childLanes=su(e,r,n),t.memoizedState=au,t=Ta(null,i));else if($n(t),Ic(s)){if(r=s.nextSibling&&s.nextSibling.dataset,r)var c=r.dgst;r=c,i=Error(L(419)),i.stack="",i.digest=r,Ja({value:i,source:null,stack:null}),t=ou(e,t,n)}else if(Be||Kl(e,t,n,!1),r=(n&e.childLanes)!==0,Be||r){if(r=ye,r!==null&&(i=iy(r,n),i!==0&&i!==u.retryLane))throw u.retryLane=i,Ji(e,i),pt(r,e,i),Wf;Uc(s)||Vs(),t=ou(e,t,n)}else Uc(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&&Dy(t,e),t=Nc(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=Mi(s,l,n,null),s.flags|=2),s.return=t,i.return=t,i.sibling=s,t.child=i,Ta(null,i),i=t.child,s=e.child.memoizedState,s===null?s=ru(n):(l=s.cachePool,l!==null?(u=Me._currentValue,l=l.parent!==u?{parent:u,pool:u}:l):l=Ly(),s={baseLanes:s.baseLanes|n,cachePool:l}),i.memoizedState=s,i.childLanes=su(e,r,n),t.memoizedState=au,Ta(e.child,i)):($n(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 Nc(e,t){return t=Hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Hs(e,t){return e=Et(22,e,null,t),e.lanes=0,e}function ou(e,t,n){return Fi(t,e.child,null,n),e=Nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tp(e,t,n){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),hc(e.return,t,n)}function uu(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 wx(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?Ka:0,!s&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tp(e,n,t);else if(e.tag===19)tp(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&&Ms(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),uu(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&&Ms(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}uu(t,!0,n,null,a,i);break;case"together":uu(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),bi|=t.lanes,!(n&t.childLanes))if(e!==null){if(Kl(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 ed(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Ds(e)))}function L1(e,t,n){switch(t.tag){case 3:Ns(t,t.stateNode.containerInfo),Jn(t,Me,e.memoizedState.cache),Hi();break;case 27:case 5:ec(t);break;case 4:Ns(t,t.stateNode.containerInfo);break;case 10:Jn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?($n(t),t.flags|=128,null):n&t.child.childLanes?Ax(e,t,n):($n(t),e=Un(e,t,n),e!==null?e.sibling:null);$n(t);break;case 19:var l=(e.flags&128)!==0;if(i=(n&t.childLanes)!==0,i||(Kl(e,t,n,!1),i=(n&t.childLanes)!==0),l){if(i)return wx(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,Nx(e,t,n,t.pendingProps);case 24:Jn(t,Me,e.memoizedState.cache)}return Un(e,t,n)}function jx(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!ed(e,n)&&!(t.flags&128))return Be=!1,L1(e,t,n);Be=!!(e.flags&131072)}else Be=!1,se&&t.flags&1048576&&Oy(t,Ka,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=Ri(t.elementType),t.type=e,typeof e=="function")Of(e)?(i=Vi(e,i),t.tag=1,t=Wh(null,t,e,i,n)):(t.tag=0,t=kc(null,t,e,i,n));else{if(e!=null){var l=e.$$typeof;if(l===xf){t.tag=11,t=Qh(null,t,e,i,n);break e}else if(l===vf){t.tag=14,t=Zh(null,t,e,i,n);break e}}throw t=$u(e)||e,Error(L(306,t,""))}}return t;case 0:return kc(e,t,t.type,t.pendingProps,n);case 1:return i=t.type,l=Vi(i,t.pendingProps),Wh(e,t,i,l,n);case 3:e:{if(Ns(t,t.stateNode.containerInfo),e===null)throw Error(L(387));i=t.pendingProps;var a=t.memoizedState;l=a.element,gc(e,t),za(t,i,null,n);var r=t.memoizedState;if(i=r.cache,Jn(t,Me,i),i!==a.cache&&pc(t,[Me],n,!0),Da(),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=ep(e,t,i,n);break e}else if(i!==l){l=Ht(Error(L(424)),t),Ja(l),t=ep(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=Uy(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Hi(),i===l){t=Un(e,t,n);break e}Xe(e,t,i,n)}t=t.child}return t;case 26:return cs(e,t),e===null?(n=Sp(t.type,null,t.pendingProps,null))?t.memoizedState=n:se||(n=t.type,e=t.pendingProps,i=Qs(oi.current).createElement(n),i[Qe]=t,i[mt]=e,Je(i,n,e),Ye(i),t.stateNode=i):t.memoizedState=Sp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ec(t),e===null&&se&&(i=t.stateNode=vv(t.type,t.pendingProps,oi.current),Ze=t,qt=!0,l=Ee,Ei(t.type)?(Hc=l,Ee=Gt(i.firstChild)):Ee=l),Xe(e,t,t.pendingProps.children,n),cs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&se&&((l=i=Ee)&&(i=fE(i,t.type,t.pendingProps,qt),i!==null?(t.stateNode=i,Ze=t,Ee=Gt(i.firstChild),qt=!1,l=!0):l=!1),l||xi(t)),ec(t),l=t.type,a=t.pendingProps,r=e!==null?e.memoizedProps:null,i=a.children,Mc(l,a)?i=null:r!==null&&Mc(l,r)&&(t.flags|=32),t.memoizedState!==null&&(l=qf(e,t,N1,null,null,n),ir._currentValue=l),cs(e,t),Xe(e,t,i,n),t.child;case 6:return e===null&&se&&((e=n=Ee)&&(n=dE(n,t.pendingProps,qt),n!==null?(t.stateNode=n,Ze=t,Ee=null,e=!0):e=!1),e||xi(t)),null;case 13:return Ax(e,t,n);case 4:return Ns(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Fi(t,null,i,n):Xe(e,t,i,n),t.child;case 11:return Qh(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,Jn(t,t.type,i.value),Xe(e,t,i.children,n),t.child;case 9:return l=t.type._context,i=t.pendingProps.children,qi(t),l=Ke(l),i=i(l),t.flags|=1,Xe(e,t,i,n),t.child;case 14:return Zh(e,t,t.type,t.pendingProps,n);case 15:return kx(e,t,t.type,t.pendingProps,n);case 19:return wx(e,t,n);case 31:return z1(e,t,n);case 22:return Nx(e,t,n,t.pendingProps);case 24:return qi(t),i=Ke(Me),e===null?(l=Mf(),l===null&&(l=ye,a=Lf(),l.pooledCache=a,a.refCount++,a!==null&&(l.pooledCacheLanes|=n),l=a),t.memoizedState={parent:i,cache:l},Uf(t),Jn(t,Me,l)):(e.lanes&n&&(gc(e,t),za(t,null,null,n),Da()),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),Jn(t,Me,i)):(i=a.cache,Jn(t,Me,i),i!==l.cache&&pc(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 cu(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(Wx())e.flags|=8192;else throw Ui=zs,Bf}else e.flags&=-16777217}function np(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ev(t))if(Wx())e.flags|=8192;else throw Ui=zs,Bf}function Hr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ey():536870912,e.lanes|=t,Hl|=t)}function ha(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 M1(e,t,n){var i=t.pendingProps;switch(zf(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),zl(),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)||(t.flags|=1024,tu())),Se(t),null;case 26:var l=t.type,a=t.memoizedState;return e===null?(Cn(t),a!==null?(Se(t),np(t,a)):(Se(t),cu(t,l,null,i,n))):a?a!==e.memoizedState?(Cn(t),Se(t),np(t,a)):(Se(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&Cn(t),Se(t),cu(t,l,e,i,n)),null;case 27:if(As(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=pn.current,al(t)?Rh(t):(e=vv(l,i,n),t.stateNode=e,Cn(t))}return Se(t),null;case 5:if(As(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=pn.current,al(t))Rh(t);else{var r=Qs(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(Je(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),cu(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||mv(e.nodeValue,n)),e||xi(t,!0)}else e=Qs(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 Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Se(t),e=!1}else n=tu(),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)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 Hi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Se(t),l=!1}else l=tu(),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?(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),Hr(t,t.updateQueue),Se(t),null);case 4:return zl(),e===null&&sd(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)ha(i,!1);else{if(je!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Ms(e),a!==null){for(t.flags|=128,ha(i,!1),e=a.updateQueue,t.updateQueue=e,Hr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)_y(n,e),n=n.sibling;return be(Re,Re.current&1|2),se&&An(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&Tt()>Fs&&(t.flags|=128,l=!0,ha(i,!1),t.lanes=4194304)}else{if(!l)if(e=Ms(a),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Hr(t,e),ha(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!se)return Se(t),null}else 2*Tt()-i.renderingStartTime>Fs&&n!==536870912&&(t.flags|=128,l=!0,ha(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&&An(t,i.treeForkCount),e):(Se(t),null);case 22:case 23:return St(t),If(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?n&536870912&&!(t.flags&128)&&(Se(t),t.subtreeFlags&6&&(t.flags|=8192)):Se(t),n=t.updateQueue,n!==null&&Hr(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(Bi),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(zf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Dn(Me),zl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return As(t),null;case 31:if(t.memoizedState!==null){if(St(t),t.alternate===null)throw Error(L(340));Hi()}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));Hi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Pe(Re),null;case 4:return zl(),null;case 10:return Dn(t.type),null;case 22:case 23:return St(t),If(),e!==null&&Pe(Bi),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 _x(e,t){switch(zf(t),t.tag){case 3:Dn(Me),zl();break;case 26:case 27:case 5:As(t);break;case 4:zl();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),If(),e!==null&&Pe(Bi);break;case 24:Dn(Me)}}function xr(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 vi(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 Rx(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Hy(t,n)}catch(i){he(e,e.return,i)}}}function Ox(e,t,n){n.props=Vi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(i){he(e,t,i)}}function Ma(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 hn(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 Dx(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 fu(e,t,n){try{var i=e.stateNode;aE(i,e.type,n,t),i[mt]=t}catch(l){he(e,e.return,l)}}function zx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ei(e.type)||e.tag===4}function du(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||zx(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&&Ei(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 Ac(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&&Ei(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ac(e,t,n),e=e.sibling;e!==null;)Ac(e,t,n),e=e.sibling}function qs(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&&Ei(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(qs(e,t,n),e=e.sibling;e!==null;)qs(e,t,n),e=e.sibling}function Lx(e){var t=e.stateNode,n=e.memoizedProps;try{for(var i=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Je(t,i,n),t[Qe]=e,t[mt]=n}catch(a){he(e,e.return,a)}}var wn=!1,Le=!1,hu=!1,ip=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function U1(e,t){if(e=e.containerInfo,zc=$s,e=Ey(e),jf(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(Lc={focusedElem:e,selectionRange:n},$s=!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&&(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&&a!==null){e=void 0,n=t,l=a.memoizedProps,a=a.memoizedState,i=n.stateNode;try{var y=Vi(n.type,l);e=i.getSnapshotBeforeUpdate(y,a),i.__reactInternalSnapshotBeforeUpdate=e}catch(x){he(n,n.return,x)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Bc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Bc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(L(163))}if(e=t.sibling,e!==null){e.return=t.return,Ve=e;break}Ve=t.return}}function Mx(e,t,n){var i=n.flags;switch(n.tag){case 0:case 11:case 15:kn(e,n),i&4&&xr(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=Vi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){he(n,n.return,r)}}i&64&&Rx(n),i&512&&Ma(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{Hy(e,t)}catch(r){he(n,n.return,r)}}break;case 27:t===null&&i&4&&Lx(n);case 26:case 5:kn(e,n),t===null&&i&4&&Dx(n),i&512&&Ma(n,n.return);break;case 12:kn(e,n);break;case 31:kn(e,n),i&4&&Ix(e,n);break;case 13:kn(e,n),i&4&&Hx(e,n),i&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=X1.bind(null,n),hE(e,n))));break;case 22:if(i=n.memoizedState!==null||wn,!i){t=t!==null&&t.memoizedState!==null||Le,l=wn;var a=Le;wn=i,(Le=t)&&!a?Nn(e,n,(n.subtreeFlags&8772)!==0):kn(e,n),wn=l,Le=a}break;case 30:break;default:kn(e,n)}}function Bx(e){var t=e.alternate;t!==null&&(e.alternate=null,Bx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Cf(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;)Ux(e,t,n),n=n.sibling}function Ux(e,t,n){if(kt&&typeof kt.onCommitFiberUnmount=="function")try{kt.onCommitFiberUnmount(fr,n)}catch{}switch(n.tag){case 26:Le||hn(n,t),Tn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Le||hn(n,t);var i=ke,l=dt;Ei(n.type)&&(ke=n.stateNode,dt=!1),Tn(e,t,n),Ha(n.stateNode),ke=i,dt=l;break;case 5:Le||hn(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,gp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Vl(e)):gp(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:vi(2,n,t),Le||vi(4,n,t),Tn(e,t,n);break;case 1:Le||(hn(n,t),i=n.stateNode,typeof i.componentWillUnmount=="function"&&Ox(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 Ix(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vl(e)}catch(n){he(t,t.return,n)}}}function Hx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vl(e)}catch(n){he(t,t.return,n)}}function I1(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ip),t;default:throw Error(L(435,e.tag))}}function qr(e,t){var n=I1(e);t.forEach(function(i){if(!n.has(i)){n.add(i);var l=Q1.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(Ei(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));Ux(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;)qx(t,e),t=t.sibling}var $t=null;function qx(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&&(vi(3,e,e.return),xr(3,e),vi(5,e,e.return));break;case 1:ot(t,e),ut(e),i&512&&(Le||n===null||hn(n,n.return)),i&64&&wn&&(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=$t;if(ot(t,e),ut(e),i&512&&(Le||n===null||hn(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[pr]||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"))),Je(a,i,n),a[Qe]=e,Ye(a),i=a;break e;case"link":var r=Cp("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),Je(a,i,n),l.head.appendChild(a);break;case"meta":if(r=Cp("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),Je(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 Tp(l,e.type,e.stateNode);else e.stateNode=Ep(l,i,e.memoizedProps);else a!==i?(a===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):a.count--,i===null?Tp(l,e.type,e.stateNode):Ep(l,i,e.memoizedProps)):i===null&&e.stateNode!==null&&fu(e,e.memoizedProps,n.memoizedProps)}break;case 27:ot(t,e),ut(e),i&512&&(Le||n===null||hn(n,n.return)),n!==null&&i&4&&fu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(ot(t,e),ut(e),i&512&&(Le||n===null||hn(n,n.return)),e.flags&32){l=e.stateNode;try{Ml(l,"")}catch(y){he(e,e.return,y)}}i&4&&e.stateNode!=null&&(l=e.memoizedProps,fu(e,l,n!==null?n.memoizedProps:l)),i&1024&&(hu=!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(hs=null,l=$t,$t=Zs(t.containerInfo),ot(t,e),$t=l,ut(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{Vl(t.containerInfo)}catch(y){he(e,e.return,y)}hu&&(hu=!1,Fx(e));break;case 4:i=$t,$t=Zs(e.stateNode.containerInfo),ot(t,e),ut(e),$t=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,qr(e,i)));break;case 13:ot(t,e),ut(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(bo=Tt()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,qr(e,i)));break;case 22:l=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,c=wn,d=Le;if(wn=c||l,Le=d||u,ot(t,e),Le=d,wn=c,ut(e),i&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||u||wn||Le||Oi(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?yp(p,!0):yp(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,qr(e,n))));break;case 19:ot(t,e),ut(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,qr(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(zx(i)){n=i;break}i=i.return}if(n==null)throw Error(L(160));switch(n.tag){case 27:var l=n.stateNode,a=du(e);qs(e,a,l);break;case 5:var r=n.stateNode;n.flags&32&&(Ml(r,""),n.flags&=-33);var s=du(e);qs(e,s,r);break;case 3:case 4:var u=n.stateNode.containerInfo,c=du(e);Ac(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 Fx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Fx(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;)Mx(e,t.alternate,t),t=t.sibling}function Oi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:vi(4,t,t.return),Oi(t);break;case 1:hn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ox(t,t.return,n),Oi(t);break;case 27:Ha(t.stateNode);case 26:case 5:hn(t,t.return),Oi(t);break;case 22:t.memoizedState===null&&Oi(t);break;case 30:Oi(t);break;default:Oi(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),xr(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++)Iy(u[l],s)}catch(c){he(i,i.return,c)}}n&&r&64&&Rx(a),Ma(a,a.return);break;case 27:Lx(a);case 26:case 5:Nn(l,a,n),n&&i===null&&r&4&&Dx(a),Ma(a,a.return);break;case 12:Nn(l,a,n);break;case 31:Nn(l,a,n),n&&r&4&&Ix(l,a);break;case 13:Nn(l,a,n),n&&r&4&&Hx(l,a);break;case 22:a.memoizedState===null&&Nn(l,a,n),Ma(a,a.return);break;case 30:break;default:Nn(l,a,n)}t=t.sibling}}function td(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&&gr(n))}function nd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gr(e))}function Zt(e,t,n,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Gx(e,t,n,i),t=t.sibling}function Gx(e,t,n,i){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Zt(e,t,n,i),l&2048&&xr(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&&gr(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):Ba(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&&td(r,t);break;case 24:Zt(e,t,n,i),l&2048&&nd(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),xr(8,r);break;case 23:break;case 22:var d=r.stateNode;r.memoizedState!==null?d._visibility&2?ul(a,r,s,u,l):Ba(a,r):(d._visibility|=2,ul(a,r,s,u,l)),l&&c&2048&&td(r.alternate,r);break;case 24:ul(a,r,s,u,l),l&&c&2048&&nd(r.alternate,r);break;default:ul(a,r,s,u,l)}t=t.sibling}}function Ba(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:Ba(n,i),l&2048&&td(i.alternate,i);break;case 24:Ba(n,i),l&2048&&nd(i.alternate,i);break;default:Ba(n,i)}t=t.sibling}}var ka=8192;function rl(e,t,n){if(e.subtreeFlags&ka)for(e=e.child;e!==null;)Vx(e,t,n),e=e.sibling}function Vx(e,t,n){switch(e.tag){case 26:rl(e,t,n),e.flags&ka&&e.memoizedState!==null&&kE(n,$t,e.memoizedState,e.memoizedProps);break;case 5:rl(e,t,n);break;case 3:case 4:var i=$t;$t=Zs(e.stateNode.containerInfo),rl(e,t,n),$t=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=ka,ka=16777216,rl(e,t,n),ka=i):rl(e,t,n));break;default:rl(e,t,n)}}function Yx(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 pa(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,Xx(i,e)}Yx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Px(e),e=e.sibling}function Px(e){switch(e.tag){case 0:case 11:case 15:pa(e),e.flags&2048&&vi(9,e,e.return);break;case 3:pa(e);break;case 12:pa(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fs(e)):pa(e);break;default:pa(e)}}function fs(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var i=t[n];Ve=i,Xx(i,e)}Yx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:vi(8,t,t.return),fs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function Xx(e,t){for(;Ve!==null;){var n=Ve;switch(n.tag){case 0:case 11:case 15:vi(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:gr(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(Bx(i),i===n){Ve=null;break e}if(l!==null){l.return=a,Ve=l;break e}Ve=a}}}var H1={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}},q1=typeof WeakMap=="function"?WeakMap:Map,ue=0,ye=null,te=null,ie=0,de=0,bt=null,ai=!1,$l=!1,id=!1,In=0,je=0,bi=0,Ii=0,ld=0,Ct=0,Hl=0,Ua=null,ht=null,wc=!1,bo=0,Qx=0,Fs=1/0,Gs=null,di=null,Fe=0,hi=null,ql=null,zn=0,jc=0,_c=null,Zx=null,Ia=0,Rc=null;function At(){return ue&2&&ie!==0?ie&-ie:Z.T!==null?rd():ly()}function Kx(){if(Ct===0)if(!(ie&536870912)||se){var e=Dr;Dr<<=1,!(Dr&3932160)&&(Dr=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)&&(Fl(e,0),ri(e,ie,Ct,!1)),hr(e,n),(!(ue&2)||e!==ye)&&(e===ye&&(!(ue&2)&&(Ii|=n),je===4&&ri(e,ie,Ct,!1)),xn(e))}function Jx(e,t,n){if(ue&6)throw Error(L(327));var i=!n&&(t&127)===0&&(t&e.expiredLanes)===0||dr(e,t),l=i?V1(e,t):pu(e,t,!0),a=i;do{if(l===0){$l&&!i&&ri(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!F1(n)){l=pu(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=Ua;var u=s.current.memoizedState.isDehydrated;if(u&&(Fl(s,r).flags|=256),r=pu(s,r,!1),r!==2){if(id&&!u){s.errorRecoveryDisabledLanes|=a,Ii|=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){Fl(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=bo+300-Tt(),10<l)){if(ri(i,t,Ct,!ai),oo(i,0,!0)!==0)break e;zn=t,i.timeoutHandle=yv(lp.bind(null,i,n,ht,Gs,wc,t,Ct,Ii,Hl,ai,a,"Throttled",-0,0),l);break e}lp(i,n,ht,Gs,wc,t,Ct,Ii,Hl,ai,a,null,-0,0)}}break}while(!0);xn(e)}function lp(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},Vx(t,a,f);var y=(a&62914560)===a?bo-Tt():(a&4194048)===a?Qx-Tt():0;if(y=NE(f,y),y!==null){zn=a,e.cancelPendingCommit=y(rp.bind(null,e,t,a,n,i,l,r,s,u,d,f,null,h,p)),ri(e,a,r,!c);return}}rp(e,t,a,n,i,l,r,s,u)}function F1(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&=~ld,t&=~Ii,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&&ty(e,n,t)}function So(){return ue&6?!0:(vr(0),!1)}function ad(){if(te!==null){if(de===0)var e=te.return;else e=te,Rn=$i=null,Vf(e),jl=null,$a=0,e=te;for(;e!==null;)_x(e.alternate,e),e=e.return;te=null}}function Fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,oE(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),zn=0,ad(),ye=e,te=n=On(e.current,null),ie=t,de=0,bt=null,ai=!1,$l=dr(e,t),id=!1,Hl=Ct=ld=Ii=bi=je=0,ht=Ua=null,wc=!1,t&8&&(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,ho(),n}function $x(e,t){$=null,Z.H=er,t===Jl||t===mo?(t=Mh(),de=3):t===Bf?(t=Mh(),de=4):de=t===Wf?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,bt=t,te===null&&(je=1,Is(e,Ht(t,e.current)))}function Wx(){var e=_t.current;return e===null?!0:(ie&4194048)===ie?Ft===null:(ie&62914560)===ie||ie&536870912?e===Ft:!1}function ev(){var e=Z.H;return Z.H=er,e===null?er:e}function tv(){var e=Z.A;return Z.A=H1,e}function Vs(){je=4,ai||(ie&4194048)!==ie&&_t.current!==null||($l=!0),!(bi&134217727)&&!(Ii&134217727)||ye===null||ri(ye,ie,Ct,!1)}function pu(e,t,n){var i=ue;ue|=2;var l=ev(),a=tv();(ye!==e||ie!==t)&&(Gs=null,Fl(e,t)),t=!1;var r=je;e:do try{if(de!==0&&te!==null){var s=te,u=bt;switch(de){case 8:ad(),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,Tl(e,s,u,c),n&&$l){r=0;break e}break;default:c=de,de=0,bt=null,Tl(e,s,u,c)}}G1(),r=je;break}catch(d){$x(e,d)}while(!0);return t&&e.shellSuspendCounter++,Rn=$i=null,ue=i,Z.H=l,Z.A=a,te===null&&(ye=null,ie=0,ho()),r}function G1(){for(;te!==null;)nv(te)}function V1(e,t){var n=ue;ue|=2;var i=ev(),l=tv();ye!==e||ie!==t?(Gs=null,Fs=Tt()+500,Fl(e,t)):$l=dr(e,t);e:do try{if(de!==0&&te!==null){t=te;var a=bt;t:switch(de){case 1:de=0,bt=null,Tl(e,t,a,1);break;case 2:case 9:if(Lh(a)){de=0,bt=null,ap(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:Lh(a)?(de=0,bt=null,ap(t)):(de=0,bt=null,Tl(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?Ev(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,Eo(c)):te=null}break t}}de=0,bt=null,Tl(e,t,a,5);break;case 6:de=0,bt=null,Tl(e,t,a,6);break;case 8:ad(),je=6;break e;default:throw Error(L(462))}}Y1();break}catch(d){$x(e,d)}while(!0);return Rn=$i=null,Z.H=i,Z.A=l,ue=n,te!==null?0:(ye=null,ie=0,ho(),je)}function Y1(){for(;te!==null&&!p0();)nv(te)}function nv(e){var t=jx(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?Eo(e):te=t}function ap(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=$h(n,t,t.pendingProps,t.type,void 0,ie);break;case 11:t=$h(n,t,t.pendingProps,t.type.render,t.ref,ie);break;case 5:Vf(t);default:_x(n,t),t=te=_y(t,In),t=jx(n,t,In)}e.memoizedProps=e.pendingProps,t===null?Eo(e):te=t}function Tl(e,t,n,i){Rn=$i=null,Vf(t),jl=null,$a=0;var l=t.return;try{if(D1(e,l,t,n,ie)){je=1,Is(e,Ht(n,e.current)),te=null;return}}catch(a){if(l!==null)throw te=l,a;je=1,Is(e,Ht(n,e.current)),te=null;return}t.flags&32768?(se||i===1?e=!0:$l||ie&536870912?e=!1:(ai=e=!0,(i===2||i===9||i===3||i===6)&&(i=_t.current,i!==null&&i.tag===13&&(i.flags|=16384))),iv(t,e)):Eo(t)}function Eo(e){var t=e;do{if(t.flags&32768){iv(t,ai);return}e=t.return;var n=M1(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 iv(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 rp(e,t,n,i,l,a,r,s,u){e.cancelPendingCommit=null;do Co();while(Fe!==0);if(ue&6)throw Error(L(327));if(t!==null){if(t===e.current)throw Error(L(177));if(a=t.lanes|t.childLanes,a|=_f,T0(e,n,a,r,s,u),e===ye&&(te=ye=null,ie=0),ql=t,hi=e,zn=n,jc=a,_c=l,Zx=i,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Z1(ws,function(){return ov(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,t.subtreeFlags&13878||i){i=Z.T,Z.T=null,l=ce.p,ce.p=2,r=ue,ue|=4;try{U1(e,t,n)}finally{ue=r,ce.p=l,Z.T=i}}Fe=1,lv(),av(),rv()}}function lv(){if(Fe===1){Fe=0;var e=hi,t=ql,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{qx(t,e);var a=Lc,r=Ey(e.containerInfo),s=a.focusedElem,u=a.selectionRange;if(r!==s&&s&&s.ownerDocument&&Sy(s.ownerDocument.documentElement,s)){if(u!==null&&jf(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 m=wh(s,x),g=wh(s,E);if(m&&g&&(p.rangeCount!==1||p.anchorNode!==m.node||p.anchorOffset!==m.offset||p.focusNode!==g.node||p.focusOffset!==g.offset)){var v=f.createRange();v.setStart(m.node,m.offset),p.removeAllRanges(),x>E?(p.addRange(v),p.extend(g.node,g.offset)):(v.setEnd(g.node,g.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}}$s=!!zc,Lc=zc=null}finally{ue=l,ce.p=i,Z.T=n}}e.current=t,Fe=2}}function av(){if(Fe===2){Fe=0;var e=hi,t=ql,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=Z.T,Z.T=null;var i=ce.p;ce.p=2;var l=ue;ue|=4;try{Mx(e,t.alternate,t)}finally{ue=l,ce.p=i,Z.T=n}}Fe=3}}function rv(){if(Fe===4||Fe===3){Fe=0,m0();var e=hi,t=ql,n=zn,i=Zx;t.subtreeFlags&10256||t.flags&10256?Fe=5:(Fe=0,ql=hi=null,sv(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(di=null),Ef(n),t=t.stateNode,kt&&typeof kt.onCommitFiberRoot=="function")try{kt.onCommitFiberRoot(fr,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&&Co(),xn(e),l=e.pendingLanes,n&261930&&l&42?e===Rc?Ia++:(Ia=0,Rc=e):Ia=0,vr(0)}}function sv(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gr(t)))}function Co(){return lv(),av(),rv(),ov()}function ov(){if(Fe!==5)return!1;var e=hi,t=jc;jc=0;var n=Ef(zn),i=Z.T,l=ce.p;try{ce.p=32>n?32:n,Z.T=null,n=_c,_c=null;var a=hi,r=zn;if(Fe=0,ql=hi=null,zn=0,ue&6)throw Error(L(331));var s=ue;if(ue|=4,Px(a.current),Gx(a,a.current,r,n),ue=s,vr(0,!1),kt&&typeof kt.onPostCommitFiberRoot=="function")try{kt.onPostCommitFiberRoot(fr,a)}catch{}return!0}finally{ce.p=l,Z.T=i,sv(e,t)}}function sp(e,t,n){t=Ht(n,t),t=Tc(e.stateNode,t,2),e=fi(e,t,2),e!==null&&(hr(e,2),xn(e))}function he(e,t,n){if(e.tag===3)sp(e,e,n);else for(;t!==null;){if(t.tag===3){sp(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&&(Tx(n,i,t,e),hr(i,2),xn(i));break}}t=t.return}}function mu(e,t,n){var i=e.pingCache;if(i===null){i=e.pingCache=new q1;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)||(id=!0,l.add(n),e=P1.bind(null,e,t,n),t.then(e,e))}function P1(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()-bo?!(ue&2)&&Fl(e,0):ld|=n,Hl===ie&&(Hl=0)),xn(e)}function uv(e,t){t===0&&(t=ey()),e=Ji(e,t),e!==null&&(hr(e,t),xn(e))}function X1(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),uv(e,n)}function Q1(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),uv(e,n)}function Z1(e,t){return bf(e,t)}var Ys=null,cl=null,Oc=!1,Ps=!1,gu=!1,si=0;function xn(e){e!==cl&&e.next===null&&(cl===null?Ys=cl=e:cl=cl.next=e),Ps=!0,Oc||(Oc=!0,J1())}function vr(e,t){if(!gu&&Ps){gu=!0;do for(var n=!1,i=Ys;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,op(i,a))}else a=ie,a=oo(i,i===ye?a:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),!(a&3)||dr(i,a)||(n=!0,op(i,a));i=i.next}while(n);gu=!1}}function K1(){cv()}function cv(){Ps=Oc=!1;var e=0;si!==0&&sE()&&(e=si);for(var t=Tt(),n=null,i=Ys;i!==null;){var l=i.next,a=fv(i,t);a===0?(i.next=null,n===null?Ys=l:n.next=l,l===null&&(cl=n)):(n=i,(e!==0||a&3)&&(Ps=!0)),i=l}Fe!==0&&Fe!==5||vr(e),si!==0&&(si=0)}function fv(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)||s&i)&&(l[r]=C0(s,t)):u<=t&&(e.expiredLanes|=s),a&=~s}if(t=ye,n=ie,n=oo(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&&Vo(i),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||dr(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(i!==null&&Vo(i),Ef(n)){case 2:case 8:n=$g;break;case 32:n=ws;break;case 268435456:n=Wg;break;default:n=ws}return i=dv.bind(null,e),n=bf(n,i),e.callbackPriority=t,e.callbackNode=n,t}return i!==null&&i!==null&&Vo(i),e.callbackPriority=2,e.callbackNode=null,2}function dv(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Co()&&e.callbackNode!==n)return null;var i=ie;return i=oo(e,e===ye?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(Jx(e,i,t),fv(e,Tt()),e.callbackNode!=null&&e.callbackNode===n?dv.bind(null,e):null)}function op(e,t){if(Co())return null;Jx(e,t,!0)}function J1(){uE(function(){ue&6?bf(Jg,K1):cv()})}function rd(){if(si===0){var e=Bl;e===0&&(e=Or,Or<<=1,!(Or&261888)&&(Or=256)),si=e}return si}function up(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ns(""+e)}function cp(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 $1(e,t,n,i,l){if(t==="submit"&&n&&n.stateNode===l){var a=up((l[mt]||null).action),r=i.submitter;r&&(t=(t=r[mt]||null)?up(t.formAction):r.getAttribute("formAction"),t!==null&&(a=t,r=null));var s=new uo("action","action",null,i,l);e.push({event:s,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(si!==0){var u=r?cp(l,r):new FormData(l);Ec(n,{pending:!0,data:u,method:l.method,action:a},null,u)}}else typeof a=="function"&&(s.preventDefault(),u=r?cp(l,r):new FormData(l),Ec(n,{pending:!0,data:u,method:l.method,action:a},a,u))},currentTarget:l}]})}}for(var yu=0;yu<cc.length;yu++){var xu=cc[yu],W1=xu.toLowerCase(),eE=xu[0].toUpperCase()+xu.slice(1);ln(W1,"on"+eE)}ln(Ty,"onAnimationEnd");ln(ky,"onAnimationIteration");ln(Ny,"onAnimationStart");ln("dblclick","onDoubleClick");ln("focusin","onFocus");ln("focusout","onBlur");ln(g1,"onTransitionRun");ln(y1,"onTransitionStart");ln(x1,"onTransitionCancel");ln(Ay,"onTransitionEnd");Ll("onMouseEnter",["mouseout","mouseover"]);Ll("onMouseLeave",["mouseout","mouseover"]);Ll("onPointerEnter",["pointerout","pointerover"]);Ll("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 tr="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(" "),tE=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(tr));function hv(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){_s(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){_s(d)}l.currentTarget=null,a=u}}}}function ee(e,t){var n=t[nc];n===void 0&&(n=t[nc]=new Set);var i=e+"__bubble";n.has(i)||(pv(t,e,2,!1),n.add(i))}function vu(e,t,n){var i=0;t&&(i|=4),pv(n,e,i,t)}var Fr="_reactListening"+Math.random().toString(36).slice(2);function sd(e){if(!e[Fr]){e[Fr]=!0,ay.forEach(function(n){n!=="selectionchange"&&(tE.has(n)||vu(n,!1,e),vu(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fr]||(t[Fr]=!0,vu("selectionchange",!1,t))}}function pv(e,t,n,i){switch(Av(t)){case 2:var l=jE;break;case 8:l=_E;break;default:l=fd}n=l.bind(null,t,n,e),l=void 0,!sc||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 bu(e,t,n,i,l){var a=i;if(!(t&1)&&!(t&2)&&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=ml(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}hy(function(){var c=a,d=kf(n),f=[];e:{var h=wy.get(e);if(h!==void 0){var p=uo,y=e;switch(e){case"keypress":if(ls(n)===0)break e;case"keydown":case"keyup":p=Q0;break;case"focusin":y="focus",p=Zo;break;case"focusout":y="blur",p=Zo;break;case"beforeblur":case"afterblur":p=Zo;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=xh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=M0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=J0;break;case Ty:case ky:case Ny:p=I0;break;case Ay:p=W0;break;case"scroll":case"scrollend":p=z0;break;case"wheel":p=t1;break;case"copy":case"cut":case"paste":p=q0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=bh;break;case"toggle":case"beforetoggle":p=i1}var x=(t&4)!==0,E=!x&&(e==="scroll"||e==="scrollend"),m=x?h!==null?h+"Capture":null:h;x=[];for(var g=c,v;g!==null;){var C=g;if(v=C.stateNode,C=C.tag,C!==5&&C!==26&&C!==27||v===null||m===null||(C=Xa(g,m),C!=null&&x.push(nr(g,C,v))),E)break;g=g.return}0<x.length&&(h=new p(h,y,null,n,d),f.push({event:h,listeners:x}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==rc&&(y=n.relatedTarget||n.fromElement)&&(ml(y)||y[Ql]))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?ml(y):null,y!==null&&(E=cr(y),x=y.tag,y!==E||x!==5&&x!==27&&x!==6)&&(y=null)):(p=null,y=c),p!==y)){if(x=xh,C="onMouseLeave",m="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(x=bh,C="onPointerLeave",m="onPointerEnter",g="pointer"),E=p==null?h:Ca(p),v=y==null?h:Ca(y),h=new x(C,g+"leave",p,n,d),h.target=E,h.relatedTarget=v,C=null,ml(d)===c&&(x=new x(m,g+"enter",y,n,d),x.target=v,x.relatedTarget=E,C=x),E=C,p&&y)t:{for(x=nE,m=p,g=y,v=0,C=m;C;C=x(C))v++;C=0;for(var w=g;w;w=x(w))C++;for(;0<v-C;)m=x(m),v--;for(;0<C-v;)g=x(g),C--;for(;v--;){if(m===g||g!==null&&m===g.alternate){x=m;break t}m=x(m),g=x(g)}x=null}else x=null;p!==null&&fp(f,h,p,x,!1),y!==null&&E!==null&&fp(f,E,y,x,!0)}}e:{if(h=c?Ca(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var N=Th;else if(Ch(h))if(vy)N=h1;else{N=f1;var _=c1}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&Tf(c.elementType)&&(N=Th):N=d1;if(N&&(N=N(e,c))){xy(f,N,n,d);break e}_&&_(e,h,c),e==="focusout"&&c&&h.type==="number"&&c.memoizedProps.value!=null&&ac(h,"number",h.value)}switch(_=c?Ca(c):window,e){case"focusin":(Ch(_)||_.contentEditable==="true")&&(xl=_,oc=c,_a=null);break;case"focusout":_a=oc=xl=null;break;case"mousedown":uc=!0;break;case"contextmenu":case"mouseup":case"dragend":uc=!1,jh(f,n,d);break;case"selectionchange":if(m1)break;case"keydown":case"keyup":jh(f,n,d)}var I;if(wf)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 yl?gy(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(my&&n.locale!=="ko"&&(yl||D!=="onCompositionStart"?D==="onCompositionEnd"&&yl&&(I=py()):(li=d,Nf="value"in li?li.value:li.textContent,yl=!0)),_=Xs(c,D),0<_.length&&(D=new vh(D,e,null,n,d),f.push({event:D,listeners:_}),I?D.data=I:(I=yy(n),I!==null&&(D.data=I)))),(I=a1?r1(e,n):s1(e,n))&&(D=Xs(c,"onBeforeInput"),0<D.length&&(_=new vh("onBeforeInput","beforeinput",null,n,d),f.push({event:_,listeners:D}),_.data=I)),$1(f,e,c,n,d)}hv(f,t)})}function nr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xs(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=Xa(e,n),l!=null&&i.unshift(nr(e,l,a)),l=Xa(e,t),l!=null&&i.push(nr(e,l,a))),e.tag===3)return i;e=e.return}return[]}function nE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fp(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=Xa(n,a),c!=null&&r.unshift(nr(n,c,u))):l||(c=Xa(n,a),c!=null&&r.push(nr(n,c,u)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var iE=/\r\n?/g,lE=/\u0000|\uFFFD/g;function dp(e){return(typeof e=="string"?e:""+e).replace(iE,`
|
|
49
|
+
`).replace(lE,"")}function mv(e,t){return t=dp(t),dp(e)===t}function pe(e,t,n,i,l,a){switch(n){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||Ml(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&Ml(e,""+i);break;case"className":Lr(e,"class",i);break;case"tabIndex":Lr(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Lr(e,n,i);break;case"style":dy(e,i,a);break;case"data":if(t!=="object"){Lr(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=ns(""+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=ns(""+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=ns(""+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),ts(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":ts(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=O0.get(n)||n,ts(e,n,i))}}function Dc(e,t,n,i,l,a){switch(n){case"style":dy(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"?Ml(e,i):(typeof i=="number"||typeof i=="bigint")&&Ml(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(!ry.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,""):ts(e,n,i)}}}function Je(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)}}uy(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?Nl(e,!!i,t,!1):n!=null&&Nl(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)}fy(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<tr.length;i++)ee(tr[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(Tf(t)){for(d in n)n.hasOwnProperty(d)&&(i=n[d],i!==void 0&&Dc(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 aE(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)}}lc(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?Nl(e,!!n,h,!1):!!i!=!!n&&(t!=null?Nl(e,!!n,t,!0):Nl(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)}cy(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(Tf(t)){for(var E in n)h=n[E],n.hasOwnProperty(E)&&h!==void 0&&!i.hasOwnProperty(E)&&Dc(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||Dc(e,t,d,h,i,p);return}}for(var m in n)h=n[m],n.hasOwnProperty(m)&&h!=null&&!i.hasOwnProperty(m)&&pe(e,t,m,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 hp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rE(){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&&hp(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&&hp(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 zc=null,Lc=null;function Qs(e){return e.nodeType===9?e:e.ownerDocument}function pp(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 gv(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 Mc(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 Su=null;function sE(){var e=window.event;return e&&e.type==="popstate"?e===Su?!1:(Su=e,!0):(Su=null,!1)}var yv=typeof setTimeout=="function"?setTimeout:void 0,oE=typeof clearTimeout=="function"?clearTimeout:void 0,mp=typeof Promise=="function"?Promise:void 0,uE=typeof queueMicrotask=="function"?queueMicrotask:typeof mp<"u"?function(e){return mp.resolve(null).then(e).catch(cE)}:yv;function cE(e){setTimeout(function(){throw e})}function Ei(e){return e==="head"}function gp(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),Vl(t);return}i--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")i++;else if(n==="html")Ha(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ha(n);for(var a=n.firstChild;a;){var r=a.nextSibling,s=a.nodeName;a[pr]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=r}}else n==="body"&&Ha(e.ownerDocument.body);n=l}while(n);Vl(t)}function yp(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 Bc(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":Bc(n),Cf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function fE(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[pr])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 dE(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 xv(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 Uc(e){return e.data==="$?"||e.data==="$~"}function Ic(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function hE(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 Hc=null;function xp(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 vp(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 vv(e,t,n){switch(t=Qs(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 Ha(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Cf(e)}var Vt=new Map,bp=new Set;function Zs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var qn=ce.d;ce.d={f:pE,r:mE,D:gE,C:yE,L:xE,m:vE,X:SE,S:bE,M:EE};function pE(){var e=qn.f(),t=So();return e||t}function mE(e){var t=Zl(e);t!==null&&t.tag===5&&t.type==="form"?dx(t):qn.r(e)}var Wl=typeof document>"u"?null:document;function bv(e,t,n){var i=Wl;if(i&&typeof t=="string"&&t){var l=It(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),bp.has(l)||(bp.add(l),e={rel:e,crossOrigin:n,href:t},i.querySelector(l)===null&&(t=i.createElement("link"),Je(t,"link",e),Ye(t),i.head.appendChild(t)))}}function gE(e){qn.D(e),bv("dns-prefetch",e,null)}function yE(e,t){qn.C(e,t),bv("preconnect",e,t)}function xE(e,t,n){qn.L(e,t,n);var i=Wl;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=Gl(e);break;case"script":a=ea(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(br(a))||t==="script"&&i.querySelector(Sr(a))||(t=i.createElement("link"),Je(t,"link",e),Ye(t),i.head.appendChild(t)))}}function vE(e,t){qn.m(e,t);var n=Wl;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=ea(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(Sr(a)))return}i=n.createElement("link"),Je(i,"link",e),Ye(i),n.head.appendChild(i)}}}function bE(e,t,n){qn.S(e,t,n);var i=Wl;if(i&&e){var l=kl(i).hoistableStyles,a=Gl(e);t=t||"default";var r=l.get(a);if(!r){var s={loading:0,preload:null};if(r=i.querySelector(br(a)))s.loading=5;else{e=Te({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Vt.get(a))&&od(e,n);var u=r=i.createElement("link");Ye(u),Je(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,ds(r,t,i)}r={type:"stylesheet",instance:r,count:1,state:s},l.set(a,r)}}}function SE(e,t){qn.X(e,t);var n=Wl;if(n&&e){var i=kl(n).hoistableScripts,l=ea(e),a=i.get(l);a||(a=n.querySelector(Sr(l)),a||(e=Te({src:e,async:!0},t),(t=Vt.get(l))&&ud(e,t),a=n.createElement("script"),Ye(a),Je(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function EE(e,t){qn.M(e,t);var n=Wl;if(n&&e){var i=kl(n).hoistableScripts,l=ea(e),a=i.get(l);a||(a=n.querySelector(Sr(l)),a||(e=Te({src:e,async:!0,type:"module"},t),(t=Vt.get(l))&&ud(e,t),a=n.createElement("script"),Ye(a),Je(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},i.set(l,a))}}function Sp(e,t,n,i){var l=(l=oi.current)?Zs(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=Gl(n.href),n=kl(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=Gl(n.href);var a=kl(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(br(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||CE(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=ea(n),n=kl(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 Gl(e){return'href="'+It(e)+'"'}function br(e){return'link[rel="stylesheet"]['+e+"]"}function Sv(e){return Te({},e,{"data-precedence":e.precedence,precedence:null})}function CE(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}),Je(t,"link",n),Ye(t),e.head.appendChild(t))}function ea(e){return'[src="'+It(e)+'"]'}function Sr(e){return"script[async]"+e}function Ep(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),Je(i,"style",l),ds(i,n.precedence,e),t.instance=i;case"stylesheet":l=Gl(n.href);var a=e.querySelector(br(l));if(a)return t.state.loading|=4,t.instance=a,Ye(a),a;i=Sv(n),(l=Vt.get(l))&&od(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}),Je(a,"link",i),t.state.loading|=4,ds(a,n.precedence,e),t.instance=a;case"script":return a=ea(n.src),(l=e.querySelector(Sr(a)))?(t.instance=l,Ye(l),l):(i=n,(l=Vt.get(a))&&(i=Te({},n),ud(i,l)),e=e.ownerDocument||e,l=e.createElement("script"),Ye(l),Je(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)&&(i=t.instance,t.state.loading|=4,ds(i,n.precedence,e));return t.instance}function ds(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 od(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ud(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hs=null;function Cp(e,t,n){if(hs===null){var i=new Map,l=hs=new Map;l.set(n,i)}else l=hs,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[pr]||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 Tp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function TE(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 Ev(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function kE(e,t,n,i){if(n.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var l=Gl(i.href),a=t.querySelector(br(l));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ks.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ye(a);return}a=t.ownerDocument||t,i=Sv(i),(l=Vt.get(l))&&od(i,l),a=a.createElement("link"),Ye(a);var r=a;r._p=new Promise(function(s,u){r.onload=s,r.onerror=u}),Je(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)&&(e.count++,n=Ks.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Eu=0;function NE(e,t){return e.stylesheets&&e.count===0&&ps(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var i=setTimeout(function(){if(e.stylesheets&&ps(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&Eu===0&&(Eu=62500*rE());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ps(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>Eu?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(l)}}:null}function Ks(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ps(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Js=null;function ps(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Js=new Map,t.forEach(AE,e),Js=null,Ks.call(e))}function AE(e,t){if(!(t.state.loading&4)){var n=Js.get(e);if(n)var i=n.get(null);else{n=new Map,Js.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=Ks.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 ir={$$typeof:jn,Provider:null,Consumer:null,_currentValue:Li,_currentValue2:Li,_threadCount:0};function wE(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=Yo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yo(0),this.hiddenUpdates=Yo(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 wE(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=Lf(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:i,isDehydrated:n,cache:t},Uf(a),e}function Tv(e){return e?(e=Sl,e):Sl}function kv(e,t,n,i,l,a){l=Tv(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),Oa(n,e,t))}function kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function cd(e,t){kp(e,t),(e=e.alternate)&&kp(e,t)}function Nv(e){if(e.tag===13||e.tag===31){var t=Ji(e,67108864);t!==null&&pt(t,e,67108864),cd(e,67108864)}}function Np(e){if(e.tag===13||e.tag===31){var t=At();t=Sf(t);var n=Ji(e,t);n!==null&&pt(n,e,t),cd(e,t)}}var $s=!0;function jE(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=2,fd(e,t,n,i)}finally{ce.p=a,Z.T=l}}function _E(e,t,n,i){var l=Z.T;Z.T=null;var a=ce.p;try{ce.p=8,fd(e,t,n,i)}finally{ce.p=a,Z.T=l}}function fd(e,t,n,i){if($s){var l=qc(i);if(l===null)bu(e,t,i,Ws,n),Ap(e,i);else if(OE(l,e,t,n,i))i.stopPropagation();else if(Ap(e,i),t&4&&-1<RE.indexOf(e)){for(;l!==null;){var a=Zl(l);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var r=_i(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)&&(Fs=Tt()+500,vr(0))}}break;case 31:case 13:s=Ji(a,2),s!==null&&pt(s,a,2),So(),cd(a,2)}if(a=qc(i),a===null&&bu(e,t,i,Ws,n),a===l)break;l=a}l!==null&&i.stopPropagation()}else bu(e,t,i,null,n)}}function qc(e){return e=kf(e),dd(e)}var Ws=null;function dd(e){if(Ws=null,e=ml(e),e!==null){var t=cr(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Pg(t),e!==null)return e;e=null}else if(n===31){if(e=Xg(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 Ws=e,null}function Av(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(g0()){case Jg:return 2;case $g:return 8;case ws:case y0:return 32;case Wg:return 268435456;default:return 32}default:return 32}}var Fc=!1,pi=null,mi=null,gi=null,lr=new Map,ar=new Map,ei=[],RE="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 Ap(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":lr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ar.delete(t.pointerId)}}function ma(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=Zl(t),t!==null&&Nv(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function OE(e,t,n,i,l){switch(t){case"focusin":return pi=ma(pi,e,t,n,i,l),!0;case"dragenter":return mi=ma(mi,e,t,n,i,l),!0;case"mouseover":return gi=ma(gi,e,t,n,i,l),!0;case"pointerover":var a=l.pointerId;return lr.set(a,ma(lr.get(a)||null,e,t,n,i,l)),!0;case"gotpointercapture":return a=l.pointerId,ar.set(a,ma(ar.get(a)||null,e,t,n,i,l)),!0}return!1}function wv(e){var t=ml(e.target);if(t!==null){var n=cr(t);if(n!==null){if(t=n.tag,t===13){if(t=Pg(n),t!==null){e.blockedOn=t,fh(e.priority,function(){Np(n)});return}}else if(t===31){if(t=Xg(n),t!==null){e.blockedOn=t,fh(e.priority,function(){Np(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 ms(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=qc(e.nativeEvent);if(n===null){n=e.nativeEvent;var i=new n.constructor(n.type,n);rc=i,n.target.dispatchEvent(i),rc=null}else return t=Zl(n),t!==null&&Nv(t),e.blockedOn=n,!1;t.shift()}return!0}function wp(e,t,n){ms(e)&&n.delete(t)}function DE(){Fc=!1,pi!==null&&ms(pi)&&(pi=null),mi!==null&&ms(mi)&&(mi=null),gi!==null&&ms(gi)&&(gi=null),lr.forEach(wp),ar.forEach(wp)}function Gr(e,t){e.blockedOn===t&&(e.blockedOn=null,Fc||(Fc=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,DE)))}var Vr=null;function jp(e){Vr!==e&&(Vr=e,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,function(){Vr===e&&(Vr=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(dd(i||n)===null)continue;break}var a=Zl(n);a!==null&&(e.splice(t,3),t-=3,Ec(a,{pending:!0,data:l,method:n.method,action:i},i,l))}}))}function Vl(e){function t(u){return Gr(u,e)}pi!==null&&Gr(pi,e),mi!==null&&Gr(mi,e),gi!==null&&Gr(gi,e),lr.forEach(t),ar.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);)wv(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||jp(n);else if(r){var s=null;if(a&&a.hasAttribute("formAction")){if(l=a,r=a[mt]||null)s=r.formAction;else if(dd(l)!==null)continue}else s=r.action;typeof s=="function"?n[i+1]=s:(n.splice(i,3),i-=3),jp(n)}}}function jv(){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 hd(e){this._internalRoot=e}To.prototype.render=hd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));var n=t.current,i=At();kv(n,i,e,t,null,null)};To.prototype.unmount=hd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kv(e.current,2,null,e,null,null),So(),t[Ql]=null}};function To(e){this._internalRoot=e}To.prototype.unstable_scheduleHydration=function(e){if(e){var t=ly();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&&wv(e)}};var _p=Vg.version;if(_p!=="19.2.5")throw Error(L(527,_p,"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=u0(t),e=e!==null?Qg(e):null,e=e===null?null:e.stateNode,e};var zE={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:Z,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Yr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Yr.isDisabled&&Yr.supportsFiber)try{fr=Yr.inject(zE),kt=Yr}catch{}}ro.createRoot=function(e,t){if(!Yg(e))throw Error(L(299));var n=!1,i="",l=bx,a=Sx,r=Ex;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,jv),e[Ql]=t.current,sd(e),new hd(t)};ro.hydrateRoot=function(e,t,n){if(!Yg(e))throw Error(L(299));var i=!1,l="",a=bx,r=Sx,s=Ex,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,jv),t.context=Tv(null),n=t.current,i=At(),i=Sf(i),l=ci(i),l.callback=null,fi(n,l,i),n=i,t.current.lanes=n,hr(t,n),xn(t),e[Ql]=t.current,sd(e),new To(t)};ro.version="19.2.5";function _v(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_v)}catch(e){console.error(e)}}_v(),Ug.exports=ro;var LE=Ug.exports;/**
|
|
50
|
+
* react-router v7.18.4
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Remix Software Inc.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
56
|
+
*
|
|
57
|
+
* @license MIT
|
|
58
|
+
*/var pd=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Rv=/^[\\/]{2}/;function ME(e,t){return t+e.replace(/\\/g,"/")}var Rp="popstate";function Op(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function BE(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 Gc("",{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:Yi(l)}return IE(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 UE(){return Math.random().toString(36).substring(2,10)}function Dp(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function Gc(e,t,n=null,i,l){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?ta(t):t,state:n,key:t&&t.key||i||UE(),mask:l}}function Yi({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 ta(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 IE(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(),m=E==null?null:E-c;c=E,u&&u({action:s,location:x.location,delta:m})}function h(E,m){s="PUSH";let g=Op(E)?E:Gc(x.location,E,m);c=d()+1;let v=Dp(g,c),C=x.createHref(g.mask||g);try{r.pushState(v,"",C)}catch(w){if(w instanceof DOMException&&w.name==="DataCloneError")throw w;l.location.assign(C)}a&&u&&u({action:s,location:x.location,delta:1})}function p(E,m){s="REPLACE";let g=Op(E)?E:Gc(x.location,E,m);c=d();let v=Dp(g,c),C=x.createHref(g.mask||g);r.replaceState(v,"",C),a&&u&&u({action:s,location:x.location,delta:0})}function y(E){return HE(l,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(Rp,f),u=E,()=>{l.removeEventListener(Rp,f),u=null}},createHref(E){return t(l,E)},createURL:y,encodeLocation(E){let m=y(E);return{pathname:m.pathname,search:m.search,hash:m.hash}},push:h,replace:p,go(E){return r.go(E)}};return x}function HE(e,t,n=!1){let i="http://localhost";e&&(i=e.location.origin!=="null"?e.location.origin:e.location.href),Ne(i,"No window.location.(origin|href) available to create URL");let l=typeof t=="string"?t:Yi(t);return l=l.replace(/ $/,"%20"),!n&&Rv.test(l)&&(l=i+l),new URL(l,i)}function Ov(e,t,n="/"){return qE(e,t,n,!1)}function qE(e,t,n,i,l){let a=typeof t=="string"?ta(t):t,r=Hn(a.pathname||"/",n);if(r==null)return null;let s=FE(e),u=null,c=WE(r);for(let d=0;u==null&&d<s.length;++d)u=$E(s[d],c,i);return u}function FE(e){let t=Dv(e);return GE(t),t}function Dv(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=tn([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}".`),Dv(r.children,t,h,f,u)),!(r.path==null&&!r.index)&&t.push({path:f,score:KE(f,r.index),routesMeta:h.map((p,y)=>{let[x,E]=Mv(p.relativePath,p.caseSensitive,y===h.length-1);return{...p,matcher:x,compiledParams:E}})})};return e.forEach((r,s)=>{var u;if(r.path===""||!((u=r.path)!=null&&u.includes("?")))a(r,s);else for(let c of zv(r.path))a(r,s,!0,c)}),t}function zv(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=zv(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 GE(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:JE(t.routesMeta.map(i=>i.childrenIndex),n.routesMeta.map(i=>i.childrenIndex)))}var VE=/^:[\w-]+$/,YE=3,PE=2,XE=1,QE=10,ZE=-2,zp=e=>e==="*";function KE(e,t){let n=e.split("/"),i=n.length;return n.some(zp)&&(i+=ZE),t&&(i+=PE),n.filter(l=>!zp(l)).reduce((l,a)=>l+(VE.test(a)?YE:a===""?XE:QE),i)}function JE(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 $E(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={path:u.relativePath,caseSensitive:u.caseSensitive,end:c},h=u.matcher&&u.compiledParams?Lv(f,d,u.matcher,u.compiledParams):eo(f,d),p=u.route;if(!h&&c&&n&&!i[i.length-1].route.index&&(h=eo({path:u.relativePath,caseSensitive:u.caseSensitive,end:!1},d)),!h)return null;Object.assign(l,h.params),r.push({params:l,pathname:tn([a,h.pathname]),pathnameBase:nC(tn([a,h.pathnameBase])),route:p}),h.pathnameBase!=="/"&&(a=tn([a,h.pathnameBase]))}return r}function eo(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,i]=Mv(e.path,e.caseSensitive,e.end);return Lv(e,t,n,i)}function Lv(e,t,n,i){let l=t.match(n);if(!l)return null;let a=l[0],r=Yl(a,1),s=l.slice(1);return{params:i.reduce((c,{paramName:d,isOptional:f},h)=>{if(d==="*"){let y=s[h]||"";r=Yl(a.slice(0,a.length-y.length),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 Mv(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 WE(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)||"/"}function eC(e,t="/"){let{pathname:n,search:i="",hash:l=""}=typeof e=="string"?ta(e):e,a;return n?(n=Bv(n),n.startsWith("/")||n.startsWith("\\")?a=Lp(n.substring(1),"/"):a=Lp(n,t)):a=t,{pathname:a,search:iC(i),hash:lC(l)}}function Lp(e,t){let n=Yl(t).split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function Cu(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 tC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function md(e){let t=tC(e);return t.map((n,i)=>i===t.length-1?n.pathname:n.pathnameBase)}function ko(e,t,n,i=!1){let l;typeof e=="string"?l=ta(e):(l={...e},Ne(!l.pathname||!l.pathname.includes("?"),Cu("?","pathname","search",l)),Ne(!l.pathname||!l.pathname.includes("#"),Cu("#","pathname","hash",l)),Ne(!l.search||!l.search.includes("#"),Cu("#","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=eC(l,s),c=r&&r!=="/"&&r.endsWith("/"),d=(a||r===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(c||d)&&(u.pathname+="/"),u}var Bv=e=>e.replace(/[\\/]{2,}/g,"/"),tn=e=>Bv(e.join("/"));function Yl(e,t=0){let n=e.length;for(;n>t&&e.charCodeAt(n-1)===47;)n--;return n===e.length?e:e.slice(0,n)}var nC=e=>Yl(e).replace(/^\/*/,"/"),iC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,lC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,aC=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 rC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function sC(e){let t=e.map(n=>n.route.path).filter(Boolean);return tn(t)||"/"}var Uv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Iv(e,t){let n=e;if(typeof n!="string"||!pd.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let i=n,l=!1;if(Uv)try{let a=new URL(window.location.href),r=Rv.test(n)?new URL(ME(n,a.protocol)):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 Mp=new URL("http://localhost");function gd(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),Mp)}catch{return Mp}}function Tu(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function oC(e,t){if(e.startsWith("//"))return!0;let n=t.protocol.toLowerCase();return e.toLowerCase().startsWith(n)?t.host===""||e.slice(n.length).startsWith("//"):!1}function yd(e,t,n,i){let l=null;try{l=e==null?null:new URL(e,n)}catch{}let a=new URL(t,n),r=l!=null&&!Tu(l,n),s=!Tu(a,n);if(i==="reject"){if(r||s)throw new Error("External navigation is not allowed")}else if(s&&(l==null||!oC(e,l)||!Tu(l,a)))throw new Error("External navigation is not allowed")}var Hv=["POST","PUT","PATCH","DELETE"];new Set(Hv);var uC=["GET",...Hv];new Set(uC);var cC=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function fC(e){try{return cC.includes(new URL(e).protocol)}catch{return!1}}var na=b.createContext(null);na.displayName="DataRouter";var No=b.createContext(null);No.displayName="DataRouterState";var qv=b.createContext(!1);function dC(){return b.useContext(qv)}var Fv=b.createContext({isTransitioning:!1});Fv.displayName="ViewTransition";var hC=b.createContext(new Map);hC.displayName="Fetchers";var pC=b.createContext(null);pC.displayName="Await";var Rt=b.createContext(null);Rt.displayName="Navigation";var Er=b.createContext(null);Er.displayName="Location";var Pt=b.createContext({outlet:null,matches:[],isDataRoute:!1});Pt.displayName="Route";var xd=b.createContext(null);xd.displayName="RouteError";var Gv="REACT_ROUTER_ERROR",mC="REDIRECT",gC="ROUTE_ERROR_RESPONSE";function yC(e){if(e.startsWith(`${Gv}:${mC}:{`))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 xC(e){if(e.startsWith(`${Gv}:${gC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new aC(t.status,t.statusText,t.data)}catch{}}function vC(e,{relative:t}={}){Ne(ia(),"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}=Cr(e,{relative:t}),s=a;return n!=="/"&&(s=a==="/"?n:tn([n,a])),i.createHref({pathname:s,search:r,hash:l})}function ia(){return b.useContext(Er)!=null}function rt(){return Ne(ia(),"useLocation() may be used only in the context of a <Router> component."),b.useContext(Er).location}var Vv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Yv(e){b.useContext(Rt).static||b.useLayoutEffect(e)}function $e(){let{isDataRoute:e}=b.useContext(Pt);return e?zC():bC()}function bC(){Ne(ia(),"useNavigate() may be used only in the context of a <Router> component.");let e=b.useContext(na),{basename:t,navigator:n}=b.useContext(Rt),{matches:i}=b.useContext(Pt),{pathname:l}=rt(),a=JSON.stringify(md(i)),r=b.useRef(!1);return Yv(()=>{r.current=!0}),b.useCallback((u,c={})=>{if(Yt(r.current,Vv),!r.current)return;if(typeof u=="number"){n.go(u);return}let d=ko(u,JSON.parse(a),l,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:tn([t,d.pathname])),yd(typeof u=="string"?u:Yi(u),n.createHref(d),gd(n),"reject"),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,a,l,e])}var SC=b.createContext(null);function EC(e){let t=b.useContext(Pt).outlet;return b.useMemo(()=>t&&b.createElement(SC.Provider,{value:e},t),[t,e])}function Wi(){let{matches:e}=b.useContext(Pt),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function Cr(e,{relative:t}={}){let{matches:n}=b.useContext(Pt),{pathname:i}=rt(),l=JSON.stringify(md(n));return b.useMemo(()=>ko(e,JSON.parse(l),i,t==="path"),[e,l,i,t])}function CC(e,t){return Pv(e,t)}function Pv(e,t,n){var E;Ne(ia(),"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 m=c&&c.path||"";Qv(s,!c||m.endsWith("*")||m.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${m}">) 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
|
+
|
|
60
|
+
Please change the parent <Route path="${m}"> to <Route path="${m==="/"?"*":`${m}/*`}">.`)}let d=rt(),f;if(t){let m=typeof t=="string"?ta(t):t;Ne(u==="/"||((E=m.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 "${m.pathname}" was given in the \`location\` prop.`),f=m}else f=d;let h=f.pathname||"/",p=h;if(u!=="/"){let m=u.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(m.length).join("/")}let y=n&&n.state.matches.length?n.state.matches.map(m=>Object.assign(m,{route:n.manifest[m.route.id]||m.route})):Ov(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=wC(y&&y.map(m=>Object.assign({},m,{params:Object.assign({},r,m.params),pathname:tn([u,i.encodeLocation?i.encodeLocation(m.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathname]),pathnameBase:m.pathnameBase==="/"?u:tn([u,i.encodeLocation?i.encodeLocation(m.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:m.pathnameBase])})),l,n);return t&&x?b.createElement(Er.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",mask:void 0,...f},navigationType:"POP"}},x):x}function TC(){let e=DC(),t=rC(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 kC=b.createElement(TC,null),Xv=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=xC(e.digest);n&&(e=n)}let t=e!==void 0?b.createElement(Pt.Provider,{value:this.props.routeContext},b.createElement(xd.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(NC,{error:e},t):t}};Xv.contextType=qv;var ku=new WeakMap;function NC({children:e,error:t}){let{basename:n,navigator:i}=b.useContext(Rt);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let l=yC(t.digest);if(l){let a=ku.get(t);if(a)throw a;let r=Iv(l.location,n),s=r.absoluteURL||r.to;if(yd(l.location,s,gd(i),"allow-explicit"),fC(s))throw new Error("Invalid redirect location");if(Uv&&!ku.get(t))if(r.isExternal||l.reloadDocument)window.location.href=s;else{const u=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(r.to,{replace:l.replace}));throw ku.set(t,u),u}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s}`})}}return e}function AC({routeContext:e,match:t,children:n}){let i=b.useContext(na);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 wC(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)??{},pattern:sC(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||kC,r&&(s<0&&h===0?(Qv("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 m=t.concat(l.slice(0,h+1)),g=()=>{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:m,isDataRoute:i!=null},children:v})};return i&&(f.route.ErrorBoundary||f.route.errorElement||h===0)?b.createElement(Xv,{location:i.location,revalidation:i.revalidation,component:x,error:p,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):g()},null)}function vd(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jC(e){let t=b.useContext(na);return Ne(t,vd(e)),t}function _C(e){let t=b.useContext(No);return Ne(t,vd(e)),t}function RC(e){let t=b.useContext(Pt);return Ne(t,vd(e)),t}function bd(e){let t=RC(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 OC(){return bd("useRouteId")}function DC(){var i;let e=b.useContext(xd),t=_C("useRouteError"),n=bd("useRouteError");return e!==void 0?e:(i=t.errors)==null?void 0:i[n]}function zC(){let{router:e}=jC("useNavigate"),t=bd("useNavigate"),n=b.useRef(!1);return Yv(()=>{n.current=!0}),b.useCallback(async(l,a={})=>{Yt(n.current,Vv),n.current&&(typeof l=="number"?await e.navigate(l):await e.navigate(l,{fromRouteId:t,...a}))},[e,t])}var Bp={};function Qv(e,t,n){!t&&!Bp[e]&&(Bp[e]=!0,Yt(!1,n))}b.memo(LC);function LC({routes:e,manifest:t,future:n,state:i,isStatic:l,onError:a}){return Pv(e,void 0,{manifest:t,state:i,isStatic:l,onError:a})}function MC({to:e,replace:t,state:n,relative:i}){Ne(ia(),"<Navigate> may be used only in the context of a <Router> component.");let{static:l,navigator:a}=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:r}=b.useContext(Pt),{pathname:s}=rt(),u=$e(),c=ko(e,md(r),s,i==="path");yd(typeof e=="string"?e:Yi(e),a.createHref(c),gd(a),"reject");let d=JSON.stringify(c);return b.useEffect(()=>{u(JSON.parse(d),{replace:t,state:n,relative:i})},[u,d,i,t,n]),null}function Sd(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 BC({basename:e="/",children:t=null,location:n,navigationType:i="POP",navigator:l,static:a=!1,useTransitions:r}){Ne(!ia(),"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,useTransitions:r,future:{}}),[s,l,a,r]);typeof n=="string"&&(n=ta(n));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default",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,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(Er.Provider,{children:t,value:x}))}function UC({children:e,location:t}){return CC(Vc(e),t)}function Vc(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,Vc(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=Vc(i.props.children,a)),n.push(r)}),n}var gs="get",ys="application/x-www-form-urlencoded";function Ao(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function IC(e){return Ao(e)&&e.tagName.toLowerCase()==="button"}function HC(e){return Ao(e)&&e.tagName.toLowerCase()==="form"}function qC(e){return Ao(e)&&e.tagName.toLowerCase()==="input"}function FC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function GC(e,t){return e.button===0&&(!t||t==="_self")&&!FC(e)}function Yc(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 VC(e,t){let n=Yc(e);return t&&t.forEach((i,l)=>{n.has(l)||t.getAll(l).forEach(a=>{n.append(l,a)})}),n}var Pr=null;function YC(){if(Pr===null)try{new FormData(document.createElement("form"),0),Pr=!1}catch{Pr=!0}return Pr}var PC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Nu(e){return e!=null&&!PC.has(e)?(Yt(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${ys}"`),null):e}function XC(e,t){let n,i,l,a,r;if(HC(e)){let s=e.getAttribute("action");i=s?Hn(s,t):null,n=e.getAttribute("method")||gs,l=Nu(e.getAttribute("enctype"))||ys,a=new FormData(e)}else if(IC(e)||qC(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")||gs,l=Nu(e.getAttribute("formenctype"))||Nu(s.getAttribute("enctype"))||ys,a=new FormData(s,e),!YC()){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(Ao(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=gs,i=null,l=ys,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 Ed(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Zv(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=`${Yl(t)}/_root.${i}`:l.pathname=`${Yl(l.pathname)}.${i}`,l}async function QC(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 ZC(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 KC(e,t,n){let i=await Promise.all(e.map(async l=>{let a=t.routes[l.route.id];if(a){let r=await QC(a,n);return r.links?r.links():[]}return[]}));return eT(i.flat(1).filter(ZC).filter(l=>l.rel==="stylesheet"||l.rel==="preload").map(l=>l.rel==="stylesheet"?{...l,rel:"prefetch",as:"style"}:{...l,rel:"prefetch"}))}function Up(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 WC(e){let t={},n=Object.keys(e).sort();for(let i of n)t[i]=e[i];return t}function eT(e,t){let n=new Set;return new Set(t),e.reduce((i,l)=>{let a=JSON.stringify(WC(l));return n.has(a)||(n.add(a),i.push({key:a,link:l})),i},[])}function Cd(){let e=b.useContext(na);return Ed(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function tT(){let e=b.useContext(No);return Ed(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Td=b.createContext(void 0);Td.displayName="FrameworkContext";function wo(){let e=b.useContext(Td);return Ed(e,"You must render this element inside a <HydratedRouter> element"),e}function nT(e,t){let n=b.useContext(Td),[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=m=>{m.forEach(g=>{r(g.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:ga(s,p),onBlur:ga(u,y),onMouseEnter:ga(c,p),onMouseLeave:ga(d,y),onTouchStart:ga(f,p)}]:[!1,h,{}]}function ga(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function iT({page:e,...t}){let n=dC(),{nonce:i}=wo(),{router:l}=Cd(),a=b.useMemo(()=>Ov(l.routes,e,l.basename),[l.routes,e,l.basename]);return a?(t.nonce==null&&i&&(t={...t,nonce:i}),n?b.createElement(aT,{page:e,matches:a,...t}):b.createElement(rT,{page:e,matches:a,...t})):null}function lT(e){let{manifest:t,routeModules:n}=wo(),[i,l]=b.useState([]);return b.useEffect(()=>{let a=!1;return KC(e,t,n).then(r=>{a||l(r)}),()=>{a=!0}},[e,t,n]),i}function aT({page:e,matches:t,...n}){let i=rt(),{future:l}=wo(),{basename:a}=Cd(),r=b.useMemo(()=>{if(e===i.pathname+i.search+i.hash)return[];let s=Zv(e,a,l.v8_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.v8_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 rT({page:e,matches:t,...n}){let i=rt(),{future:l,manifest:a,routeModules:r}=wo(),{basename:s}=Cd(),{loaderData:u,matches:c}=tT(),d=b.useMemo(()=>Up(e,t,c,a,i,"data"),[e,t,c,a,i]),f=b.useMemo(()=>Up(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(g=>{var C;let v=a.routes[g.route.id];!v||!v.hasLoader||(!d.some(w=>w.route.id===g.route.id)&&g.route.id in u&&((C=r[g.route.id])!=null&&C.shouldRevalidate)||v.hasClientLoader?E=!0:x.add(g.route.id))}),x.size===0)return[];let m=Zv(e,s,l.v8_trailingSlashAwareDataRequests,"data");return E&&x.size>0&&m.searchParams.set("_routes",t.filter(g=>x.has(g.route.id)).map(g=>g.route.id).join(",")),[m.pathname+m.search]},[s,l.v8_trailingSlashAwareDataRequests,u,i,a,d,t,e,r]),p=b.useMemo(()=>JC(f,a),[f,a]),y=lT(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 sT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var oT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oT&&(window.__reactRouterVersion="7.18.4")}catch{}function uT({basename:e,children:t,useTransitions:n,window:i}){let l=b.useRef();l.current==null&&(l.current=BE({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(BC,{basename:e,children:t,location:r.location,navigationType:r.action,navigator:a,useTransitions:n})}var Pi=b.forwardRef(function({onClick:t,discover:n="render",prefetch:i="none",relative:l,reloadDocument:a,replace:r,mask:s,state:u,target:c,to:d,preventScrollReset:f,viewTransition:h,defaultShouldRevalidate:p,...y},x){let{basename:E,navigator:m,useTransitions:g}=b.useContext(Rt),v=typeof d=="string"&&pd.test(d),C=Iv(d,E);d=C.to;let w=vC(d,{relative:l}),N=rt(),_=null;if(s){let V=ko(s,[],N.mask?N.mask.pathname:"/",!0);E!=="/"&&(V.pathname=V.pathname==="/"?E:tn([E,V.pathname])),_=m.createHref(V)}let[I,D,T]=nT(i,y),M=dT(d,{replace:r,mask:s,state:u,target:c,preventScrollReset:f,relative:l,viewTransition:h,defaultShouldRevalidate:p,useTransitions:g});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||w,onClick:P?q:t,ref:sT(x,D),target:c,"data-discover":!v&&n==="render"?"true":void 0});return I&&!v?b.createElement(b.Fragment,null,F,b.createElement(iT,{page:w})):F});Pi.displayName="Link";var Pc=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=Cr(r,{relative:c.relative}),h=rt(),p=b.useContext(No),{navigator:y,basename:x}=b.useContext(Rt),E=p!=null&&xT(f)&&s===!0,m=y.encodeLocation?y.encodeLocation(f).pathname:f.pathname,g=h.pathname,v=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;n||(g=g.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase()),v&&x&&(v=Hn(v,x)||v);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let w=g===m||!l&&g.startsWith(m)&&g.charAt(C)==="/",N=v!=null&&(v===m||!l&&v.startsWith(m)&&v.charAt(m.length)==="/"),_={isActive:w,isPending:N,isTransitioning:E},I=w?t:void 0,D;typeof i=="function"?D=i(_):D=[i,w?"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)});Pc.displayName="NavLink";var cT=b.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:i,replace:l,state:a,method:r=gs,action:s,onSubmit:u,relative:c,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h,...p},y)=>{let{useTransitions:x}=b.useContext(Rt),E=gT(),m=yT(s,{relative:c}),g=r.toLowerCase()==="get"?"get":"post",v=typeof s=="string"&&pd.test(s),C=w=>{if(u&&u(w),w.defaultPrevented)return;w.preventDefault();let N=w.nativeEvent.submitter,_=(N==null?void 0:N.getAttribute("formmethod"))||r,I=()=>E(N||w.currentTarget,{fetcherKey:t,method:_,navigate:n,replace:l,state:a,relative:c,preventScrollReset:d,viewTransition:f,defaultShouldRevalidate:h});x&&n!==!1?b.startTransition(()=>I()):I()};return b.createElement("form",{ref:y,method:g,action:m,onSubmit:i?u:C,...p,"data-discover":!v&&e==="render"?"true":void 0})});cT.displayName="Form";function fT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Kv(e){let t=b.useContext(na);return Ne(t,fT(e)),t}function dT(e,{target:t,replace:n,mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,defaultShouldRevalidate:u,useTransitions:c}={}){let d=$e(),f=rt(),h=Cr(e,{relative:r});return b.useCallback(p=>{if(GC(p,t)){p.preventDefault();let y=n!==void 0?n:Yi(f)===Yi(h),x=()=>d(e,{replace:y,mask:i,state:l,preventScrollReset:a,relative:r,viewTransition:s,defaultShouldRevalidate:u});c?b.startTransition(()=>x()):x()}},[f,d,h,n,i,l,t,e,a,r,s,u,c])}function hT(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(Yc(e)),n=b.useRef(!1),i=rt(),l=b.useMemo(()=>VC(i.search,n.current?null:t.current),[i.search]),a=$e(),r=b.useCallback((s,u)=>{const c=Yc(typeof s=="function"?s(new URLSearchParams(l)):s);n.current=!0,a("?"+c,u)},[a,l]);return[l,r]}var pT=0,mT=()=>`__${String(++pT)}__`;function gT(){let{router:e}=Kv("useSubmit"),{basename:t}=b.useContext(Rt),n=OC(),i=e.fetch,l=e.navigate;return b.useCallback(async(a,r={})=>{let{action:s,method:u,encType:c,formData:d,body:f}=XC(a,t);if(r.navigate===!1){let h=r.fetcherKey||mT();await i(h,n,r.action||s,{defaultShouldRevalidate:r.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,{defaultShouldRevalidate:r.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 yT(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={...Cr(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:tn([n,a.pathname])),Yi(a)}function xT(e,{relative:t}={}){let n=b.useContext(Fv);Ne(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:i}=Kv("useViewTransitionState"),l=Cr(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 eo(l.pathname,r)!=null||eo(l.pathname,a)!=null}const vT="/beta";class Ip 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 bT extends Error{constructor(t){super(t),this.name="CancelError"}get isCancelled(){return!0}}var un,cn,Jt,ti,zi,Dl,ni;class ST{constructor(t){Yn(this,un);Yn(this,cn);Yn(this,Jt);Yn(this,ti);Yn(this,zi);Yn(this,Dl);Yn(this,ni);Qt(this,un,!1),Qt(this,cn,!1),Qt(this,Jt,!1),Qt(this,ti,[]),Qt(this,zi,new Promise((n,i)=>{Qt(this,Dl,n),Qt(this,ni,i);const l=s=>{fe(this,un)||fe(this,cn)||fe(this,Jt)||(Qt(this,un,!0),fe(this,Dl)&&fe(this,Dl).call(this,s))},a=s=>{fe(this,un)||fe(this,cn)||fe(this,Jt)||(Qt(this,cn,!0),fe(this,ni)&&fe(this,ni).call(this,s))},r=s=>{fe(this,un)||fe(this,cn)||fe(this,Jt)||fe(this,ti).push(s)};return Object.defineProperty(r,"isResolved",{get:()=>fe(this,un)}),Object.defineProperty(r,"isRejected",{get:()=>fe(this,cn)}),Object.defineProperty(r,"isCancelled",{get:()=>fe(this,Jt)}),t(l,a,r)}))}get[Symbol.toStringTag](){return"Cancellable Promise"}then(t,n){return fe(this,zi).then(t,n)}catch(t){return fe(this,zi).catch(t)}finally(t){return fe(this,zi).finally(t)}cancel(){if(!(fe(this,un)||fe(this,cn)||fe(this,Jt))){if(Qt(this,Jt,!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 bT("Request aborted"))}}get isCancelled(){return fe(this,Jt)}}un=new WeakMap,cn=new WeakMap,Jt=new WeakMap,ti=new WeakMap,zi=new WeakMap,Dl=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 Hp;(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={}))})(Hp||(Hp={}));var qp;(function(e){(function(t){t.HUMAN="human",t.AGENT="agent"})(e.type||(e.type={}))})(qp||(qp={}));var Fp;(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={}))})(Fp||(Fp={}));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.CLAUDE="claude",t.CODEX="codex",t.OPENCODE="opencode",t.ADK="adk",t.GITHUBCOPILOT="githubcopilot",t.OTHER="other"})(e.type||(e.type={}))})(Vp||(Vp={}));var Yp;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Yp||(Yp={}));var Pp;(function(e){(function(t){t.CONVERSATION="conversation",t.QUICK_TASKS="quick_tasks",t.MIDDLE_MANAGER="middle_manager",t.EMBEDDINGS="embeddings"})(e.job||(e.job={}))})(Pp||(Pp={}));var Xp;(function(e){(function(t){t.CONNECTED="connected",t.PLAN_ACCESS_NOT_GRANTED="plan_access_not_granted",t.NEEDS_REAUTHORIZATION="needs_reauthorization",t.DISCONNECTED="disconnected"})(e.status||(e.status={}))})(Xp||(Xp={}));var Qp;(function(e){(function(t){t.LANGUAGE="language",t.EMBEDDING="embedding"})(e.kind||(e.kind={}))})(Qp||(Qp={}));var Zp;(function(e){(function(t){t.OPENAI="openai",t.ANTHROPIC="anthropic",t.GOOGLE="google",t.GOOGLE_VERTEX="google_vertex",t.XAI="xai",t.OPENAI_COMPATIBLE="openai_compatible",t.CHATGPT_SUBSCRIPTION="chatgpt_subscription"})(e.type||(e.type={}))})(Zp||(Zp={}));var sn;(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={}))})(sn||(sn={}));var Kp;(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={}))})(Kp||(Kp={}));var Jp;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic",t.PRIVATE_KEY_JWT="private_key_jwt"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(Jp||(Jp={}));var Kn;(function(e){(function(t){t.PENDING="pending",t.AUTHORIZED="authorized",t.FAILED="failed"})(e.status||(e.status={}))})(Kn||(Kn={}));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 Wp;(function(e){(function(t){t.OPENAI="openai",t.ANTHROPIC="anthropic",t.GOOGLE="google",t.GOOGLE_VERTEX="google_vertex",t.XAI="xai",t.OPENAI_COMPATIBLE="openai_compatible",t.CHATGPT_SUBSCRIPTION="chatgpt_subscription"})(e.type||(e.type={}))})(Wp||(Wp={}));var em;(function(e){(function(t){t.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(em||(em={}));var Xc;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(Xc||(Xc={}));var tm;(function(e){(function(t){t.DYNAMIC_REGISTRATION="dynamic_registration",t.METADATA_DOCUMENT="metadata_document"})(e.registrationMethod||(e.registrationMethod={}))})(tm||(tm={}));var nm;(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={}))})(nm||(nm={}));var im;(function(e){(function(t){t.ACCESS_TOKEN="access_token",t.REFRESH_TOKEN="refresh_token"})(e.token_type_hint||(e.token_type_hint={}))})(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.ADMIN="admin",t.STANDARD="standard"})(e.role||(e.role={}))})(am||(am={}));var qa;(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={}))})(qa||(qa={}));var rm;(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={}))})(rm||(rm={}));var sm;(function(e){(function(t){t.NONE="none",t.CLIENT_SECRET_BASIC="client_secret_basic",t.PRIVATE_KEY_JWT="private_key_jwt"})(e.token_endpoint_auth_method||(e.token_endpoint_auth_method={}))})(sm||(sm={}));var om;(function(e){e.TITLE="title",e.CONTENT="content",e.COMMENT="comment"})(om||(om={}));var um;(function(e){e.TASK="task",e.CONTEXT_BLOCK="context_block",e.THREAD="thread",e.TOOL="tool",e.AGENT="agent",e.PROJECT="project"})(um||(um={}));var cm;(function(e){e.KEYWORD="keyword",e.FUZZY_TITLE="fuzzy_title",e.SEMANTIC="semantic"})(cm||(cm={}));var fm;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(fm||(fm={}));var dm;(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={}))})(dm||(dm={}));var hm;(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={}))})(hm||(hm={}));var pm;(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={}))})(pm||(pm={}));var Qc;(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={}))})(Qc||(Qc={}));var mm;(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={}))})(mm||(mm={}));var gm;(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={}))})(gm||(gm={}));var ym;(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={}))})(ym||(ym={}));var xm;(function(e){(function(t){t.AUTHORIZATION_CODE="authorization_code",t.REFRESH_TOKEN="refresh_token"})(e.grant_type||(e.grant_type={}))})(xm||(xm={}));var vm;(function(e){(function(t){t.BEARER="Bearer"})(e.token_type||(e.token_type={}))})(vm||(vm={}));var bm;(function(e){(function(t){t.HTTP="http",t.STDIO="stdio"})(e.type||(e.type={}))})(bm||(bm={}));var Sm;(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={}))})(Sm||(Sm={}));var Em;(function(e){(function(t){t.FULL_PAGE="FULL_PAGE",t.BANNER="BANNER",t.OFF="OFF"})(e.onboardingDisplayMode||(e.onboardingDisplayMode={}))})(Em||(Em={}));const kd=e=>e!=null,Tr=e=>typeof e=="string",Au=e=>Tr(e)&&e!=="",Nd=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]),Jv=e=>e instanceof FormData,ET=e=>{try{return btoa(e)}catch{return Buffer.from(e).toString("base64")}},CT=e=>{const t=[],n=(l,a)=>{t.push(`${encodeURIComponent(l)}=${encodeURIComponent(String(a))}`)},i=(l,a)=>{kd(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("&")}`:""},TT=(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}${CT(t.query)}`:l},kT=e=>{if(e.formData){const t=new FormData,n=(i,l)=>{Tr(l)||Nd(l)?t.append(i,l):t.append(i,JSON.stringify(l))};return Object.entries(e.formData).filter(([i,l])=>kd(l)).forEach(([i,l])=>{Array.isArray(l)?l.forEach(a=>n(i,a)):n(i,l)}),t}},Xr=async(e,t)=>typeof t=="function"?t(e):t,NT=async(e,t)=>{const[n,i,l,a]=await Promise.all([Xr(t,e.TOKEN),Xr(t,e.USERNAME),Xr(t,e.PASSWORD),Xr(t,e.HEADERS)]),r=Object.entries({Accept:"application/json",...a,...t.headers}).filter(([s,u])=>kd(u)).reduce((s,[u,c])=>({...s,[u]:String(c)}),{});if(Au(n)&&(r.Authorization=`Bearer ${n}`),Au(i)&&Au(l)){const s=ET(`${i}:${l}`);r.Authorization=`Basic ${s}`}return t.body!==void 0&&(t.mediaType?r["Content-Type"]=t.mediaType:Nd(t.body)?r["Content-Type"]=t.body.type||"application/octet-stream":Tr(t.body)?r["Content-Type"]="text/plain":Jv(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):Tr(e.body)||Nd(e.body)||Jv(e.body)?e.body:JSON.stringify(e.body)},wT=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)},jT=(e,t)=>{if(t){const n=e.headers.get(t);if(Tr(n))return n}},_T=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)}},RT=(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 Ip(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 Ip(e,t,`Generic Error: status: ${l}; status text: ${a}; body: ${r}`)}},U=(e,t)=>new ST(async(n,i,l)=>{try{const a=TT(e,t),r=kT(t),s=AT(t),u=await NT(e,t);if(!l.isCancelled){const c=await wT(e,t,a,s,r,u,l),d=await _T(c),f=jT(c,t.responseHeader),h={url:a,ok:c.ok,status:c.status,statusText:c.statusText,body:f??d};RT(t,h),n(h.body)}}catch(a){i(a)}});class wu{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 OT{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 DT{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,i=B){return U(i,{method:"GET",url:"/api/v1/context/blocks/search/query",query:{query:t,limit:n}})}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 $v{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,i=B){return U(i,{method:"GET",url:"/api/v1/tasks/tasks/search/query",query:{query:t,limit:n}})}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 ya{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 Wv=()=>"",eb=e=>e,el=Wv();B.BASE=el;B.CREDENTIALS="include";B.BASE=el;const tb=b.createContext(void 0);function zT({children:e}){const[t,n]=b.useState(null),[i,l]=b.useState(!0);b.useEffect(()=>{ya.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 ya.webAuthControllerRefresh();n(d.user)}catch(d){console.error("Token refresh failed:",d),n(null)}},8*60*1e3);return()=>clearInterval(c)},[t]);const u={user:t,isAuthenticated:!!t,isLoading:i,login:async(c,d)=>{const f=await ya.webAuthControllerLogin({email:c,password:d});n(f.user)},logout:async()=>{try{await ya.webAuthControllerLogout()}finally{n(null)}},refreshAuth:async()=>{const c=await ya.webAuthControllerRefresh();n(c.user)}};return o.jsx(tb.Provider,{value:u,children:e})}function Ad(){const e=b.useContext(tb);if(e===void 0)throw new Error("useAuth must be used within an AuthProvider");return e}function LT({children:e}){const{isAuthenticated:t,isLoading:n}=Ad(),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(MC,{to:"/login",state:{from:i},replace:!0})}function MT(){var p,y;const[e,t]=b.useState(""),[n,i]=b.useState(""),[l,a]=b.useState(""),[r,s]=b.useState(!1),{login:u}=Ad(),c=$e(),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 BT({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(Pc,{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(Pc,{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 UT=768;function rr(){return window.innerWidth<UT}function IT(){const[e,t]=b.useState(()=>rr());return b.useEffect(()=>{const n=()=>{t(rr())};return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),e}const Cm="app-nav-collapsed";function HT(){const[e,t]=b.useState(()=>{const i=localStorage.getItem(Cm);return i!==null?i==="true":rr()});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(BT,{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(Sd,{})})]})}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 qT(){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 nb=({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 FT({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(nb,{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 ib(){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 lb({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 wd=({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 $v.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(),w=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(w),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const g=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const x=g=>{var C;const v=g.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=g=>{t(e.filter(v=>v!==g))},m=g=>{g.key==="Tab"&&i.trim()||g.key==="Enter"&&i.trim()?(g.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):g.key==="ArrowDown"?(g.preventDefault(),d(v=>v<a.length-1?v+1:v)):g.key==="ArrowUp"?(g.preventDefault(),d(v=>v>0?v-1:-1)):g.key==="Escape"?(u(!1),d(-1)):g.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 g;return(g=p.current)==null?void 0:g.focus()},children:[e.map(g=>{const v=f.find(w=>w.name===g),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:[g,o.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),E(g)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},g)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:g=>l(g.target.value),onKeyDown:m,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((g,v)=>o.jsxs("div",{onClick:()=>x(g.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:g.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:g.name})]},g.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 GT({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 VT={name:"",description:"",assignee:"",sessionId:"",tagNames:[],dependsOnIds:[]};function YT({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=ib(),[l,a,r]=GT({key:"create-task-draft",defaultValue:VT}),[s,u]=b.useState(!1),{name:c,description:d,assignee:f,sessionId:h,tagNames:p,dependsOnIds:y}=l,x=(m,g)=>{a({...l,[m]:g})};b.useEffect(()=>{const m=g=>{g.key==="Escape"&&e()};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[e]);const E=async m=>{var g;m.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=((g=v==null?void 0:v.body)==null?void 0:g.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:m=>m.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:m=>x("name",m.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:m=>x("description",m.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:m=>x("assignee",m.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:m=>x("sessionId",m.target.value),placeholder:"Agent session ID"})]}),o.jsxs("div",{className:"form-group",children:[o.jsx("label",{htmlFor:"tags",children:"Tags"}),o.jsx(wd,{value:p,onChange:m=>x("tagNames",m),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:m=>x("dependsOnIds",m.target.value.split(",").map(g=>g.trim()).filter(g=>g)),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(m=>o.jsx(lb,{message:m.message,type:m.type,onClose:()=>i(m.id)},m.id))]})})}const re=Qc.status;function ab({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),[m,g]=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),g("")}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";g(V)}},C=async()=>{console.log("NOT IMPLEMENTED - ASSIGNEE STRUCTURE CHANGED")},w=async()=>{var P;if(f.trim())try{await en.tasksControllerAddComment(e.id,{content:f});const F=await en.tasksControllerGetTask(e.id);n(F),h(""),g("")}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";g(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(""),g("")}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";g(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";g(V)}},I=async P=>{var F,V;d(P);try{const j=await en.tasksControllerUpdateTask(e.id,{tagNames:P});n(j),g("")}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";g(O),d(((V=e.tags)==null?void 0:V.map(A=>A.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"}),m&&o.jsxs("div",{className:"error-message",children:[o.jsx("strong",{children:"Error:"})," ",m]}),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(wd,{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:w,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 sr(){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 xs=Object.create(null);Object.keys(gn).forEach(e=>{xs[gn[e]]=e});const Zc={type:"error",data:"parser error"},rb=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",sb=typeof ArrayBuffer=="function",ob=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,jd=({type:e,data:t},n,i)=>rb&&t instanceof Blob?n?i(t):Tm(t,i):sb&&(t instanceof ArrayBuffer||ob(t))?n?i(t):Tm(new Blob([t]),i):i(gn[e]+(t||"")),Tm=(e,t)=>{const n=new FileReader;return n.onload=function(){const i=n.result.split(",")[1];t("b"+(i||""))},n.readAsDataURL(e)};function km(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ju;function PT(e,t){if(rb&&e.data instanceof Blob)return e.data.arrayBuffer().then(km).then(t);if(sb&&(e.data instanceof ArrayBuffer||ob(e.data)))return t(km(e.data));jd(e,!1,n=>{ju||(ju=new TextEncoder),t(ju.encode(n))})}const Nm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Na=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<Nm.length;e++)Na[Nm.charCodeAt(e)]=e;const XT=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=Na[e.charCodeAt(i)],r=Na[e.charCodeAt(i+1)],s=Na[e.charCodeAt(i+2)],u=Na[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},QT=typeof ArrayBuffer=="function",_d=(e,t)=>{if(typeof e!="string")return{type:"message",data:ub(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ZT(e.substring(1),t)}:xs[n]?e.length>1?{type:xs[n],data:e.substring(1)}:{type:xs[n]}:Zc},ZT=(e,t)=>{if(QT){const n=XT(e);return ub(n,t)}else return{base64:!0,data:e}},ub=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},cb="",KT=(e,t)=>{const n=e.length,i=new Array(n);let l=0;e.forEach((a,r)=>{jd(a,!1,s=>{i[r]=s,++l===n&&t(i.join(cb))})})},JT=(e,t)=>{const n=e.split(cb),i=[];for(let l=0;l<n.length;l++){const a=_d(n[l],t);if(i.push(a),a.type==="error")break}return i};function $T(){return new TransformStream({transform(e,t){PT(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 _u;function Qr(e){return e.reduce((t,n)=>t+n.length,0)}function Zr(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 WT(e,t){_u||(_u=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(Qr(n)<1)break;const u=Zr(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(Qr(n)<2)break;const u=Zr(n,2);l=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),i=3}else if(i===2){if(Qr(n)<8)break;const u=Zr(n,8),c=new DataView(u.buffer,u.byteOffset,u.length),d=c.getUint32(0);if(d>Math.pow(2,21)-1){s.enqueue(Zc);break}l=d*Math.pow(2,32)+c.getUint32(4),i=3}else{if(Qr(n)<l)break;const u=Zr(n,l);s.enqueue(_d(a?u:_u.decode(u),t)),i=0}if(l===0||l>e){s.enqueue(Zc);break}}}})}const fb=4;function Ue(e){if(e)return ek(e)}function ek(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 jo=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")(),tk="arraybuffer";function db(e,...t){return t.reduce((n,i)=>(e.hasOwnProperty(i)&&(n[i]=e[i]),n),{})}const nk=Bt.setTimeout,ik=Bt.clearTimeout;function _o(e,t){t.useNativeTimers?(e.setTimeoutFn=nk.bind(Bt),e.clearTimeoutFn=ik.bind(Bt)):(e.setTimeoutFn=Bt.setTimeout.bind(Bt),e.clearTimeoutFn=Bt.clearTimeout.bind(Bt))}const lk=1.33;function ak(e){return typeof e=="string"?rk(e):Math.ceil((e.byteLength||e.size)*lk)}function rk(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 hb(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function sk(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function ok(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 uk extends Error{constructor(t,n,i){super(t),this.description=n,this.context=i,this.type="TransportError"}}class Rd extends Ue{constructor(t){super(),this.writable=!1,_o(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 uk(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=_d(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=sk(t);return n.length?"?"+n:""}}class ck extends Rd{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,KT(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]=hb()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pb=!1;try{pb=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const fk=pb;function dk(){}class hk extends ck{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,_o(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=db(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=dk,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",Am);else if(typeof addEventListener=="function"){const e="onpagehide"in Bt?"pagehide":"unload";addEventListener(e,Am,!1)}}function Am(){for(let e in mn.requests)mn.requests.hasOwnProperty(e)&&mn.requests[e].abort()}const pk=function(){const e=mb({xdomain:!1});return e&&e.responseType!==null}();class mk extends hk{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=pk&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new mn(mb,this.uri(),t)}}function mb(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||fk))return new XMLHttpRequest}catch{}if(!t)try{return new Bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const gb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class gk extends Rd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,i=gb?{}:db(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;jd(i,this.supportsBinary,a=>{try{this.doWrite(i,a)}catch{}l&&jo(()=>{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]=hb()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Ru=Bt.WebSocket||Bt.MozWebSocket;class yk extends gk{createSocket(t,n,i){return gb?new Ru(t,n,i):n?new Ru(t,n):new Ru(t)}doWrite(t,n){this.ws.send(n)}}class xk extends Rd{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=WT(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&&jo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const vk={websocket:yk,webtransport:xk,polling:mk},bk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Sk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kc(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=bk.exec(e||""),a={},r=14;for(;r--;)a[Sk[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=Ck(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 Ck(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(i,l,a){l&&(n[l]=a)}),n}const Jc=typeof addEventListener=="function"&&typeof removeEventListener=="function",vs=[];Jc&&addEventListener("offline",()=>{vs.forEach(e=>e())},!1);let yb=class fl extends Ue{constructor(t,n={}){var i,l;if(super(),this.binaryType=tk,this.writeBuffer=[],this._prevBufferLen=0,this._upgrades=[],this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const a=Kc(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=Kc(n.host).host);if(_o(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"),n.transportImplementations&&n.transports)throw new Error("specifying both 'transportImplementations' and 'transports' options is not supported");n.transportImplementations||!((i=n.transports)===null||i===void 0)&&i.length&&typeof n.transports[0]=="function"?(this.transports=[],this._transportsByName=Object.create(null),((l=n.transportImplementations)!==null&&l!==void 0?l:n.transports).forEach(a=>{const r=a.prototype.name;this.transports.push(r),this._transportsByName[r]=a})):(this.transports=n.transports?[...n.transports]:["polling","websocket","webtransport"],this._transportsByName=vk),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=ok(this.opts.query)),Jc&&(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"})},vs.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=fb,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&&fl.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))}_probe(t){let n=this.createTransport(t),i=!1;fl.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;fl.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()}onOpen(){if(this.readyState="open",fl.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_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._upgrades=this._filterUpgrades(t.upgrades),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+=ak(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,jo(()=>{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(fl.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(),Jc&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const i=vs.indexOf(this._offlineEventListener);i!==-1&&vs.splice(i,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}_filterUpgrades(t){const n=[];for(let i=0;i<t.length;i++)~this.transports.indexOf(t[i])&&n.push(t[i]);return n}};yb.protocol=fb;function Tk(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=Kc(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 kk=typeof ArrayBuffer=="function",Nk=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,xb=Object.prototype.toString,Ak=typeof Blob=="function"||typeof Blob<"u"&&xb.call(Blob)==="[object BlobConstructor]",wk=typeof File=="function"||typeof File<"u"&&xb.call(File)==="[object FileConstructor]";function Od(e){return kk&&(e instanceof ArrayBuffer||Nk(e))||Ak&&e instanceof Blob||wk&&e instanceof File}function bs(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,i=e.length;n<i;n++)if(bs(e[n]))return!0;return!1}if(Od(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return bs(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&bs(e[n]))return!0;return!1}function jk(e){const t=[],n=e.data,i=e;return i.data=Ss(n,t),i.attachments=t.length,{packet:i,buffers:t}}function Ss(e,t,n){if(!e)return e;if(Od(e)){const i={_placeholder:!0,num:t.length};return t.push(e),i}else if(Array.isArray(e)){const i=new Array(e.length);for(let l=0;l<e.length;l++)i[l]=Ss(e[l],t);return i}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Ss(e.toJSON(),t,!0);const i={};for(const l in e)Object.prototype.hasOwnProperty.call(e,l)&&(i[l]=Ss(e[l],t));return i}return e}function _k(e,t){return e.data=$c(e.data,t),delete e.attachments,e}function $c(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]=$c(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=$c(e[n],t));return e}const Rk=["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 Ok{constructor(t){this.replacer=t}encode(t){return(t.type===ae.EVENT||t.type===ae.ACK)&&bs(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=jk(t),i=this.encodeAsString(n.packet),l=n.buffers;return l.unshift(i),l}}class Dd 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 Dk(n)):super.emitReserved("decoded",n)}else if(Od(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(!zk(s)||s<1)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(Dd.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 wm(n);case ae.DISCONNECT:return n===void 0;case ae.CONNECT_ERROR:return typeof n=="string"||wm(n);case ae.EVENT:case ae.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Rk.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 Dk{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=_k(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const zk=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function wm(e){return Object.prototype.toString.call(e)==="[object Object]"}const Lk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Dd,Encoder:Ok,get PacketType(){return ae}},Symbol.toStringTag,{value:"Module"}));function Wt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Mk=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vb 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(Mk.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 la(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}la.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?e+n:e-n}return Math.min(e,this.max)|0};la.prototype.reset=function(){this.attempts=0};la.prototype.setMin=function(e){this.ms=e};la.prototype.setMax=function(e){this.max=e};la.prototype.setJitter=function(e){this.jitter=e};class Wc 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,_o(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 la({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||Lk;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 yb(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){jo(()=>{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 vb(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 xa={};function Fa(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Tk(e,t.path||"/socket.io"),i=n.source,l=n.id,a=n.path,r=xa[l]&&a in xa[l].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||r;let u;return s?u=new Wc(i,t):(xa[l]||(xa[l]=new Wc(i,t)),u=xa[l]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(Fa,{Manager:Wc,Socket:vb,io:Fa,connect:Fa});const Bk=eb("/tasks"),bb=()=>{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=Fa(Bk,{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(g=>g.id===x.id)===-1?d([x,...E]):d(E.map(g=>g.id===x.id?x:g)))}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(g=>g.id===x.id)===-1?d([x,...E]):d(E.map(g=>g.id===x.id?x:g)))}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 Uk(){const{tasks:e,isConnected:t}=bb(),[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(sr,{}),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(FT,{task:c,onClick:()=>i(c)},c.id))]})]},s))}),l&&o.jsx(YT,{onClose:()=>a(!1)}),n&&o.jsx(ab,{task:n,onClose:()=>i(null),onUpdate:s=>i(s)})]})}function Ik(){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 Hk=[re.NOT_STARTED,re.IN_PROGRESS,re.FOR_REVIEW,re.DONE],Kr={[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 qk(){const{tasks:e,isConnected:t}=bb(),[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(Ik,{}),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:Kr[r].label}),o.jsx("p",{className:"matrix-status-sub",children:Kr[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(nb,{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:Hk.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:Kr[f].icon}),o.jsx("span",{className:"matrix-nav-label",children:Kr[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(ab,{task:n,onClose:()=>i(null),onUpdate:f=>i(f)}),l&&o.jsx(Fk,{onClose:()=>a(!1)})]})}function Fk({onClose:e}){const{toasts:t,showToast:n,removeToast:i}=ib(),[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,m]=b.useState(!1),g=async v=>{var C;if(v.preventDefault(),!l.trim()||!r.trim()){n("Name and description are required","error");return}m(!0);try{const w=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},...w.length>0&&{dependsOnIds:w}}),e()}catch(w){const N=((C=w==null?void 0:w.body)==null?void 0:C.detail)||(w==null?void 0:w.message)||"Failed to create task";n(N,"error")}finally{m(!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:g,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(wd,{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(lb,{message:v.message,type:v.type,onClose:()=>i(v.id)},v.id))]})})}function Sb(e,t){return t?e.id===t?!0:e.children?e.children.some(n=>Sb(n,t)):!1:!1}const Gk=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&&Sb(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 Vk({pages:e,currentPageId:t,onPageClick:n}){const i=$e(),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(Gk,{page:r,level:0,isActive:r.id===t,currentPageId:t,onPageClick:n,onAddChild:a},r.id))})}B.BASE=el;const Yk=eb("/context"),kr=()=>{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,m]=b.useState(null),[g,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)}},[]),w=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(A=>{const X=A.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=>{w(j)},[w]),I=b.useCallback(async(j,O)=>{f(!0),x(null);try{const A=await Kt.contextControllerUpdateBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:A.id,title:A.title,createdBy:A.createdBy,createdByActorId:A.createdByActorId,tags:A.tags,parentId:A.parentId,order:A.order,createdAt:A.createdAt,updatedAt:A.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to update page"),A}finally{f(!1)}},[n]),D=b.useCallback(async j=>{p(!0),x(null);try{await Kt.contextControllerDeleteBlock(j),t(O=>O.filter(A=>A.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 A=await Kt.contextControllerAppendToBlock(j,{content:O});return(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to append content"),A}finally{f(!1)}},[n]),M=b.useCallback(async(j,O)=>{x(null);try{const A=await Kt.contextControllerAddTagToBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:A.id,title:A.title,createdBy:A.createdBy,createdByActorId:A.createdByActorId,tags:A.tags,parentId:A.parentId,order:A.order,createdAt:A.createdAt,updatedAt:A.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to add tag"),A}},[n]),q=b.useCallback(async(j,O)=>{x(null);try{const A=await Kt.contextControllerRemoveTagFromBlock(j,O);return t(X=>X.map(S=>S.id===j?{id:A.id,title:A.title,createdBy:A.createdBy,createdByActorId:A.createdByActorId,tags:A.tags,parentId:A.parentId,order:A.order,createdAt:A.createdAt,updatedAt:A.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to remove tag"),A}},[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 A=await Kt.contextControllerReorderBlock(j,{newOrder:O});return t(X=>X.map(S=>S.id===j?{id:A.id,title:A.title,createdBy:A.createdBy,createdByActorId:A.createdByActorId,tags:A.tags,parentId:A.parentId,order:A.order,createdAt:A.createdAt,updatedAt:A.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to reorder page"),A}},[n]),V=b.useCallback(async(j,O)=>{x(null);try{const A=await Kt.contextControllerMoveBlock(j,{newParentId:O});return t(X=>X.map(S=>S.id===j?{id:A.id,title:A.title,createdBy:A.createdBy,createdByActorId:A.createdByActorId,tags:A.tags,parentId:A.parentId,order:A.order,createdAt:A.createdAt,updatedAt:A.updatedAt}:S)),(n==null?void 0:n.id)===j&&i(A),A}catch(A){throw x(A instanceof Error?A.message:"Failed to move page"),A}},[n]);return b.useEffect(()=>{const j=Fa(Yk,{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(A=>A.some(X=>X.id===O.id)?A:[{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},...A])}),j.on("page.updated",O=>{t(A=>A.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(A=>A.filter(X=>X.id!==O)),(n==null?void 0:n.id)===O&&i(null)}),m(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:g,socket:E,loadPages:C,createPage:N,selectPage:_,updatePage:I,appendToPage:T,deletePage:D,addTagToPage:M,removeTagFromPage:q,getPageTree:P,reorderPage:F,movePage:V}},jm="context-sidebar-collapsed";function Pk(){const{pageId:e}=Wi(),t=$e(),{getPageTree:n,isConnected:i,socket:l}=kr(),[a,r]=b.useState([]),[s,u]=b.useState(!1),[c,d]=b.useState(()=>{const y=localStorage.getItem(jm);return y!==null?y==="true":rr()});b.useEffect(()=>{localStorage.setItem(jm,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(Vk,{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(Sd,{})})]})}const Eb=({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 Xk(){const e=$e(),{pages:t,isLoadingList:n}=kr();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(Eb,{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 Qk=({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 $v.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(),w=f.filter(N=>N.name.toLowerCase().includes(C)&&!e.includes(N.name));r(w),u(!0)}else r([]),u(!1)},150);return()=>clearTimeout(v)},[i,e,f]),b.useEffect(()=>{const g=v=>{y.current&&!y.current.contains(v.target)&&u(!1)};return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[]);const x=g=>{var C;const v=g.trim();v&&!e.includes(v)&&t([...e,v]),l(""),r([]),u(!1),d(-1),(C=p.current)==null||C.focus()},E=g=>{t(e.filter(v=>v!==g))},m=g=>{g.key==="Tab"&&i.trim()||g.key==="Enter"&&i.trim()?(g.preventDefault(),c>=0&&a[c]?x(a[c].name):x(i)):g.key==="ArrowDown"?(g.preventDefault(),d(v=>v<a.length-1?v+1:v)):g.key==="ArrowUp"?(g.preventDefault(),d(v=>v>0?v-1:-1)):g.key==="Escape"?(u(!1),d(-1)):g.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 g;return(g=p.current)==null?void 0:g.focus()},children:[e.map(g=>{const v=f.find(w=>w.name===g),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:[g,o.jsx("button",{type:"button",onClick:w=>{w.stopPropagation(),E(g)},style:{background:"none",border:"none",color:"white",cursor:"pointer",padding:"0",marginLeft:"1px",fontSize:"0.85rem",lineHeight:"1"},children:"×"})]},g)}),o.jsx("input",{ref:p,type:"text",value:i,onChange:g=>l(g.target.value),onKeyDown:m,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((g,v)=>o.jsxs("div",{onClick:()=>x(g.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:g.color||"#6B7280"}}),o.jsx("span",{style:{fontSize:"0.875rem"},children:g.name})]},g.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 Zk(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const Kk=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Jk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$k={};function _m(e,t){return($k.jsx?Jk:Kk).test(e)}const Wk=/[ \t\n\f\r]/g;function eN(e){return typeof e=="object"?e.type==="text"?Rm(e.value):!1:Rm(e)}function Rm(e){return e.replace(Wk,"")===""}class Nr{constructor(t,n,i){this.normal=n,this.property=t,i&&(this.space=i)}}Nr.prototype.normal={};Nr.prototype.property={};Nr.prototype.space=void 0;function Cb(e,t){const n={},i={};for(const l of e)Object.assign(n,l.property),Object.assign(i,l.normal);return new Nr(n,i,t)}function ef(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 tN=0;const W=nl(),De=nl(),tf=nl(),H=nl(),ve=nl(),Ol=nl(),vt=nl();function nl(){return 2**++tN}const nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:W,booleanish:De,commaOrSpaceSeparated:vt,commaSeparated:Ol,number:H,overloadedBoolean:tf,spaceSeparated:ve},Symbol.toStringTag,{value:"Module"})),Ou=Object.keys(nf);class zd extends yt{constructor(t,n,i,l){let a=-1;if(super(t,n),Om(this,"space",l),typeof i=="number")for(;++a<Ou.length;){const r=Ou[a];Om(this,Ou[a],(i&nf[r])===nf[r])}}}zd.prototype.defined=!0;function Om(e,t,n){n&&(e[t]=n)}function aa(e){const t={},n={};for(const[i,l]of Object.entries(e.properties)){const a=new zd(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,n[ef(i)]=i,n[ef(a.attribute)]=i}return new Nr(t,n,e.space)}const Tb=aa({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 kb(e,t){return t in e?e[t]:t}function Nb(e,t){return kb(e,t.toLowerCase())}const nN=aa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ol,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|Ol,crossOrigin:null,data:null,dateTime:null,decoding:null,default:W,defer:W,dir:null,dirName:null,disabled:W,download:tf,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:tf,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:Nb}),iN=aa({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:Ol,g2:Ol,glyphName:Ol,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:kb}),Ab=aa({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()}}),wb=aa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nb}),jb=aa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),lN={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"},aN=/[A-Z]/g,Dm=/-[a-z]/g,rN=/^data[-\w.:]+$/i;function sN(e,t){const n=ef(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"&&rN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(Dm,uN);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!Dm.test(a)){let r=a.replace(aN,oN);r.charAt(0)!=="-"&&(r="-"+r),t="data"+r}}l=zd}return new l(i,t)}function oN(e){return"-"+e.toLowerCase()}function uN(e){return e.charAt(1).toUpperCase()}const cN=Cb([Tb,nN,Ab,wb,jb],"html"),Ld=Cb([Tb,iN,Ab,wb,jb],"svg");function fN(e){return e.join(" ").trim()}var Md={},zm=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,dN=/\n/g,hN=/^\s*/,pN=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,mN=/^:\s*/,gN=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,yN=/^[;\s]*/,xN=/^\s+|\s+$/g,vN=`
|
|
61
|
+
`,Lm="/",Mm="*",Di="",bN="comment",SN="declaration";function EN(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(dN);x&&(n+=x.length);var E=y.lastIndexOf(vN);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(hN)}function d(y){var x;for(y=y||[];x=f();)x!==!1&&y.push(x);return y}function f(){var y=a();if(!(Lm!=e.charAt(0)||Mm!=e.charAt(1))){for(var x=2;Di!=e.charAt(x)&&(Mm!=e.charAt(x)||Lm!=e.charAt(x+1));)++x;if(x+=2,Di===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:bN,comment:E})}}function h(){var y=a(),x=u(pN);if(x){if(f(),!u(mN))return s("property missing ':'");var E=u(gN),m=y({type:SN,property:Bm(x[0].replace(zm,Di)),value:E?Bm(E[0].replace(zm,Di)):Di});return u(yN),m}}function p(){var y=[];d(y);for(var x;x=h();)x!==!1&&(y.push(x),d(y));return y}return c(),p()}function Bm(e){return e?e.replace(xN,Di):Di}var CN=EN,TN=Ts&&Ts.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Md,"__esModule",{value:!0});Md.default=NN;const kN=TN(CN);function NN(e,t){let n=null;if(!e||typeof e!="string")return n;const i=(0,kN.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 Ro={};Object.defineProperty(Ro,"__esModule",{value:!0});Ro.camelCase=void 0;var AN=/^--[a-zA-Z0-9_-]+$/,wN=/-([a-z])/g,jN=/^[^-]+$/,_N=/^-(webkit|moz|ms|o|khtml)-/,RN=/^-(ms)-/,ON=function(e){return!e||jN.test(e)||AN.test(e)},DN=function(e,t){return t.toUpperCase()},Um=function(e,t){return"".concat(t,"-")},zN=function(e,t){return t===void 0&&(t={}),ON(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(RN,Um):e=e.replace(_N,Um),e.replace(wN,DN))};Ro.camelCase=zN;var LN=Ts&&Ts.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},MN=LN(Md),BN=Ro;function lf(e,t){var n={};return!e||typeof e!="string"||(0,MN.default)(e,function(i,l){i&&l&&(n[(0,BN.camelCase)(i,t)]=l)}),n}lf.default=lf;var UN=lf;const IN=wg(UN),_b=Rb("end"),Bd=Rb("start");function Rb(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 HN(e){const t=Bd(e),n=_b(e);if(t&&n)return{start:t,end:n}}function Ga(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Im(e.position):"start"in e||"end"in e?Im(e):"line"in e||"column"in e?af(e):""}function af(e){return Hm(e&&e.line)+":"+Hm(e&&e.column)}function Im(e){return af(e&&e.start)+"-"+af(e&&e.end)}function Hm(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=Ga(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 Ud={}.hasOwnProperty,qN=new Map,FN=/[A-Z]/g,GN=new Set(["table","tbody","thead","tfoot","tr"]),VN=new Set(["td","th"]),Ob="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function YN(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=WN(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=$N(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"?Ld:cN,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Db(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function Db(e,t,n){if(t.type==="element")return PN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return XN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ZN(e,t,n);if(t.type==="mdxjsEsm")return QN(e,t);if(t.type==="root")return KN(e,t,n);if(t.type==="text")return JN(e,t)}function PN(e,t,n){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=Ld,e.schema=l),e.ancestors.push(t);const a=Lb(e,t.tagName,!1),r=eA(e,t);let s=Hd(e,t);return GN.has(t.tagName)&&(s=s.filter(function(u){return typeof u=="string"?!eN(u):!0})),zb(e,r,a,t),Id(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function XN(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)}or(e,t.position)}function QN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);or(e,t.position)}function ZN(e,t,n){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=Ld,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:Lb(e,t.name,!0),r=tA(e,t),s=Hd(e,t);return zb(e,r,a,t),Id(r,s),e.ancestors.pop(),e.schema=i,e.create(t,a,r,n)}function KN(e,t,n){const i={};return Id(i,Hd(e,t)),e.create(t,e.Fragment,i,n)}function JN(e,t){return t.value}function zb(e,t,n,i){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=i)}function Id(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function $N(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 WN(e,t){return n;function n(i,l,a,r){const s=Array.isArray(a.children),u=Bd(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 eA(e,t){const n={};let i,l;for(l in t.properties)if(l!=="children"&&Ud.call(t.properties,l)){const a=nA(e,l,t.properties[l]);if(a){const[r,s]=a;e.tableCellAlignToStyle&&r==="align"&&typeof s=="string"&&VN.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 tA(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 or(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 or(e,t.position);else a=i.value===null?!0:i.value;n[l]=a}return n}function Hd(e,t){const n=[];let i=-1;const l=e.passKeys?new Map:qN;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=Db(e,a,r);s!==void 0&&n.push(s)}return n}function nA(e,t,n){const i=sN(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?Zk(n):fN(n)),i.property==="style"){let l=typeof n=="object"?n:iA(e,String(n));return e.stylePropertyNameCase==="css"&&(l=lA(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?lN[i.property]||i.property:i.attribute,n]}}function iA(e,t){try{return IN(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=Ob+"#cannot-parse-style-attribute",l}}function Lb(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=_m(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=_m(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return Ud.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);or(e)}function or(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=Ob+"#cannot-handle-mdx-estrees-without-createevaluater",n}function lA(e){const t={};let n;for(n in e)Ud.call(e,n)&&(t[aA(n)]=e[n]);return t}function aA(e){let t=e.replace(FN,rA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function rA(e){return"-"+e.toLowerCase()}const Du={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"]},sA={};function qd(e,t){const n=sA,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,l=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Mb(e,i,l)}function Mb(e,t,n){if(oA(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 qm(e.children,t,n)}return Array.isArray(e)?qm(e,t,n):""}function qm(e,t,n){const i=[];let l=-1;for(;++l<e.length;)i[l]=Mb(e[l],t,n);return i.join("")}function oA(e){return!!(e&&typeof e=="object")}const Fm=document.createElement("i");function Fd(e){const t="&"+e+";";Fm.innerHTML=t;const n=Fm.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function wt(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?(wt(e,e.length,0,t),e):t}const Gm={}.hasOwnProperty;function Bb(e){const t={};let n=-1;for(;++n<e.length;)uA(t,e[n]);return t}function uA(e,t){let n;for(n in t){const l=(Gm.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let r;if(a)for(r in a){Gm.call(l,r)||(l[r]=[]);const s=a[r];cA(l[r],Array.isArray(s)?s:s?[s]:[])}}}function cA(e,t){let n=-1;const i=[];for(;++n<t.length;)(t[n].add==="after"?e:i).push(t[n]);wt(e,0,0,i)}function Ub(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 nn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const it=Ci(/[A-Za-z]/),et=Ci(/[\dA-Za-z]/),fA=Ci(/[#-'*+\--9=?A-Z^-~]/);function to(e){return e!==null&&(e<32||e===127)}const rf=Ci(/\d/),dA=Ci(/[\dA-Fa-f]/),hA=Ci(/[!-/:-@[-`{-~]/);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 Oo=Ci(new RegExp("\\p{P}|\\p{S}","u")),Xi=Ci(/\s/);function Ci(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ra(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 pA={tokenize:mA};function mA(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 gA={tokenize:yA},Vm={tokenize:xA};function yA(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&&g();const C=t.events.length;let w=C,N;for(;w--;)if(t.events[w][0]==="exit"&&t.events[w][1].type==="chunkFlow"){N=t.events[w][1].end;break}m(i);let _=C;for(;_<t.events.length;)t.events[_][1].end={...N},_++;return wt(t.events,w+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(Vm,d,f)(v)}function d(v){return l&&g(),m(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(Vm,p,y)(v)}function p(v){return i++,n.push([t.currentConstruct,t.containerState]),h(v)}function y(v){if(v===null){l&&g(),m(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),m(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 w=t.sliceStream(v);if(C&&w.push(null),v.previous=a,a&&(a.next=v),a=v,l.defineSkip(v.start),l.write(w),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(m(i),N=_;N<t.events.length;)t.events[N][1].end={...T},N++;wt(t.events,I+1,0,t.events.slice(_)),t.events.length=N}}function m(v){let C=n.length;for(;C-- >v;){const w=n[C];t.containerState=w[1],w[0].exit.call(t,e)}n.length=v}function g(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function xA(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 Pl(e){if(e===null||xe(e)||Xi(e))return 1;if(Oo(e))return 2}function Do(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 sf={name:"attention",resolveAll:vA,tokenize:bA};function vA(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};Ym(f,-u),Ym(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,Do(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,wt(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 bA(e,t){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Pl(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=Pl(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 Ym(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const SA={name:"autolink",tokenize:EA};function EA(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||to(p)?n(p):(e.consume(p),u)}function c(p){return p===64?(e.consume(p),d):fA(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 Ar={partial:!0,tokenize:CA};function CA(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 Ib={continuation:{tokenize:kA},exit:NA,name:"blockQuote",tokenize:TA};function TA(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 kA(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(Ib,t,n)(r)}}function NA(e){e.exit("blockQuote")}const Hb={name:"characterEscape",tokenize:AA};function AA(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 hA(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const qb={name:"characterReference",tokenize:wA};function wA(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=dA,d):(e.enter("characterReferenceValue"),a=7,r=rf,d(f))}function d(f){if(f===59&&l){const h=e.exit("characterReferenceValue");return r===et&&!Fd(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 Pm={partial:!0,tokenize:_A},Xm={concrete:!0,name:"codeFenced",tokenize:jA};function jA(e,t,n){const i=this,l={partial:!0,tokenize:w};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(Pm,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"),m}function m(N){return a>0&&ne(N)?oe(e,g,"linePrefix",a+1)(N):g(N)}function g(N){return N===null||Q(N)?e.check(Pm,x,C)(N):(e.enter("codeFlowValue"),v(N))}function v(N){return N===null||Q(N)?(e.exit("codeFlowValue"),g(N)):(e.consume(N),v)}function C(N){return e.exit("codeFenced"),t(N)}function w(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 _A(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 zu={name:"codeIndented",tokenize:OA},RA={partial:!0,tokenize:DA};function OA(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(RA,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 DA(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 zA={name:"codeText",previous:MA,resolve:LA,tokenize:BA};function LA(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 MA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BA(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 UA{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&&va(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),va(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),va(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);va(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);va(this.left,n.reverse())}}}function va(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 Fb(e){const t={};let n=-1,i,l,a,r,s,u,c;const d=new UA(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,IA(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 wt(e,0,Number.POSITIVE_INFINITY,d.slice(0)),!c}function IA(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 m=s.slice(E[h],E[h+1]),g=a.pop();u.push([g,g+m.length-1]),e.splice(g,2,m)}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 HA={resolve:FA,tokenize:GA},qA={partial:!0,tokenize:VA};function FA(e){return Fb(e),e}function GA(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(qA,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 VA(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 Gb(e,t,n,i,l,a,r,s,u){const c=u||Number.POSITIVE_INFINITY;let d=0;return f;function f(m){return m===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(m),e.exit(a),h):m===null||m===32||m===41||to(m)?n(m):(e.enter(i),e.enter(r),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(m))}function h(m){return m===62?(e.enter(a),e.consume(m),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),p(m))}function p(m){return m===62?(e.exit("chunkString"),e.exit(s),h(m)):m===null||m===60||Q(m)?n(m):(e.consume(m),m===92?y:p)}function y(m){return m===60||m===62||m===92?(e.consume(m),p):p(m)}function x(m){return!d&&(m===null||m===41||xe(m))?(e.exit("chunkString"),e.exit(s),e.exit(r),e.exit(i),t(m)):d<c&&m===40?(e.consume(m),d++,x):m===41?(e.consume(m),d--,x):m===null||m===32||m===40||to(m)?n(m):(e.consume(m),m===92?E:x)}function E(m){return m===40||m===41||m===92?(e.consume(m),x):x(m)}}function Vb(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 Yb(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 Va(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 YA={name:"definition",tokenize:XA},PA={partial:!0,tokenize:QA};function XA(e,t,n){const i=this;let l;return a;function a(p){return e.enter("definition"),r(p)}function r(p){return Vb.call(i,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(p)}function s(p){return l=nn(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)?Va(e,c)(p):c(p)}function c(p){return Gb(e,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(p)}function d(p){return e.attempt(PA,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 QA(e,t,n){return i;function i(s){return xe(s)?Va(e,l)(s):n(s)}function l(s){return Yb(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 ZA={name:"hardBreakEscape",tokenize:KA};function KA(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 JA={name:"headingAtx",resolve:$A,tokenize:WA};function $A(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"},wt(e,i,n-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function WA(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 ew=["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"],Qm=["pre","script","style","textarea"],tw={concrete:!0,name:"htmlFlow",resolveTo:lw,tokenize:aw},nw={partial:!0,tokenize:sw},iw={partial:!0,tokenize:rw};function lw(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 aw(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&&Qm.includes(st)?(l=1,i.interrupt?t(k):q(k)):ew.includes(r.toLowerCase())?(l=6,_e?(e.consume(k),m):i.interrupt?t(k):q(k)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(k):a?g(k):v(k))}return k===45||et(k)?(e.consume(k),r+=String.fromCharCode(k),E):n(k)}function m(k){return k===62?(e.consume(k),i.interrupt?t:q):n(k)}function g(k){return ne(k)?(e.consume(k),g):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):w(k)}function w(k){return k===61?(e.consume(k),N):ne(k)?(e.consume(k),w):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)?w(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),Ae):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(nw,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="",A):q(k)}function A(k){if(k===62){const _e=r.toLowerCase();return Qm.includes(_e)?(e.consume(k),Ae):q(k)}return it(k)&&r.length<8?(e.consume(k),r+=String.fromCharCode(k),A):q(k)}function X(k){return k===93?(e.consume(k),S):q(k)}function S(k){return k===62?(e.consume(k),Ae):k===45&&l===2?(e.consume(k),S):q(k)}function Ae(k){return k===null||Q(k)?(e.exit("htmlFlowData"),We(k)):(e.consume(k),Ae)}function We(k){return e.exit("htmlFlow"),t(k)}}function rw(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 sw(e,t,n){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(Ar,t,n)}}const ow={name:"htmlText",tokenize:uw};function uw(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),w):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),g):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 Ae="CDATA[";return S===Ae.charCodeAt(a++)?(e.consume(S),a===Ae.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),m):x(S)}function m(S){return S===62?j(S):S===93?(e.consume(S),m):x(S)}function g(S){return S===null||S===62?j(S):Q(S)?(r=g,O(S)):(e.consume(S),g)}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 w(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"),A}function A(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 Gd={name:"labelEnd",resolveAll:hw,resolveTo:pw,tokenize:mw},cw={tokenize:gw},fw={tokenize:yw},dw={tokenize:xw};function hw(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&&wt(e,0,e.length,n),e}function pw(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,Do(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]]),wt(e,a,e.length,s),e}function mw(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(nn(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(cw,d,r?d:f)(h):h===91?e.attempt(fw,d,r?c:f)(h):r?d(h):f(h)}function c(h){return e.attempt(dw,d,f)(h)}function d(h){return t(h)}function f(h){return a._balanced=!0,n(h)}}function gw(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)?Va(e,a)(f):a(f)}function a(f){return f===41?d(f):Gb(e,r,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function r(f){return xe(f)?Va(e,u)(f):d(f)}function s(f){return n(f)}function u(f){return f===34||f===39||f===40?Yb(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):d(f)}function c(f){return xe(f)?Va(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 yw(e,t,n){const i=this;return l;function l(s){return Vb.call(i,e,a,r,"reference","referenceMarker","referenceString")(s)}function a(s){return i.parser.defined.includes(nn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function r(s){return n(s)}}function xw(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 vw={name:"labelStartImage",resolveAll:Gd.resolveAll,tokenize:bw};function bw(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 Sw={name:"labelStartLink",resolveAll:Gd.resolveAll,tokenize:Ew};function Ew(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 Lu={name:"lineEnding",tokenize:Cw};function Cw(e,t){return n;function n(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),oe(e,t,"linePrefix")}}const Es={name:"thematicBreak",tokenize:Tw};function Tw(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:ww},exit:_w,name:"list",tokenize:Aw},kw={partial:!0,tokenize:Rw},Nw={partial:!0,tokenize:jw};function Aw(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:rf(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(Es,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 rf(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(Ar,i.interrupt?n:d,e.attempt(kw,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 ww(e,t,n){const i=this;return i.containerState._closeFlow=void 0,e.check(Ar,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(Nw,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 jw(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 _w(e){e.exit(this.containerState.type)}function Rw(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:Ow,tokenize:Dw};function Ow(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 Dw(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 zw={tokenize:Lw};function Lw(e){const t=this,n=e.attempt(Ar,i,e.attempt(this.parser.constructs.flowInitial,l,oe(e,e.attempt(this.parser.constructs.flow,l,e.attempt(HA,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 Mw={resolveAll:Xb()},Bw=Pb("string"),Uw=Pb("text");function Pb(e){return{resolveAll:Xb(e==="text"?Iw: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 Xb(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 Iw(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 Hw={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:Ib},qw={91:YA},Fw={[-2]:zu,[-1]:zu,32:zu},Gw={35:JA,42:Es,45:[Zm,Es],60:tw,61:Zm,95:Es,96:Xm,126:Xm},Vw={38:qb,92:Hb},Yw={[-5]:Lu,[-4]:Lu,[-3]:Lu,33:vw,38:qb,42:sf,60:[SA,ow],91:Sw,92:[ZA,Hb],93:Gd,95:sf,96:zA},Pw={null:[sf,Mw]},Xw={null:[42,95]},Qw={null:[]},Zw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Xw,contentInitial:qw,disable:Qw,document:Hw,flow:Gw,flowInitial:Fw,insideSpan:Pw,string:Vw,text:Yw},Symbol.toStringTag,{value:"Module"}));function Kw(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:_(w),check:_(N),consume:g,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=Do(a,c.events,c),c.events)}function h(M,q){return $w(p(M),q)}function p(M){return Jw(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;)m(q.charCodeAt(i._bufferIndex));else m(q)}}function m(M){d=d(M)}function g(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 w(M,q){I(M,q.from)}function N(M,q){q.restore()}function _(M,q){return P;function P(F,V,j){let O,A,X,S;return Array.isArray(F)?We(F):"tokenize"in F?We([F]):Ae(F);function Ae(Ie){return Ti;function Ti(an){const Gn=an!==null&&Ie[an],Vn=an!==null&&Ie.null,ki=[...Array.isArray(Gn)?Gn:Gn?[Gn]:[],...Array.isArray(Vn)?Vn:Vn?[Vn]:[]];return We(ki)(an)}}function We(Ie){return O=Ie,A=0,Ie.length===0?j:k(Ie[A])}function k(Ie){return Ti;function Ti(an){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)(an)}}function _e(Ie){return M(X,S),V}function st(Ie){return S.restore(),++A<O.length?k(O[A]):j}}}function I(M,q){M.resolveAll&&!a.includes(M)&&a.push(M),M.resolve&&wt(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 Jw(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 $w(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
|
+
`;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 Ww(e){const i={constructs:Bb([Zw,...(e||{}).extensions||[]]),content:l(pA),defined:[],document:l(gA),flow:l(zw),lazy:{},string:l(Bw),text:l(Uw)};return i;function l(a){return r;function r(s){return Kw(i,a,s)}}}function ej(e){for(;!Fb(e););return e}const Km=/[\0\t\n\r]/g;function tj(){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(Km.lastIndex=f,c=Km.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 nj=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function ij(e){return e.replace(nj,lj)}function lj(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const l=n.charCodeAt(1),a=l===120||l===88;return Ub(n.slice(a?2:1),a?16:10)}return Fd(n)||e}const Qb={}.hasOwnProperty;function aj(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),rj(n)(ej(Ww(n).document().write(tj()(e,t,!0))))}function rj(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ot),autolinkProtocol:D,autolinkEmail:D,atxHeading:a(jr),blockQuote:a(Vn),characterEscape:D,characterReference:D,codeFenced:a(ki),codeFencedFenceInfo:r,codeFencedFenceMeta:r,codeIndented:a(ki,r),codeText:a(Bo,r),codeTextData:D,data:D,codeFlowValue:D,definition:a(Uo),definitionDestinationString:r,definitionLabelString:r,definitionTitleString:r,emphasis:a(Io),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(OS),listItemValue:h,listOrdered:a(rn,f),listUnordered:a(rn),paragraph:a(DS),reference:k,referenceString:r,resourceDestinationString:r,resourceTitleString:r,setextHeading:a(jr),strong:a(zS),thematicBreak:a(MS)},exit:{atxHeading:u(),atxHeadingSequence:w,autolink:u(),autolinkEmail:Gn,autolinkProtocol:an,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:st,characterReferenceMarkerNumeric:st,characterReferenceValue:Ie,characterReference:Ti,codeFenced:u(E),codeFencedFence:x,codeFencedFenceInfo:p,codeFencedFenceMeta:y,codeFlowValue:T,codeIndented:u(m),codeText:u(V),codeTextData:T,data:T,definition:u(),definitionDestinationString:C,definitionLabelString:g,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:A,lineEnding:M,link:u(j),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:_e,resourceDestinationString:S,resourceTitleString:Ae,resource:We,setextHeading:u(I),setextHeadingLineSequence:_,setextHeadingText:N,strong:u(),thematicBreak:u()}};Zb(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]];Qb.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]||Jm).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,Ni,bn,sa,oa;for(;++le<=K;){const xt=z[le];switch(xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{xt[0]==="enter"?ge++:ge--,oa=void 0;break}case"lineEndingBlank":{xt[0]==="enter"&&(Ni&&!oa&&!ge&&!sa&&(sa=le),oa=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oa=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(Ni){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}sa&&(!bn||sa<bn)&&(Ni._spread=!0),Ni.end=Object.assign({},bn?z[bn][1].start:xt[1].end),z.splice(bn||le,0,["exit",Ni,xt[2]]),le++,K++}if(xt[1].type==="listItemPrefix"){const il={type:"listItem",_spread:!1,start:Object.assign({},xt[1].start),end:void 0};Ni=il,z.splice(le,0,["enter",il,xt[2]]),le++,K++,sa=void 0,oa=!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]||Jm).call(this,z,le[0]));else throw new Error("Cannot close `"+z.type+"` ("+Ga({start:z.start,end:z.end})+"): it’s not open");K.position.end=Xn(z.end)}function d(){return qd(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 m(){const z=this.resume(),Y=this.stack[this.stack.length-1];Y.value=z.replace(/(\r?\n|\r)$/g,"")}function g(z){const Y=this.resume(),K=this.stack[this.stack.length-1];K.label=Y,K.identifier=nn(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 w(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=LS(),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 A(z){const Y=this.sliceSerialize(z),K=this.stack[this.stack.length-2];K.label=ij(Y),K.identifier=nn(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 Ae(){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=nn(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=Ub(Y,K==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):le=Fd(Y);const ge=this.stack[this.stack.length-1];ge.value+=le}function Ti(z){const Y=this.stack.pop();Y.position.end=Xn(z.end)}function an(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 ki(){return{type:"code",lang:null,meta:null,value:""}}function Bo(){return{type:"inlineCode",value:""}}function Uo(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Io(){return{type:"emphasis",children:[]}}function jr(){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 rn(z){return{type:"list",ordered:z.type==="listOrdered",start:null,spread:z._spread,children:[]}}function OS(z){return{type:"listItem",spread:z._spread,checked:null,children:[]}}function DS(){return{type:"paragraph",children:[]}}function zS(){return{type:"strong",children:[]}}function LS(){return{type:"text",value:""}}function MS(){return{type:"thematicBreak"}}}function Xn(e){return{line:e.line,column:e.column,offset:e.offset}}function Zb(e,t){let n=-1;for(;++n<t.length;){const i=t[n];Array.isArray(i)?Zb(e,i):sj(e,i)}}function sj(e,t){let n;for(n in t)if(Qb.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 Jm(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ga({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ga({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ga({start:t.start,end:t.end})+") is still open")}function oj(e){const t=this;t.parser=n;function n(i){return aj(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uj(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 cj(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
64
|
+
`}]}function fj(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 dj(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function hj(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pj(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=ra(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 mj(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 gj(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Kb(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 yj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Kb(e,t);const l={src:ra(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 xj(e,t){const n={src:ra(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 vj(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 bj(e,t){const n=String(t.identifier).toUpperCase(),i=e.definitionById.get(n);if(!i)return Kb(e,t);const l={href:ra(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 Sj(e,t){const n={href:ra(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 Ej(e,t,n){const i=e.all(t),l=n?Cj(n):Jb(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
|
+
`}),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 Cj(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=Jb(n[i])}return t}function Jb(e){const t=e.spread;return t??e.children.length>1}function Tj(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 kj(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Nj(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function Aj(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function wj(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=Bd(t.children[1]),u=_b(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 jj(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 _j(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $m=9,Wm=32;function Rj(e){const t=String(e),n=/\r?\n|\r/g;let i=n.exec(t),l=0;const a=[];for(;i;)a.push(eg(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=n.exec(t);return a.push(eg(t.slice(l),l>0,!1)),a.join("")}function eg(e,t,n){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===$m||a===Wm;)i++,a=e.codePointAt(i)}if(n){let a=e.codePointAt(l-1);for(;a===$m||a===Wm;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function Oj(e,t){const n={type:"text",value:Rj(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function Dj(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const zj={blockquote:uj,break:cj,code:fj,delete:dj,emphasis:hj,footnoteReference:pj,heading:mj,html:gj,imageReference:yj,image:xj,inlineCode:vj,linkReference:bj,link:Sj,listItem:Ej,list:Tj,paragraph:kj,root:Nj,strong:Aj,table:wj,tableCell:_j,tableRow:jj,text:Oj,thematicBreak:Dj,toml:Jr,yaml:Jr,definition:Jr,footnoteDefinition:Jr};function Jr(){}const $b=-1,zo=0,Ya=1,no=2,Vd=3,Yd=4,Pd=5,Xd=6,Wb=7,eS=8,tg=typeof self=="object"?self:globalThis,Lj=(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 zo:case $b:return n(r,l);case Ya:{const s=n([],l);for(const u of r)s.push(i(u));return s}case no:{const s=n({},l);for(const[u,c]of r)s[i(u)]=i(c);return s}case Vd:return n(new Date(r),l);case Yd:{const{source:s,flags:u}=r;return n(new RegExp(s,u),l)}case Pd:{const s=n(new Map,l);for(const[u,c]of r)s.set(i(u),i(c));return s}case Xd:{const s=n(new Set,l);for(const u of r)s.add(i(u));return s}case Wb:{const{name:s,message:u}=r;return n(new tg[s](u),l)}case eS: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 tg[a](r),l)};return i},ng=e=>Lj(new Map,e)(0),sl="",{toString:Mj}={},{keys:Bj}=Object,ba=e=>{const t=typeof e;if(t!=="object"||!e)return[zo,t];const n=Mj.call(e).slice(8,-1);switch(n){case"Array":return[Ya,sl];case"Object":return[no,sl];case"Date":return[Vd,sl];case"RegExp":return[Yd,sl];case"Map":return[Pd,sl];case"Set":return[Xd,sl];case"DataView":return[Ya,n]}return n.includes("Array")?[Ya,n]:n.includes("Error")?[Wb,n]:[no,n]},$r=([e,t])=>e===zo&&(t==="function"||t==="symbol"),Uj=(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]=ba(r);switch(s){case zo:{let d=r;switch(u){case"bigint":s=eS,d=r.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+u);d=null;break;case"undefined":return l([$b],r)}return l([s,d],r)}case Ya:{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 no:{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 Bj(r))(e||!$r(ba(r[h])))&&d.push([a(h),a(r[h])]);return f}case Vd:return l([s,r.toISOString()],r);case Yd:{const{source:d,flags:f}=r;return l([s,{source:d,flags:f}],r)}case Pd:{const d=[],f=l([s,d],r);for(const[h,p]of r)(e||!($r(ba(h))||$r(ba(p))))&&d.push([a(h),a(p)]);return f}case Xd:{const d=[],f=l([s,d],r);for(const h of r)(e||!$r(ba(h)))&&d.push(a(h));return f}}const{message:c}=r;return l([s,{name:u,message:c}],r)};return a},ig=(e,{json:t,lossy:n}={})=>{const i=[];return Uj(!(t||n),!!t,new Map,i)(e),i},io=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ng(ig(e,t)):structuredClone(e):(e,t)=>ng(ig(e,t));function Ij(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 Hj(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qj(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Ij,i=e.options.footnoteBackLabel||Hj,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=ra(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 g=typeof n=="string"?n:n(u,p);typeof g=="string"&&(g={type:"text",value:g}),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(g)?g:[g]})}const E=d[d.length-1];if(E&&E.type==="element"&&E.tagName==="p"){const g=E.children[E.children.length-1];g&&g.type==="text"?g.value+=" ":E.children.push({type:"text",value:" "}),E.children.push(...y)}else d.push(...y);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+h},children:e.wrap(d,!0)};e.patch(c,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...io(r),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
|
|
68
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
|
|
69
|
+
`}]}}const Lo=function(e){if(e==null)return Yj;if(typeof e=="function")return Mo(e);if(typeof e=="object")return Array.isArray(e)?Fj(e):Gj(e);if(typeof e=="string")return Vj(e);throw new Error("Expected function, string, or object as test")};function Fj(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Lo(e[n]);return Mo(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function Gj(e){const t=e;return Mo(n);function n(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function Vj(e){return Mo(t);function t(n){return n&&n.type===e}}function Mo(e){return t;function t(n,i,l){return!!(Pj(n)&&e.call(this,n,typeof i=="number"?i:void 0,l||void 0))}}function Yj(){return!0}function Pj(e){return e!==null&&typeof e=="object"&&"type"in e}const tS=[],Xj=!0,of=!1,Qj="skip";function nS(e,t,n,i){let l;typeof t=="function"&&typeof n!="function"?(i=n,n=t):l=t;const a=Lo(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=tS,y,x,E;if((!t||a(u,c,d[d.length-1]||void 0))&&(p=Zj(n(u,d)),p[0]===of))return p;if("children"in u&&u.children){const m=u;if(m.children&&p[0]!==Qj)for(x=(i?m.children.length:-1)+r,E=d.concat(m);x>-1&&x<m.children.length;){const g=m.children[x];if(y=s(g,x,E)(),y[0]===of)return y;x=typeof y[1]=="number"?y[1]:x+r}}return p}}}function Zj(e){return Array.isArray(e)?e:typeof e=="number"?[Xj,e]:e==null?tS:[e]}function Qd(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),nS(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 uf={}.hasOwnProperty,Kj={};function Jj(e,t){const n=t||Kj,i=new Map,l=new Map,a=new Map,r={...zj,...n.handlers},s={all:c,applyData:Wj,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:r,one:u,options:n,patch:$j,wrap:t_};return Qd(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(uf.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,m=io(E);return m.children=s.all(d),m}return io(d)}return(s.options.unknownHandler||e_)(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=lg(y.value)),!Array.isArray(y)&&y.type==="element")){const x=y.children[0];x&&x.type==="text"&&(x.value=lg(x.value))}Array.isArray(y)?f.push(...y):f.push(y)}}}return f}}function $j(e,t){e.position&&(t.position=HN(e))}function Wj(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,io(a)),"children"in n&&n.children&&l!==null&&l!==void 0&&(n.children=l)}return n}function e_(e,t){const n=t.data||{},i="value"in t&&!(uf.call(n,"hProperties")||uf.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 t_(e,t){const n=[];let i=-1;for(t&&n.push({type:"text",value:`
|
|
70
|
+
`});++i<e.length;)i&&n.push({type:"text",value:`
|
|
71
|
+
`}),n.push(e[i]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
72
|
+
`}),n}function lg(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function ag(e,t){const n=Jj(e,t),i=n.one(e,void 0),l=qj(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 n_(e,t){return e&&"run"in e?async function(n,i){const l=ag(n,{file:i,...t});await e.run(l,i)}:function(n,i){return ag(n,{file:i,...e||t})}}function rg(e){if(e)throw e}var Cs=Object.prototype.hasOwnProperty,iS=Object.prototype.toString,sg=Object.defineProperty,og=Object.getOwnPropertyDescriptor,ug=function(t){return typeof Array.isArray=="function"?Array.isArray(t):iS.call(t)==="[object Array]"},cg=function(t){if(!t||iS.call(t)!=="[object Object]")return!1;var n=Cs.call(t,"constructor"),i=t.constructor&&t.constructor.prototype&&Cs.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!i)return!1;var l;for(l in t);return typeof l>"u"||Cs.call(t,l)},fg=function(t,n){sg&&n.name==="__proto__"?sg(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},dg=function(t,n){if(n==="__proto__")if(Cs.call(t,n)){if(og)return og(t,n).value}else return;return t[n]},i_=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=dg(s,n),l=dg(t,n),s!==l&&(d&&l&&(cg(l)||(a=ug(l)))?(a?(a=!1,r=i&&ug(i)?i:[]):r=i&&cg(i)?i:{},fg(s,{name:n,newValue:e(d,r,l)})):typeof l<"u"&&fg(s,{name:n,newValue:l}));return s};const Mu=wg(i_);function cf(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 l_(){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?a_(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 a_(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 on={basename:r_,dirname:s_,extname:o_,join:u_,sep:"/"};function r_(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 s_(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 o_(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 u_(...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?".":c_(n)}function c_(e){wr(e);const t=e.codePointAt(0)===47;let n=f_(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function f_(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 d_={cwd:h_};function h_(){return"/"}function ff(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function p_(e){if(typeof e=="string")e=new URL(e);else if(!ff(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 m_(e)}function m_(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 Bu=["history","path","basename","stem","extname","dirname"];class lS{constructor(t){let n;t?ff(t)?n={path:t}:typeof t=="string"||g_(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":d_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Bu.length;){const a=Bu[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)Bu.includes(l)||(this[l]=n[l])}get basename(){return typeof this.path=="string"?on.basename(this.path):void 0}set basename(t){Iu(t,"basename"),Uu(t,"basename"),this.path=on.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?on.dirname(this.path):void 0}set dirname(t){hg(this.basename,"dirname"),this.path=on.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?on.extname(this.path):void 0}set extname(t){if(Uu(t,"extname"),hg(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=on.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){ff(t)&&(t=p_(t)),Iu(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?on.basename(this.path,this.extname):void 0}set stem(t){Iu(t,"stem"),Uu(t,"stem"),this.path=on.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 Uu(e,t){if(e&&e.includes(on.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+on.sep+"`")}function Iu(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function hg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function g_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const y_=function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a},x_={}.hasOwnProperty;class Zd extends y_{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=l_()}copy(){const t=new Zd;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];t.use(...i)}return t.data(Mu(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Fu("data",this.frozen),this.namespace[t]=n,this):x_.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Fu("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=Wr(t),i=this.parser||this.Parser;return Hu("parse",i),i(String(n),n)}process(t,n){const i=this;return this.freeze(),Hu("process",this.parser||this.Parser),qu("process",this.compiler||this.Compiler),n?l(void 0,n):new Promise(l);function l(a,r){const s=Wr(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);S_(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(),Hu("processSync",this.parser||this.Parser),qu("processSync",this.compiler||this.Compiler),this.process(t,l),mg("processSync","process",n),i;function l(a,r){n=!0,rg(a),i=r}}run(t,n,i){pg(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=Wr(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),mg("runSync","run",i),l;function a(r,s){rg(r),l=s,i=!0}}stringify(t,n){this.freeze();const i=Wr(n),l=this.compiler||this.Compiler;return qu("stringify",l),pg(t),l(t,i)}use(t,...n){const i=this.attachers,l=this.namespace;if(Fu("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=Mu(!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];cf(x)&&cf(p)&&(p=Mu(!0,x,p)),i[h]=[c,p,...y]}}}}const v_=new Zd().freeze();function Hu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qu(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Fu(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 pg(e){if(!cf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function mg(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wr(e){return b_(e)?e:new lS(e)}function b_(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function S_(e){return typeof e=="string"||E_(e)}function E_(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",gg=[],yg={allowDangerousHtml:!0},T_=/^(https?|ircs?|mailto|xmpp)$/i,k_=[{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 N_(e){const t=A_(e),n=w_(e);return j_(t.runSync(t.parse(n),n),e)}function A_(e){const t=e.rehypePlugins||gg,n=e.remarkPlugins||gg,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...yg}:yg;return v_().use(oj).use(n).use(n_,i).use(t)}function w_(e){const t=e.children||"",n=new lS;return typeof t=="string"&&(n.value=t),n}function j_(e,t){const n=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,r=t.skipHtml,s=t.unwrapDisallowed,u=t.urlTransform||__;for(const d of k_)Object.hasOwn(t,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+C_+d.id,void 0);return t.className&&(e={type:"element",tagName:"div",properties:{className:t.className},children:e.type==="root"?e.children:[e]}),Qd(e,c),YN(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 Du)if(Object.hasOwn(Du,p)&&Object.hasOwn(d.properties,p)){const y=d.properties[p],x=Du[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 __(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||T_.test(e.slice(0,t))?e:""}function xg(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 R_(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function aS(e,t,n){const l=Lo((n||{}).ignore||[]),a=O_(t);let r=-1;for(;++r<a.length;)nS(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 m=!1,g=[];h.lastIndex=0;let v=h.exec(c.value);for(;v;){const C=v.index,w={index:v.index,input:v.input,stack:[...d,c]};let N=p(...v,w);if(typeof N=="string"&&(N=N.length>0?{type:"text",value:N}:void 0),N===!1?h.lastIndex=C+1:(y!==C&&g.push({type:"text",value:c.value.slice(y,C)}),Array.isArray(N)?g.push(...N):N&&g.push(N),y=C+v[0].length,m=!0),!h.global)break;v=h.exec(c.value)}return m?(y<c.value.length&&g.push({type:"text",value:c.value.slice(y)}),f.children.splice(E,1,...g)):g=[c],E+g.length}}function O_(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([D_(l[0]),z_(l[1])])}return t}function D_(e){return typeof e=="string"?new RegExp(R_(e),"g"):e}function z_(e){return typeof e=="function"?e:function(){return e}}const Gu="phrasing",Vu=["autolink","link","image","label"];function L_(){return{transforms:[F_],enter:{literalAutolink:B_,literalAutolinkEmail:Yu,literalAutolinkHttp:Yu,literalAutolinkWww:Yu},exit:{literalAutolink:q_,literalAutolinkEmail:H_,literalAutolinkHttp:U_,literalAutolinkWww:I_}}}function M_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Gu,notInConstruct:Vu},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Gu,notInConstruct:Vu},{character:":",before:"[ps]",after:"\\/",inConstruct:Gu,notInConstruct:Vu}]}}function B_(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Yu(e){this.config.enter.autolinkProtocol.call(this,e)}function U_(e){this.config.exit.autolinkProtocol.call(this,e)}function I_(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 H_(e){this.config.exit.autolinkEmail.call(this,e)}function q_(e){this.exit(e)}function F_(e){aS(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,G_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),V_]],{ignore:["link","linkReference"]})}function G_(e,t,n,i,l){let a="";if(!rS(l)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!Y_(n)))return!1;const r=P_(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 V_(e,t,n,i){return!rS(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y_(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 P_(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=xg(e,"(");let a=xg(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 rS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xi(n)||Oo(n))&&(!t||n!==47)}sS.peek=tR;function X_(){this.buffer()}function Q_(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Z_(){this.buffer()}function K_(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function J_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function $_(e){this.exit(e)}function W_(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=nn(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eR(e){this.exit(e)}function tR(){return"["}function sS(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 nR(){return{enter:{gfmFootnoteCallString:X_,gfmFootnoteCall:Q_,gfmFootnoteDefinitionLabelString:Z_,gfmFootnoteDefinition:K_},exit:{gfmFootnoteCallString:J_,gfmFootnoteCall:$_,gfmFootnoteDefinitionLabelString:W_,gfmFootnoteDefinition:eR}}}function iR(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:sS},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?oS:lR))),c(),u}}function lR(e,t,n){return t===0?e:oS(e,t,n)}function oS(e,t,n){return(n?"":" ")+e}const aR=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];uS.peek=cR;function rR(){return{canContainEols:["delete"],enter:{strikethrough:oR},exit:{strikethrough:uR}}}function sR(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:aR}],handlers:{delete:uS}}}function oR(e){this.enter({type:"delete",children:[]},e)}function uR(e){this.exit(e)}function uS(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 cR(){return"~"}function fR(e){return e.length}function dR(e,t){const n=t||{},i=(n.align||[]).concat(),l=n.stringLength||fR,a=[],r=[],s=[],u=[];let c=0,d=-1;for(;++d<e.length;){const x=[],E=[];let m=-1;for(e[d].length>c&&(c=e[d].length);++m<e[d].length;){const g=hR(e[d][m]);if(n.alignDelimiters!==!1){const v=l(g);E[m]=v,(u[m]===void 0||v>u[m])&&(u[m]=v)}x.push(g)}r[d]=x,s[d]=E}let f=-1;if(typeof i=="object"&&"length"in i)for(;++f<c;)a[f]=vg(i[f]);else{const x=vg(i);for(;++f<c;)a[f]=x}f=-1;const h=[],p=[];for(;++f<c;){const x=a[f];let E="",m="";x===99?(E=":",m=":"):x===108?E=":":x===114&&(m=":");let g=n.alignDelimiters===!1?1:Math.max(1,u[f]-E.length-m.length);const v=E+"-".repeat(g)+m;n.alignDelimiters!==!1&&(g=E.length+g+m.length,g>u[f]&&(u[f]=g),p[f]=g),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 m=[];for(;++f<c;){const g=x[f]||"";let v="",C="";if(n.alignDelimiters!==!1){const w=u[f]-(E[f]||0),N=a[f];N===114?v=" ".repeat(w):N===99?w%2?(v=" ".repeat(w/2+.5),C=" ".repeat(w/2-.5)):(v=" ".repeat(w/2),C=v):C=" ".repeat(w)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&g==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(v),m.push(g),n.alignDelimiters!==!1&&m.push(C),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&m.push("|")}y.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return y.join(`
|
|
75
|
+
`)}function hR(e){return e==null?"":String(e)}function vg(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 pR(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()),mR);return l(),r}function mR(e,t,n){return">"+(n?"":" ")+e}function gR(e,t){return bg(e,t.inConstruct,!0)&&!bg(e,t.notInConstruct,!1)}function bg(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 Sg(e,t,n,i){let l=-1;for(;++l<n.unsafe.length;)if(n.unsafe[l].character===`
|
|
76
|
+
`&&gR(n.stack,n.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
|
|
77
|
+
`}function yR(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 xR(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 vR(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 bR(e,t,n,i){const l=vR(n),a=e.value||"",r=l==="`"?"GraveAccent":"Tilde";if(xR(e,n)){const f=n.enter("codeIndented"),h=n.indentLines(a,SR);return f(),h}const s=n.createTracker(i),u=l.repeat(Math.max(yR(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
|
+
`,encode:["`"],...s.current()})),f()}return d+=s.move(`
|
|
79
|
+
`),a&&(d+=s.move(a+`
|
|
80
|
+
`)),d+=s.move(u),c(),d}function SR(e,t,n){return(n?"":" ")+e}function Kd(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 ER(e,t,n,i){const l=Kd(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 CR(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 ur(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lo(e,t,n){const i=Pl(e),l=Pl(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}}cS.peek=TR;function cS(e,t,n,i){const l=CR(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=lo(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=ur(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=lo(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+ur(f));const p=r.move(l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function TR(e,t,n){return n.options.emphasis||"*"}function kR(e,t){let n=!1;return Qd(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,of}),!!((!e.depth||e.depth<3)&&qd(e)&&(t.options.setext||n))}function NR(e,t,n,i){const l=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(i);if(kR(e,n)){const d=n.enter("headingSetext"),f=n.enter("phrasing"),h=n.containerPhrasing(e,{...a.current(),before:`
|
|
82
|
+
`,after:`
|
|
83
|
+
`});return f(),d(),h+`
|
|
84
|
+
`+(l===1?"=":"-").repeat(h.length-(Math.max(h.lastIndexOf("\r"),h.lastIndexOf(`
|
|
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=ur(c.charCodeAt(0))+c.slice(1)),c=c?r+" "+c:r,n.options.closeAtx&&(c+=" "+r),u(),s(),c}fS.peek=AR;function fS(e){return e.value||""}function AR(){return"<"}dS.peek=wR;function dS(e,t,n,i){const l=Kd(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 wR(){return"!"}hS.peek=jR;function hS(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 jR(){return"!"}pS.peek=_R;function pS(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 _R(){return"`"}function mS(e,t){const n=qd(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))}gS.peek=RR;function gS(e,t,n,i){const l=Kd(n),a=l==='"'?"Quote":"Apostrophe",r=n.createTracker(i);let s,u;if(mS(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 RR(e,t,n){return mS(e,n)?"<":"["}yS.peek=OR;function yS(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 OR(){return"["}function Jd(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 DR(e){const t=Jd(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 zR(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 xS(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 LR(e,t,n,i){const l=n.enter("list"),a=n.bulletCurrent;let r=e.ordered?zR(n):Jd(n);const s=e.ordered?r==="."?")":".":DR(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),xS(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 MR(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 BR(e,t,n,i){const l=MR(n);let a=n.bulletCurrent||Jd(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 UR(e,t,n,i){const l=n.enter("paragraph"),a=n.enter("phrasing"),r=n.containerPhrasing(e,i);return a(),l(),r}const IR=Lo(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function HR(e,t,n,i){return(e.children.some(function(r){return IR(r)})?n.containerPhrasing:n.containerFlow).call(n,e,i)}function qR(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}vS.peek=FR;function vS(e,t,n,i){const l=qR(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=lo(i.before.charCodeAt(i.before.length-1),c,l);d.inside&&(u=ur(c)+u.slice(1));const f=u.charCodeAt(u.length-1),h=lo(i.after.charCodeAt(0),f,l);h.inside&&(u=u.slice(0,-1)+ur(f));const p=r.move(l+l);return a(),n.attentionEncodeSurroundingInfo={after:h.outside,before:d.outside},s+u+p}function FR(e,t,n){return n.options.strong||"*"}function GR(e,t,n,i){return n.safe(e.value,i)}function VR(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 YR(e,t,n){const i=(xS(n)+(n.options.ruleSpaces?" ":"")).repeat(VR(n));return n.options.ruleSpaces?i.slice(0,-1):i}const bS={blockquote:pR,break:Sg,code:bR,definition:ER,emphasis:cS,hardBreak:Sg,heading:NR,html:fS,image:dS,imageReference:hS,inlineCode:pS,link:gS,linkReference:yS,list:LR,listItem:BR,paragraph:UR,root:HR,strong:vS,text:GR,thematicBreak:YR};function PR(){return{enter:{table:XR,tableData:Eg,tableHeader:Eg,tableRow:ZR},exit:{codeText:KR,table:QR,tableData:Pu,tableHeader:Pu,tableRow:Pu}}}function XR(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 QR(e){this.exit(e),this.data.inTable=void 0}function ZR(e){this.enter({type:"tableRow",children:[]},e)}function Pu(e){this.exit(e)}function Eg(e){this.enter({type:"tableCell",children:[]},e)}function KR(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JR));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function JR(e,t){return t==="|"?t:e}function $R(e){const t=e||{},n=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
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 m=f(p,x,E),g=c([m]);return g.slice(0,g.indexOf(`
|
|
88
|
+
`))}function u(p,y,x,E){const m=x.enter("tableCell"),g=x.enter("phrasing"),v=x.containerPhrasing(p,{...E,before:a,after:a});return g(),m(),v}function c(p,y){return dR(p,{align:y,alignDelimiters:i,padding:n,stringLength:l})}function d(p,y,x){const E=p.children;let m=-1;const g=[],v=y.enter("table");for(;++m<E.length;)g[m]=f(E[m],y,x);return v(),g}function f(p,y,x){const E=p.children;let m=-1;const g=[],v=y.enter("tableRow");for(;++m<E.length;)g[m]=u(E[m],p,y,x);return v(),g}function h(p,y,x){let E=bS.inlineCode(p,y,x);return x.stack.includes("tableCell")&&(E=E.replace(/\|/g,"\\$&")),E}}function WR(){return{exit:{taskListCheckValueChecked:Cg,taskListCheckValueUnchecked:Cg,paragraph:t2}}}function e2(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:n2}}}function Cg(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function t2(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 n2(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=bS.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[L_(),nR(),rR(),PR(),WR()]}function l2(e){return{extensions:[M_(),iR(e),sR(),$R(e),e2()]}}const a2={tokenize:f2,partial:!0},SS={tokenize:d2,partial:!0},ES={tokenize:h2,partial:!0},CS={tokenize:p2,partial:!0},r2={tokenize:m2,partial:!0},TS={name:"wwwAutolink",tokenize:u2,previous:NS},kS={name:"protocolAutolink",tokenize:c2,previous:AS},Fn={name:"emailAutolink",tokenize:o2,previous:wS},vn={};function s2(){return{text:vn}}let wi=48;for(;wi<123;)vn[wi]=Fn,wi++,wi===58?wi=65:wi===91&&(wi=97);vn[43]=Fn;vn[45]=Fn;vn[46]=Fn;vn[95]=Fn;vn[72]=[Fn,kS];vn[104]=[Fn,kS];vn[87]=[Fn,TS];vn[119]=[Fn,TS];function o2(e,t,n){const i=this;let l,a;return r;function r(f){return!df(f)||!wS.call(i,i.previous)||$d(i.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),s(f))}function s(f){return df(f)?(e.consume(f),s):f===64?(e.consume(f),u):n(f)}function u(f){return f===46?e.check(r2,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 u2(e,t,n){const i=this;return l;function l(r){return r!==87&&r!==119||!NS.call(i,i.previous)||$d(i.events)?n(r):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(a2,e.attempt(SS,e.attempt(ES,a),n),n)(r))}function a(r){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(r)}}function c2(e,t,n){const i=this;let l="",a=!1;return r;function r(f){return(f===72||f===104)&&AS.call(i,i.previous)&&!$d(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||to(f)||xe(f)||Xi(f)||Oo(f)?n(f):e.attempt(SS,e.attempt(ES,d),n)(f)}function d(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function f2(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 d2(e,t,n){let i,l,a;return r;function r(c){return c===46||c===95?e.check(CS,u,s)(c):c===null||xe(c)||Xi(c)||c!==45&&Oo(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 h2(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(CS,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 p2(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 m2(e,t,n){return i;function i(a){return e.consume(a),l}function l(a){return et(a)?n(a):t(a)}}function NS(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xe(e)}function AS(e){return!it(e)}function wS(e){return!(e===47||df(e))}function df(e){return e===43||e===45||e===46||e===95||et(e)}function $d(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 g2={tokenize:T2,partial:!0};function y2(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:S2,continuation:{tokenize:E2},exit:C2}},text:{91:{name:"gfmFootnoteCall",tokenize:b2},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:x2,resolveTo:v2}}}}function x2(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=nn(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 v2(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 b2(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(nn(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 S2(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=nn(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 E2(e,t,n){return e.check(Ar,t,e.attempt(g2,t,n))}function C2(e){e.exit("gfmFootnoteDefinition")}function T2(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 k2(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&&wt(h,h.length,0,Do(p,r.slice(c+1,u),s)),wt(h,h.length,0,[["exit",f,s],["enter",r[u][1],s],["exit",r[u][1],s],["exit",d,s]]),wt(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=Pl(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"),m=Pl(y);return E._open=!m||m===2&&!!x,E._close=!x||x===2&&!!m,s(y)}}}class N2{constructor(){this.map=[]}add(t,n,i){A2(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 A2(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 w2(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 j2(){return{flow:{null:{name:"table",tokenize:_2,resolveAll:R2}}}}function _2(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):w(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"),m):T===45?(a+=1,m(T)):T===null||Q(T)?C(T):w(T)}function m(T){return T===45?(e.enter("tableDelimiterFiller"),g(T)):w(T)}function g(T){return T===45?(e.consume(T),g):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?w(T):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(T)):w(T)}function w(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 R2(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 N2;for(;++n<e.length;){const p=e[n],y=p[1];p[0]==="enter"?y.type==="tableHead"?(s=!1,u!==0&&(Tg(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=es(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=es(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=es(h,t,a,l,n,f)):r[1]!==0&&(f=es(h,t,r,l,n,f)),l=0):l&&(y.type==="data"||y.type==="tableDelimiterMarker"||y.type==="tableDelimiterFiller")&&(r[3]=n)}for(u!==0&&Tg(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=w2(t.events,n))}return e}function es(e,t,n,i,l,a){const r=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",s="tableContent";n[0]!==0&&(a.end=Object.assign({},dl(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const u=dl(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=dl(t.events,n[2]),d=dl(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({},dl(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function Tg(e,t,n,i,l){const a=[],r=dl(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 dl(e,t){const n=e[t],i=n[0]==="enter"?"start":"end";return n[1][i]}const O2={name:"tasklistCheck",tokenize:z2};function D2(){return{text:{91:O2}}}function z2(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:L2},t,n)(u):n(u)}}function L2(e,t,n){return oe(e,i,"whitespace");function i(l){return l===null?n(l):t(l)}}function M2(e){return Bb([s2(),y2(),k2(e),j2(),D2()])}const B2={};function U2(e){const t=this,n=e||B2,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),r=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(M2(n)),a.push(i2()),r.push(l2(n))}function I2(e){aS(e,[/\r?\n|\r/g,H2])}function H2(){return{type:"break"}}function q2(){return function(e){I2(e)}}function jS({content:e}){return o.jsx("div",{className:"context-markdownXXX",children:o.jsx(N_,{remarkPlugins:[U2,q2],children:e.replace(/\\n/g,`
|
|
89
|
+
`)})})}function F2({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 G2=[{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
|
+
| --- | --- |
|
|
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
|
+
---
|
|
93
|
+
`},description:"Horizontal divider"},{id:"link",label:"/link",trigger:"link",markdown:{before:"[",after:"](url)"},description:"Insert link"}];function V2(e,t){return{id:e.id,label:e.label,description:e.description,action:()=>t(e.markdown.before,e.markdown.after)}}function Y2(e){return G2.map(t=>V2(t,e))}function P2({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=Y2((y,x="")=>{if(!l.current)return;const E=l.current,m=a.startPosition,g=E.selectionEnd,v=e.substring(0,m),C=e.substring(g),w=v+y+x+C;t(w),r({...a,active:!1}),setTimeout(()=>{const N=m+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,m=e.substring(0,E);if(E===0||m[E-1].match(/\s/)){const g=x.getBoundingClientRect(),v=24,C=m.split(`
|
|
94
|
+
`).length;r({active:!0,query:"",position:{x:g.left+16,y:g.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,m=x.substring(a.startPosition+1,E);r({...a,query:m,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(F2,{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(jS,{content:e}):o.jsx("div",{className:"rich-editor-empty",children:"Nothing to preview yet"})})]})]})})}function X2(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 _S({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(""),m=b.useMemo(()=>{if(e==="create")return n;{const C=X2(t.id,n);return n.filter(w=>!C.has(w.id))}},[e,n,t]);b.useEffect(()=>{const C=w=>{w.key==="Escape"&&l()};return document.addEventListener("keydown",C),()=>{document.removeEventListener("keydown",C)}},[l]);const g=async C=>{var w,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=((w=t.tags)==null?void 0:w.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:g,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)"}),m.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(P2,{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(Qk,{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 kg(){const e=$e(),{pageId:t}=Wi(),{pages:n,isCreating:i,createPage:l,getPageTree:a}=kr(),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(_S,{mode:"create",pages:n,onSubmit:r,onCancel:()=>e("/context"),isSubmitting:i,defaultParentId:t})]})}function Wd({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 Q2(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 Z2({pageId:e,pages:t}){const n=Q2(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 Ng(e){try{return new Date(e).toLocaleString()}catch{return e}}function K2(){const{pageId:e}=Wi(),t=$e(),{pages:n,selectedPage:i,isLoadingPage:l,isUpdating:a,isDeleting:r,error:s,selectPage:u,deletePage:c,getPageTree:d}=kr(),[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 m;if(e)try{await c(e),h(!1),await d(),t("/context")}catch(g){const v=((m=g==null?void 0:g.body)==null?void 0:m.detail)||(g==null?void 0:g.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(Z2,{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 ",Ng(i.createdAt)]}),o.jsx("span",{children:"•"}),o.jsxs("span",{children:["Last edited ",Ng(i.updatedAt)]})]})]}),i.tags&&i.tags.length>0&&o.jsx("div",{className:"context-page-detail-tags",children:i.tags.map(m=>o.jsx(Eb,{tag:m},m.name))}),o.jsx("div",{className:"context-page-detail-content",children:o.jsx(jS,{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(Wd,{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 J2(){const{pageId:e}=Wi(),t=$e(),{selectedPage:n,pages:i,isUpdating:l,updatePage:a,getPageTree:r,selectPage:s}=kr();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(_S,{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 RS=()=>{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??Xc.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 $2(){tl("Tools");const{servers:e,isLoading:t,error:n,createServer:i}=RS(),l=$e(),[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(sr,{}),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 W2=()=>{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=Wv(),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(),m=new URL(`${E}/mcp/${h}/${p}`);a(m);const g=new URL(`${m.origin}/.well-known/oauth-authorization-server${m.pathname}`);s(g),await f(g)}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 eO(){const{serverId:e}=Wi(),t=$e(),{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}=RS(),{metadata:m,authorizationServerMetadataUrl:g,loadMetadata:v}=W2(),[C,w]=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:""}),[A,X]=b.useState({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""}),[S,Ae]=b.useState({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]});tl(n?`${n.name} - Tools`:"Tools"),b.useEffect(()=>{e&&(u(e),OT.authJourneysControllerGetAuthJourneys(e).then(w).catch(()=>w([])))},[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,A),_(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"))},Ti=async R=>{if(R.preventDefault(),!!T)try{const G={};A.friendlyName&&(G.friendlyName=A.friendlyName),A.providedId&&(G.providedId=A.providedId),A.clientId&&(G.clientId=A.clientId),A.clientSecret&&(G.clientSecret=A.clientSecret),A.authorizeUrl&&(G.authorizeUrl=A.authorizeUrl),A.tokenUrl&&(G.tokenUrl=A.tokenUrl),await h(T,G),_(null),M(null),X({clientId:"",clientSecret:"",authorizeUrl:"",tokenUrl:"",friendlyName:"",providedId:""})}catch(G){console.error("Failed to update connection",G)}},an=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),Ae({scopeId:"",mappings:[{connectionId:"",downstreamScope:""}]})}catch(G){console.error("Failed to create mapping",G)}},Gn=()=>{const R=S.mappings[S.mappings.length-1];Ae({...S,mappings:[...S.mappings,{connectionId:R.connectionId,downstreamScope:""}]})},Vn=R=>{S.mappings.length!==1&&Ae({...S,mappings:S.mappings.filter((G,He)=>He!==R)})},ki=(R,G,He)=>{const Ot=[...S.mappings];Ot[R]={...Ot[R],[G]:He},Ae({...S,mappings:Ot})},Bo=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)}}})},Uo=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)}}})},Io=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)}}})},jr=b.useMemo(()=>{const R={};return a.forEach(G=>{const He=i.find(rn=>rn.id===G.scopeId),Ot=l.find(rn=>rn.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(sr,{})})]}),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"})]})]})]}),m?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:g==null?void 0:g.toString()}),o.jsx("pre",{className:"metadata-json",children:JSON.stringify(m,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:()=>Bo(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:()=>Uo(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(jr).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(rn=>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:rn.downstreamScope})]}),o.jsx("button",{onClick:()=>Io(rn.id),className:"btn-delete-small",title:"Delete mapping",children:"Delete"})]},rn.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===sn.status.AUTHORIZATION_CODE_EXCHANGED?"#d4edda":R.status===sn.status.MCP_AUTH_FLOW_STARTED?"#cfe2ff":R.status===sn.status.CONNECTIONS_FLOW_STARTED?"#fff3cd":R.status===sn.status.USER_CONSENT_REJECTED?"#f8d7da":"#e2e3e5",color:R.status===sn.status.AUTHORIZATION_CODE_EXCHANGED?"#155724":R.status===sn.status.MCP_AUTH_FLOW_STARTED?"#084298":R.status===sn.status.CONNECTIONS_FLOW_STARTED?"#664d03":R.status===sn.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===qa.status.AUTHORIZATION_CODE_EXCHANGED?"#28a745":R.mcpAuthorizationFlow.status===qa.status.CLIENT_REGISTERED?"#007bff":R.mcpAuthorizationFlow.status===qa.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:A.friendlyName,onChange:R=>X({...A,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:A.providedId,onChange:R=>X({...A,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:A.clientId,onChange:R=>X({...A,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:A.clientSecret,onChange:R=>X({...A,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:A.authorizeUrl,onChange:R=>X({...A,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:A.tokenUrl,onChange:R=>X({...A,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:Ti,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:A.friendlyName,onChange:R=>X({...A,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:A.providedId,onChange:R=>X({...A,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:A.clientId,onChange:R=>X({...A,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:A.clientSecret,onChange:R=>X({...A,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:A.authorizeUrl,onChange:R=>X({...A,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:A.tokenUrl,onChange:R=>X({...A,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:an,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=>Ae({...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=>ki(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=>ki(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(Wd,{message:I.message,onConfirm:I.onConfirm,onCancel:()=>D(null)})]}):o.jsx("div",{className:"error-message",children:"Server not found"})}B.BASE=el;function tO(){tl("Authorization Consent - taico");const[e]=hT(),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 DT.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??"",m=document.createElement("form");m.method="POST",m.action=`${E}/api/v1/auth/authorize/mcp/${n.server.providedId}/0.0.0`,Object.entries(x).forEach(([g,v])=>{const C=document.createElement("input");C.type="hidden",C.name=g,C.value=String(v),m.appendChild(C)}),document.body.appendChild(m),m.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(sr,{})]})})}):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(sr,{})]})]})})}const Ag="agents-sidebar-collapsed";function nO(){const{agentId:e,sessionId:t}=Wi(),n=$e(),[i,l]=b.useState(()=>{const u=localStorage.getItem(Ag);return u!==null?u==="true":rr()});b.useEffect(()=>{localStorage.setItem(Ag,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(Sd,{})})]})}B.BASE=el;const eh=()=>{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 wu.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 wu.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 wu.agentsControllerCreateAgent(f);return await u(),h}catch(h){return i(h instanceof Error?h.message:"Failed to create agent"),null}finally{t(!1)}}}};function iO(){const e=$e(),{agents:t,isLoading:n,error:i}=eh();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 lO(){const{agents:e,isLoading:t,error:n,createAgent:i}=eh(),l=$e(),[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 aO(){var y;const{agentId:e}=Wi(),t=$e(),{selectedAgent:n,isLoading:i,error:l,loadAgentDetails:a}=eh(),[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(Wd,{message:u.message,onConfirm:u.onConfirm,onCancel:()=>c(null)})]})):o.jsx("div",{className:"error-message",children:"Agent not found"})}function rO(){const{logout:e}=Ad(),t=$e();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 sO(){return IT()?o.jsx(qk,{}):o.jsx(Uk,{})}function oO(){return o.jsx(uT,{basename:vT,children:o.jsx(zT,{children:o.jsxs(UC,{children:[o.jsx(qe,{path:"/login",element:o.jsx(MT,{})}),o.jsx(qe,{path:"/logout",element:o.jsx(rO,{})}),o.jsxs(qe,{element:o.jsx(LT,{children:o.jsx(HT,{})}),children:[o.jsx(qe,{index:!0,element:o.jsx(qT,{})}),o.jsx(qe,{path:"tasks",element:o.jsx(sO,{})}),o.jsx(qe,{path:"mcp-registry",element:o.jsx($2,{})}),o.jsx(qe,{path:"mcp-registry/:serverId",element:o.jsx(eO,{})}),o.jsx(qe,{path:"consent",element:o.jsx(tO,{})}),o.jsxs(qe,{path:"context",element:o.jsx(Pk,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(Xk,{})}),o.jsx(qe,{path:"new",element:o.jsx(kg,{})}),o.jsx(qe,{path:"page/:pageId",element:o.jsx(K2,{})}),o.jsx(qe,{path:"page/:pageId/edit",element:o.jsx(J2,{})}),o.jsx(qe,{path:"page/:pageId/new",element:o.jsx(kg,{})})]}),o.jsxs(qe,{path:"agents",element:o.jsx(nO,{}),children:[o.jsx(qe,{index:!0,element:o.jsx(iO,{})}),o.jsx(qe,{path:"admin",element:o.jsx(lO,{})}),o.jsx(qe,{path:":agentId/admin",element:o.jsx(aO,{})})]})]})]})})})}LE.createRoot(document.getElementById("root")).render(o.jsx(b.StrictMode,{children:o.jsx("div",{className:"app-shell",children:o.jsx(oO,{})})}));
|