agent-dealer 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function Ay(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ic={exports:{}},hr={};/**
1
+ (function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const f of o.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&r(f)}).observe(document,{childList:!0,subtree:!0});function i(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(s){if(s.ep)return;s.ep=!0;const o=i(s);fetch(s.href,o)}})();function jy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Yc={exports:{}},hr={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var dg;function j1(){if(dg)return hr;dg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,s,o){var f=null;if(o!==void 0&&(f=""+o),s.key!==void 0&&(f=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:f,ref:s!==void 0?s:null,props:o}}return hr.Fragment=l,hr.jsx=i,hr.jsxs=i,hr}var hg;function A1(){return hg||(hg=1,Ic.exports=j1()),Ic.exports}var g=A1(),Zc={exports:{}},De={};/**
9
+ */var dg;function A1(){if(dg)return hr;dg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function i(r,s,o){var f=null;if(o!==void 0&&(f=""+o),s.key!==void 0&&(f=""+s.key),"key"in s){o={};for(var h in s)h!=="key"&&(o[h]=s[h])}else o=s;return s=o.ref,{$$typeof:t,type:r,key:f,ref:s!==void 0?s:null,props:o}}return hr.Fragment=l,hr.jsx=i,hr.jsxs=i,hr}var hg;function j1(){return hg||(hg=1,Yc.exports=A1()),Yc.exports}var g=j1(),Zc={exports:{}},De={};/**
10
10
  * @license React
11
11
  * react.production.js
12
12
  *
@@ -14,7 +14,7 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var mg;function N1(){if(mg)return De;mg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function v(j){return j===null||typeof j!="object"?null:(j=k&&j[k]||j["@@iterator"],typeof j=="function"?j:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,H={};function N(j,F,S){this.props=j,this.context=F,this.refs=H,this.updater=S||_}N.prototype.isReactComponent={},N.prototype.setState=function(j,F){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,F,"setState")},N.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function Z(){}Z.prototype=N.prototype;function q(j,F,S){this.props=j,this.context=F,this.refs=H,this.updater=S||_}var te=q.prototype=new Z;te.constructor=q,R(te,N.prototype),te.isPureReactComponent=!0;var ee=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function me(j,F,S){var ue=S.ref;return{$$typeof:t,type:j,key:F,ref:ue!==void 0?ue:null,props:S}}function M(j,F){return me(j.type,F,j.props)}function I(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function $(j){var F={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(S){return F[S]})}var xe=/\/+/g;function re(j,F){return typeof j=="object"&&j!==null&&j.key!=null?$(""+j.key):F.toString(36)}function W(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(O,O):(j.status="pending",j.then(function(F){j.status==="pending"&&(j.status="fulfilled",j.value=F)},function(F){j.status==="pending"&&(j.status="rejected",j.reason=F)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function T(j,F,S,ue,ce){var ge=typeof j;(ge==="undefined"||ge==="boolean")&&(j=null);var je=!1;if(j===null)je=!0;else switch(ge){case"bigint":case"string":case"number":je=!0;break;case"object":switch(j.$$typeof){case t:case l:je=!0;break;case x:return je=j._init,T(je(j._payload),F,S,ue,ce)}}if(je)return ce=ce(j),je=ue===""?"."+re(j,0):ue,ee(ce)?(S="",je!=null&&(S=je.replace(xe,"$&/")+"/"),T(ce,F,S,"",function(ft){return ft})):ce!=null&&(I(ce)&&(ce=M(ce,S+(ce.key==null||j&&j.key===ce.key?"":(""+ce.key).replace(xe,"$&/")+"/")+je)),F.push(ce)),1;je=0;var pe=ue===""?".":ue+":";if(ee(j))for(var Te=0;Te<j.length;Te++)ue=j[Te],ge=pe+re(ue,Te),je+=T(ue,F,S,ge,ce);else if(Te=v(j),typeof Te=="function")for(j=Te.call(j),Te=0;!(ue=j.next()).done;)ue=ue.value,ge=pe+re(ue,Te++),je+=T(ue,F,S,ge,ce);else if(ge==="object"){if(typeof j.then=="function")return T(W(j),F,S,ue,ce);throw F=String(j),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return je}function J(j,F,S){if(j==null)return j;var ue=[],ce=0;return T(j,ue,"","",function(ge){return F.call(S,ge,ce++)}),ue}function ae(j){if(j._status===-1){var F=j._result;F=F(),F.then(function(S){(j._status===0||j._status===-1)&&(j._status=1,j._result=S)},function(S){(j._status===0||j._status===-1)&&(j._status=2,j._result=S)}),j._status===-1&&(j._status=0,j._result=F)}if(j._status===1)return j._result.default;throw j._result}var Se=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},E={map:J,forEach:function(j,F,S){J(j,function(){F.apply(this,arguments)},S)},count:function(j){var F=0;return J(j,function(){F++}),F},toArray:function(j){return J(j,function(F){return F})||[]},only:function(j){if(!I(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return De.Activity=y,De.Children=E,De.Component=N,De.Fragment=i,De.Profiler=s,De.PureComponent=q,De.StrictMode=r,De.Suspense=p,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,De.__COMPILER_RUNTIME={__proto__:null,c:function(j){return P.H.useMemoCache(j)}},De.cache=function(j){return function(){return j.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(j,F,S){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ue=R({},j.props),ce=j.key;if(F!=null)for(ge in F.key!==void 0&&(ce=""+F.key),F)!se.call(F,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&F.ref===void 0||(ue[ge]=F[ge]);var ge=arguments.length-2;if(ge===1)ue.children=S;else if(1<ge){for(var je=Array(ge),pe=0;pe<ge;pe++)je[pe]=arguments[pe+2];ue.children=je}return me(j.type,ce,ue)},De.createContext=function(j){return j={$$typeof:f,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:o,_context:j},j},De.createElement=function(j,F,S){var ue,ce={},ge=null;if(F!=null)for(ue in F.key!==void 0&&(ge=""+F.key),F)se.call(F,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(ce[ue]=F[ue]);var je=arguments.length-2;if(je===1)ce.children=S;else if(1<je){for(var pe=Array(je),Te=0;Te<je;Te++)pe[Te]=arguments[Te+2];ce.children=pe}if(j&&j.defaultProps)for(ue in je=j.defaultProps,je)ce[ue]===void 0&&(ce[ue]=je[ue]);return me(j,ge,ce)},De.createRef=function(){return{current:null}},De.forwardRef=function(j){return{$$typeof:h,render:j}},De.isValidElement=I,De.lazy=function(j){return{$$typeof:x,_payload:{_status:-1,_result:j},_init:ae}},De.memo=function(j,F){return{$$typeof:m,type:j,compare:F===void 0?null:F}},De.startTransition=function(j){var F=P.T,S={};P.T=S;try{var ue=j(),ce=P.S;ce!==null&&ce(S,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(O,Se)}catch(ge){Se(ge)}finally{F!==null&&S.types!==null&&(F.types=S.types),P.T=F}},De.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},De.use=function(j){return P.H.use(j)},De.useActionState=function(j,F,S){return P.H.useActionState(j,F,S)},De.useCallback=function(j,F){return P.H.useCallback(j,F)},De.useContext=function(j){return P.H.useContext(j)},De.useDebugValue=function(){},De.useDeferredValue=function(j,F){return P.H.useDeferredValue(j,F)},De.useEffect=function(j,F){return P.H.useEffect(j,F)},De.useEffectEvent=function(j){return P.H.useEffectEvent(j)},De.useId=function(){return P.H.useId()},De.useImperativeHandle=function(j,F,S){return P.H.useImperativeHandle(j,F,S)},De.useInsertionEffect=function(j,F){return P.H.useInsertionEffect(j,F)},De.useLayoutEffect=function(j,F){return P.H.useLayoutEffect(j,F)},De.useMemo=function(j,F){return P.H.useMemo(j,F)},De.useOptimistic=function(j,F){return P.H.useOptimistic(j,F)},De.useReducer=function(j,F,S){return P.H.useReducer(j,F,S)},De.useRef=function(j){return P.H.useRef(j)},De.useState=function(j){return P.H.useState(j)},De.useSyncExternalStore=function(j,F,S){return P.H.useSyncExternalStore(j,F,S)},De.useTransition=function(){return P.H.useTransition()},De.version="19.2.7",De}var pg;function Hf(){return pg||(pg=1,Zc.exports=N1()),Zc.exports}var V=Hf(),Fc={exports:{}},mr={},Qc={exports:{}},Gc={};/**
17
+ */var mg;function N1(){if(mg)return De;mg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),k=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=k&&A[k]||A["@@iterator"],typeof A=="function"?A:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},R=Object.assign,H={};function N(A,F,S){this.props=A,this.context=F,this.refs=H,this.updater=S||_}N.prototype.isReactComponent={},N.prototype.setState=function(A,F){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,F,"setState")},N.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function Z(){}Z.prototype=N.prototype;function q(A,F,S){this.props=A,this.context=F,this.refs=H,this.updater=S||_}var te=q.prototype=new Z;te.constructor=q,R(te,N.prototype),te.isPureReactComponent=!0;var ee=Array.isArray;function O(){}var P={H:null,A:null,T:null,S:null},se=Object.prototype.hasOwnProperty;function me(A,F,S){var ue=S.ref;return{$$typeof:t,type:A,key:F,ref:ue!==void 0?ue:null,props:S}}function M(A,F){return me(A.type,F,A.props)}function Y(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function $(A){var F={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(S){return F[S]})}var xe=/\/+/g;function re(A,F){return typeof A=="object"&&A!==null&&A.key!=null?$(""+A.key):F.toString(36)}function W(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(O,O):(A.status="pending",A.then(function(F){A.status==="pending"&&(A.status="fulfilled",A.value=F)},function(F){A.status==="pending"&&(A.status="rejected",A.reason=F)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function T(A,F,S,ue,ce){var ge=typeof A;(ge==="undefined"||ge==="boolean")&&(A=null);var Ae=!1;if(A===null)Ae=!0;else switch(ge){case"bigint":case"string":case"number":Ae=!0;break;case"object":switch(A.$$typeof){case t:case l:Ae=!0;break;case x:return Ae=A._init,T(Ae(A._payload),F,S,ue,ce)}}if(Ae)return ce=ce(A),Ae=ue===""?"."+re(A,0):ue,ee(ce)?(S="",Ae!=null&&(S=Ae.replace(xe,"$&/")+"/"),T(ce,F,S,"",function(ft){return ft})):ce!=null&&(Y(ce)&&(ce=M(ce,S+(ce.key==null||A&&A.key===ce.key?"":(""+ce.key).replace(xe,"$&/")+"/")+Ae)),F.push(ce)),1;Ae=0;var pe=ue===""?".":ue+":";if(ee(A))for(var Te=0;Te<A.length;Te++)ue=A[Te],ge=pe+re(ue,Te),Ae+=T(ue,F,S,ge,ce);else if(Te=v(A),typeof Te=="function")for(A=Te.call(A),Te=0;!(ue=A.next()).done;)ue=ue.value,ge=pe+re(ue,Te++),Ae+=T(ue,F,S,ge,ce);else if(ge==="object"){if(typeof A.then=="function")return T(W(A),F,S,ue,ce);throw F=String(A),Error("Objects are not valid as a React child (found: "+(F==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":F)+"). If you meant to render a collection of children, use an array instead.")}return Ae}function J(A,F,S){if(A==null)return A;var ue=[],ce=0;return T(A,ue,"","",function(ge){return F.call(S,ge,ce++)}),ue}function ae(A){if(A._status===-1){var F=A._result;F=F(),F.then(function(S){(A._status===0||A._status===-1)&&(A._status=1,A._result=S)},function(S){(A._status===0||A._status===-1)&&(A._status=2,A._result=S)}),A._status===-1&&(A._status=0,A._result=F)}if(A._status===1)return A._result.default;throw A._result}var Se=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var F=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(F))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:J,forEach:function(A,F,S){J(A,function(){F.apply(this,arguments)},S)},count:function(A){var F=0;return J(A,function(){F++}),F},toArray:function(A){return J(A,function(F){return F})||[]},only:function(A){if(!Y(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return De.Activity=y,De.Children=E,De.Component=N,De.Fragment=i,De.Profiler=s,De.PureComponent=q,De.StrictMode=r,De.Suspense=p,De.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,De.__COMPILER_RUNTIME={__proto__:null,c:function(A){return P.H.useMemoCache(A)}},De.cache=function(A){return function(){return A.apply(null,arguments)}},De.cacheSignal=function(){return null},De.cloneElement=function(A,F,S){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var ue=R({},A.props),ce=A.key;if(F!=null)for(ge in F.key!==void 0&&(ce=""+F.key),F)!se.call(F,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&F.ref===void 0||(ue[ge]=F[ge]);var ge=arguments.length-2;if(ge===1)ue.children=S;else if(1<ge){for(var Ae=Array(ge),pe=0;pe<ge;pe++)Ae[pe]=arguments[pe+2];ue.children=Ae}return me(A.type,ce,ue)},De.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:o,_context:A},A},De.createElement=function(A,F,S){var ue,ce={},ge=null;if(F!=null)for(ue in F.key!==void 0&&(ge=""+F.key),F)se.call(F,ue)&&ue!=="key"&&ue!=="__self"&&ue!=="__source"&&(ce[ue]=F[ue]);var Ae=arguments.length-2;if(Ae===1)ce.children=S;else if(1<Ae){for(var pe=Array(Ae),Te=0;Te<Ae;Te++)pe[Te]=arguments[Te+2];ce.children=pe}if(A&&A.defaultProps)for(ue in Ae=A.defaultProps,Ae)ce[ue]===void 0&&(ce[ue]=Ae[ue]);return me(A,ge,ce)},De.createRef=function(){return{current:null}},De.forwardRef=function(A){return{$$typeof:h,render:A}},De.isValidElement=Y,De.lazy=function(A){return{$$typeof:x,_payload:{_status:-1,_result:A},_init:ae}},De.memo=function(A,F){return{$$typeof:m,type:A,compare:F===void 0?null:F}},De.startTransition=function(A){var F=P.T,S={};P.T=S;try{var ue=A(),ce=P.S;ce!==null&&ce(S,ue),typeof ue=="object"&&ue!==null&&typeof ue.then=="function"&&ue.then(O,Se)}catch(ge){Se(ge)}finally{F!==null&&S.types!==null&&(F.types=S.types),P.T=F}},De.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},De.use=function(A){return P.H.use(A)},De.useActionState=function(A,F,S){return P.H.useActionState(A,F,S)},De.useCallback=function(A,F){return P.H.useCallback(A,F)},De.useContext=function(A){return P.H.useContext(A)},De.useDebugValue=function(){},De.useDeferredValue=function(A,F){return P.H.useDeferredValue(A,F)},De.useEffect=function(A,F){return P.H.useEffect(A,F)},De.useEffectEvent=function(A){return P.H.useEffectEvent(A)},De.useId=function(){return P.H.useId()},De.useImperativeHandle=function(A,F,S){return P.H.useImperativeHandle(A,F,S)},De.useInsertionEffect=function(A,F){return P.H.useInsertionEffect(A,F)},De.useLayoutEffect=function(A,F){return P.H.useLayoutEffect(A,F)},De.useMemo=function(A,F){return P.H.useMemo(A,F)},De.useOptimistic=function(A,F){return P.H.useOptimistic(A,F)},De.useReducer=function(A,F,S){return P.H.useReducer(A,F,S)},De.useRef=function(A){return P.H.useRef(A)},De.useState=function(A){return P.H.useState(A)},De.useSyncExternalStore=function(A,F,S){return P.H.useSyncExternalStore(A,F,S)},De.useTransition=function(){return P.H.useTransition()},De.version="19.2.7",De}var pg;function Hf(){return pg||(pg=1,Zc.exports=N1()),Zc.exports}var V=Hf(),Fc={exports:{}},mr={},Qc={exports:{}},Gc={};/**
18
18
  * @license React
19
19
  * scheduler.production.js
20
20
  *
@@ -22,7 +22,7 @@
22
22
  *
23
23
  * This source code is licensed under the MIT license found in the
24
24
  * LICENSE file in the root directory of this source tree.
25
- */var gg;function T1(){return gg||(gg=1,(function(t){function l(T,J){var ae=T.length;T.push(J);e:for(;0<ae;){var Se=ae-1>>>1,E=T[Se];if(0<s(E,J))T[Se]=J,T[ae]=E,ae=Se;else break e}}function i(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var J=T[0],ae=T.pop();if(ae!==J){T[0]=ae;e:for(var Se=0,E=T.length,j=E>>>1;Se<j;){var F=2*(Se+1)-1,S=T[F],ue=F+1,ce=T[ue];if(0>s(S,ae))ue<E&&0>s(ce,S)?(T[Se]=ce,T[ue]=ae,Se=ue):(T[Se]=S,T[F]=ae,Se=F);else if(ue<E&&0>s(ce,ae))T[Se]=ce,T[ue]=ae,Se=ue;else break e}}return J}function s(T,J){var ae=T.sortIndex-J.sortIndex;return ae!==0?ae:T.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],x=1,y=null,k=3,v=!1,_=!1,R=!1,H=!1,N=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function te(T){for(var J=i(m);J!==null;){if(J.callback===null)r(m);else if(J.startTime<=T)r(m),J.sortIndex=J.expirationTime,l(p,J);else break;J=i(m)}}function ee(T){if(R=!1,te(T),!_)if(i(p)!==null)_=!0,O||(O=!0,$());else{var J=i(m);J!==null&&W(ee,J.startTime-T)}}var O=!1,P=-1,se=5,me=-1;function M(){return H?!0:!(t.unstable_now()-me<se)}function I(){if(H=!1,O){var T=t.unstable_now();me=T;var J=!0;try{e:{_=!1,R&&(R=!1,Z(P),P=-1),v=!0;var ae=k;try{t:{for(te(T),y=i(p);y!==null&&!(y.expirationTime>T&&M());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,k=y.priorityLevel;var E=Se(y.expirationTime<=T);if(T=t.unstable_now(),typeof E=="function"){y.callback=E,te(T),J=!0;break t}y===i(p)&&r(p),te(T)}else r(p);y=i(p)}if(y!==null)J=!0;else{var j=i(m);j!==null&&W(ee,j.startTime-T),J=!1}}break e}finally{y=null,k=ae,v=!1}J=void 0}}finally{J?$():O=!1}}}var $;if(typeof q=="function")$=function(){q(I)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,re=xe.port2;xe.port1.onmessage=I,$=function(){re.postMessage(null)}}else $=function(){N(I,0)};function W(T,J){P=N(function(){T(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_next=function(T){switch(k){case 1:case 2:case 3:var J=3;break;default:J=k}var ae=k;k=J;try{return T()}finally{k=ae}},t.unstable_requestPaint=function(){H=!0},t.unstable_runWithPriority=function(T,J){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ae=k;k=T;try{return J()}finally{k=ae}},t.unstable_scheduleCallback=function(T,J,ae){var Se=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Se+ae:Se):ae=Se,T){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ae+E,T={id:x++,callback:J,priorityLevel:T,startTime:ae,expirationTime:E,sortIndex:-1},ae>Se?(T.sortIndex=ae,l(m,T),i(p)===null&&T===i(m)&&(R?(Z(P),P=-1):R=!0,W(ee,ae-Se))):(T.sortIndex=E,l(p,T),_||v||(_=!0,O||(O=!0,$()))),T},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(T){var J=k;return function(){var ae=k;k=J;try{return T.apply(this,arguments)}finally{k=ae}}}})(Gc)),Gc}var yg;function D1(){return yg||(yg=1,Qc.exports=T1()),Qc.exports}var Xc={exports:{}},Lt={};/**
25
+ */var gg;function T1(){return gg||(gg=1,(function(t){function l(T,J){var ae=T.length;T.push(J);e:for(;0<ae;){var Se=ae-1>>>1,E=T[Se];if(0<s(E,J))T[Se]=J,T[ae]=E,ae=Se;else break e}}function i(T){return T.length===0?null:T[0]}function r(T){if(T.length===0)return null;var J=T[0],ae=T.pop();if(ae!==J){T[0]=ae;e:for(var Se=0,E=T.length,A=E>>>1;Se<A;){var F=2*(Se+1)-1,S=T[F],ue=F+1,ce=T[ue];if(0>s(S,ae))ue<E&&0>s(ce,S)?(T[Se]=ce,T[ue]=ae,Se=ue):(T[Se]=S,T[F]=ae,Se=F);else if(ue<E&&0>s(ce,ae))T[Se]=ce,T[ue]=ae,Se=ue;else break e}}return J}function s(T,J){var ae=T.sortIndex-J.sortIndex;return ae!==0?ae:T.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;t.unstable_now=function(){return o.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var p=[],m=[],x=1,y=null,k=3,v=!1,_=!1,R=!1,H=!1,N=typeof setTimeout=="function"?setTimeout:null,Z=typeof clearTimeout=="function"?clearTimeout:null,q=typeof setImmediate<"u"?setImmediate:null;function te(T){for(var J=i(m);J!==null;){if(J.callback===null)r(m);else if(J.startTime<=T)r(m),J.sortIndex=J.expirationTime,l(p,J);else break;J=i(m)}}function ee(T){if(R=!1,te(T),!_)if(i(p)!==null)_=!0,O||(O=!0,$());else{var J=i(m);J!==null&&W(ee,J.startTime-T)}}var O=!1,P=-1,se=5,me=-1;function M(){return H?!0:!(t.unstable_now()-me<se)}function Y(){if(H=!1,O){var T=t.unstable_now();me=T;var J=!0;try{e:{_=!1,R&&(R=!1,Z(P),P=-1),v=!0;var ae=k;try{t:{for(te(T),y=i(p);y!==null&&!(y.expirationTime>T&&M());){var Se=y.callback;if(typeof Se=="function"){y.callback=null,k=y.priorityLevel;var E=Se(y.expirationTime<=T);if(T=t.unstable_now(),typeof E=="function"){y.callback=E,te(T),J=!0;break t}y===i(p)&&r(p),te(T)}else r(p);y=i(p)}if(y!==null)J=!0;else{var A=i(m);A!==null&&W(ee,A.startTime-T),J=!1}}break e}finally{y=null,k=ae,v=!1}J=void 0}}finally{J?$():O=!1}}}var $;if(typeof q=="function")$=function(){q(Y)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,re=xe.port2;xe.port1.onmessage=Y,$=function(){re.postMessage(null)}}else $=function(){N(Y,0)};function W(T,J){P=N(function(){T(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(T){T.callback=null},t.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):se=0<T?Math.floor(1e3/T):5},t.unstable_getCurrentPriorityLevel=function(){return k},t.unstable_next=function(T){switch(k){case 1:case 2:case 3:var J=3;break;default:J=k}var ae=k;k=J;try{return T()}finally{k=ae}},t.unstable_requestPaint=function(){H=!0},t.unstable_runWithPriority=function(T,J){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ae=k;k=T;try{return J()}finally{k=ae}},t.unstable_scheduleCallback=function(T,J,ae){var Se=t.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?Se+ae:Se):ae=Se,T){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ae+E,T={id:x++,callback:J,priorityLevel:T,startTime:ae,expirationTime:E,sortIndex:-1},ae>Se?(T.sortIndex=ae,l(m,T),i(p)===null&&T===i(m)&&(R?(Z(P),P=-1):R=!0,W(ee,ae-Se))):(T.sortIndex=E,l(p,T),_||v||(_=!0,O||(O=!0,$()))),T},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(T){var J=k;return function(){var ae=k;k=J;try{return T.apply(this,arguments)}finally{k=ae}}}})(Gc)),Gc}var yg;function D1(){return yg||(yg=1,Qc.exports=T1()),Qc.exports}var Xc={exports:{}},Lt={};/**
26
26
  * @license React
27
27
  * react-dom.production.js
28
28
  *
@@ -38,28 +38,28 @@
38
38
  *
39
39
  * This source code is licensed under the MIT license found in the
40
40
  * LICENSE file in the root directory of this source tree.
41
- */var vg;function M1(){if(vg)return mr;vg=1;var t=D1(),l=Hf(),i=O1();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(u=c.return,u!==null){a=u;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===u)return p(c),n;d=d.sibling}throw Error(r(188))}if(a.return!==u.return)a=c,u=d;else{for(var b=!1,w=c.child;w;){if(w===a){b=!0,a=c,u=d;break}if(w===u){b=!0,u=c,a=d;break}w=w.sibling}if(!b){for(w=d.child;w;){if(w===a){b=!0,a=d,u=c;break}if(w===u){b=!0,u=d,a=c;break}w=w.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),q=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case N:return"Profiler";case H:return"StrictMode";case ee:return"Suspense";case O:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return n=e.displayName||null,n!==null?n:re(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return re(e(n))}catch{}}return null}var W=Array.isArray,T=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Se=[],E=-1;function j(e){return{current:e}}function F(e){0>E||(e.current=Se[E],Se[E]=null,E--)}function S(e,n){E++,Se[E]=e.current,e.current=n}var ue=j(null),ce=j(null),ge=j(null),je=j(null);function pe(e,n){switch(S(ge,n),S(ce,e),S(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Rp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Rp(n),e=Lp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(ue),S(ue,e)}function Te(){F(ue),F(ce),F(ge)}function ft(e){e.memoizedState!==null&&S(je,e);var n=ue.current,a=Lp(n,e.type);n!==a&&(S(ce,e),S(ue,a))}function Tt(e){ce.current===e&&(F(ue),F(ce)),je.current===e&&(F(je),or._currentValue=ae)}var dl,Hn;function St(e){if(dl===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);dl=n&&n[1]||"",Hn=-1<a.stack.indexOf(`
41
+ */var vg;function M1(){if(vg)return mr;vg=1;var t=D1(),l=Hf(),i=O1();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(o(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=o(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,u=n;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(u=c.return,u!==null){a=u;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return p(c),e;if(d===u)return p(c),n;d=d.sibling}throw Error(r(188))}if(a.return!==u.return)a=c,u=d;else{for(var b=!1,w=c.child;w;){if(w===a){b=!0,a=c,u=d;break}if(w===u){b=!0,u=c,a=d;break}w=w.sibling}if(!b){for(w=d.child;w;){if(w===a){b=!0,a=d,u=c;break}if(w===u){b=!0,u=d,a=c;break}w=w.sibling}if(!b)throw Error(r(189))}}if(a.alternate!==u)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,k=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),R=Symbol.for("react.fragment"),H=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),q=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),ee=Symbol.for("react.suspense"),O=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),se=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case R:return"Fragment";case N:return"Profiler";case H:return"StrictMode";case ee:return"Suspense";case O:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case q:return e.displayName||"Context";case Z:return(e._context.displayName||"Context")+".Consumer";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return n=e.displayName||null,n!==null?n:re(e.type)||"Memo";case se:n=e._payload,e=e._init;try{return re(e(n))}catch{}}return null}var W=Array.isArray,T=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},Se=[],E=-1;function A(e){return{current:e}}function F(e){0>E||(e.current=Se[E],Se[E]=null,E--)}function S(e,n){E++,Se[E]=e.current,e.current=n}var ue=A(null),ce=A(null),ge=A(null),Ae=A(null);function pe(e,n){switch(S(ge,n),S(ce,e),S(ue,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Rp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Rp(n),e=Lp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}F(ue),S(ue,e)}function Te(){F(ue),F(ce),F(ge)}function ft(e){e.memoizedState!==null&&S(Ae,e);var n=ue.current,a=Lp(n,e.type);n!==a&&(S(ce,e),S(ue,a))}function Tt(e){ce.current===e&&(F(ue),F(ce)),Ae.current===e&&(F(Ae),or._currentValue=ae)}var dl,Hn;function St(e){if(dl===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);dl=n&&n[1]||"",Hn=-1<a.stack.indexOf(`
42
42
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+dl+e+Hn}var hl=!1;function Nn(e,n){if(!e||hl)return"";hl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Y){var U=Y}Reflect.construct(e,[],K)}else{try{K.call()}catch(Y){U=Y}e.call(K.prototype)}}else{try{throw Error()}catch(Y){U=Y}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(Y){if(Y&&U&&typeof Y.stack=="string")return[Y.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),b=d[0],w=d[1];if(b&&w){var C=b.split(`
43
+ `+dl+e+Hn}var hl=!1;function Nn(e,n){if(!e||hl)return"";hl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(I){var U=I}Reflect.construct(e,[],K)}else{try{K.call()}catch(I){U=I}e.call(K.prototype)}}else{try{throw Error()}catch(I){U=I}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(I){if(I&&U&&typeof I.stack=="string")return[I.stack,U.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=u.DetermineComponentFrameRoot(),b=d[0],w=d[1];if(b&&w){var C=b.split(`
44
44
  `),B=w.split(`
45
45
  `);for(c=u=0;u<C.length&&!C[u].includes("DetermineComponentFrameRoot");)u++;for(;c<B.length&&!B[c].includes("DetermineComponentFrameRoot");)c++;if(u===C.length||c===B.length)for(u=C.length-1,c=B.length-1;1<=u&&0<=c&&C[u]!==B[c];)c--;for(;1<=u&&0<=c;u--,c--)if(C[u]!==B[c]){if(u!==1||c!==1)do if(u--,c--,0>c||C[u]!==B[c]){var G=`
46
46
  `+C[u].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=u&&0<=c);break}}}finally{hl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?St(a):""}function _a(e,n){switch(e.tag){case 26:case 27:case 5:return St(e.type);case 16:return St("Lazy");case 13:return e.child!==n&&n!==null?St("Suspense Fallback"):St("Suspense");case 19:return St("SuspenseList");case 0:case 15:return Nn(e.type,!1);case 11:return Nn(e.type.render,!1);case 1:return Nn(e.type,!0);case 31:return St("Activity");default:return""}}function Gl(e){try{var n="",a=null;do n+=_a(e,a),a=e,e=e.return;while(e);return n}catch(u){return`
47
47
  Error generating stack: `+u.message+`
48
- `+u.stack}}var ml=Object.prototype.hasOwnProperty,pl=t.unstable_scheduleCallback,gl=t.unstable_cancelCallback,vi=t.unstable_shouldYield,ki=t.unstable_requestPaint,gt=t.unstable_now,Ze=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,ie=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,Ae=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,tn=t.log,qn=t.unstable_setDisableYieldValue,Ht=null,_t=null;function Ft(e){if(typeof tn=="function"&&qn(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ht,e)}catch{}}var tt=Math.clz32?Math.clz32:h0,yl=Math.log,_n=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(yl(e)/_n|0)|0}var zr=256,Or=262144,Mr=4194304;function Xl(e){var n=e&42;if(n!==0)return n;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 Rr(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~d,u!==0?c=Xl(u):(b&=w,b!==0?c=Xl(b):a||(a=w&~e,a!==0&&(c=Xl(a))))):(w=u&~d,w!==0?c=Xl(w):b!==0?c=Xl(b):a||(a=u&~e,a!==0&&(c=Xl(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function wi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function m0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 gd(){var e=Mr;return Mr<<=1,(Mr&62914560)===0&&(Mr=4194304),e}function Ts(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Si(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function p0(e,n,a,u,c,d){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,C=e.expirationTimes,B=e.hiddenUpdates;for(a=b&~a;0<a;){var G=31-tt(a),K=1<<G;w[G]=0,C[G]=-1;var U=B[G];if(U!==null)for(B[G]=null,G=0;G<U.length;G++){var Y=U[G];Y!==null&&(Y.lane&=-536870913)}a&=~K}u!==0&&yd(e,u,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function yd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function xd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),c=1<<u;c&n|e[u]&n&&(e[u]|=n),a&=~c}}function bd(e,n){var a=n&-n;return a=(a&42)!==0?1:Ds(a),(a&(e.suspendedLanes|n))!==0?0:a}function Ds(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 zs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:ig(e.type))}function kd(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var xl=Math.random().toString(36).slice(2),Dt="__reactFiber$"+xl,Qt="__reactProps$"+xl,Ea="__reactContainer$"+xl,Os="__reactEvents$"+xl,g0="__reactListeners$"+xl,y0="__reactHandles$"+xl,wd="__reactResources$"+xl,_i="__reactMarker$"+xl;function Ms(e){delete e[Dt],delete e[Qt],delete e[Os],delete e[g0],delete e[y0]}function Ca(e){var n=e[Dt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Ea]||a[Dt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Ip(e);e!==null;){if(a=e[Dt])return a;e=Ip(e)}return n}e=a,a=e.parentNode}return null}function ja(e){if(e=e[Dt]||e[Ea]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ei(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Aa(e){var n=e[wd];return n||(n=e[wd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ct(e){e[_i]=!0}var Sd=new Set,_d={};function Jl(e,n){Na(e,n),Na(e+"Capture",n)}function Na(e,n){for(_d[e]=n,e=0;e<n.length;e++)Sd.add(n[e])}var x0=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]*$"),Ed={},Cd={};function b0(e){return ml.call(Cd,e)?!0:ml.call(Ed,e)?!1:x0.test(e)?Cd[e]=!0:(Ed[e]=!0,!1)}function Lr(e,n,a){if(b0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Br(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Vn(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function jd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function v0(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var c=u.get,d=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Rs(e){if(!e._valueTracker){var n=jd(e)?"checked":"value";e._valueTracker=v0(e,n,""+e[n])}}function Ad(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=jd(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function Ur(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 k0=/[\n"\\]/g;function hn(e){return e.replace(k0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ls(e,n,a,u,c,d,b,w){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+dn(n)):e.value!==""+dn(n)&&(e.value=""+dn(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Bs(e,b,dn(n)):a!=null?Bs(e,b,dn(a)):u!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+dn(w):e.removeAttribute("name")}function Nd(e,n,a,u,c,d,b,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Rs(e);return}a=a!=null?""+dn(a):"",n=n!=null?""+dn(n):a,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??c,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Rs(e)}function Bs(e,n,a){n==="number"&&Ur(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ta(e,n,a,u){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&u&&(e[a].defaultSelected=!0)}else{for(a=""+dn(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,u&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Td(e,n,a){if(n!=null&&(n=""+dn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+dn(a):""}function Dd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(W(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=dn(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Rs(e)}function Da(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var w0=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 zd(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||w0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Od(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var c in n)u=n[c],n.hasOwnProperty(c)&&a[c]!==u&&zd(e,c,u)}else for(var d in n)n.hasOwnProperty(d)&&zd(e,d,n[d])}function Us(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 S0=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"]]),_0=/^[\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 Hr(e){return _0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Yn(){}var Hs=null;function qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var za=null,Oa=null;function Md(e){var n=ja(e);if(n&&(e=n.stateNode)){var a=e[Qt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ls(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+hn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var c=u[Qt]||null;if(!c)throw Error(r(90));Ls(u,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&Ad(u)}break e;case"textarea":Td(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Ta(e,!!a.multiple,n,!1)}}}var Vs=!1;function Rd(e,n,a){if(Vs)return e(n,a);Vs=!0;try{var u=e(n);return u}finally{if(Vs=!1,(za!==null||Oa!==null)&&(Cu(),za&&(n=za,e=Oa,Oa=za=null,Md(n),e)))for(n=0;n<e.length;n++)Md(e[n])}}function Ci(e,n){var a=e.stateNode;if(a===null)return null;var u=a[Qt]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ys=!1;if(In)try{var ji={};Object.defineProperty(ji,"passive",{get:function(){Ys=!0}}),window.addEventListener("test",ji,ji),window.removeEventListener("test",ji,ji)}catch{Ys=!1}var bl=null,Is=null,qr=null;function Ld(){if(qr)return qr;var e,n=Is,a=n.length,u,c="value"in bl?bl.value:bl.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var b=a-e;for(u=1;u<=b&&n[a-u]===c[d-u];u++);return qr=c.slice(e,1<u?1-u:void 0)}function Vr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Yr(){return!0}function Bd(){return!1}function Gt(e){function n(a,u,c,d,b){this._reactName=a,this._targetInst=c,this.type=u,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Yr:Bd,this.isPropagationStopped=Bd,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Yr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Yr)},persist:function(){},isPersistent:Yr}),n}var Kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ir=Gt(Kl),Ai=y({},Kl,{view:0,detail:0}),E0=Gt(Ai),Zs,Fs,Ni,Zr=y({},Ai,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gs,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!==Ni&&(Ni&&e.type==="mousemove"?(Zs=e.screenX-Ni.screenX,Fs=e.screenY-Ni.screenY):Fs=Zs=0,Ni=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),Ud=Gt(Zr),C0=y({},Zr,{dataTransfer:0}),j0=Gt(C0),A0=y({},Ai,{relatedTarget:0}),Qs=Gt(A0),N0=y({},Kl,{animationName:0,elapsedTime:0,pseudoElement:0}),T0=Gt(N0),D0=y({},Kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z0=Gt(D0),O0=y({},Kl,{data:0}),Hd=Gt(O0),M0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R0={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"},L0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=L0[e])?!!n[e]:!1}function Gs(){return B0}var U0=y({},Ai,{key:function(e){if(e.key){var n=M0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gs,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),H0=Gt(U0),q0=y({},Zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qd=Gt(q0),V0=y({},Ai,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gs}),Y0=Gt(V0),I0=y({},Kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z0=Gt(I0),F0=y({},Zr,{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}),Q0=Gt(F0),G0=y({},Kl,{newState:0,oldState:0}),X0=Gt(G0),J0=[9,13,27,32],Xs=In&&"CompositionEvent"in window,Ti=null;In&&"documentMode"in document&&(Ti=document.documentMode);var K0=In&&"TextEvent"in window&&!Ti,Vd=In&&(!Xs||Ti&&8<Ti&&11>=Ti),Yd=" ",Id=!1;function Zd(e,n){switch(e){case"keyup":return J0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ma=!1;function $0(e,n){switch(e){case"compositionend":return Fd(n);case"keypress":return n.which!==32?null:(Id=!0,Yd);case"textInput":return e=n.data,e===Yd&&Id?null:e;default:return null}}function P0(e,n){if(Ma)return e==="compositionend"||!Xs&&Zd(e,n)?(e=Ld(),qr=Is=bl=null,Ma=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Vd&&n.locale!=="ko"?null:n.data;default:return null}}var W0={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 Qd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!W0[e.type]:n==="textarea"}function Gd(e,n,a,u){za?Oa?Oa.push(u):Oa=[u]:za=u,n=Ou(n,"onChange"),0<n.length&&(a=new Ir("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Di=null,zi=null;function eb(e){Np(e,0)}function Fr(e){var n=Ei(e);if(Ad(n))return e}function Xd(e,n){if(e==="change")return n}var Jd=!1;if(In){var Js;if(In){var Ks="oninput"in document;if(!Ks){var Kd=document.createElement("div");Kd.setAttribute("oninput","return;"),Ks=typeof Kd.oninput=="function"}Js=Ks}else Js=!1;Jd=Js&&(!document.documentMode||9<document.documentMode)}function $d(){Di&&(Di.detachEvent("onpropertychange",Pd),zi=Di=null)}function Pd(e){if(e.propertyName==="value"&&Fr(zi)){var n=[];Gd(n,zi,e,qs(e)),Rd(eb,n)}}function tb(e,n,a){e==="focusin"?($d(),Di=n,zi=a,Di.attachEvent("onpropertychange",Pd)):e==="focusout"&&$d()}function nb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fr(zi)}function lb(e,n){if(e==="click")return Fr(n)}function ab(e,n){if(e==="input"||e==="change")return Fr(n)}function ib(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:ib;function Oi(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var c=a[u];if(!ml.call(n,c)||!nn(e[c],n[c]))return!1}return!0}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,n){var a=Wd(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wd(a)}}function th(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?th(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ur(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ur(e.document)}return n}function $s(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var rb=In&&"documentMode"in document&&11>=document.documentMode,Ra=null,Ps=null,Mi=null,Ws=!1;function lh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ws||Ra==null||Ra!==Ur(u)||(u=Ra,"selectionStart"in u&&$s(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Mi&&Oi(Mi,u)||(Mi=u,u=Ou(Ps,"onSelect"),0<u.length&&(n=new Ir("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ra)))}function $l(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var La={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionrun:$l("Transition","TransitionRun"),transitionstart:$l("Transition","TransitionStart"),transitioncancel:$l("Transition","TransitionCancel"),transitionend:$l("Transition","TransitionEnd")},eo={},ah={};In&&(ah=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function Pl(e){if(eo[e])return eo[e];if(!La[e])return e;var n=La[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in ah)return eo[e]=n[a];return e}var ih=Pl("animationend"),rh=Pl("animationiteration"),uh=Pl("animationstart"),ub=Pl("transitionrun"),sb=Pl("transitionstart"),ob=Pl("transitioncancel"),sh=Pl("transitionend"),oh=new Map,to="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(" ");to.push("scrollEnd");function En(e,n){oh.set(e,n),Jl(n,[e])}var Qr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],Ba=0,no=0;function Gr(){for(var e=Ba,n=no=Ba=0;n<e;){var a=mn[n];mn[n++]=null;var u=mn[n];mn[n++]=null;var c=mn[n];mn[n++]=null;var d=mn[n];if(mn[n++]=null,u!==null&&c!==null){var b=u.pending;b===null?c.next=c:(c.next=b.next,b.next=c),u.pending=c}d!==0&&ch(a,c,d)}}function Xr(e,n,a,u){mn[Ba++]=e,mn[Ba++]=n,mn[Ba++]=a,mn[Ba++]=u,no|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function lo(e,n,a,u){return Xr(e,n,a,u),Jr(e)}function Wl(e,n){return Xr(e,null,null,n),Jr(e)}function ch(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,u=d.alternate,u!==null&&(u.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-tt(a),e=d.hiddenUpdates,u=e[c],u===null?e[c]=[n]:u.push(n),n.lane=a|536870912),d):null}function Jr(e){if(50<nr)throw nr=0,hc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ua={};function cb(e,n,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,a,u){return new cb(e,n,a,u)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,n){var a=e.alternate;return a===null?(a=ln(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function fh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Kr(e,n,a,u,c,d){var b=0;if(u=e,typeof e=="function")ao(e)&&(b=1);else if(typeof e=="string")b=p1(e,a,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=ln(31,a,n,c),e.elementType=me,e.lanes=d,e;case R:return ea(a.children,c,d,n);case H:b=8,c|=24;break;case N:return e=ln(12,a,n,c|2),e.elementType=N,e.lanes=d,e;case ee:return e=ln(13,a,n,c),e.elementType=ee,e.lanes=d,e;case O:return e=ln(19,a,n,c),e.elementType=O,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:b=10;break e;case Z:b=9;break e;case te:b=11;break e;case P:b=14;break e;case se:b=16,u=null;break e}b=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=ln(b,a,n,c),n.elementType=e,n.type=u,n.lanes=d,n}function ea(e,n,a,u){return e=ln(7,e,u,n),e.lanes=a,e}function io(e,n,a){return e=ln(6,e,null,n),e.lanes=a,e}function dh(e){var n=ln(18,null,null,0);return n.stateNode=e,n}function ro(e,n,a){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var hh=new WeakMap;function pn(e,n){if(typeof e=="object"&&e!==null){var a=hh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Gl(n)},hh.set(e,n),n)}return{value:e,source:n,stack:Gl(n)}}var Ha=[],qa=0,$r=null,Ri=0,gn=[],yn=0,vl=null,Tn=1,Dn="";function Fn(e,n){Ha[qa++]=Ri,Ha[qa++]=$r,$r=e,Ri=n}function mh(e,n,a){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,vl=e;var u=Tn;e=Dn;var c=32-tt(u)-1;u&=~(1<<c),a+=1;var d=32-tt(n)+c;if(30<d){var b=c-c%5;d=(u&(1<<b)-1).toString(32),u>>=b,c-=b,Tn=1<<32-tt(n)+c|a<<c|u,Dn=d+e}else Tn=1<<d|a<<c|u,Dn=e}function uo(e){e.return!==null&&(Fn(e,1),mh(e,1,0))}function so(e){for(;e===$r;)$r=Ha[--qa],Ha[qa]=null,Ri=Ha[--qa],Ha[qa]=null;for(;e===vl;)vl=gn[--yn],gn[yn]=null,Dn=gn[--yn],gn[yn]=null,Tn=gn[--yn],gn[yn]=null}function ph(e,n){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,Tn=n.id,Dn=n.overflow,vl=e}var zt=null,rt=null,Ve=!1,kl=null,xn=!1,oo=Error(r(519));function wl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Li(pn(n,e)),oo}function gh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[Dt]=e,n[Qt]=u,a){case"dialog":Le("cancel",n),Le("close",n);break;case"iframe":case"object":case"embed":Le("load",n);break;case"video":case"audio":for(a=0;a<ar.length;a++)Le(ar[a],n);break;case"source":Le("error",n);break;case"img":case"image":case"link":Le("error",n),Le("load",n);break;case"details":Le("toggle",n);break;case"input":Le("invalid",n),Nd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Le("invalid",n);break;case"textarea":Le("invalid",n),Dd(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||Op(n.textContent,a)?(u.popover!=null&&(Le("beforetoggle",n),Le("toggle",n)),u.onScroll!=null&&Le("scroll",n),u.onScrollEnd!=null&&Le("scrollend",n),u.onClick!=null&&(n.onclick=Yn),n=!0):n=!1,n||wl(e,!0)}function yh(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:zt=zt.return}}function Va(e){if(e!==zt)return!1;if(!Ve)return yh(e),Ve=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Ac(e.type,e.memoizedProps)),a=!a),a&&rt&&wl(e),yh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Yp(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Yp(e)}else n===27?(n=rt,Ll(e.type)?(e=Oc,Oc=null,rt=e):rt=n):rt=zt?vn(e.stateNode.nextSibling):null;return!0}function ta(){rt=zt=null,Ve=!1}function co(){var e=kl;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),kl=null),e}function Li(e){kl===null?kl=[e]:kl.push(e)}var fo=j(null),na=null,Qn=null;function Sl(e,n,a){S(fo,n._currentValue),n._currentValue=a}function Gn(e){e._currentValue=fo.current,F(fo)}function ho(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function mo(e,n,a,u){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=c;for(var C=0;C<n.length;C++)if(w.context===n[C]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),ho(d.return,a,e),u||(b=null);break e}d=w.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(r(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),ho(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Ya(e,n,a,u){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var w=c.type;nn(c.pendingProps.value,b.value)||(e!==null?e.push(w):e=[w])}}else if(c===je.current){if(b=c.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(or):e=[or])}c=c.return}e!==null&&mo(n,e,a,u),n.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){na=e,Qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return xh(na,e)}function Wr(e,n){return na===null&&la(e),xh(e,n)}function xh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Qn===null){if(e===null)throw Error(r(308));Qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Qn=Qn.next=n;return a}var fb=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},db=t.unstable_scheduleCallback,hb=t.unstable_NormalPriority,yt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function po(){return{controller:new fb,data:new Map,refCount:0}}function Bi(e){e.refCount--,e.refCount===0&&db(hb,function(){e.controller.abort()})}var Ui=null,go=0,Ia=0,Za=null;function mb(e,n){if(Ui===null){var a=Ui=[];go=0,Ia=bc(),Za={status:"pending",value:void 0,then:function(u){a.push(u)}}}return go++,n.then(bh,bh),n}function bh(){if(--go===0&&Ui!==null){Za!==null&&(Za.status="fulfilled");var e=Ui;Ui=null,Ia=0,Za=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function pb(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(u.status="rejected",u.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),u}var vh=T.S;T.S=function(e,n){lp=gt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&mb(e,n),vh!==null&&vh(e,n)};var aa=j(null);function yo(){var e=aa.current;return e!==null?e:nt.pooledCache}function eu(e,n){n===null?S(aa,aa.current):S(aa,n.pool)}function kh(){var e=yo();return e===null?null:{parent:yt._currentValue,pool:e}}var Fa=Error(r(460)),xo=Error(r(474)),tu=Error(r(542)),nu={then:function(){}};function wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Yn,Yn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e;default:if(typeof n.status=="string")n.then(Yn,Yn);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=u}},function(u){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e}throw ra=n,Fa}}function ia(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ra=a,Fa):a}}var ra=null;function _h(){if(ra===null)throw Error(r(459));var e=ra;return ra=null,e}function Eh(e){if(e===Fa||e===tu)throw Error(r(483))}var Qa=null,Hi=0;function lu(e){var n=Hi;return Hi+=1,Qa===null&&(Qa=[]),Sh(Qa,e,n)}function qi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function au(e,n){throw n.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ch(e){function n(D,A){if(e){var L=D.deletions;L===null?(D.deletions=[A],D.flags|=16):L.push(A)}}function a(D,A){if(!e)return null;for(;A!==null;)n(D,A),A=A.sibling;return null}function u(D){for(var A=new Map;D!==null;)D.key!==null?A.set(D.key,D):A.set(D.index,D),D=D.sibling;return A}function c(D,A){return D=Zn(D,A),D.index=0,D.sibling=null,D}function d(D,A,L){return D.index=L,e?(L=D.alternate,L!==null?(L=L.index,L<A?(D.flags|=67108866,A):L):(D.flags|=67108866,A)):(D.flags|=1048576,A)}function b(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function w(D,A,L,X){return A===null||A.tag!==6?(A=io(L,D.mode,X),A.return=D,A):(A=c(A,L),A.return=D,A)}function C(D,A,L,X){var ke=L.type;return ke===R?G(D,A,L.props.children,X,L.key):A!==null&&(A.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&ia(ke)===A.type)?(A=c(A,L.props),qi(A,L),A.return=D,A):(A=Kr(L.type,L.key,L.props,null,D.mode,X),qi(A,L),A.return=D,A)}function B(D,A,L,X){return A===null||A.tag!==4||A.stateNode.containerInfo!==L.containerInfo||A.stateNode.implementation!==L.implementation?(A=ro(L,D.mode,X),A.return=D,A):(A=c(A,L.children||[]),A.return=D,A)}function G(D,A,L,X,ke){return A===null||A.tag!==7?(A=ea(L,D.mode,X,ke),A.return=D,A):(A=c(A,L),A.return=D,A)}function K(D,A,L){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=io(""+A,D.mode,L),A.return=D,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case v:return L=Kr(A.type,A.key,A.props,null,D.mode,L),qi(L,A),L.return=D,L;case _:return A=ro(A,D.mode,L),A.return=D,A;case se:return A=ia(A),K(D,A,L)}if(W(A)||$(A))return A=ea(A,D.mode,L,null),A.return=D,A;if(typeof A.then=="function")return K(D,lu(A),L);if(A.$$typeof===q)return K(D,Wr(D,A),L);au(D,A)}return null}function U(D,A,L,X){var ke=A!==null?A.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ke!==null?null:w(D,A,""+L,X);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ke?C(D,A,L,X):null;case _:return L.key===ke?B(D,A,L,X):null;case se:return L=ia(L),U(D,A,L,X)}if(W(L)||$(L))return ke!==null?null:G(D,A,L,X,null);if(typeof L.then=="function")return U(D,A,lu(L),X);if(L.$$typeof===q)return U(D,A,Wr(D,L),X);au(D,L)}return null}function Y(D,A,L,X,ke){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return D=D.get(L)||null,w(A,D,""+X,ke);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return D=D.get(X.key===null?L:X.key)||null,C(A,D,X,ke);case _:return D=D.get(X.key===null?L:X.key)||null,B(A,D,X,ke);case se:return X=ia(X),Y(D,A,L,X,ke)}if(W(X)||$(X))return D=D.get(L)||null,G(A,D,X,ke,null);if(typeof X.then=="function")return Y(D,A,L,lu(X),ke);if(X.$$typeof===q)return Y(D,A,L,Wr(A,X),ke);au(A,X)}return null}function he(D,A,L,X){for(var ke=null,Fe=null,ye=A,Oe=A=0,He=null;ye!==null&&Oe<L.length;Oe++){ye.index>Oe?(He=ye,ye=null):He=ye.sibling;var Qe=U(D,ye,L[Oe],X);if(Qe===null){ye===null&&(ye=He);break}e&&ye&&Qe.alternate===null&&n(D,ye),A=d(Qe,A,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe,ye=He}if(Oe===L.length)return a(D,ye),Ve&&Fn(D,Oe),ke;if(ye===null){for(;Oe<L.length;Oe++)ye=K(D,L[Oe],X),ye!==null&&(A=d(ye,A,Oe),Fe===null?ke=ye:Fe.sibling=ye,Fe=ye);return Ve&&Fn(D,Oe),ke}for(ye=u(ye);Oe<L.length;Oe++)He=Y(ye,D,Oe,L[Oe],X),He!==null&&(e&&He.alternate!==null&&ye.delete(He.key===null?Oe:He.key),A=d(He,A,Oe),Fe===null?ke=He:Fe.sibling=He,Fe=He);return e&&ye.forEach(function(Vl){return n(D,Vl)}),Ve&&Fn(D,Oe),ke}function _e(D,A,L,X){if(L==null)throw Error(r(151));for(var ke=null,Fe=null,ye=A,Oe=A=0,He=null,Qe=L.next();ye!==null&&!Qe.done;Oe++,Qe=L.next()){ye.index>Oe?(He=ye,ye=null):He=ye.sibling;var Vl=U(D,ye,Qe.value,X);if(Vl===null){ye===null&&(ye=He);break}e&&ye&&Vl.alternate===null&&n(D,ye),A=d(Vl,A,Oe),Fe===null?ke=Vl:Fe.sibling=Vl,Fe=Vl,ye=He}if(Qe.done)return a(D,ye),Ve&&Fn(D,Oe),ke;if(ye===null){for(;!Qe.done;Oe++,Qe=L.next())Qe=K(D,Qe.value,X),Qe!==null&&(A=d(Qe,A,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe);return Ve&&Fn(D,Oe),ke}for(ye=u(ye);!Qe.done;Oe++,Qe=L.next())Qe=Y(ye,D,Oe,Qe.value,X),Qe!==null&&(e&&Qe.alternate!==null&&ye.delete(Qe.key===null?Oe:Qe.key),A=d(Qe,A,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe);return e&&ye.forEach(function(C1){return n(D,C1)}),Ve&&Fn(D,Oe),ke}function et(D,A,L,X){if(typeof L=="object"&&L!==null&&L.type===R&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ke=L.key;A!==null;){if(A.key===ke){if(ke=L.type,ke===R){if(A.tag===7){a(D,A.sibling),X=c(A,L.props.children),X.return=D,D=X;break e}}else if(A.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&ia(ke)===A.type){a(D,A.sibling),X=c(A,L.props),qi(X,L),X.return=D,D=X;break e}a(D,A);break}else n(D,A);A=A.sibling}L.type===R?(X=ea(L.props.children,D.mode,X,L.key),X.return=D,D=X):(X=Kr(L.type,L.key,L.props,null,D.mode,X),qi(X,L),X.return=D,D=X)}return b(D);case _:e:{for(ke=L.key;A!==null;){if(A.key===ke)if(A.tag===4&&A.stateNode.containerInfo===L.containerInfo&&A.stateNode.implementation===L.implementation){a(D,A.sibling),X=c(A,L.children||[]),X.return=D,D=X;break e}else{a(D,A);break}else n(D,A);A=A.sibling}X=ro(L,D.mode,X),X.return=D,D=X}return b(D);case se:return L=ia(L),et(D,A,L,X)}if(W(L))return he(D,A,L,X);if($(L)){if(ke=$(L),typeof ke!="function")throw Error(r(150));return L=ke.call(L),_e(D,A,L,X)}if(typeof L.then=="function")return et(D,A,lu(L),X);if(L.$$typeof===q)return et(D,A,Wr(D,L),X);au(D,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,A!==null&&A.tag===6?(a(D,A.sibling),X=c(A,L),X.return=D,D=X):(a(D,A),X=io(L,D.mode,X),X.return=D,D=X),b(D)):a(D,A)}return function(D,A,L,X){try{Hi=0;var ke=et(D,A,L,X);return Qa=null,ke}catch(ye){if(ye===Fa||ye===tu)throw ye;var Fe=ln(29,ye,null,D.mode);return Fe.lanes=X,Fe.return=D,Fe}finally{}}}var ua=Ch(!0),jh=Ch(!1),_l=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var c=u.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),u.pending=n,n=Jr(e),ch(e,null,a),n}return Xr(e,u,n,a),Jr(e)}function Vi(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}function ko(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:u.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var wo=!1;function Yi(){if(wo){var e=Za;if(e!==null)throw e}}function Ii(e,n,a,u){wo=!1;var c=e.updateQueue;_l=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var C=w,B=C.next;C.next=null,b===null?d=B:b.next=B,b=C;var G=e.alternate;G!==null&&(G=G.updateQueue,w=G.lastBaseUpdate,w!==b&&(w===null?G.firstBaseUpdate=B:w.next=B,G.lastBaseUpdate=C))}if(d!==null){var K=c.baseState;b=0,G=B=C=null,w=d;do{var U=w.lane&-536870913,Y=U!==w.lane;if(Y?(Ue&U)===U:(u&U)===U){U!==0&&U===Ia&&(wo=!0),G!==null&&(G=G.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var he=e,_e=w;U=n;var et=a;switch(_e.tag){case 1:if(he=_e.payload,typeof he=="function"){K=he.call(et,K,U);break e}K=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=_e.payload,U=typeof he=="function"?he.call(et,K,U):he,U==null)break e;K=y({},K,U);break e;case 2:_l=!0}}U=w.callback,U!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=c.callbacks,Y===null?c.callbacks=[U]:Y.push(U))}else Y={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},G===null?(B=G=Y,C=K):G=G.next=Y,b|=U;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;Y=w,w=Y.next,Y.next=null,c.lastBaseUpdate=Y,c.shared.pending=null}}while(!0);G===null&&(C=K),c.baseState=C,c.firstBaseUpdate=B,c.lastBaseUpdate=G,d===null&&(c.shared.lanes=0),Dl|=b,e.lanes=b,e.memoizedState=K}}function Ah(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Nh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Ah(a[e],n)}var Ga=j(null),iu=j(0);function Th(e,n){e=nl,S(iu,e),S(Ga,n),nl=e|n.baseLanes}function So(){S(iu,nl),S(Ga,Ga.current)}function _o(){nl=iu.current,F(Ga),F(iu)}var an=j(null),bn=null;function jl(e){var n=e.alternate;S(mt,mt.current&1),S(an,e),bn===null&&(n===null||Ga.current!==null||n.memoizedState!==null)&&(bn=e)}function Eo(e){S(mt,mt.current),S(an,e),bn===null&&(bn=e)}function Dh(e){e.tag===22?(S(mt,mt.current),S(an,e),bn===null&&(bn=e)):Al()}function Al(){S(mt,mt.current),S(an,an.current)}function rn(e){F(an),bn===e&&(bn=null),F(mt)}var mt=j(0);function ru(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Dc(a)||zc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xn=0,ze=null,Pe=null,xt=null,uu=!1,Xa=!1,sa=!1,su=0,Zi=0,Ja=null,gb=0;function dt(){throw Error(r(321))}function Co(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function jo(e,n,a,u,c,d){return Xn=d,ze=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=e===null||e.memoizedState===null?mm:Yo,sa=!1,d=a(u,c),sa=!1,Xa&&(d=Oh(n,a,u,c)),zh(e),d}function zh(e){T.H=Gi;var n=Pe!==null&&Pe.next!==null;if(Xn=0,xt=Pe=ze=null,uu=!1,Zi=0,Ja=null,n)throw Error(r(300));e===null||bt||(e=e.dependencies,e!==null&&Pr(e)&&(bt=!0))}function Oh(e,n,a,u){ze=e;var c=0;do{if(Xa&&(Ja=null),Zi=0,Xa=!1,25<=c)throw Error(r(301));if(c+=1,xt=Pe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=pm,d=n(a,u)}while(Xa);return d}function yb(){var e=T.H,n=e.useState()[0];return n=typeof n.then=="function"?Fi(n):n,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(ze.flags|=1024),n}function Ao(){var e=su!==0;return su=0,e}function No(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function To(e){if(uu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}uu=!1}Xn=0,xt=Pe=ze=null,Xa=!1,Zi=su=0,Ja=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=e:xt=xt.next=e,xt}function pt(){if(Pe===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var n=xt===null?ze.memoizedState:xt.next;if(n!==null)xt=n,Pe=e;else{if(e===null)throw ze.alternate===null?Error(r(467)):Error(r(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},xt===null?ze.memoizedState=xt=e:xt=xt.next=e}return xt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fi(e){var n=Zi;return Zi+=1,Ja===null&&(Ja=[]),e=Sh(Ja,e,n),n=ze,(xt===null?n.memoizedState:xt.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?mm:Yo),e}function cu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Fi(e);if(e.$$typeof===q)return Ot(e)}throw Error(r(438,String(e)))}function Do(e){var n=null,a=ze.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=ou(),ze.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=M;return n.index++,a}function Jn(e,n){return typeof n=="function"?n(e):n}function fu(e){var n=pt();return zo(n,Pe,e)}function zo(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var c=e.baseQueue,d=u.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}n.baseQueue=c=d,u.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var w=b=null,C=null,B=n,G=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Ue&K)===K:(Xn&K)===K){var U=B.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Ia&&(G=!0);else if((Xn&U)===U){B=B.next,U===Ia&&(G=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=K,b=d):C=C.next=K,ze.lanes|=U,Dl|=U;K=B.action,sa&&a(d,K),d=B.hasEagerState?B.eagerState:a(d,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=U,b=d):C=C.next=U,ze.lanes|=K,Dl|=K;B=B.next}while(B!==null&&B!==n);if(C===null?b=d:C.next=w,!nn(d,e.memoizedState)&&(bt=!0,G&&(a=Za,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=C,u.lastRenderedState=d}return c===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Oo(e){var n=pt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);nn(d,n.memoizedState)||(bt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,u]}function Mh(e,n,a){var u=ze,c=pt(),d=Ve;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var b=!nn((Pe||c).memoizedState,a);if(b&&(c.memoizedState=a,bt=!0),c=c.queue,Lo(Bh.bind(null,u,c,e),[e]),c.getSnapshot!==n||b||xt!==null&&xt.memoizedState.tag&1){if(u.flags|=2048,Ka(9,{destroy:void 0},Lh.bind(null,u,c,a,n),null),nt===null)throw Error(r(349));d||(Xn&127)!==0||Rh(u,n,a)}return a}function Rh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=ze.updateQueue,n===null?(n=ou(),ze.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Lh(e,n,a,u){n.value=a,n.getSnapshot=u,Uh(n)&&Hh(e)}function Bh(e,n,a){return a(function(){Uh(n)&&Hh(e)})}function Uh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function Hh(e){var n=Wl(e,2);n!==null&&Pt(n,e,2)}function Mo(e){var n=qt();if(typeof e=="function"){var a=e;if(e=a(),sa){Ft(!0);try{a()}finally{Ft(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function qh(e,n,a,u){return e.baseState=a,zo(e,Pe,typeof u=="function"?u:Jn)}function xb(e,n,a,u,c){if(mu(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};T.T!==null?a(!0):d.isTransition=!1,u(d),a=n.pending,a===null?(d.next=n.pending=d,Vh(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Vh(e,n){var a=n.action,u=n.payload,c=e.state;if(n.isTransition){var d=T.T,b={};T.T=b;try{var w=a(c,u),C=T.S;C!==null&&C(b,w),Yh(e,n,w)}catch(B){Ro(e,n,B)}finally{d!==null&&b.types!==null&&(d.types=b.types),T.T=d}}else try{d=a(c,u),Yh(e,n,d)}catch(B){Ro(e,n,B)}}function Yh(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Ih(e,n,u)},function(u){return Ro(e,n,u)}):Ih(e,n,a)}function Ih(e,n,a){n.status="fulfilled",n.value=a,Zh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Vh(e,a)))}function Ro(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Zh(n),n=n.next;while(n!==u)}e.action=null}function Zh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Fh(e,n){return n}function Qh(e,n){if(Ve){var a=nt.formState;if(a!==null){e:{var u=ze;if(Ve){if(rt){t:{for(var c=rt,d=xn;c.nodeType!==8;){if(!d){c=null;break t}if(c=vn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){rt=vn(c.nextSibling),u=c.data==="F!";break e}}wl(u)}u=!1}u&&(n=a[0])}}return a=qt(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fh,lastRenderedState:n},a.queue=u,a=fm.bind(null,ze,u),u.dispatch=a,u=Mo(!1),d=Vo.bind(null,ze,!1,u.queue),u=qt(),c={state:n,dispatch:null,action:e,pending:null},u.queue=c,a=xb.bind(null,ze,c,d,a),c.dispatch=a,u.memoizedState=e,[n,a,!1]}function Gh(e){var n=pt();return Xh(n,Pe,e)}function Xh(e,n,a){if(n=zo(e,n,Fh)[0],e=fu(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Fi(n)}catch(b){throw b===Fa?tu:b}else u=n;n=pt();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(ze.flags|=2048,Ka(9,{destroy:void 0},bb.bind(null,c,a),null)),[u,d,e]}function bb(e,n){e.action=n}function Jh(e){var n=pt(),a=Pe;if(a!==null)return Xh(n,a,e);pt(),n=n.memoizedState,a=pt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function Ka(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=ze.updateQueue,n===null&&(n=ou(),ze.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function Kh(){return pt().memoizedState}function du(e,n,a,u){var c=qt();ze.flags|=e,c.memoizedState=Ka(1|n,{destroy:void 0},a,u===void 0?null:u)}function hu(e,n,a,u){var c=pt();u=u===void 0?null:u;var d=c.memoizedState.inst;Pe!==null&&u!==null&&Co(u,Pe.memoizedState.deps)?c.memoizedState=Ka(n,d,a,u):(ze.flags|=e,c.memoizedState=Ka(1|n,d,a,u))}function $h(e,n){du(8390656,8,e,n)}function Lo(e,n){hu(2048,8,e,n)}function vb(e){ze.flags|=4;var n=ze.updateQueue;if(n===null)n=ou(),ze.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Ph(e){var n=pt().memoizedState;return vb({ref:n,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Wh(e,n){return hu(4,2,e,n)}function em(e,n){return hu(4,4,e,n)}function tm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nm(e,n,a){a=a!=null?a.concat([e]):null,hu(4,4,tm.bind(null,n,e),a)}function Bo(){}function lm(e,n){var a=pt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&Co(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function am(e,n){var a=pt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&Co(n,u[1]))return u[0];if(u=e(),sa){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[u,n],u}function Uo(e,n,a){return a===void 0||(Xn&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=ip(),ze.lanes|=e,Dl|=e,a)}function im(e,n,a,u){return nn(a,n)?a:Ga.current!==null?(e=Uo(e,a,u),nn(e,n)||(bt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Ue&261930)===0?(bt=!0,e.memoizedState=a):(e=ip(),ze.lanes|=e,Dl|=e,n)}function rm(e,n,a,u,c){var d=J.p;J.p=d!==0&&8>d?d:8;var b=T.T,w={};T.T=w,Vo(e,!1,n,a);try{var C=c(),B=T.S;if(B!==null&&B(w,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=pb(C,u);Qi(e,n,G,on(e))}else Qi(e,n,u,on(e))}catch(K){Qi(e,n,{then:function(){},status:"rejected",reason:K},on())}finally{J.p=d,b!==null&&w.types!==null&&(b.types=w.types),T.T=b}}function kb(){}function Ho(e,n,a,u){if(e.tag!==5)throw Error(r(476));var c=um(e).queue;rm(e,c,n,ae,a===null?kb:function(){return sm(e),a(u)})}function um(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:ae},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function sm(e){var n=um(e);n.next===null&&(n=e.alternate.memoizedState),Qi(e,n.next.queue,{},on())}function qo(){return Ot(or)}function om(){return pt().memoizedState}function cm(){return pt().memoizedState}function wb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=on();e=El(a);var u=Cl(n,e,a);u!==null&&(Pt(u,n,a),Vi(u,n,a)),n={cache:po()},e.payload=n;return}n=n.return}}function Sb(e,n,a){var u=on();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},mu(e)?dm(n,a):(a=lo(e,n,a,u),a!==null&&(Pt(a,e,u),hm(a,n,u)))}function fm(e,n,a){var u=on();Qi(e,n,a,u)}function Qi(e,n,a,u){var c={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(mu(e))dm(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,w=d(b,a);if(c.hasEagerState=!0,c.eagerState=w,nn(w,b))return Xr(e,n,c,0),nt===null&&Gr(),!1}catch{}finally{}if(a=lo(e,n,c,u),a!==null)return Pt(a,e,u),hm(a,n,u),!0}return!1}function Vo(e,n,a,u){if(u={lane:2,revertLane:bc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},mu(e)){if(n)throw Error(r(479))}else n=lo(e,a,u,2),n!==null&&Pt(n,e,2)}function mu(e){var n=e.alternate;return e===ze||n!==null&&n===ze}function dm(e,n){Xa=uu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function hm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}var Gi={readContext:Ot,use:cu,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};Gi.useEffectEvent=dt;var mm={readContext:Ot,use:cu,useCallback:function(e,n){return qt().memoizedState=[e,n===void 0?null:n],e},useContext:Ot,useEffect:$h,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,du(4194308,4,tm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return du(4194308,4,e,n)},useInsertionEffect:function(e,n){du(4,2,e,n)},useMemo:function(e,n){var a=qt();n=n===void 0?null:n;var u=e();if(sa){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=qt();if(a!==void 0){var c=a(n);if(sa){Ft(!0);try{a(n)}finally{Ft(!1)}}}else c=n;return u.memoizedState=u.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},u.queue=e,e=e.dispatch=Sb.bind(null,ze,e),[u.memoizedState,e]},useRef:function(e){var n=qt();return e={current:e},n.memoizedState=e},useState:function(e){e=Mo(e);var n=e.queue,a=fm.bind(null,ze,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Bo,useDeferredValue:function(e,n){var a=qt();return Uo(a,e,n)},useTransition:function(){var e=Mo(!1);return e=rm.bind(null,ze,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=ze,c=qt();if(Ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),nt===null)throw Error(r(349));(Ue&127)!==0||Rh(u,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,$h(Bh.bind(null,u,d,e),[e]),u.flags|=2048,Ka(9,{destroy:void 0},Lh.bind(null,u,d,a,n),null),a},useId:function(){var e=qt(),n=nt.identifierPrefix;if(Ve){var a=Dn,u=Tn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=su++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=gb++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:qo,useFormState:Qh,useActionState:Qh,useOptimistic:function(e){var n=qt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Vo.bind(null,ze,!0,a),a.dispatch=n,[e,n]},useMemoCache:Do,useCacheRefresh:function(){return qt().memoizedState=wb.bind(null,ze)},useEffectEvent:function(e){var n=qt(),a={impl:e};return n.memoizedState=a,function(){if((Ge&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Yo={readContext:Ot,use:cu,useCallback:lm,useContext:Ot,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:fu,useRef:Kh,useState:function(){return fu(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=pt();return im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=fu(Jn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Fi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Gh,useActionState:Gh,useOptimistic:function(e,n){var a=pt();return qh(a,Pe,e,n)},useMemoCache:Do,useCacheRefresh:cm};Yo.useEffectEvent=Ph;var pm={readContext:Ot,use:cu,useCallback:lm,useContext:Ot,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:Oo,useRef:Kh,useState:function(){return Oo(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=pt();return Pe===null?Uo(a,e,n):im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=Oo(Jn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Fi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Jh,useActionState:Jh,useOptimistic:function(e,n){var a=pt();return Pe!==null?qh(a,Pe,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Do,useCacheRefresh:cm};pm.useEffectEvent=Ph;function Io(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zo={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&(Pt(n,e,u),Vi(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&(Pt(n,e,u),Vi(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=on(),u=El(a);u.tag=2,n!=null&&(u.callback=n),n=Cl(e,u,a),n!==null&&(Pt(n,e,a),Vi(n,e,a))}};function gm(e,n,a,u,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,b):n.prototype&&n.prototype.isPureReactComponent?!Oi(a,u)||!Oi(c,d):!0}function ym(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&Zo.enqueueReplaceState(n,n.state,null)}function oa(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function xm(e){Qr(e)}function bm(e){console.error(e)}function vm(e){Qr(e)}function pu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function km(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Fo(e,n,a){return a=El(a),a.tag=3,a.payload={element:null},a.callback=function(){pu(e,n)},a}function wm(e){return e=El(e),e.tag=3,e}function Sm(e,n,a,u){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=u.value;e.payload=function(){return c(d)},e.callback=function(){km(n,a,u)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){km(n,a,u),typeof c!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function _b(e,n,a,u,c){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&Ya(n,a,c,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return bn===null?ju():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=c,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),gc(e,u,c)),!1;case 22:return a.flags|=65536,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),gc(e,u,c)),!1}throw Error(r(435,a.tag))}return gc(e,u,c),ju(),!1}if(Ve)return n=an.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,u!==oo&&(e=Error(r(422),{cause:u}),Li(pn(e,a)))):(u!==oo&&(n=Error(r(423),{cause:u}),Li(pn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,u=pn(u,a),c=Fo(e.stateNode,u,c),ko(e,c),ht!==4&&(ht=2)),!1;var d=Error(r(520),{cause:u});if(d=pn(d,a),tr===null?tr=[d]:tr.push(d),ht!==4&&(ht=2),n===null)return!0;u=pn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Fo(a.stateNode,u,e),ko(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(zl===null||!zl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=wm(c),Sm(c,e,a,u),ko(a,c),!1}a=a.return}while(a!==null);return!1}var Qo=Error(r(461)),bt=!1;function Mt(e,n,a,u){n.child=e===null?jh(n,null,a,u):ua(n,e.child,a,u)}function _m(e,n,a,u,c){a=a.render;var d=n.ref;if("ref"in u){var b={};for(var w in u)w!=="ref"&&(b[w]=u[w])}else b=u;return la(n),u=jo(e,n,a,b,d,c),w=Ao(),e!==null&&!bt?(No(e,n,c),Kn(e,n,c)):(Ve&&w&&uo(n),n.flags|=1,Mt(e,n,u,c),n.child)}function Em(e,n,a,u,c){if(e===null){var d=a.type;return typeof d=="function"&&!ao(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,Cm(e,n,d,u,c)):(e=Kr(a.type,null,u,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!ec(e,c)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:Oi,a(b,u)&&e.ref===n.ref)return Kn(e,n,c)}return n.flags|=1,e=Zn(d,u),e.ref=n.ref,e.return=n,n.child=e}function Cm(e,n,a,u,c){if(e!==null){var d=e.memoizedProps;if(Oi(d,u)&&e.ref===n.ref)if(bt=!1,n.pendingProps=u=d,ec(e,c))(e.flags&131072)!==0&&(bt=!0);else return n.lanes=e.lanes,Kn(e,n,c)}return Go(e,n,a,u,c)}function jm(e,n,a,u){var c=u.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(u=n.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;u=c&~d}else u=0,n.child=null;return Am(e,n,d,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&eu(n,d!==null?d.cachePool:null),d!==null?Th(n,d):So(),Dh(n);else return u=n.lanes=536870912,Am(e,n,d!==null?d.baseLanes|a:a,a,u)}else d!==null?(eu(n,d.cachePool),Th(n,d),Al(),n.memoizedState=null):(e!==null&&eu(n,null),So(),Al());return Mt(e,n,c,a),n.child}function Xi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Am(e,n,a,u,c){var d=yo();return d=d===null?null:{parent:yt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&eu(n,null),So(),Dh(n),e!==null&&Ya(e,n,u,!0),n.childLanes=c,null}function gu(e,n){return n=xu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Nm(e,n,a){return ua(n,e.child,null,a),e=gu(n,n.pendingProps),e.flags|=2,rn(n),n.memoizedState=null,e}function Eb(e,n,a){var u=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ve){if(u.mode==="hidden")return e=gu(n,u),n.lanes=536870912,Xi(null,e);if(Eo(n),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,zt=n,rt=null)):e=null,e===null)throw wl(n);return n.lanes=536870912,null}return gu(n,u)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(Eo(n),c)if(n.flags&256)n.flags&=-257,n=Nm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(bt||Ya(e,n,a,!1),c=(a&e.childLanes)!==0,bt||c){if(u=nt,u!==null&&(b=bd(u,a),b!==0&&b!==d.retryLane))throw d.retryLane=b,Wl(e,b),Pt(u,e,b),Qo;ju(),n=Nm(e,n,a)}else e=d.treeContext,rt=vn(b.nextSibling),zt=n,Ve=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=gu(n,u),n.flags|=4096;return n}return e=Zn(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function yu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Go(e,n,a,u,c){return la(n),a=jo(e,n,a,u,void 0,c),u=Ao(),e!==null&&!bt?(No(e,n,c),Kn(e,n,c)):(Ve&&u&&uo(n),n.flags|=1,Mt(e,n,a,c),n.child)}function Tm(e,n,a,u,c,d){return la(n),n.updateQueue=null,a=Oh(n,u,a,c),zh(e),u=Ao(),e!==null&&!bt?(No(e,n,d),Kn(e,n,d)):(Ve&&u&&uo(n),n.flags|=1,Mt(e,n,a,d),n.child)}function Dm(e,n,a,u,c){if(la(n),n.stateNode===null){var d=Ua,b=a.contextType;typeof b=="object"&&b!==null&&(d=Ot(b)),d=new a(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Zo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},bo(n),b=a.contextType,d.context=typeof b=="object"&&b!==null?Ot(b):Ua,d.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Io(n,a,b,u),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&Zo.enqueueReplaceState(d,d.state,null),Ii(n,u,d,c),Yi(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var w=n.memoizedProps,C=oa(a,w);d.props=C;var B=d.context,G=a.contextType;b=Ua,typeof G=="object"&&G!==null&&(b=Ot(G));var K=a.getDerivedStateFromProps;G=typeof K=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||B!==b)&&ym(n,d,u,b),_l=!1;var U=n.memoizedState;d.state=U,Ii(n,u,d,c),Yi(),B=n.memoizedState,w||U!==B||_l?(typeof K=="function"&&(Io(n,a,K,u),B=n.memoizedState),(C=_l||gm(n,a,C,u,U,B,b))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=B),d.props=u,d.state=B,d.context=b,u=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,vo(e,n),b=n.memoizedProps,G=oa(a,b),d.props=G,K=n.pendingProps,U=d.context,B=a.contextType,C=Ua,typeof B=="object"&&B!==null&&(C=Ot(B)),w=a.getDerivedStateFromProps,(B=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==K||U!==C)&&ym(n,d,u,C),_l=!1,U=n.memoizedState,d.state=U,Ii(n,u,d,c),Yi();var Y=n.memoizedState;b!==K||U!==Y||_l||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof w=="function"&&(Io(n,a,w,u),Y=n.memoizedState),(G=_l||gm(n,a,G,u,U,Y,C)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(B||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,Y,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,Y,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=Y),d.props=u,d.state=Y,d.context=C,u=G):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,yu(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=ua(n,e.child,null,c),n.child=ua(n,null,a,c)):Mt(e,n,a,c),n.memoizedState=d.state,e=n.child):e=Kn(e,n,c),e}function zm(e,n,a,u){return ta(),n.flags|=256,Mt(e,n,a,u),n.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jo(e){return{baseLanes:e,cachePool:kh()}}function Ko(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=sn),e}function Om(e,n,a){var u=n.pendingProps,c=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),b&&(c=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ve){if(c?jl(n):Al(),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,zt=n,rt=null)):e=null,e===null)throw wl(n);return zc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,c?(Al(),c=n.mode,w=xu({mode:"hidden",children:w},c),u=ea(u,c,a,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,b,a),n.memoizedState=Xo,Xi(null,u)):(jl(n),$o(n,w))}var C=e.memoizedState;if(C!==null&&(w=C.dehydrated,w!==null)){if(d)n.flags&256?(jl(n),n.flags&=-257,n=Po(e,n,a)):n.memoizedState!==null?(Al(),n.child=e.child,n.flags|=128,n=null):(Al(),w=u.fallback,c=n.mode,u=xu({mode:"visible",children:u.children},c),w=ea(w,c,a,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,ua(n,e.child,null,a),u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,b,a),n.memoizedState=Xo,n=Xi(null,u));else if(jl(n),zc(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var B=b.dgst;b=B,u=Error(r(419)),u.stack="",u.digest=b,Li({value:u,source:null,stack:null}),n=Po(e,n,a)}else if(bt||Ya(e,n,a,!1),b=(a&e.childLanes)!==0,bt||b){if(b=nt,b!==null&&(u=bd(b,a),u!==0&&u!==C.retryLane))throw C.retryLane=u,Wl(e,u),Pt(b,e,u),Qo;Dc(w)||ju(),n=Po(e,n,a)}else Dc(w)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,rt=vn(w.nextSibling),zt=n,Ve=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=$o(n,u.children),n.flags|=4096);return n}return c?(Al(),w=u.fallback,c=n.mode,C=e.child,B=C.sibling,u=Zn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,B!==null?w=Zn(B,w):(w=ea(w,c,a,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,Xi(null,u),u=n.child,w=e.child.memoizedState,w===null?w=Jo(a):(c=w.cachePool,c!==null?(C=yt._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=kh(),w={baseLanes:w.baseLanes|a,cachePool:c}),u.memoizedState=w,u.childLanes=Ko(e,b,a),n.memoizedState=Xo,Xi(e.child,u)):(jl(n),a=e.child,e=a.sibling,a=Zn(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function $o(e,n){return n=xu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function xu(e,n){return e=ln(22,e,null,n),e.lanes=0,e}function Po(e,n,a){return ua(n,e.child,null,a),e=$o(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mm(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ho(e.return,n,a)}function Wo(e,n,a,u,c,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:c,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=u,b.tail=a,b.tailMode=c,b.treeForkCount=d)}function Rm(e,n,a){var u=n.pendingProps,c=u.revealOrder,d=u.tail;u=u.children;var b=mt.current,w=(b&2)!==0;if(w?(b=b&1|2,n.flags|=128):b&=1,S(mt,b),Mt(e,n,u,a),u=Ve?Ri:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mm(e,a,n);else if(e.tag===19)Mm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&ru(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),Wo(n,!1,c,a,d,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&ru(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Wo(n,!0,a,null,d,u);break;case"together":Wo(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function Kn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Dl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ya(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Zn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Zn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function ec(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function Cb(e,n,a){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Sl(n,yt,e.memoizedState.cache),ta();break;case 27:case 5:ft(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Sl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Eo(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(jl(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Om(e,n,a):(jl(n),e=Kn(e,n,a),e!==null?e.sibling:null);jl(n);break;case 19:var c=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(Ya(e,n,a,!1),u=(a&n.childLanes)!==0),c){if(u)return Rm(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),S(mt,mt.current),u)break;return null;case 22:return n.lanes=0,jm(e,n,a,n.pendingProps);case 24:Sl(n,yt,e.memoizedState.cache)}return Kn(e,n,a)}function Lm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)bt=!0;else{if(!ec(e,a)&&(n.flags&128)===0)return bt=!1,Cb(e,n,a);bt=(e.flags&131072)!==0}else bt=!1,Ve&&(n.flags&1048576)!==0&&mh(n,Ri,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=ia(n.elementType),n.type=e,typeof e=="function")ao(e)?(u=oa(e,u),n.tag=1,n=Dm(null,n,e,u,a)):(n.tag=0,n=Go(null,n,e,u,a));else{if(e!=null){var c=e.$$typeof;if(c===te){n.tag=11,n=_m(null,n,e,u,a);break e}else if(c===P){n.tag=14,n=Em(null,n,e,u,a);break e}}throw n=re(e)||e,Error(r(306,n,""))}}return n;case 0:return Go(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,c=oa(u,n.pendingProps),Dm(e,n,u,c,a);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var d=n.memoizedState;c=d.element,vo(e,n),Ii(n,u,null,a);var b=n.memoizedState;if(u=b.cache,Sl(n,yt,u),u!==d.cache&&mo(n,[yt],a,!0),Yi(),u=b.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=zm(e,n,u,a);break e}else if(u!==c){c=pn(Error(r(424)),n),Li(c),n=zm(e,n,u,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=vn(e.firstChild),zt=n,Ve=!0,kl=null,xn=!0,a=jh(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ta(),u===c){n=Kn(e,n,a);break e}Mt(e,n,u,a)}n=n.child}return n;case 26:return yu(e,n),e===null?(a=Gp(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ve||(a=n.type,e=n.pendingProps,u=Mu(ge.current).createElement(a),u[Dt]=n,u[Qt]=e,Rt(u,a,e),Ct(u),n.stateNode=u):n.memoizedState=Gp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return ft(n),e===null&&Ve&&(u=n.stateNode=Zp(n.type,n.pendingProps,ge.current),zt=n,xn=!0,c=rt,Ll(n.type)?(Oc=c,rt=vn(u.firstChild)):rt=c),Mt(e,n,n.pendingProps.children,a),yu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ve&&((c=u=rt)&&(u=n1(u,n.type,n.pendingProps,xn),u!==null?(n.stateNode=u,zt=n,rt=vn(u.firstChild),xn=!1,c=!0):c=!1),c||wl(n)),ft(n),c=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,u=d.children,Ac(c,d)?u=null:b!==null&&Ac(c,b)&&(n.flags|=32),n.memoizedState!==null&&(c=jo(e,n,yb,null,null,a),or._currentValue=c),yu(e,n),Mt(e,n,u,a),n.child;case 6:return e===null&&Ve&&((e=a=rt)&&(a=l1(a,n.pendingProps,xn),a!==null?(n.stateNode=a,zt=n,rt=null,e=!0):e=!1),e||wl(n)),null;case 13:return Om(e,n,a);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ua(n,null,u,a):Mt(e,n,u,a),n.child;case 11:return _m(e,n,n.type,n.pendingProps,a);case 7:return Mt(e,n,n.pendingProps,a),n.child;case 8:return Mt(e,n,n.pendingProps.children,a),n.child;case 12:return Mt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,Sl(n,n.type,u.value),Mt(e,n,u.children,a),n.child;case 9:return c=n.type._context,u=n.pendingProps.children,la(n),c=Ot(c),u=u(c),n.flags|=1,Mt(e,n,u,a),n.child;case 14:return Em(e,n,n.type,n.pendingProps,a);case 15:return Cm(e,n,n.type,n.pendingProps,a);case 19:return Rm(e,n,a);case 31:return Eb(e,n,a);case 22:return jm(e,n,a,n.pendingProps);case 24:return la(n),u=Ot(yt),e===null?(c=yo(),c===null&&(c=nt,d=po(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:u,cache:c},bo(n),Sl(n,yt,c)):((e.lanes&a)!==0&&(vo(e,n),Ii(n,null,null,a),Yi()),c=e.memoizedState,d=n.memoizedState,c.parent!==u?(c={parent:u,cache:u},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),Sl(n,yt,u)):(u=d.cache,Sl(n,yt,u),u!==c.cache&&mo(n,[yt],a,!0))),Mt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function $n(e){e.flags|=4}function tc(e,n,a,u,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(op())e.flags|=8192;else throw ra=nu,xo}else e.flags&=-16777217}function Bm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pp(n))if(op())e.flags|=8192;else throw ra=nu,xo}function bu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?gd():536870912,e.lanes|=n,ei|=n)}function Ji(e,n){if(!Ve)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ut(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags&65011712,u|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags,u|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function jb(e,n,a){var u=n.pendingProps;switch(so(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(n),null;case 1:return ut(n),null;case 3:return a=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Gn(yt),Te(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Va(n)?$n(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,co())),ut(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?($n(n),d!==null?(ut(n),Bm(n,d)):(ut(n),tc(n,c,null,u,a))):d?d!==e.memoizedState?($n(n),ut(n),Bm(n,d)):(ut(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&$n(n),ut(n),tc(n,c,e,u,a)),null;case 27:if(Tt(n),a=ge.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}e=ue.current,Va(n)?gh(n):(e=Zp(c,u,a),n.stateNode=e,$n(n))}return ut(n),null;case 5:if(Tt(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}if(d=ue.current,Va(n))gh(n);else{var b=Mu(ge.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof u.is=="string"?b.createElement("select",{is:u.is}):b.createElement("select"),u.multiple?d.multiple=!0:u.size&&(d.size=u.size);break;default:d=typeof u.is=="string"?b.createElement(c,{is:u.is}):b.createElement(c)}}d[Dt]=n,d[Qt]=u;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=d;e:switch(Rt(d,c,u),c){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&$n(n)}}return ut(n),tc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=ge.current,Va(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,c=zt,c!==null)switch(c.tag){case 27:case 5:u=c.memoizedProps}e[Dt]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Op(e.nodeValue,a)),e||wl(n,!0)}else e=Mu(e).createTextNode(u),e[Dt]=n,n.stateNode=e}return ut(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=Va(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Dt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),e=!1}else a=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(rn(n),n):(rn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return ut(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Va(n),u!==null&&u.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Dt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),c=!1}else c=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(rn(n),n):(rn(n),null)}return rn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,c=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(c=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==c&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),bu(n,n.updateQueue),ut(n),null);case 4:return Te(),e===null&&Sc(n.stateNode.containerInfo),ut(n),null;case 10:return Gn(n.type),ut(n),null;case 19:if(F(mt),u=n.memoizedState,u===null)return ut(n),null;if(c=(n.flags&128)!==0,d=u.rendering,d===null)if(c)Ji(u,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=ru(e),d!==null){for(n.flags|=128,Ji(u,!1),e=d.updateQueue,n.updateQueue=e,bu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)fh(a,e),a=a.sibling;return S(mt,mt.current&1|2),Ve&&Fn(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&gt()>_u&&(n.flags|=128,c=!0,Ji(u,!1),n.lanes=4194304)}else{if(!c)if(e=ru(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,bu(n,e),Ji(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Ve)return ut(n),null}else 2*gt()-u.renderingStartTime>_u&&a!==536870912&&(n.flags|=128,c=!0,Ji(u,!1),n.lanes=4194304);u.isBackwards?(d.sibling=n.child,n.child=d):(e=u.last,e!==null?e.sibling=d:n.child=d,u.last=d)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=gt(),e.sibling=null,a=mt.current,S(mt,c?a&1|2:a&1),Ve&&Fn(n,u.treeForkCount),e):(ut(n),null);case 22:case 23:return rn(n),_o(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(ut(n),n.subtreeFlags&6&&(n.flags|=8192)):ut(n),a=n.updateQueue,a!==null&&bu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&F(aa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Gn(yt),ut(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Ab(e,n){switch(so(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Gn(yt),Te(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Tt(n),null;case 31:if(n.memoizedState!==null){if(rn(n),n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(mt),null;case 4:return Te(),null;case 10:return Gn(n.type),null;case 22:case 23:return rn(n),_o(),e!==null&&F(aa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Gn(yt),null;case 25:return null;default:return null}}function Um(e,n){switch(so(n),n.tag){case 3:Gn(yt),Te();break;case 26:case 27:case 5:Tt(n);break;case 4:Te();break;case 31:n.memoizedState!==null&&rn(n);break;case 13:rn(n);break;case 19:F(mt);break;case 10:Gn(n.type);break;case 22:case 23:rn(n),_o(),e!==null&&F(aa);break;case 24:Gn(yt)}}function Ki(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var c=u.next;a=c;do{if((a.tag&e)===e){u=void 0;var d=a.create,b=a.inst;u=d(),b.destroy=u}a=a.next}while(a!==c)}}catch(w){Ke(n,n.return,w)}}function Nl(e,n,a){try{var u=n.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var d=c.next;u=d;do{if((u.tag&e)===e){var b=u.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,c=n;var C=a,B=w;try{B()}catch(G){Ke(c,C,G)}}}u=u.next}while(u!==d)}}catch(G){Ke(n,n.return,G)}}function Hm(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Nh(n,a)}catch(u){Ke(e,e.return,u)}}}function qm(e,n,a){a.props=oa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){Ke(e,n,u)}}function $i(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(c){Ke(e,n,c)}}function zn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(c){Ke(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ke(e,n,c)}else a.current=null}function Vm(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(c){Ke(e,e.return,c)}}function nc(e,n,a){try{var u=e.stateNode;Kb(u,e.type,a,n),u[Qt]=n}catch(c){Ke(e,e.return,c)}}function Ym(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ym(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&&Ll(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,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=Yn));else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(ac(e,n,a),e=e.sibling;e!==null;)ac(e,n,a),e=e.sibling}function vu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vu(e,n,a),e=e.sibling;e!==null;)vu(e,n,a),e=e.sibling}function Im(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Rt(n,u,a),n[Dt]=e,n[Qt]=a}catch(d){Ke(e,e.return,d)}}var Pn=!1,vt=!1,ic=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,jt=null;function Nb(e,n){if(e=e.containerInfo,Cc=Vu,e=nh(e),$s(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var c=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,w=-1,C=-1,B=0,G=0,K=e,U=null;t:for(;;){for(var Y;K!==a||c!==0&&K.nodeType!==3||(w=b+c),K!==d||u!==0&&K.nodeType!==3||(C=b+u),K.nodeType===3&&(b+=K.nodeValue.length),(Y=K.firstChild)!==null;)U=K,K=Y;for(;;){if(K===e)break t;if(U===a&&++B===c&&(w=b),U===d&&++G===u&&(C=b),(Y=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=Y}a=w===-1||C===-1?null:{start:w,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(jc={focusedElem:e,selectionRange:a},Vu=!1,jt=n;jt!==null;)if(n=jt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,jt=e;else for(;jt!==null;){switch(n=jt,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,u=a.stateNode;try{var he=oa(a.type,c);e=u.getSnapshotBeforeUpdate(he,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(_e){Ke(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,jt=e;break}jt=n.return}}function Fm(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:el(e,a),u&4&&Ki(5,a);break;case 1:if(el(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){Ke(a,a.return,b)}else{var c=oa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ke(a,a.return,b)}}u&64&&Hm(a),u&512&&$i(a,a.return);break;case 3:if(el(e,a),u&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Nh(e,n)}catch(b){Ke(a,a.return,b)}}break;case 27:n===null&&u&4&&Im(a);case 26:case 5:el(e,a),n===null&&u&4&&Vm(a),u&512&&$i(a,a.return);break;case 12:el(e,a);break;case 31:el(e,a),u&4&&Xm(e,a);break;case 13:el(e,a),u&4&&Jm(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ub.bind(null,a),a1(e,a))));break;case 22:if(u=a.memoizedState!==null||Pn,!u){n=n!==null&&n.memoizedState!==null||vt,c=Pn;var d=vt;Pn=u,(vt=n)&&!d?tl(e,a,(a.subtreeFlags&8772)!==0):el(e,a),Pn=c,vt=d}break;case 30:break;default:el(e,a)}}function Qm(e){var n=e.alternate;n!==null&&(e.alternate=null,Qm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ms(n)),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 ct=null,Xt=!1;function Wn(e,n,a){for(a=a.child;a!==null;)Gm(e,n,a),a=a.sibling}function Gm(e,n,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ht,a)}catch{}switch(a.tag){case 26:vt||zn(a,n),Wn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:vt||zn(a,n);var u=ct,c=Xt;Ll(a.type)&&(ct=a.stateNode,Xt=!1),Wn(e,n,a),rr(a.stateNode),ct=u,Xt=c;break;case 5:vt||zn(a,n);case 6:if(u=ct,c=Xt,ct=null,Wn(e,n,a),ct=u,Xt=c,ct!==null)if(Xt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(d){Ke(a,n,d)}else try{ct.removeChild(a.stateNode)}catch(d){Ke(a,n,d)}break;case 18:ct!==null&&(Xt?(e=ct,Hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),si(e)):Hp(ct,a.stateNode));break;case 4:u=ct,c=Xt,ct=a.stateNode.containerInfo,Xt=!0,Wn(e,n,a),ct=u,Xt=c;break;case 0:case 11:case 14:case 15:Nl(2,a,n),vt||Nl(4,a,n),Wn(e,n,a);break;case 1:vt||(zn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&qm(a,n,u)),Wn(e,n,a);break;case 21:Wn(e,n,a);break;case 22:vt=(u=vt)||a.memoizedState!==null,Wn(e,n,a),vt=u;break;default:Wn(e,n,a)}}function Xm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{si(e)}catch(a){Ke(n,n.return,a)}}}function Jm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{si(e)}catch(a){Ke(n,n.return,a)}}function Tb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Zm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Zm),n;default:throw Error(r(435,e.tag))}}function ku(e,n){var a=Tb(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var c=Hb.bind(null,e,u);u.then(c,c)}})}function Jt(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var c=a[u],d=e,b=n,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(Ll(w.type)){ct=w.stateNode,Xt=!1;break e}break;case 5:ct=w.stateNode,Xt=!1;break e;case 3:case 4:ct=w.stateNode.containerInfo,Xt=!0;break e}w=w.return}if(ct===null)throw Error(r(160));Gm(d,b,c),ct=null,Xt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Km(n,e),n=n.sibling}var Cn=null;function Km(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(n,e),Kt(e),u&4&&(Nl(3,e,e.return),Ki(3,e),Nl(5,e,e.return));break;case 1:Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),u&64&&Pn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var c=Cn;if(Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),u&4){var d=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(u){case"title":d=c.getElementsByTagName("title")[0],(!d||d[_i]||d[Dt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(u),c.head.insertBefore(d,c.querySelector("head > title"))),Rt(d,u,a),d[Dt]=e,Ct(d),u=d;break e;case"link":var b=Kp("link","href",c).get(u+(a.href||""));if(b){for(var w=0;w<b.length;w++)if(d=b[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(w,1);break t}}d=c.createElement(u),Rt(d,u,a),c.head.appendChild(d);break;case"meta":if(b=Kp("meta","content",c).get(u+(a.content||""))){for(w=0;w<b.length;w++)if(d=b[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(w,1);break t}}d=c.createElement(u),Rt(d,u,a),c.head.appendChild(d);break;default:throw Error(r(468,u))}d[Dt]=e,Ct(d),u=d}e.stateNode=u}else $p(c,e.type,e.stateNode);else e.stateNode=Jp(c,u,e.memoizedProps);else d!==u?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,u===null?$p(c,e.type,e.stateNode):Jp(c,u,e.memoizedProps)):u===null&&e.stateNode!==null&&nc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),a!==null&&u&4&&nc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),e.flags&32){c=e.stateNode;try{Da(c,"")}catch(he){Ke(e,e.return,he)}}u&4&&e.stateNode!=null&&(c=e.memoizedProps,nc(e,c,a!==null?a.memoizedProps:c)),u&1024&&(ic=!0);break;case 6:if(Jt(n,e),Kt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(he){Ke(e,e.return,he)}}break;case 3:if(Bu=null,c=Cn,Cn=Ru(n.containerInfo),Jt(n,e),Cn=c,Kt(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{si(n.containerInfo)}catch(he){Ke(e,e.return,he)}ic&&(ic=!1,$m(e));break;case 4:u=Cn,Cn=Ru(e.stateNode.containerInfo),Jt(n,e),Kt(e),Cn=u;break;case 12:Jt(n,e),Kt(e);break;case 31:Jt(n,e),Kt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 13:Jt(n,e),Kt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Su=gt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 22:c=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,B=Pn,G=vt;if(Pn=B||c,vt=G||C,Jt(n,e),vt=G,Pn=B,Kt(e),u&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||C||Pn||vt||ca(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{if(d=C.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=C.stateNode;var K=C.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(he){Ke(C,C.return,he)}}}else if(n.tag===6){if(a===null){C=n;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(he){Ke(C,C.return,he)}}}else if(n.tag===18){if(a===null){C=n;try{var Y=C.stateNode;c?qp(Y,!0):qp(C.stateNode,!1)}catch(he){Ke(C,C.return,he)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,ku(e,a))));break;case 19:Jt(n,e),Kt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 30:break;case 21:break;default:Jt(n,e),Kt(e)}}function Kt(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Ym(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=lc(e);vu(e,d,c);break;case 5:var b=a.stateNode;a.flags&32&&(Da(b,""),a.flags&=-33);var w=lc(e);vu(e,w,b);break;case 3:case 4:var C=a.stateNode.containerInfo,B=lc(e);ac(e,B,C);break;default:throw Error(r(161))}}catch(G){Ke(e,e.return,G)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function $m(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;$m(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function el(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Fm(e,n.alternate,n),n=n.sibling}function ca(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Nl(4,n,n.return),ca(n);break;case 1:zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&qm(n,n.return,a),ca(n);break;case 27:rr(n.stateNode);case 26:case 5:zn(n,n.return),ca(n);break;case 22:n.memoizedState===null&&ca(n);break;case 30:ca(n);break;default:ca(n)}e=e.sibling}}function tl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,c=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:tl(c,d,a),Ki(4,d);break;case 1:if(tl(c,d,a),u=d,c=u.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){Ke(u,u.return,B)}if(u=d,c=u.updateQueue,c!==null){var w=u.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)Ah(C[c],w)}catch(B){Ke(u,u.return,B)}}a&&b&64&&Hm(d),$i(d,d.return);break;case 27:Im(d);case 26:case 5:tl(c,d,a),a&&u===null&&b&4&&Vm(d),$i(d,d.return);break;case 12:tl(c,d,a);break;case 31:tl(c,d,a),a&&b&4&&Xm(c,d);break;case 13:tl(c,d,a),a&&b&4&&Jm(c,d);break;case 22:d.memoizedState===null&&tl(c,d,a),$i(d,d.return);break;case 30:break;default:tl(c,d,a)}n=n.sibling}}function rc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Bi(a))}function uc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bi(e))}function jn(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pm(e,n,a,u),n=n.sibling}function Pm(e,n,a,u){var c=n.flags;switch(n.tag){case 0:case 11:case 15:jn(e,n,a,u),c&2048&&Ki(9,n);break;case 1:jn(e,n,a,u);break;case 3:jn(e,n,a,u),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bi(e)));break;case 12:if(c&2048){jn(e,n,a,u),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,w=d.onPostCommit;typeof w=="function"&&w(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ke(n,n.return,C)}}else jn(e,n,a,u);break;case 31:jn(e,n,a,u);break;case 13:jn(e,n,a,u);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?jn(e,n,a,u):Pi(e,n):d._visibility&2?jn(e,n,a,u):(d._visibility|=2,$a(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),c&2048&&rc(b,n);break;case 24:jn(e,n,a,u),c&2048&&uc(n.alternate,n);break;default:jn(e,n,a,u)}}function $a(e,n,a,u,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,w=a,C=u,B=b.flags;switch(b.tag){case 0:case 11:case 15:$a(d,b,w,C,c),Ki(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?$a(d,b,w,C,c):Pi(d,b):(G._visibility|=2,$a(d,b,w,C,c)),c&&B&2048&&rc(b.alternate,b);break;case 24:$a(d,b,w,C,c),c&&B&2048&&uc(b.alternate,b);break;default:$a(d,b,w,C,c)}n=n.sibling}}function Pi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,c=u.flags;switch(u.tag){case 22:Pi(a,u),c&2048&&rc(u.alternate,u);break;case 24:Pi(a,u),c&2048&&uc(u.alternate,u);break;default:Pi(a,u)}n=n.sibling}}var Wi=8192;function Pa(e,n,a){if(e.subtreeFlags&Wi)for(e=e.child;e!==null;)Wm(e,n,a),e=e.sibling}function Wm(e,n,a){switch(e.tag){case 26:Pa(e,n,a),e.flags&Wi&&e.memoizedState!==null&&g1(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Pa(e,n,a);break;case 3:case 4:var u=Cn;Cn=Ru(e.stateNode.containerInfo),Pa(e,n,a),Cn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Wi,Wi=16777216,Pa(e,n,a),Wi=u):Pa(e,n,a));break;default:Pa(e,n,a)}}function ep(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function er(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];jt=u,np(u,e)}ep(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)tp(e),e=e.sibling}function tp(e){switch(e.tag){case 0:case 11:case 15:er(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:er(e);break;case 12:er(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,wu(e)):er(e);break;default:er(e)}}function wu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];jt=u,np(u,e)}ep(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Nl(8,n,n.return),wu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,wu(n));break;default:wu(n)}e=e.sibling}}function np(e,n){for(;jt!==null;){var a=jt;switch(a.tag){case 0:case 11:case 15:Nl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Bi(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,jt=u;else e:for(a=e;jt!==null;){u=jt;var c=u.sibling,d=u.return;if(Qm(u),u===a){jt=null;break e}if(c!==null){c.return=d,jt=c;break e}jt=d}}}var Db={getCacheForType:function(e){var n=Ot(yt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Ot(yt).controller.signal}},zb=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Re=null,Ue=0,Je=0,un=null,Tl=!1,Wa=!1,sc=!1,nl=0,ht=0,Dl=0,fa=0,oc=0,sn=0,ei=0,tr=null,$t=null,cc=!1,Su=0,lp=0,_u=1/0,Eu=null,zl=null,Et=0,Ol=null,ti=null,ll=0,fc=0,dc=null,ap=null,nr=0,hc=null;function on(){return(Ge&2)!==0&&Ue!==0?Ue&-Ue:T.T!==null?bc():vd()}function ip(){if(sn===0)if((Ue&536870912)===0||Ve){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),sn=e}else sn=536870912;return e=an.current,e!==null&&(e.flags|=32),sn}function Pt(e,n,a){(e===nt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(ni(e,0),Ml(e,Ue,sn,!1)),Si(e,a),((Ge&2)===0||e!==nt)&&(e===nt&&((Ge&2)===0&&(fa|=a),ht===4&&Ml(e,Ue,sn,!1)),On(e))}function rp(e,n,a){if((Ge&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||wi(e,n),c=u?Rb(e,n):pc(e,n,!0),d=u;do{if(c===0){Wa&&!u&&Ml(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!Ob(a)){c=pc(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var w=e;c=tr;var C=w.current.memoizedState.isDehydrated;if(C&&(ni(w,b).flags|=256),b=pc(w,b,!1),b!==2){if(sc&&!C){w.errorRecoveryDisabledLanes|=d,fa|=d,c=4;break e}d=$t,$t=c,d!==null&&($t===null?$t=d:$t.push.apply($t,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){ni(e,0),Ml(e,n,0,!0);break}e:{switch(u=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Ml(u,n,sn,!Tl);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Su+300-gt(),10<c)){if(Ml(u,n,sn,!Tl),Rr(u,0,!0)!==0)break e;ll=n,u.timeoutHandle=Bp(up.bind(null,u,a,$t,Eu,cc,n,sn,fa,ei,Tl,d,"Throttled",-0,0),c);break e}up(u,a,$t,Eu,cc,n,sn,fa,ei,Tl,d,null,-0,0)}}break}while(!0);On(e)}function up(e,n,a,u,c,d,b,w,C,B,G,K,U,Y){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Yn},Wm(n,d,K);var he=(d&62914560)===d?Su-gt():(d&4194048)===d?lp-gt():0;if(he=y1(K,he),he!==null){ll=d,e.cancelPendingCommit=he(pp.bind(null,e,n,d,a,u,c,b,w,C,G,K,null,U,Y)),Ml(e,d,b,!B);return}}pp(e,n,d,a,u,c,b,w,C)}function Ob(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var c=a[u],d=c.getSnapshot;c=c.value;try{if(!nn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ml(e,n,a,u){n&=~oc,n&=~fa,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var c=n;0<c;){var d=31-tt(c),b=1<<d;u[d]=-1,c&=~b}a!==0&&yd(e,a,n)}function Cu(){return(Ge&6)===0?(lr(0),!1):!0}function mc(){if(Re!==null){if(Je===0)var e=Re.return;else e=Re,Qn=na=null,To(e),Qa=null,Hi=0,e=Re;for(;e!==null;)Um(e.alternate,e),e=e.return;Re=null}}function ni(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ll=0,mc(),nt=e,Re=a=Zn(e.current,null),Ue=n,Je=0,un=null,Tl=!1,Wa=wi(e,n),sc=!1,ei=sn=oc=fa=Dl=ht=0,$t=tr=null,cc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var c=31-tt(u),d=1<<c;n|=e[c],u&=~d}return nl=n,Gr(),a}function sp(e,n){ze=null,T.H=Gi,n===Fa||n===tu?(n=_h(),Je=3):n===xo?(n=_h(),Je=4):Je=n===Qo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,un=n,Re===null&&(ht=1,pu(e,pn(n,e.current)))}function op(){var e=an.current;return e===null?!0:(Ue&4194048)===Ue?bn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===bn:!1}function cp(){var e=T.H;return T.H=Gi,e===null?Gi:e}function fp(){var e=T.A;return T.A=Db,e}function ju(){ht=4,Tl||(Ue&4194048)!==Ue&&an.current!==null||(Wa=!0),(Dl&134217727)===0&&(fa&134217727)===0||nt===null||Ml(nt,Ue,sn,!1)}function pc(e,n,a){var u=Ge;Ge|=2;var c=cp(),d=fp();(nt!==e||Ue!==n)&&(Eu=null,ni(e,n)),n=!1;var b=ht;e:do try{if(Je!==0&&Re!==null){var w=Re,C=un;switch(Je){case 8:mc(),b=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(n=!0);var B=Je;if(Je=0,un=null,li(e,w,C,B),a&&Wa){b=0;break e}break;default:B=Je,Je=0,un=null,li(e,w,C,B)}}Mb(),b=ht;break}catch(G){sp(e,G)}while(!0);return n&&e.shellSuspendCounter++,Qn=na=null,Ge=u,T.H=c,T.A=d,Re===null&&(nt=null,Ue=0,Gr()),b}function Mb(){for(;Re!==null;)dp(Re)}function Rb(e,n){var a=Ge;Ge|=2;var u=cp(),c=fp();nt!==e||Ue!==n?(Eu=null,_u=gt()+500,ni(e,n)):Wa=wi(e,n);e:do try{if(Je!==0&&Re!==null){n=Re;var d=un;t:switch(Je){case 1:Je=0,un=null,li(e,n,d,1);break;case 2:case 9:if(wh(d)){Je=0,un=null,hp(n);break}n=function(){Je!==2&&Je!==9||nt!==e||(Je=7),On(e)},d.then(n,n);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:wh(d)?(Je=0,un=null,hp(n)):(Je=0,un=null,li(e,n,d,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var w=Re;if(b?Pp(b):w.stateNode.complete){Je=0,un=null;var C=w.sibling;if(C!==null)Re=C;else{var B=w.return;B!==null?(Re=B,Au(B)):Re=null}break t}}Je=0,un=null,li(e,n,d,5);break;case 6:Je=0,un=null,li(e,n,d,6);break;case 8:mc(),ht=6;break e;default:throw Error(r(462))}}Lb();break}catch(G){sp(e,G)}while(!0);return Qn=na=null,T.H=u,T.A=c,Ge=a,Re!==null?0:(nt=null,Ue=0,Gr(),ht)}function Lb(){for(;Re!==null&&!vi();)dp(Re)}function dp(e){var n=Lm(e.alternate,e,nl);e.memoizedProps=e.pendingProps,n===null?Au(e):Re=n}function hp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Tm(a,n,n.pendingProps,n.type,void 0,Ue);break;case 11:n=Tm(a,n,n.pendingProps,n.type.render,n.ref,Ue);break;case 5:To(n);default:Um(a,n),n=Re=fh(n,nl),n=Lm(a,n,nl)}e.memoizedProps=e.pendingProps,n===null?Au(e):Re=n}function li(e,n,a,u){Qn=na=null,To(n),Qa=null,Hi=0;var c=n.return;try{if(_b(e,c,n,a,Ue)){ht=1,pu(e,pn(a,e.current)),Re=null;return}}catch(d){if(c!==null)throw Re=c,d;ht=1,pu(e,pn(a,e.current)),Re=null;return}n.flags&32768?(Ve||u===1?e=!0:Wa||(Ue&536870912)!==0?e=!1:(Tl=e=!0,(u===2||u===9||u===3||u===6)&&(u=an.current,u!==null&&u.tag===13&&(u.flags|=16384))),mp(n,e)):Au(n)}function Au(e){var n=e;do{if((n.flags&32768)!==0){mp(n,Tl);return}e=n.return;var a=jb(n.alternate,n,nl);if(a!==null){Re=a;return}if(n=n.sibling,n!==null){Re=n;return}Re=n=e}while(n!==null);ht===0&&(ht=5)}function mp(e,n){do{var a=Ab(e.alternate,e);if(a!==null){a.flags&=32767,Re=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Re=e;return}Re=e=a}while(e!==null);ht=6,Re=null}function pp(e,n,a,u,c,d,b,w,C){e.cancelPendingCommit=null;do Nu();while(Et!==0);if((Ge&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=no,p0(e,a,d,b,w,C),e===nt&&(Re=nt=null,Ue=0),ti=n,Ol=e,ll=a,fc=d,dc=c,ap=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qb(ve,function(){return vp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=T.T,T.T=null,c=J.p,J.p=2,b=Ge,Ge|=4;try{Nb(e,n,a)}finally{Ge=b,J.p=c,T.T=u}}Et=1,gp(),yp(),xp()}}function gp(){if(Et===1){Et=0;var e=Ol,n=ti,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var u=J.p;J.p=2;var c=Ge;Ge|=4;try{Km(n,e);var d=jc,b=nh(e.containerInfo),w=d.focusedElem,C=d.selectionRange;if(b!==w&&w&&w.ownerDocument&&th(w.ownerDocument.documentElement,w)){if(C!==null&&$s(w)){var B=C.start,G=C.end;if(G===void 0&&(G=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(G,w.value.length);else{var K=w.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var Y=U.getSelection(),he=w.textContent.length,_e=Math.min(C.start,he),et=C.end===void 0?_e:Math.min(C.end,he);!Y.extend&&_e>et&&(b=et,et=_e,_e=b);var D=eh(w,_e),A=eh(w,et);if(D&&A&&(Y.rangeCount!==1||Y.anchorNode!==D.node||Y.anchorOffset!==D.offset||Y.focusNode!==A.node||Y.focusOffset!==A.offset)){var L=K.createRange();L.setStart(D.node,D.offset),Y.removeAllRanges(),_e>et?(Y.addRange(L),Y.extend(A.node,A.offset)):(L.setEnd(A.node,A.offset),Y.addRange(L))}}}}for(K=[],Y=w;Y=Y.parentNode;)Y.nodeType===1&&K.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<K.length;w++){var X=K[w];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Vu=!!Cc,jc=Cc=null}finally{Ge=c,J.p=u,T.T=a}}e.current=n,Et=2}}function yp(){if(Et===2){Et=0;var e=Ol,n=ti,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var u=J.p;J.p=2;var c=Ge;Ge|=4;try{Fm(e,n.alternate,n)}finally{Ge=c,J.p=u,T.T=a}}Et=3}}function xp(){if(Et===4||Et===3){Et=0,ki();var e=Ol,n=ti,a=ll,u=ap;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Et=5:(Et=0,ti=Ol=null,bp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(zl=null),zs(a),n=n.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ht,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=T.T,c=J.p,J.p=2,T.T=null;try{for(var d=e.onRecoverableError,b=0;b<u.length;b++){var w=u[b];d(w.value,{componentStack:w.stack})}}finally{T.T=n,J.p=c}}(ll&3)!==0&&Nu(),On(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===hc?nr++:(nr=0,hc=e):nr=0,lr(0)}}function bp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Bi(n)))}function Nu(){return gp(),yp(),xp(),vp()}function vp(){if(Et!==5)return!1;var e=Ol,n=fc;fc=0;var a=zs(ll),u=T.T,c=J.p;try{J.p=32>a?32:a,T.T=null,a=dc,dc=null;var d=Ol,b=ll;if(Et=0,ti=Ol=null,ll=0,(Ge&6)!==0)throw Error(r(331));var w=Ge;if(Ge|=4,tp(d.current),Pm(d,d.current,b,a),Ge=w,lr(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ht,d)}catch{}return!0}finally{J.p=c,T.T=u,bp(e,n)}}function kp(e,n,a){n=pn(a,n),n=Fo(e.stateNode,n,2),e=Cl(e,n,2),e!==null&&(Si(e,2),On(e))}function Ke(e,n,a){if(e.tag===3)kp(e,e,a);else for(;n!==null;){if(n.tag===3){kp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(zl===null||!zl.has(u))){e=pn(a,e),a=wm(2),u=Cl(n,a,2),u!==null&&(Sm(a,u,n,e),Si(u,2),On(u));break}}n=n.return}}function gc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new zb;var c=new Set;u.set(n,c)}else c=u.get(n),c===void 0&&(c=new Set,u.set(n,c));c.has(a)||(sc=!0,c.add(a),e=Bb.bind(null,e,n,a),n.then(e,e))}function Bb(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(Ue&a)===a&&(ht===4||ht===3&&(Ue&62914560)===Ue&&300>gt()-Su?(Ge&2)===0&&ni(e,0):oc|=a,ei===Ue&&(ei=0)),On(e)}function wp(e,n){n===0&&(n=gd()),e=Wl(e,n),e!==null&&(Si(e,n),On(e))}function Ub(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),wp(e,a)}function Hb(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),wp(e,a)}function qb(e,n){return pl(e,n)}var Tu=null,ai=null,yc=!1,Du=!1,xc=!1,Rl=0;function On(e){e!==ai&&e.next===null&&(ai===null?Tu=ai=e:ai=ai.next=e),Du=!0,yc||(yc=!0,Yb())}function lr(e,n){if(!xc&&Du){xc=!0;do for(var a=!1,u=Tu;u!==null;){if(e!==0){var c=u.pendingLanes;if(c===0)var d=0;else{var b=u.suspendedLanes,w=u.pingedLanes;d=(1<<31-tt(42|e)+1)-1,d&=c&~(b&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Cp(u,d))}else d=Ue,d=Rr(u,u===nt?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||wi(u,d)||(a=!0,Cp(u,d));u=u.next}while(a);xc=!1}}function Vb(){Sp()}function Sp(){Du=yc=!1;var e=0;Rl!==0&&Pb()&&(e=Rl);for(var n=gt(),a=null,u=Tu;u!==null;){var c=u.next,d=_p(u,n);d===0?(u.next=null,a===null?Tu=c:a.next=c,c===null&&(ai=a)):(a=u,(e!==0||(d&3)!==0)&&(Du=!0)),u=c}Et!==0&&Et!==5||lr(e),Rl!==0&&(Rl=0)}function _p(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-tt(d),w=1<<b,C=c[b];C===-1?((w&a)===0||(w&u)!==0)&&(c[b]=m0(w,n)):C<=n&&(e.expiredLanes|=w),d&=~w}if(n=nt,a=Ue,a=Rr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&gl(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||wi(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&gl(u),zs(a)){case 2:case 8:a=ie;break;case 32:a=ve;break;case 268435456:a=Xe;break;default:a=ve}return u=Ep.bind(null,e),a=pl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&gl(u),e.callbackPriority=2,e.callbackNode=null,2}function Ep(e,n){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Nu()&&e.callbackNode!==a)return null;var u=Ue;return u=Rr(e,e===nt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(rp(e,u,n),_p(e,gt()),e.callbackNode!=null&&e.callbackNode===a?Ep.bind(null,e):null)}function Cp(e,n){if(Nu())return null;rp(e,n,!0)}function Yb(){e1(function(){(Ge&6)!==0?pl(Q,Vb):Sp()})}function bc(){if(Rl===0){var e=Ia;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),Rl=e}return Rl}function jp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Hr(""+e)}function Ap(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Ib(e,n,a,u,c){if(n==="submit"&&a&&a.stateNode===c){var d=jp((c[Qt]||null).action),b=u.submitter;b&&(n=(n=b[Qt]||null)?jp(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var w=new Ir("action","action",null,u,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Rl!==0){var C=b?Ap(c,b):new FormData(c);Ho(a,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(w.preventDefault(),C=b?Ap(c,b):new FormData(c),Ho(a,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var vc=0;vc<to.length;vc++){var kc=to[vc],Zb=kc.toLowerCase(),Fb=kc[0].toUpperCase()+kc.slice(1);En(Zb,"on"+Fb)}En(ih,"onAnimationEnd"),En(rh,"onAnimationIteration"),En(uh,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(ub,"onTransitionRun"),En(sb,"onTransitionStart"),En(ob,"onTransitionCancel"),En(sh,"onTransitionEnd"),Na("onMouseEnter",["mouseout","mouseover"]),Na("onMouseLeave",["mouseout","mouseover"]),Na("onPointerEnter",["pointerout","pointerover"]),Na("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ar="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(" "),Qb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ar));function Np(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],c=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var b=u.length-1;0<=b;b--){var w=u[b],C=w.instance,B=w.currentTarget;if(w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}else for(b=0;b<u.length;b++){if(w=u[b],C=w.instance,B=w.currentTarget,w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}}}}function Le(e,n){var a=n[Os];a===void 0&&(a=n[Os]=new Set);var u=e+"__bubble";a.has(u)||(Tp(n,e,2,!1),a.add(u))}function wc(e,n,a){var u=0;n&&(u|=4),Tp(a,e,u,n)}var zu="_reactListening"+Math.random().toString(36).slice(2);function Sc(e){if(!e[zu]){e[zu]=!0,Sd.forEach(function(a){a!=="selectionchange"&&(Qb.has(a)||wc(a,!1,e),wc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[zu]||(n[zu]=!0,wc("selectionchange",!1,n))}}function Tp(e,n,a,u){switch(ig(n)){case 2:var c=v1;break;case 8:c=k1;break;default:c=Uc}a=c.bind(null,n,a,e),c=void 0,!Ys||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),u?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function _c(e,n,a,u,c){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var w=u.stateNode.containerInfo;if(w===c)break;if(b===4)for(b=u.return;b!==null;){var C=b.tag;if((C===3||C===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;w!==null;){if(b=Ca(w),b===null)return;if(C=b.tag,C===5||C===6||C===26||C===27){u=d=b;continue e}w=w.parentNode}}u=u.return}Rd(function(){var B=d,G=qs(a),K=[];e:{var U=oh.get(e);if(U!==void 0){var Y=Ir,he=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":Y=H0;break;case"focusin":he="focus",Y=Qs;break;case"focusout":he="blur",Y=Qs;break;case"beforeblur":case"afterblur":Y=Qs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Y=Ud;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=j0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=Y0;break;case ih:case rh:case uh:Y=T0;break;case sh:Y=Z0;break;case"scroll":case"scrollend":Y=E0;break;case"wheel":Y=Q0;break;case"copy":case"cut":case"paste":Y=z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=qd;break;case"toggle":case"beforetoggle":Y=X0}var _e=(n&4)!==0,et=!_e&&(e==="scroll"||e==="scrollend"),D=_e?U!==null?U+"Capture":null:U;_e=[];for(var A=B,L;A!==null;){var X=A;if(L=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||L===null||D===null||(X=Ci(A,D),X!=null&&_e.push(ir(A,X,L))),et)break;A=A.return}0<_e.length&&(U=new Y(U,he,null,a,G),K.push({event:U,listeners:_e}))}}if((n&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",U&&a!==Hs&&(he=a.relatedTarget||a.fromElement)&&(Ca(he)||he[Ea]))break e;if((Y||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,Y?(he=a.relatedTarget||a.toElement,Y=B,he=he?Ca(he):null,he!==null&&(et=o(he),_e=he.tag,he!==et||_e!==5&&_e!==27&&_e!==6)&&(he=null)):(Y=null,he=B),Y!==he)){if(_e=Ud,X="onMouseLeave",D="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(_e=qd,X="onPointerLeave",D="onPointerEnter",A="pointer"),et=Y==null?U:Ei(Y),L=he==null?U:Ei(he),U=new _e(X,A+"leave",Y,a,G),U.target=et,U.relatedTarget=L,X=null,Ca(G)===B&&(_e=new _e(D,A+"enter",he,a,G),_e.target=L,_e.relatedTarget=et,X=_e),et=X,Y&&he)t:{for(_e=Gb,D=Y,A=he,L=0,X=D;X;X=_e(X))L++;X=0;for(var ke=A;ke;ke=_e(ke))X++;for(;0<L-X;)D=_e(D),L--;for(;0<X-L;)A=_e(A),X--;for(;L--;){if(D===A||A!==null&&D===A.alternate){_e=D;break t}D=_e(D),A=_e(A)}_e=null}else _e=null;Y!==null&&Dp(K,U,Y,_e,!1),he!==null&&et!==null&&Dp(K,et,he,_e,!0)}}e:{if(U=B?Ei(B):window,Y=U.nodeName&&U.nodeName.toLowerCase(),Y==="select"||Y==="input"&&U.type==="file")var Fe=Xd;else if(Qd(U))if(Jd)Fe=ab;else{Fe=nb;var ye=tb}else Y=U.nodeName,!Y||Y.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&Us(B.elementType)&&(Fe=Xd):Fe=lb;if(Fe&&(Fe=Fe(e,B))){Gd(K,Fe,a,G);break e}ye&&ye(e,U,B),e==="focusout"&&B&&U.type==="number"&&B.memoizedProps.value!=null&&Bs(U,"number",U.value)}switch(ye=B?Ei(B):window,e){case"focusin":(Qd(ye)||ye.contentEditable==="true")&&(Ra=ye,Ps=B,Mi=null);break;case"focusout":Mi=Ps=Ra=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,lh(K,a,G);break;case"selectionchange":if(rb)break;case"keydown":case"keyup":lh(K,a,G)}var Oe;if(Xs)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Ma?Zd(e,a)&&(He="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(He="onCompositionStart");He&&(Vd&&a.locale!=="ko"&&(Ma||He!=="onCompositionStart"?He==="onCompositionEnd"&&Ma&&(Oe=Ld()):(bl=G,Is="value"in bl?bl.value:bl.textContent,Ma=!0)),ye=Ou(B,He),0<ye.length&&(He=new Hd(He,e,null,a,G),K.push({event:He,listeners:ye}),Oe?He.data=Oe:(Oe=Fd(a),Oe!==null&&(He.data=Oe)))),(Oe=K0?$0(e,a):P0(e,a))&&(He=Ou(B,"onBeforeInput"),0<He.length&&(ye=new Hd("onBeforeInput","beforeinput",null,a,G),K.push({event:ye,listeners:He}),ye.data=Oe)),Ib(K,e,B,a,G)}Np(K,n)})}function ir(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Ou(e,n){for(var a=n+"Capture",u=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ci(e,a),c!=null&&u.unshift(ir(e,c,d)),c=Ci(e,n),c!=null&&u.push(ir(e,c,d))),e.tag===3)return u;e=e.return}return[]}function Gb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dp(e,n,a,u,c){for(var d=n._reactName,b=[];a!==null&&a!==u;){var w=a,C=w.alternate,B=w.stateNode;if(w=w.tag,C!==null&&C===u)break;w!==5&&w!==26&&w!==27||B===null||(C=B,c?(B=Ci(a,d),B!=null&&b.unshift(ir(a,B,C))):c||(B=Ci(a,d),B!=null&&b.push(ir(a,B,C)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var Xb=/\r\n?/g,Jb=/\u0000|\uFFFD/g;function zp(e){return(typeof e=="string"?e:""+e).replace(Xb,`
49
- `).replace(Jb,"")}function Op(e,n){return n=zp(n),zp(e)===n}function We(e,n,a,u,c,d){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Da(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Da(e,""+u);break;case"className":Br(e,"class",u);break;case"tabIndex":Br(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Br(e,a,u);break;case"style":Od(e,u,d);break;case"data":if(n!=="object"){Br(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(a,"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 d=="function"&&(a==="formAction"?(n!=="input"&&We(e,n,"name",c.name,c,null),We(e,n,"formEncType",c.formEncType,c,null),We(e,n,"formMethod",c.formMethod,c,null),We(e,n,"formTarget",c.formTarget,c,null)):(We(e,n,"encType",c.encType,c,null),We(e,n,"method",c.method,c,null),We(e,n,"target",c.target,c,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=Yn);break;case"onScroll":u!=null&&Le("scroll",e);break;case"onScrollEnd":u!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=Hr(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":Le("beforetoggle",e),Le("toggle",e),Lr(e,"popover",u);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Lr(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=S0.get(a)||a,Lr(e,a,u))}}function Ec(e,n,a,u,c,d){switch(a){case"style":Od(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Da(e,u):(typeof u=="number"||typeof u=="bigint")&&Da(e,""+u);break;case"onScroll":u!=null&&Le("scroll",e);break;case"onScrollEnd":u!=null&&Le("scrollend",e);break;case"onClick":u!=null&&(e.onclick=Yn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_d.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Qt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof u=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,c);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Lr(e,a,u)}}}function Rt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var u=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":u=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,d,b,a,null)}}c&&We(e,n,"srcSet",a.srcSet,a,null),u&&We(e,n,"src",a.src,a,null);return;case"input":Le("invalid",e);var w=d=b=c=null,C=null,B=null;for(u in a)if(a.hasOwnProperty(u)){var G=a[u];if(G!=null)switch(u){case"name":c=G;break;case"type":b=G;break;case"checked":C=G;break;case"defaultChecked":B=G;break;case"value":d=G;break;case"defaultValue":w=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,n));break;default:We(e,n,u,G,a,null)}}Nd(e,d,w,C,B,b,c,!1);return;case"select":Le("invalid",e),u=b=d=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":d=w;break;case"defaultValue":b=w;break;case"multiple":u=w;default:We(e,n,c,w,a,null)}n=d,a=b,e.multiple=!!u,n!=null?Ta(e,!!u,n,!1):a!=null&&Ta(e,!!u,a,!0);return;case"textarea":Le("invalid",e),d=c=u=null;for(b in a)if(a.hasOwnProperty(b)&&(w=a[b],w!=null))switch(b){case"value":u=w;break;case"defaultValue":c=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:We(e,n,b,w,a,null)}Dd(e,u,c,d);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(u=a[C],u!=null))switch(C){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:We(e,n,C,u,a,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(u=0;u<ar.length;u++)Le(ar[u],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(B in a)if(a.hasOwnProperty(B)&&(u=a[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,B,u,a,null)}return;default:if(Us(n)){for(G in a)a.hasOwnProperty(G)&&(u=a[G],u!==void 0&&Ec(e,n,G,u,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(u=a[w],u!=null&&We(e,n,w,u,a,null))}function Kb(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,w=null,C=null,B=null,G=null;for(Y in a){var K=a[Y];if(a.hasOwnProperty(Y)&&K!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":C=K;default:u.hasOwnProperty(Y)||We(e,n,Y,null,u,K)}}for(var U in u){var Y=u[U];if(K=a[U],u.hasOwnProperty(U)&&(Y!=null||K!=null))switch(U){case"type":d=Y;break;case"name":c=Y;break;case"checked":B=Y;break;case"defaultChecked":G=Y;break;case"value":b=Y;break;case"defaultValue":w=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(r(137,n));break;default:Y!==K&&We(e,n,U,Y,u,K)}}Ls(e,b,w,C,B,G,d,c);return;case"select":Y=b=w=U=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":Y=C;default:u.hasOwnProperty(d)||We(e,n,d,null,u,C)}for(c in u)if(d=u[c],C=a[c],u.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":U=d;break;case"defaultValue":w=d;break;case"multiple":b=d;default:d!==C&&We(e,n,c,d,u,C)}n=w,a=b,u=Y,U!=null?Ta(e,!!a,U,!1):!!u!=!!a&&(n!=null?Ta(e,!!a,n,!0):Ta(e,!!a,a?[]:"",!1));return;case"textarea":Y=U=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:We(e,n,w,null,u,c)}for(b in u)if(c=u[b],d=a[b],u.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":U=c;break;case"defaultValue":Y=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&We(e,n,b,c,u,d)}Td(e,U,Y);return;case"option":for(var he in a)if(U=a[he],a.hasOwnProperty(he)&&U!=null&&!u.hasOwnProperty(he))switch(he){case"selected":e.selected=!1;break;default:We(e,n,he,null,u,U)}for(C in u)if(U=u[C],Y=a[C],u.hasOwnProperty(C)&&U!==Y&&(U!=null||Y!=null))switch(C){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:We(e,n,C,U,u,Y)}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 _e in a)U=a[_e],a.hasOwnProperty(_e)&&U!=null&&!u.hasOwnProperty(_e)&&We(e,n,_e,null,u,U);for(B in u)if(U=u[B],Y=a[B],u.hasOwnProperty(B)&&U!==Y&&(U!=null||Y!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,n));break;default:We(e,n,B,U,u,Y)}return;default:if(Us(n)){for(var et in a)U=a[et],a.hasOwnProperty(et)&&U!==void 0&&!u.hasOwnProperty(et)&&Ec(e,n,et,void 0,u,U);for(G in u)U=u[G],Y=a[G],!u.hasOwnProperty(G)||U===Y||U===void 0&&Y===void 0||Ec(e,n,G,U,u,Y);return}}for(var D in a)U=a[D],a.hasOwnProperty(D)&&U!=null&&!u.hasOwnProperty(D)&&We(e,n,D,null,u,U);for(K in u)U=u[K],Y=a[K],!u.hasOwnProperty(K)||U===Y||U==null&&Y==null||We(e,n,K,U,u,Y)}function Mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $b(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var c=a[u],d=c.transferSize,b=c.initiatorType,w=c.duration;if(d&&w&&Mp(b)){for(b=0,w=c.responseEnd,u+=1;u<a.length;u++){var C=a[u],B=C.startTime;if(B>w)break;var G=C.transferSize,K=C.initiatorType;G&&Mp(K)&&(C=C.responseEnd,b+=G*(C<w?1:(w-B)/(C-B)))}if(--u,n+=8*(d+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cc=null,jc=null;function Mu(e){return e.nodeType===9?e:e.ownerDocument}function Rp(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 Lp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Ac(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Nc=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===Nc?!1:(Nc=e,!0):(Nc=null,!1)}var Bp=typeof setTimeout=="function"?setTimeout:void 0,Wb=typeof clearTimeout=="function"?clearTimeout:void 0,Up=typeof Promise=="function"?Promise:void 0,e1=typeof queueMicrotask=="function"?queueMicrotask:typeof Up<"u"?function(e){return Up.resolve(null).then(e).catch(t1)}:Bp;function t1(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function Hp(e,n){var a=n,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(c),si(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")rr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,rr(a);for(var d=a.firstChild;d;){var b=d.nextSibling,w=d.nodeName;d[_i]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=b}}else a==="body"&&rr(e.ownerDocument.body);a=c}while(a);si(n)}function qp(e,n){var a=e;e=0;do{var u=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function Tc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Tc(a),Ms(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function n1(e,n,a,u){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[_i])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function l1(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=vn(e.nextSibling),e===null))return null;return e}function Vp(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function Dc(e){return e.data==="$?"||e.data==="$~"}function zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a1(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function vn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Oc=null;function Yp(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return vn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Ip(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Zp(e,n,a){switch(n=Mu(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function rr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ms(e)}var kn=new Map,Fp=new Set;function Ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var al=J.d;J.d={f:i1,r:r1,D:u1,C:s1,L:o1,m:c1,X:d1,S:f1,M:h1};function i1(){var e=al.f(),n=Cu();return e||n}function r1(e){var n=ja(e);n!==null&&n.tag===5&&n.type==="form"?sm(n):al.r(e)}var ii=typeof document>"u"?null:document;function Qp(e,n,a){var u=ii;if(u&&typeof n=="string"&&n){var c=hn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Fp.has(c)||(Fp.add(c),e={rel:e,crossOrigin:a,href:n},u.querySelector(c)===null&&(n=u.createElement("link"),Rt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function u1(e){al.D(e),Qp("dns-prefetch",e,null)}function s1(e,n){al.C(e,n),Qp("preconnect",e,n)}function o1(e,n,a){al.L(e,n,a);var u=ii;if(u&&e&&n){var c='link[rel="preload"][as="'+hn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+hn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+hn(a.imageSizes)+'"]')):c+='[href="'+hn(e)+'"]';var d=c;switch(n){case"style":d=ri(e);break;case"script":d=ui(e)}kn.has(d)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),kn.set(d,e),u.querySelector(c)!==null||n==="style"&&u.querySelector(ur(d))||n==="script"&&u.querySelector(sr(d))||(n=u.createElement("link"),Rt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function c1(e,n){al.m(e,n);var a=ii;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+hn(u)+'"][href="'+hn(e)+'"]',d=c;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ui(e)}if(!kn.has(d)&&(e=y({rel:"modulepreload",href:e},n),kn.set(d,e),a.querySelector(c)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sr(d)))return}u=a.createElement("link"),Rt(u,"link",e),Ct(u),a.head.appendChild(u)}}}function f1(e,n,a){al.S(e,n,a);var u=ii;if(u&&e){var c=Aa(u).hoistableStyles,d=ri(e);n=n||"default";var b=c.get(d);if(!b){var w={loading:0,preload:null};if(b=u.querySelector(ur(d)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=kn.get(d))&&Mc(e,a);var C=b=u.createElement("link");Ct(C),Rt(C,"link",e),C._p=new Promise(function(B,G){C.onload=B,C.onerror=G}),C.addEventListener("load",function(){w.loading|=1}),C.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Lu(b,n,u)}b={type:"stylesheet",instance:b,count:1,state:w},c.set(d,b)}}}function d1(e,n){al.X(e,n);var a=ii;if(a&&e){var u=Aa(a).hoistableScripts,c=ui(e),d=u.get(c);d||(d=a.querySelector(sr(c)),d||(e=y({src:e,async:!0},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Rt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function h1(e,n){al.M(e,n);var a=ii;if(a&&e){var u=Aa(a).hoistableScripts,c=ui(e),d=u.get(c);d||(d=a.querySelector(sr(c)),d||(e=y({src:e,async:!0,type:"module"},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Rt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function Gp(e,n,a,u){var c=(c=ge.current)?Ru(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ri(a.href),a=Aa(c).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ri(a.href);var d=Aa(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(ur(e)))&&!d._p&&(b.instance=d,b.state.loading=5),kn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},kn.set(e,a),d||m1(c,e,a,b.state))),n&&u===null)throw Error(r(528,""));return b}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ui(a),a=Aa(c).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ri(e){return'href="'+hn(e)+'"'}function ur(e){return'link[rel="stylesheet"]['+e+"]"}function Xp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function m1(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Rt(n,"link",a),Ct(n),e.head.appendChild(n))}function ui(e){return'[src="'+hn(e)+'"]'}function sr(e){return"script[async]"+e}function Jp(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+hn(a.href)+'"]');if(u)return n.instance=u,Ct(u),u;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),Ct(u),Rt(u,"style",c),Lu(u,a.precedence,e),n.instance=u;case"stylesheet":c=ri(a.href);var d=e.querySelector(ur(c));if(d)return n.state.loading|=4,n.instance=d,Ct(d),d;u=Xp(a),(c=kn.get(c))&&Mc(u,c),d=(e.ownerDocument||e).createElement("link"),Ct(d);var b=d;return b._p=new Promise(function(w,C){b.onload=w,b.onerror=C}),Rt(d,"link",u),n.state.loading|=4,Lu(d,a.precedence,e),n.instance=d;case"script":return d=ui(a.src),(c=e.querySelector(sr(d)))?(n.instance=c,Ct(c),c):(u=a,(c=kn.get(d))&&(u=y({},a),Rc(u,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ct(c),Rt(c,"link",u),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Lu(u,a.precedence,e));return n.instance}function Lu(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=u.length?u[u.length-1]:null,d=c,b=0;b<u.length;b++){var w=u[b];if(w.dataset.precedence===n)d=w;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Mc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Rc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Bu=null;function Kp(e,n,a){if(Bu===null){var u=new Map,c=Bu=new Map;c.set(a,u)}else c=Bu,u=c.get(a),u||(u=new Map,c.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[_i]||d[Dt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var w=u.get(b);w?w.push(d):u.set(b,[d])}}return u}function $p(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function p1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Pp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function g1(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=ri(u.href),d=n.querySelector(ur(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Uu.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,Ct(d);return}d=n.ownerDocument||n,u=Xp(u),(c=kn.get(c))&&Mc(u,c),d=d.createElement("link"),Ct(d);var b=d;b._p=new Promise(function(w,C){b.onload=w,b.onerror=C}),Rt(d,"link",u),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uu.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Lc=0;function y1(e,n){return e.stylesheets&&e.count===0&&qu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Lc===0&&(Lc=62500*$b());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Lc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(c)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hu=null;function qu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hu=new Map,n.forEach(x1,e),Hu=null,Uu.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=Hu.get(e);if(a)var u=a.get(null);else{a=new Map,Hu.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),u=b)}u&&a.set(null,u)}c=n.instance,b=c.getAttribute("data-precedence"),d=a.get(b)||u,d===u&&a.set(null,c),a.set(b,c),this.count++,u=Uu.bind(this),c.addEventListener("load",u),c.addEventListener("error",u),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var or={$$typeof:q,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function b1(e,n,a,u,c,d,b,w,C){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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=u,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Wp(e,n,a,u,c,d,b,w,C,B,G,K){return e=new b1(e,n,a,b,C,B,G,K,w),n=1,d===!0&&(n|=24),d=ln(3,null,null,n),e.current=d,d.stateNode=e,n=po(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:a,cache:n},bo(d),e}function eg(e){return e?(e=Ua,e):Ua}function tg(e,n,a,u,c,d){c=eg(c),u.context===null?u.context=c:u.pendingContext=c,u=El(n),u.payload={element:a},d=d===void 0?null:d,d!==null&&(u.callback=d),a=Cl(e,u,n),a!==null&&(Pt(a,e,n),Vi(a,e,n))}function ng(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Bc(e,n){ng(e,n),(e=e.alternate)&&ng(e,n)}function lg(e){if(e.tag===13||e.tag===31){var n=Wl(e,67108864);n!==null&&Pt(n,e,67108864),Bc(e,67108864)}}function ag(e){if(e.tag===13||e.tag===31){var n=on();n=Ds(n);var a=Wl(e,n);a!==null&&Pt(a,e,n),Bc(e,n)}}var Vu=!0;function v1(e,n,a,u){var c=T.T;T.T=null;var d=J.p;try{J.p=2,Uc(e,n,a,u)}finally{J.p=d,T.T=c}}function k1(e,n,a,u){var c=T.T;T.T=null;var d=J.p;try{J.p=8,Uc(e,n,a,u)}finally{J.p=d,T.T=c}}function Uc(e,n,a,u){if(Vu){var c=Hc(u);if(c===null)_c(e,n,u,Yu,a),rg(e,u);else if(S1(c,e,n,a,u))u.stopPropagation();else if(rg(e,u),n&4&&-1<w1.indexOf(e)){for(;c!==null;){var d=ja(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Xl(d.pendingLanes);if(b!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var C=1<<31-tt(b);w.entanglements[1]|=C,b&=~C}On(d),(Ge&6)===0&&(_u=gt()+500,lr(0))}}break;case 31:case 13:w=Wl(d,2),w!==null&&Pt(w,d,2),Cu(),Bc(d,2)}if(d=Hc(u),d===null&&_c(e,n,u,Yu,a),d===c)break;c=d}c!==null&&u.stopPropagation()}else _c(e,n,u,null,a)}}function Hc(e){return e=qs(e),qc(e)}var Yu=null;function qc(e){if(Yu=null,e=Ca(e),e!==null){var n=o(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Yu=e,null}function ig(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(Ze()){case Q:return 2;case ie:return 8;case ve:case Ae:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Vc=!1,Bl=null,Ul=null,Hl=null,cr=new Map,fr=new Map,ql=[],w1="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 rg(e,n){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":cr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(n.pointerId)}}function dr(e,n,a,u,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:d,targetContainers:[c]},n!==null&&(n=ja(n),n!==null&&lg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function S1(e,n,a,u,c){switch(n){case"focusin":return Bl=dr(Bl,e,n,a,u,c),!0;case"dragenter":return Ul=dr(Ul,e,n,a,u,c),!0;case"mouseover":return Hl=dr(Hl,e,n,a,u,c),!0;case"pointerover":var d=c.pointerId;return cr.set(d,dr(cr.get(d)||null,e,n,a,u,c)),!0;case"gotpointercapture":return d=c.pointerId,fr.set(d,dr(fr.get(d)||null,e,n,a,u,c)),!0}return!1}function ug(e){var n=Ca(e.target);if(n!==null){var a=o(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Iu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);Hs=u,a.target.dispatchEvent(u),Hs=null}else return n=ja(a),n!==null&&lg(n),e.blockedOn=a,!1;n.shift()}return!0}function sg(e,n,a){Iu(e)&&a.delete(n)}function _1(){Vc=!1,Bl!==null&&Iu(Bl)&&(Bl=null),Ul!==null&&Iu(Ul)&&(Ul=null),Hl!==null&&Iu(Hl)&&(Hl=null),cr.forEach(sg),fr.forEach(sg)}function Zu(e,n){e.blockedOn===n&&(e.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_1)))}var Fu=null;function og(e){Fu!==e&&(Fu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],c=e[n+2];if(typeof u!="function"){if(qc(u||a)===null)continue;break}var d=ja(a);d!==null&&(e.splice(n,3),n-=3,Ho(d,{pending:!0,data:c,method:a.method,action:u},u,c))}}))}function si(e){function n(C){return Zu(C,e)}Bl!==null&&Zu(Bl,e),Ul!==null&&Zu(Ul,e),Hl!==null&&Zu(Hl,e),cr.forEach(n),fr.forEach(n);for(var a=0;a<ql.length;a++){var u=ql[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<ql.length&&(a=ql[0],a.blockedOn===null);)ug(a),a.blockedOn===null&&ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var c=a[u],d=a[u+1],b=c[Qt]||null;if(typeof d=="function")b||og(a);else if(b){var w=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[Qt]||null)w=b.formAction;else if(qc(c)!==null)continue}else w=b.action;typeof w=="function"?a[u+1]=w:(a.splice(u,3),u-=3),og(a)}}}function cg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Yc(e){this._internalRoot=e}Qu.prototype.render=Yc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=on();tg(a,u,e,n,null,null)},Qu.prototype.unmount=Yc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;tg(e.current,2,null,e,null,null),Cu(),n[Ea]=null}};function Qu(e){this._internalRoot=e}Qu.prototype.unstable_scheduleHydration=function(e){if(e){var n=vd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<ql.length&&n!==0&&n<ql[a].priority;a++);ql.splice(a,0,e),a===0&&ug(e)}};var fg=l.version;if(fg!=="19.2.7")throw Error(r(527,fg,"19.2.7"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var E1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{Ht=Gu.inject(E1),_t=Gu}catch{}}return mr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,u="",c=xm,d=bm,b=vm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Wp(e,1,!1,null,null,a,u,null,c,d,b,cg),e[Ea]=n.current,Sc(e),new Yc(n)},mr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var u=!1,c="",d=xm,b=bm,w=vm,C=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),n=Wp(e,1,!0,n,a??null,u,c,C,d,b,w,cg),n.context=eg(null),a=n.current,u=on(),u=Ds(u),c=El(u),c.callback=null,Cl(a,c,u),a=u,n.current.lanes=a,Si(n,a),On(n),e[Ea]=n.current,Sc(e),new Qu(n)},mr.version="19.2.7",mr}var kg;function R1(){if(kg)return Fc.exports;kg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Fc.exports=M1(),Fc.exports}var L1=R1();const Ny=new Map,Jc=new Map;function yf(t){return Ny.get(t)??null}function B1(t,l){l.models.length!==0&&Ny.set(t,l)}function U1(t,l){const i=yf(t);if(i)return Promise.resolve(i);const r=Jc.get(t);if(r)return r;const s=l().then(o=>(B1(t,o),o)).finally(()=>Jc.delete(t));return Jc.set(t,s),s}const ot="";async function Ty(t){const l=await t.text();try{const i=JSON.parse(l),r=i.error??i.message;if(typeof r=="string"&&r.trim())return r.replace(/^Error:\s*/i,"")}catch{}return l}async function wg(){const t=await fetch(`${ot}/api/snapshot`);if(!t.ok)throw new Error("Failed to fetch snapshot");return t.json()}async function hi(t){const l=await fetch(`${ot}/api/runs/${t}`);if(!l.ok)throw new Error("Not found");return l.json()}async function H1(){const t=await fetch(`${ot}/api/intake/linear`);if(!t.ok)throw new Error(await t.text());return(await t.json()).candidates??[]}async function es(){const t=await fetch(`${ot}/api/intake/linear/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function qf(){const t=await fetch(`${ot}/api/intake/linear/config`);if(!t.ok)throw new Error(await t.text());return t.json()}async function q1(t){const l=await fetch(`${ot}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function V1(t,l){const i=await fetch(`${ot}/api/intake/linear/${t}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Y1(t){const l=await fetch(`${ot}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function I1(t,l){const i=await fetch(`${ot}/api/agents/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Z1(t){const l=await fetch(`${ot}/api/agents/${t}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function Vf(t){const l=await fetch(`${ot}/api/runs/${t}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function F1(t){const l=await fetch(`${ot}/api/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Kc(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/plan`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({planMarkdown:l,approve:i,...(r==null?void 0:r.planModel)!==void 0?{planModel:r.planModel}:{},...(r==null?void 0:r.executeModel)!==void 0?{executeModel:r.executeModel}:{},...(r==null?void 0:r.planBudget)!==void 0?{planBudget:r.planBudget}:{},...(r==null?void 0:r.executeBudget)!==void 0?{executeBudget:r.executeBudget}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Q1(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/draft-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!==void 0?{planModel:l}:{},...i!==void 0?{planBudget:i}:{},...(r==null?void 0:r.feedback)!==void 0?{feedback:r.feedback}:{},...(r==null?void 0:r.editedMarkdown)!==void 0?{editedMarkdown:r.editedMarkdown}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function G1(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/kick`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!=null&&l.trim()?{executeModel:l.trim()}:{},...i!==void 0?{executeBudget:i}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function X1(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/plan/answers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:l,...(i==null?void 0:i.executeModel)!==void 0?{executeModel:i.executeModel}:{},...(i==null?void 0:i.executeBudget)!==void 0?{executeBudget:i.executeBudget}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function J1(t,l){const i=await fetch(`${ot}/api/runs/${t}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l?{outboundBody:l}:{})});if(!i.ok)throw new Error(await Ty(i));return i.json()}async function Dy(t,l){const i=await fetch(`${ot}/api/runs/${t}/qa`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:l})});if(!i.ok)throw new Error(await Ty(i));return i.json()}async function K1(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:l,...i!==void 0?{executeModel:i}:{},...r!==void 0?{executeBudget:r}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function $1(t,l){return U1(t,async()=>{const r=await fetch(`${ot}/api/runtimes/${t}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function P1(){const t=await fetch(`${ot}/api/agent-deck/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function W1(){return(await(await fetch(`${ot}/api/agent-deck/decks`)).json()).data??[]}async function ev(t){return(await(await fetch(`${ot}/api/agent-deck/decks/${t}/playbooks`)).json()).data??[]}function tv(t){const l=new EventSource(`${ot}/api/events`);return l.onmessage=i=>{try{t(JSON.parse(i.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function nv(t,l="transcript"){const i=await fetch(`${ot}/api/runs/${t}/log-tail?kind=${l}`);if(!i.ok)throw new Error(await i.text());return(await i.json()).content}function ol(t){if(!t.contentJson)return null;try{return JSON.parse(t.contentJson)}catch{return null}}function ts(t){if(!t.contentJson)return t.blobPath??"";try{const l=JSON.parse(t.contentJson);return l.markdown??l.resultText??l.excerpt??t.contentJson}catch{return t.contentJson}}function Vt(t,l){return[...t].reverse().find(i=>i.kind===l)}function lv(t){var i;const l=Vt(t,"task_snapshot");if(!(l!=null&&l.contentJson))return null;try{const s=(i=JSON.parse(l.contentJson).url)==null?void 0:i.trim();return s!=null&&s.startsWith("http")?s:null}catch{return null}}function zy(t,l,i){const r=t.filter(o=>o.kind===l);for(let o=r.length-1;o>=0;o--){const f=ol(r[o]);if(f&&f.phase===i)return f}const s=r[r.length-1];return s?ol(s):null}function ns(t,l=Date.now()){const i=l-new Date(t).getTime();if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const f=Math.floor(o/24);return f<7?`${f}d ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Oy(t){if(t<1e3)return`${Math.round(t)}ms`;const l=Math.round(t/1e3),i=Math.floor(l/60),r=l%60;if(i>=60){const s=Math.floor(i/60),o=i%60;return o>0?`${s}h ${o}m`:`${s}h`}return i>0?r>0?`${i}m ${r}s`:`${i}m`:`${r}s`}function ga(t){return t==="claude_code"?"Claude":t==="cursor_local"?"Cursor":"No agent"}function vs(t){return t==="claude_code"?"bg-[#D4A574]/20 text-[#E8C9A8] border-[#D4A574]/40":t==="cursor_local"?"bg-[#7EB8FF]/15 text-[#A8D4FF] border-[#7EB8FF]/35":"bg-white/5 text-white/50 border-white/15"}function Yf(t){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[t]??t}function ls(t){return t.source==="linear"&&t.externalLabel?t.externalLabel:t.source==="linear"&&t.externalId?t.externalId:t.source==="linear"?"Linear":"Manual"}function My(t,l){switch(t){case"plan_pending":return{label:"Planning",hint:"Agent is writing the plan",tone:"bg-cyber-violet/15 text-cyber-violet-light border-cyber-violet/35",accent:"border-l-cyber-violet"};case"plan_approved":return{label:"Queued",hint:"Approved — waiting for slot",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"queued":return{label:"Queued",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"running":return{label:"Running",hint:"Agent executing",tone:"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35",accent:"border-l-[#92E4DD]"};case"review":return{label:"Needs Review",hint:"Your sign-off required",tone:"bg-[#C4B643]/20 text-[#E8DC7A] border-[#C4B643]/40",accent:"border-l-[#C4B643]"};case"done":return{label:"Done",tone:"bg-emerald-500/10 text-emerald-300/90 border-emerald-400/25",accent:"border-l-emerald-400/60"};case"failed":return{label:"Failed",hint:"Retry from result review",tone:"bg-red-500/15 text-red-300 border-red-400/30",accent:"border-l-red-400"};case"cancelled":return{label:"Removed",hint:"Dismissed from Operations",tone:"bg-white/5 text-white/40 border-white/10",accent:"border-l-white/20"};default:return{label:t,tone:"bg-white/5 text-white/60 border-white/15",accent:"border-l-white/20"}}}function If(t){return t.deckName?t.deckName:t.deckId?`deck ${t.deckId.slice(0,8)}…`:null}function st({children:t,className:l="",title:i}){return g.jsx("span",{title:i,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:t})}function Ry({index:t,total:l,onPrev:i,onNext:r,label:s="In Queue"}){return l<=1?null:g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45 hidden sm:inline",children:s}),g.jsx("button",{type:"button",onClick:i,disabled:t<=0,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Previous","aria-label":"Previous in queue",children:"←"}),g.jsxs("span",{className:"text-sm tabular-nums text-white/60 min-w-[3.5rem] text-center",children:[t+1," / ",l]}),g.jsx("button",{type:"button",onClick:r,disabled:t>=l-1,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Next","aria-label":"Next in queue",children:"→"})]})}var Ie;(function(t){t.assertEqual=s=>{};function l(s){}t.assertIs=l;function i(s){throw new Error}t.assertNever=i,t.arrayToEnum=s=>{const o={};for(const f of s)o[f]=f;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of o)f[h]=s[h];return t.objectValues(f)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&o.push(f);return o},t.find=(s,o)=>{for(const f of s)if(o(f))return f},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ie||(Ie={}));var Sg;(function(t){t.mergeShapes=(l,i)=>({...l,...i})})(Sg||(Sg={}));const fe=Ie.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Il=t=>{switch(typeof t){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return Number.isNaN(t)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(t)?fe.array:t===null?fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?fe.promise:typeof Map<"u"&&t instanceof Map?fe.map:typeof Set<"u"&&t instanceof Set?fe.set:typeof Date<"u"&&t instanceof Date?fe.date:fe.object;default:return fe.unknown}},le=Ie.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class cl extends Error{get errors(){return this.issues}constructor(l){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=l}format(l){const i=l||function(o){return o.message},r={_errors:[]},s=o=>{for(const f of o.issues)if(f.code==="invalid_union")f.unionErrors.map(s);else if(f.code==="invalid_return_type")s(f.returnTypeError);else if(f.code==="invalid_arguments")s(f.argumentsError);else if(f.path.length===0)r._errors.push(i(f));else{let h=r,p=0;for(;p<f.path.length;){const m=f.path[p];p===f.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(i(f))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),r}static assert(l){if(!(l instanceof cl))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ie.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=i=>i.message){const i={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];i[o]=i[o]||[],i[o].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}cl.create=t=>new cl(t);const xf=(t,l)=>{let i;switch(t.code){case le.invalid_type:t.received===fe.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case le.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Ie.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:i=`Unrecognized key(s) in object: ${Ie.joinValues(t.keys,", ")}`;break;case le.invalid_union:i="Invalid input";break;case le.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Ie.joinValues(t.options)}`;break;case le.invalid_enum_value:i=`Invalid enum value. Expected ${Ie.joinValues(t.options)}, received '${t.received}'`;break;case le.invalid_arguments:i="Invalid function arguments";break;case le.invalid_return_type:i="Invalid function return type";break;case le.invalid_date:i="Invalid date";break;case le.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:Ie.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case le.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case le.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case le.custom:i="Invalid input";break;case le.invalid_intersection_types:i="Intersection results could not be merged";break;case le.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case le.not_finite:i="Number must be finite";break;default:i=l.defaultError,Ie.assertNever(t)}return{message:i}};let av=xf;function iv(){return av}const rv=t=>{const{data:l,path:i,errorMaps:r,issueData:s}=t,o=[...i,...s.path||[]],f={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=r.filter(m=>!!m).slice().reverse();for(const m of p)h=m(f,{data:l,defaultError:h}).message;return{...s,path:o,message:h}};function oe(t,l){const i=iv(),r=rv({issueData:l,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===xf?void 0:xf].filter(s=>!!s)});t.common.issues.push(r)}class Zt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,i){const r=[];for(const s of i){if(s.status==="aborted")return Ee;s.status==="dirty"&&l.dirty(),r.push(s.value)}return{status:l.value,value:r}}static async mergeObjectAsync(l,i){const r=[];for(const s of i){const o=await s.key,f=await s.value;r.push({key:o,value:f})}return Zt.mergeObjectSync(l,r)}static mergeObjectSync(l,i){const r={};for(const s of i){const{key:o,value:f}=s;if(o.status==="aborted"||f.status==="aborted")return Ee;o.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),o.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[o.value]=f.value)}return{status:l.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),br=t=>({status:"dirty",value:t}),Sn=t=>({status:"valid",value:t}),_g=t=>t.status==="aborted",Eg=t=>t.status==="dirty",mi=t=>t.status==="valid",as=t=>typeof Promise<"u"&&t instanceof Promise;var be;(function(t){t.errToObj=l=>typeof l=="string"?{message:l}:l||{},t.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(be||(be={}));class Ln{constructor(l,i,r,s){this._cachedPath=[],this.parent=l,this.data=i,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cg=(t,l)=>{if(mi(l))return{success:!0,data:l.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new cl(t.common.issues);return this._error=i,this._error}}};function Me(t){if(!t)return{};const{errorMap:l,invalid_type_error:i,required_error:r,description:s}=t;if(l&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:s}:{errorMap:(f,h)=>{const{message:p}=t;return f.code==="invalid_enum_value"?{message:p??h.defaultError}:typeof h.data>"u"?{message:p??r??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:p??i??h.defaultError}},description:s}}class qe{get description(){return this._def.description}_getType(l){return Il(l.data)}_getOrReturnCtx(l,i){return i||{common:l.parent.common,data:l.data,parsedType:Il(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new Zt,ctx:{common:l.parent.common,data:l.data,parsedType:Il(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const i=this._parse(l);if(as(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(l){const i=this._parse(l);return Promise.resolve(i)}parse(l,i){const r=this.safeParse(l,i);if(r.success)return r.data;throw r.error}safeParse(l,i){const r={common:{issues:[],async:(i==null?void 0:i.async)??!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Il(l)},s=this._parseSync({data:l,path:r.path,parent:r});return Cg(r,s)}"~validate"(l){var r,s;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Il(l)};if(!this["~standard"].async)try{const o=this._parseSync({data:l,path:[],parent:i});return mi(o)?{value:o.value}:{issues:i.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:i}).then(o=>mi(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(l,i){const r=await this.safeParseAsync(l,i);if(r.success)return r.data;throw r.error}async safeParseAsync(l,i){const r={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Il(l)},s=this._parse({data:l,path:r.path,parent:r}),o=await(as(s)?s:Promise.resolve(s));return Cg(r,o)}refine(l,i){const r=s=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(s):i;return this._refinement((s,o)=>{const f=l(s),h=()=>o.addIssue({code:le.custom,...r(s)});return typeof Promise<"u"&&f instanceof Promise?f.then(p=>p?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(l,i){return this._refinement((r,s)=>l(r)?!0:(s.addIssue(typeof i=="function"?i(r,s):i),!1))}_refinement(l){return new ba({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return sl.create(this,this._def)}nullable(){return va.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return cs.create(this,this._def)}or(l){return rs.create([this,l],this._def)}and(l){return us.create(this,l,this._def)}transform(l){return new ba({...Me(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const i=typeof l=="function"?l:()=>l;return new fs({...Me(this._def),innerType:this,defaultValue:i,typeName:Ce.ZodDefault})}brand(){return new Hy({typeName:Ce.ZodBranded,type:this,...Me(this._def)})}catch(l){const i=typeof l=="function"?l:()=>l;return new ds({...Me(this._def),innerType:this,catchValue:i,typeName:Ce.ZodCatch})}describe(l){const i=this.constructor;return new i({...this._def,description:l})}pipe(l){return Ff.create(this,l)}readonly(){return hs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uv=/^c[^\s-]{8,}$/i,sv=/^[0-9a-z]+$/,ov=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fv=/^[a-z0-9_-]{21}$/i,dv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $c;const gv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ly="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",wv=new RegExp(`^${Ly}$`);function By(t){let l="[0-5]\\d";t.precision?l=`${l}\\.\\d{${t.precision}}`:t.precision==null&&(l=`${l}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${i}`}function Sv(t){return new RegExp(`^${By(t)}$`)}function _v(t){let l=`${Ly}T${By(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${i.join("|")})`,new RegExp(`^${l}$`)}function Ev(t,l){return!!((l==="v4"||!l)&&gv.test(t)||(l==="v6"||!l)&&xv.test(t))}function Cv(t,l){if(!dv.test(t))return!1;try{const[i]=t.split(".");if(!i)return!1;const r=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||l&&s.alg!==l)}catch{return!1}}function jv(t,l){return!!((l==="v4"||!l)&&yv.test(t)||(l==="v6"||!l)&&bv.test(t))}class ul extends qe{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==fe.string){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.string,received:o.parsedType}),Ee}const r=new Zt;let s;for(const o of this._def.checks)if(o.kind==="min")l.data.length<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")l.data.length>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const f=l.data.length>o.value,h=l.data.length<o.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")mv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"email",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")$c||($c=new RegExp(pv,"u")),$c.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"emoji",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")cv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"uuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")fv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"nanoid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")uv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")sv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid2",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")ov.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ulid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),oe(s,{validation:"url",code:le.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"regex",code:le.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?l.data=l.data.trim():o.kind==="includes"?l.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?l.data=l.data.toLowerCase():o.kind==="toUpperCase"?l.data=l.data.toUpperCase():o.kind==="startsWith"?l.data.startsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?l.data.endsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_v(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?wv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Sv(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?hv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"duration",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Ev(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ip",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Cv(l.data,o.alg)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"jwt",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?jv(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cidr",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?vv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?kv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64url",code:le.invalid_string,message:o.message}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:l.data}}_regex(l,i,r){return this.refinement(s=>l.test(s),{validation:i,code:le.invalid_string,...be.errToObj(r)})}_addCheck(l){return new ul({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...be.errToObj(l)})}url(l){return this._addCheck({kind:"url",...be.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...be.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...be.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...be.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...be.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...be.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...be.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...be.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...be.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...be.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...be.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...be.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...be.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...be.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...be.errToObj(l)})}regex(l,i){return this._addCheck({kind:"regex",regex:l,...be.errToObj(i)})}includes(l,i){return this._addCheck({kind:"includes",value:l,position:i==null?void 0:i.position,...be.errToObj(i==null?void 0:i.message)})}startsWith(l,i){return this._addCheck({kind:"startsWith",value:l,...be.errToObj(i)})}endsWith(l,i){return this._addCheck({kind:"endsWith",value:l,...be.errToObj(i)})}min(l,i){return this._addCheck({kind:"min",value:l,...be.errToObj(i)})}max(l,i){return this._addCheck({kind:"max",value:l,...be.errToObj(i)})}length(l,i){return this._addCheck({kind:"length",value:l,...be.errToObj(i)})}nonempty(l){return this.min(1,be.errToObj(l))}trim(){return new ul({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxLength(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}ul.create=t=>new ul({checks:[],typeName:Ce.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Me(t)});function Av(t,l){const i=(t.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=i>r?i:r,o=Number.parseInt(t.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return o%f/10**s}class pi extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==fe.number){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.number,received:o.parsedType}),Ee}let r;const s=new Zt;for(const o of this._def.checks)o.kind==="int"?Ie.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?Av(l.data,o.value)!==0&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_finite,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:l.data}}gte(l,i){return this.setLimit("min",l,!0,be.toString(i))}gt(l,i){return this.setLimit("min",l,!1,be.toString(i))}lte(l,i){return this.setLimit("max",l,!0,be.toString(i))}lt(l,i){return this.setLimit("max",l,!1,be.toString(i))}setLimit(l,i,r,s){return new pi({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:be.toString(s)}]})}_addCheck(l){return new pi({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:be.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:be.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:be.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:be.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:be.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:be.toString(i)})}finite(l){return this._addCheck({kind:"finite",message:be.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:be.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:be.toString(l)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ie.isInteger(l.value))}get isFinite(){let l=null,i=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(i===null||r.value>i)&&(i=r.value):r.kind==="max"&&(l===null||r.value<l)&&(l=r.value)}return Number.isFinite(i)&&Number.isFinite(l)}}pi.create=t=>new pi({checks:[],typeName:Ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});class _r extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==fe.bigint)return this._getInvalidInput(l);let r;const s=new Zt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?l.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ie.assertNever(o);return{status:s.value,value:l.data}}_getInvalidInput(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:fe.bigint,received:i.parsedType}),Ee}gte(l,i){return this.setLimit("min",l,!0,be.toString(i))}gt(l,i){return this.setLimit("min",l,!1,be.toString(i))}lte(l,i){return this.setLimit("max",l,!0,be.toString(i))}lt(l,i){return this.setLimit("max",l,!1,be.toString(i))}setLimit(l,i,r,s){return new _r({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:be.toString(s)}]})}_addCheck(l){return new _r({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:be.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:be.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:be.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:be.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:be.toString(i)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}_r.create=t=>new _r({checks:[],typeName:Ce.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Me(t)});class bf extends qe{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==fe.boolean){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.boolean,received:r.parsedType}),Ee}return Sn(l.data)}}bf.create=t=>new bf({typeName:Ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});class is extends qe{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==fe.date){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.date,received:o.parsedType}),Ee}if(Number.isNaN(l.data.getTime())){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_date}),Ee}const r=new Zt;let s;for(const o of this._def.checks)o.kind==="min"?l.data.getTime()<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?l.data.getTime()>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ie.assertNever(o);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new is({...this._def,checks:[...this._def.checks,l]})}min(l,i){return this._addCheck({kind:"min",value:l.getTime(),message:be.toString(i)})}max(l,i){return this._addCheck({kind:"max",value:l.getTime(),message:be.toString(i)})}get minDate(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l!=null?new Date(l):null}}is.create=t=>new is({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ce.ZodDate,...Me(t)});class jg extends qe{_parse(l){if(this._getType(l)!==fe.symbol){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.symbol,received:r.parsedType}),Ee}return Sn(l.data)}}jg.create=t=>new jg({typeName:Ce.ZodSymbol,...Me(t)});class vf extends qe{_parse(l){if(this._getType(l)!==fe.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.undefined,received:r.parsedType}),Ee}return Sn(l.data)}}vf.create=t=>new vf({typeName:Ce.ZodUndefined,...Me(t)});class kf extends qe{_parse(l){if(this._getType(l)!==fe.null){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.null,received:r.parsedType}),Ee}return Sn(l.data)}}kf.create=t=>new kf({typeName:Ce.ZodNull,...Me(t)});class Ag extends qe{constructor(){super(...arguments),this._any=!0}_parse(l){return Sn(l.data)}}Ag.create=t=>new Ag({typeName:Ce.ZodAny,...Me(t)});class wf extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Sn(l.data)}}wf.create=t=>new wf({typeName:Ce.ZodUnknown,...Me(t)});class Fl extends qe{_parse(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:fe.never,received:i.parsedType}),Ee}}Fl.create=t=>new Fl({typeName:Ce.ZodNever,...Me(t)});class Ng extends qe{_parse(l){if(this._getType(l)!==fe.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.void,received:r.parsedType}),Ee}return Sn(l.data)}}Ng.create=t=>new Ng({typeName:Ce.ZodVoid,...Me(t)});class Rn extends qe{_parse(l){const{ctx:i,status:r}=this._processInputParams(l),s=this._def;if(i.parsedType!==fe.array)return oe(i,{code:le.invalid_type,expected:fe.array,received:i.parsedType}),Ee;if(s.exactLength!==null){const f=i.data.length>s.exactLength.value,h=i.data.length<s.exactLength.value;(f||h)&&(oe(i,{code:f?le.too_big:le.too_small,minimum:h?s.exactLength.value:void 0,maximum:f?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&i.data.length<s.minLength.value&&(oe(i,{code:le.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&i.data.length>s.maxLength.value&&(oe(i,{code:le.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((f,h)=>s.type._parseAsync(new Ln(i,f,i.path,h)))).then(f=>Zt.mergeArray(r,f));const o=[...i.data].map((f,h)=>s.type._parseSync(new Ln(i,f,i.path,h)));return Zt.mergeArray(r,o)}get element(){return this._def.type}min(l,i){return new Rn({...this._def,minLength:{value:l,message:be.toString(i)}})}max(l,i){return new Rn({...this._def,maxLength:{value:l,message:be.toString(i)}})}length(l,i){return new Rn({...this._def,exactLength:{value:l,message:be.toString(i)}})}nonempty(l){return this.min(1,l)}}Rn.create=(t,l)=>new Rn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Me(l)});function ci(t){if(t instanceof wt){const l={};for(const i in t.shape){const r=t.shape[i];l[i]=sl.create(ci(r))}return new wt({...t._def,shape:()=>l})}else return t instanceof Rn?new Rn({...t._def,type:ci(t.element)}):t instanceof sl?sl.create(ci(t.unwrap())):t instanceof va?va.create(ci(t.unwrap())):t instanceof ya?ya.create(t.items.map(l=>ci(l))):t}class wt extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),i=Ie.objectKeys(l);return this._cached={shape:l,keys:i},this._cached}_parse(l){if(this._getType(l)!==fe.object){const m=this._getOrReturnCtx(l);return oe(m,{code:le.invalid_type,expected:fe.object,received:m.parsedType}),Ee}const{status:r,ctx:s}=this._processInputParams(l),{shape:o,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof Fl&&this._def.unknownKeys==="strip"))for(const m in s.data)f.includes(m)||h.push(m);const p=[];for(const m of f){const x=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:x._parse(new Ln(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Fl){const m=this._def.unknownKeys;if(m==="passthrough")for(const x of h)p.push({key:{status:"valid",value:x},value:{status:"valid",value:s.data[x]}});else if(m==="strict")h.length>0&&(oe(s,{code:le.unrecognized_keys,keys:h}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const x of h){const y=s.data[x];p.push({key:{status:"valid",value:x},value:m._parse(new Ln(s,y,s.path,x)),alwaysSet:x in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const x of p){const y=await x.key,k=await x.value;m.push({key:y,value:k,alwaysSet:x.alwaysSet})}return m}).then(m=>Zt.mergeObjectSync(r,m)):Zt.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return be.errToObj,new wt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(i,r)=>{var o,f;const s=((f=(o=this._def).errorMap)==null?void 0:f.call(o,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:be.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(l){return new wt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new wt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:Ce.ZodObject})}setKey(l,i){return this.augment({[l]:i})}catchall(l){return new wt({...this._def,catchall:l})}pick(l){const i={};for(const r of Ie.objectKeys(l))l[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new wt({...this._def,shape:()=>i})}omit(l){const i={};for(const r of Ie.objectKeys(this.shape))l[r]||(i[r]=this.shape[r]);return new wt({...this._def,shape:()=>i})}deepPartial(){return ci(this)}partial(l){const i={};for(const r of Ie.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?i[r]=s:i[r]=s.optional()}return new wt({...this._def,shape:()=>i})}required(l){const i={};for(const r of Ie.objectKeys(this.shape))if(l&&!l[r])i[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof sl;)o=o._def.innerType;i[r]=o}return new wt({...this._def,shape:()=>i})}keyof(){return Uy(Ie.objectKeys(this.shape))}}wt.create=(t,l)=>new wt({shape:()=>t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});wt.strictCreate=(t,l)=>new wt({shape:()=>t,unknownKeys:"strict",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});wt.lazycreate=(t,l)=>new wt({shape:t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});class rs extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const f=o.map(h=>new cl(h.ctx.common.issues));return oe(i,{code:le.invalid_union,unionErrors:f}),Ee}if(i.common.async)return Promise.all(r.map(async o=>{const f={...i,common:{...i.common,issues:[]},parent:null};return{result:await o._parseAsync({data:i.data,path:i.path,parent:f}),ctx:f}})).then(s);{let o;const f=[];for(const p of r){const m={...i,common:{...i.common,issues:[]},parent:null},x=p._parseSync({data:i.data,path:i.path,parent:m});if(x.status==="valid")return x;x.status==="dirty"&&!o&&(o={result:x,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(o)return i.common.issues.push(...o.ctx.common.issues),o.result;const h=f.map(p=>new cl(p));return oe(i,{code:le.invalid_union,unionErrors:h}),Ee}}get options(){return this._def.options}}rs.create=(t,l)=>new rs({options:t,typeName:Ce.ZodUnion,...Me(l)});const rl=t=>t instanceof _f?rl(t.schema):t instanceof ba?rl(t.innerType()):t instanceof os?[t.value]:t instanceof xa?t.options:t instanceof Ef?Ie.objectValues(t.enum):t instanceof fs?rl(t._def.innerType):t instanceof vf?[void 0]:t instanceof kf?[null]:t instanceof sl?[void 0,...rl(t.unwrap())]:t instanceof va?[null,...rl(t.unwrap())]:t instanceof Hy||t instanceof hs?rl(t.unwrap()):t instanceof ds?rl(t._def.innerType):[];class Zf extends qe{_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==fe.object)return oe(i,{code:le.invalid_type,expected:fe.object,received:i.parsedType}),Ee;const r=this.discriminator,s=i.data[r],o=this.optionsMap.get(s);return o?i.common.async?o._parseAsync({data:i.data,path:i.path,parent:i}):o._parseSync({data:i.data,path:i.path,parent:i}):(oe(i,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(l,i,r){const s=new Map;for(const o of i){const f=rl(o.shape[l]);if(!f.length)throw new Error(`A discriminator value for key \`${l}\` could not be extracted from all schema options`);for(const h of f){if(s.has(h))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(h)}`);s.set(h,o)}}return new Zf({typeName:Ce.ZodDiscriminatedUnion,discriminator:l,options:i,optionsMap:s,...Me(r)})}}function Sf(t,l){const i=Il(t),r=Il(l);if(t===l)return{valid:!0,data:t};if(i===fe.object&&r===fe.object){const s=Ie.objectKeys(l),o=Ie.objectKeys(t).filter(h=>s.indexOf(h)!==-1),f={...t,...l};for(const h of o){const p=Sf(t[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(i===fe.array&&r===fe.array){if(t.length!==l.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const f=t[o],h=l[o],p=Sf(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return i===fe.date&&r===fe.date&&+t==+l?{valid:!0,data:t}:{valid:!1}}class us extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=(o,f)=>{if(_g(o)||_g(f))return Ee;const h=Sf(o.value,f.value);return h.valid?((Eg(o)||Eg(f))&&i.dirty(),{status:i.value,value:h.data}):(oe(r,{code:le.invalid_intersection_types}),Ee)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,f])=>s(o,f)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}us.create=(t,l,i)=>new us({left:t,right:l,typeName:Ce.ZodIntersection,...Me(i)});class ya extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.array)return oe(r,{code:le.invalid_type,expected:fe.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return oe(r,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const o=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Ln(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(o).then(f=>Zt.mergeArray(i,f)):Zt.mergeArray(i,o)}get items(){return this._def.items}rest(l){return new ya({...this._def,rest:l})}}ya.create=(t,l)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ya({items:t,typeName:Ce.ZodTuple,rest:null,...Me(l)})};class ss extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.object)return oe(r,{code:le.invalid_type,expected:fe.object,received:r.parsedType}),Ee;const s=[],o=this._def.keyType,f=this._def.valueType;for(const h in r.data)s.push({key:o._parse(new Ln(r,h,r.path,h)),value:f._parse(new Ln(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?Zt.mergeObjectAsync(i,s):Zt.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(l,i,r){return i instanceof qe?new ss({keyType:l,valueType:i,typeName:Ce.ZodRecord,...Me(r)}):new ss({keyType:ul.create(),valueType:l,typeName:Ce.ZodRecord,...Me(i)})}}class Tg extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.map)return oe(r,{code:le.invalid_type,expected:fe.map,received:r.parsedType}),Ee;const s=this._def.keyType,o=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Ln(r,h,r.path,[m,"key"])),value:o._parse(new Ln(r,p,r.path,[m,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of f){const m=await p.key,x=await p.value;if(m.status==="aborted"||x.status==="aborted")return Ee;(m.status==="dirty"||x.status==="dirty")&&i.dirty(),h.set(m.value,x.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const p of f){const m=p.key,x=p.value;if(m.status==="aborted"||x.status==="aborted")return Ee;(m.status==="dirty"||x.status==="dirty")&&i.dirty(),h.set(m.value,x.value)}return{status:i.value,value:h}}}}Tg.create=(t,l,i)=>new Tg({valueType:l,keyType:t,typeName:Ce.ZodMap,...Me(i)});class Er extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.set)return oe(r,{code:le.invalid_type,expected:fe.set,received:r.parsedType}),Ee;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(oe(r,{code:le.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),i.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(oe(r,{code:le.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());const o=this._def.valueType;function f(p){const m=new Set;for(const x of p){if(x.status==="aborted")return Ee;x.status==="dirty"&&i.dirty(),m.add(x.value)}return{status:i.value,value:m}}const h=[...r.data.values()].map((p,m)=>o._parse(new Ln(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,i){return new Er({...this._def,minSize:{value:l,message:be.toString(i)}})}max(l,i){return new Er({...this._def,maxSize:{value:l,message:be.toString(i)}})}size(l,i){return this.min(l,i).max(l,i)}nonempty(l){return this.min(1,l)}}Er.create=(t,l)=>new Er({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Me(l)});class _f extends qe{get schema(){return this._def.getter()}_parse(l){const{ctx:i}=this._processInputParams(l);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}_f.create=(t,l)=>new _f({getter:t,typeName:Ce.ZodLazy,...Me(l)});class os extends qe{_parse(l){if(l.data!==this._def.value){const i=this._getOrReturnCtx(l);return oe(i,{received:i.data,code:le.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:l.data}}get value(){return this._def.value}}os.create=(t,l)=>new os({value:t,typeName:Ce.ZodLiteral,...Me(l)});function Uy(t,l){return new xa({values:t,typeName:Ce.ZodEnum,...Me(l)})}class xa extends qe{_parse(l){if(typeof l.data!="string"){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{expected:Ie.joinValues(r),received:i.parsedType,code:le.invalid_type}),Ee}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{received:i.data,code:le.invalid_enum_value,options:r}),Ee}return Sn(l.data)}get options(){return this._def.values}get enum(){const l={};for(const i of this._def.values)l[i]=i;return l}get Values(){const l={};for(const i of this._def.values)l[i]=i;return l}get Enum(){const l={};for(const i of this._def.values)l[i]=i;return l}extract(l,i=this._def){return xa.create(l,{...this._def,...i})}exclude(l,i=this._def){return xa.create(this.options.filter(r=>!l.includes(r)),{...this._def,...i})}}xa.create=Uy;class Ef extends qe{_parse(l){const i=Ie.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const s=Ie.objectValues(i);return oe(r,{expected:Ie.joinValues(s),received:r.parsedType,code:le.invalid_type}),Ee}if(this._cache||(this._cache=new Set(Ie.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ie.objectValues(i);return oe(r,{received:r.data,code:le.invalid_enum_value,options:s}),Ee}return Sn(l.data)}get enum(){return this._def.values}}Ef.create=(t,l)=>new Ef({values:t,typeName:Ce.ZodNativeEnum,...Me(l)});class cs extends qe{unwrap(){return this._def.type}_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==fe.promise&&i.common.async===!1)return oe(i,{code:le.invalid_type,expected:fe.promise,received:i.parsedType}),Ee;const r=i.parsedType===fe.promise?i.data:Promise.resolve(i.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:i.path,errorMap:i.common.contextualErrorMap})))}}cs.create=(t,l)=>new cs({type:t,typeName:Ce.ZodPromise,...Me(l)});class ba extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=this._def.effect||null,o={addIssue:f=>{oe(r,f),f.fatal?i.abort():i.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const f=s.transform(r.data,o);if(r.common.async)return Promise.resolve(f).then(async h=>{if(i.value==="aborted")return Ee;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?Ee:p.status==="dirty"||i.value==="dirty"?br(p.value):p});{if(i.value==="aborted")return Ee;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?Ee:h.status==="dirty"||i.value==="dirty"?br(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,o);if(r.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(r.common.async===!1){const h=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return h.status==="aborted"?Ee:(h.status==="dirty"&&i.dirty(),f(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(h=>h.status==="aborted"?Ee:(h.status==="dirty"&&i.dirty(),f(h.value).then(()=>({status:i.value,value:h.value}))))}if(s.type==="transform")if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!mi(f))return Ee;const h=s.transform(f.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>mi(f)?Promise.resolve(s.transform(f.value,o)).then(h=>({status:i.value,value:h})):Ee);Ie.assertNever(s)}}ba.create=(t,l,i)=>new ba({schema:t,typeName:Ce.ZodEffects,effect:l,...Me(i)});ba.createWithPreprocess=(t,l,i)=>new ba({schema:l,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...Me(i)});class sl extends qe{_parse(l){return this._getType(l)===fe.undefined?Sn(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}sl.create=(t,l)=>new sl({innerType:t,typeName:Ce.ZodOptional,...Me(l)});class va extends qe{_parse(l){return this._getType(l)===fe.null?Sn(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}va.create=(t,l)=>new va({innerType:t,typeName:Ce.ZodNullable,...Me(l)});class fs extends qe{_parse(l){const{ctx:i}=this._processInputParams(l);let r=i.data;return i.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}fs.create=(t,l)=>new fs({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...Me(l)});class ds extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r={...i,common:{...i.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return as(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ds.create=(t,l)=>new ds({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...Me(l)});class Dg extends qe{_parse(l){if(this._getType(l)!==fe.nan){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.nan,received:r.parsedType}),Ee}return{status:"valid",value:l.data}}}Dg.create=t=>new Dg({typeName:Ce.ZodNaN,...Me(t)});class Hy extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Ff extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ee:o.status==="dirty"?(i.dirty(),br(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"?(i.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(l,i){return new Ff({in:l,out:i,typeName:Ce.ZodPipeline})}}class hs extends qe{_parse(l){const i=this._def.innerType._parse(l),r=s=>(mi(s)&&(s.value=Object.freeze(s.value)),s);return as(i)?i.then(s=>r(s)):r(i)}unwrap(){return this._def.innerType}}hs.create=(t,l)=>new hs({innerType:t,typeName:Ce.ZodReadonly,...Me(l)});var Ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));const z=ul.create,$e=pi.create,At=bf.create,qy=wf.create;Fl.create;const at=Rn.create,de=wt.create;rs.create;const Nv=Zf.create;us.create;ya.create;const ms=ss.create,fi=os.create,Nt=xa.create;cs.create;sl.create;va.create;const Bn=Nt(["claude_code","cursor_local"]),It=de({maxTurns:$e().positive().nullable().optional(),maxBudgetUsd:$e().positive().nullable().optional()}),Qf=de({plan:It.optional(),execute:It.optional(),reflect:It.optional()});function Tv(t){if(!(t!=null&&t.trim()))return null;try{const l=It.parse(JSON.parse(t));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function Dv(t){if(!(t!=null&&t.trim()))return{};try{const l=JSON.parse(t);return l&&typeof l=="object"&&!("plan"in l)&&!("execute"in l)&&!("reflect"in l)&&("maxTurns"in l||"maxBudgetUsd"in l)?{execute:It.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Qf.parse(l)}catch{return{}}}const zv="00000000-0000-4000-a000-000000000001",ps="auto",Ov=de({code:Nt(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:z()}),Mv=de({id:z().uuid(),name:z(),runtime:Bn,workspaceRoot:z().nullable(),deckId:z().uuid().nullable(),deckName:z().nullable(),playbookId:z().nullable(),defaultPlanModel:z().nullable(),defaultExecuteModel:z().nullable(),defaultPlanBudgetJson:z().nullable(),defaultExecuteBudgetJson:z().nullable(),isBuiltin:At(),createdAt:z(),updatedAt:z()}),Vy=Mv.extend({healthy:At(),issues:at(Ov)});de({name:z().min(1),runtime:Bn,workspaceRoot:z().min(1),deckId:z().uuid().optional(),playbookId:z().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:It.nullable().optional(),defaultExecuteBudget:It.nullable().optional()});de({name:z().min(1).optional(),runtime:Bn.optional(),workspaceRoot:z().nullable().optional(),deckId:z().uuid().nullable().optional(),playbookId:z().nullable().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:It.nullable().optional(),defaultExecuteBudget:It.nullable().optional()});de({agents:at(Vy),issueCount:$e()});function Rv(t){if(!(t!=null&&t.trim()))return{detected:!1};const l=t.match(/\*\*Blocker:\*\*\s*([^\n]+)/i);if(l)return{detected:!0,summary:l[1].trim()};const i=t.match(/^Blocker:\s*([^\n]+)/im);return i?{detected:!0,summary:i[1].trim()}:[/can't complete the deliverable/i,/cannot complete the deliverable/i,/needs explicit approval/i,/permission grant i can't obtain/i,/no prompt available in this session/i,/were both blocked/i,/without that permission being pre-approved/i,/can't obtain \(no prompt available/i].some(s=>s.test(t))?{detected:!0,summary:(t.trim().split(/\n/)[0]??"Execution blocked").slice(0,220)}:{detected:!1}}function Yy(t){var i,r,s;if((i=t.blocker)!=null&&i.summary)return{detected:!0,summary:t.blocker.summary};const l=Rv(t.resultText);return l.detected?l:t.isError||t.exitCode!==0?{detected:!0,summary:((s=(r=t.resultText)==null?void 0:r.trim().split(/\n/)[0])==null?void 0:s.slice(0,220))||(t.exitCode!==0?`Process exited with code ${t.exitCode}`:"Agent reported an error")}:{detected:!1}}const Lv=de({label:z().min(1).max(60),description:z().max(200).optional()}),Iy=de({id:z().regex(/^q\d+$/),question:z().min(1).max(300),options:at(Lv).min(2).max(4)}),Zy=Nt(["trivial","needs_review"]);de({verdict:Zy,rationale:z().min(1).max(300),questions:at(Iy).max(3).default([])}).refine(t=>t.verdict!=="trivial"||t.questions.length===0,{message:"trivial verdict cannot carry questions"});de({verdict:Zy,rationale:z(),questions:at(Iy),sessionId:z().optional(),parseFallback:At(),consumed:At().default(!1)});const Fy=de({questionId:z(),selectedLabel:z().max(60).optional(),freeText:z().min(1).max(2e3).optional()}).refine(t=>t.selectedLabel?!t.freeText:!!t.freeText,{message:"Provide exactly one of selectedLabel or freeText"});de({answers:at(Fy).min(1),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});de({answers:at(Fy),outcome:Nt(["approved","redraft","delegated"]),answeredAt:z()});const Bv=Nt(["slack_message","email","service_tool_call"]),Uv=de({target:z().min(1).max(120),body:z().min(1).max(4e3)}),Hv=de({serviceName:z().min(1).max(120),toolName:z().min(1).max(120),arguments:ms(qy())}),qv=de({actionType:Bv,summary:Uv,toolCall:Hv}),Vv=Nt(["pending","sent","rejected"]);de({draft:qv,status:Vv,sentAt:z().optional(),rejectedAt:z().optional(),bodyMismatch:At().optional()});de({draftArtifactId:z().uuid(),sentAt:z(),toolResult:ms(qy()),permalink:z().url().optional()});const Yv=["text","body","message"];function Iv(t,l){if(t.actionType==="service_tool_call")return{...t,summary:{...t.summary,body:l}};const i={...t.toolCall.arguments},r=Yv.find(s=>typeof i[s]=="string");return r?i[r]=l:i.text=l,{...t,summary:{...t.summary,body:l},toolCall:{...t.toolCall,arguments:i}}}const Zv=Nt(["pending","answered","failed"]);de({exchangeId:z().min(1),question:z().min(1).max(2e3),answer:z().optional(),status:Zv,sessionResumed:At(),askedAt:z(),answeredAt:z().optional(),error:z().optional()});de({question:z().trim().min(1).max(2e3)});function Fv(t){const l=new Map;for(const i of t)l.set(i.exchangeId,i);return[...l.values()].sort((i,r)=>i.askedAt.localeCompare(r.askedAt))}const Qv=de({failure_summary:z().min(1),user_feedback_excerpt:z().min(1),corrected_output_hint:z().optional()}),Gv=Nv("op",[de({op:fi("add_item"),section:z().min(1),text:z().min(1)}),de({op:fi("amend_item"),section:z().min(1),anchor:z().min(1),text:z().min(1)}),de({op:fi("remove_item"),section:z().min(1),anchor:z().min(1)}),de({op:fi("set_triggers"),triggers:at(z())}),de({op:fi("rewrite_body"),text:z()})]);de({rationale:z().min(1),ops:at(Gv).min(1),evidence:Qv.optional()});const Xv=Nt(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Qy=Nt(["code","communication","email","research","content","other"]),Jv=Nt(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),ks=Nt(["plan","execute","reflect","qa"]),Gy=Nt(["retry","approve"]);de({patchId:z(),playbookId:z().optional(),playbookTitle:z().optional(),rationale:z().optional(),status:fi("proposed"),trigger:Gy,dashboardUrl:z().optional()});de({status:Nt(["pending","completed","failed","skipped"]),trigger:Gy,error:z().optional()});const Kv=de({type:Nt(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:z(),toolName:z().optional()});de({phase:ks,runtime:Bn,entries:at(Kv)});const $v=de({phase:ks,runtime:Bn,totalCostUsd:$e().optional(),inputTokens:$e().optional(),outputTokens:$e().optional(),cacheReadTokens:$e().optional(),cacheWriteTokens:$e().optional(),durationMs:$e().optional(),model:z().optional(),numTurns:$e().optional(),maxTurns:$e().optional(),maxBudgetUsd:$e().optional()}),Pv=de({label:z(),usage:$v,maxTurns:$e().optional(),maxBudgetUsd:$e().optional()});de({lines:at(Pv),total:de({totalCostUsd:$e(),inputTokens:$e(),outputTokens:$e(),durationMs:$e(),numTurns:$e()})});de({phase:ks,runtime:Bn,sessionId:z()});de({phase:ks,exitCode:$e(),resultText:z().optional(),isError:At().optional(),blocker:de({summary:z().optional()}).optional()});de({path:z(),title:z(),markdown:z()});de({markdown:z(),sessionId:z().optional()});const Wv=Nt(["manual","linear"]);de({id:z(),title:z(),description:z().optional(),url:z().optional()});const il=de({id:z().uuid(),source:Wv,externalId:z().nullable(),externalLabel:z().nullable(),taskCategory:Qy,title:z(),description:z().nullable(),repo:z().nullable(),artifactWorkspace:z().nullable(),agentId:z().uuid().nullable(),agentName:z().nullable(),deckId:z().nullable(),deckName:z().nullable(),playbookId:z().nullable(),runtime:Bn.nullable(),planModel:z().nullable(),executeModel:z().nullable(),status:Xv,lineageId:z().uuid().nullable(),acceptanceCriteria:z().nullable(),approvalGatesJson:z().nullable(),budgetJson:z().nullable(),createdAt:z(),updatedAt:z()});de({id:z().uuid(),runId:z().uuid(),kind:Jv,contentJson:z().nullable(),blobPath:z().nullable(),author:Nt(["human","agent","system"]),createdAt:z()});de({id:z().uuid(),runId:z().uuid(),type:z(),payloadJson:z().nullable(),ts:z()});de({title:z().min(1),description:z().optional(),taskCategory:Qy.default("other"),repo:z().optional(),artifactWorkspace:z().optional(),acceptanceCriteria:z().optional(),status:Nt(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:z().uuid(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});de({runtime:Bn,deckId:z().uuid().optional(),playbookId:z().optional(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});de({planMarkdown:z(),approve:At().default(!1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),planBudget:It.nullable().optional(),executeBudget:It.nullable().optional()});de({runtime:Bn.optional(),deckId:z().uuid().optional(),playbookId:z().optional(),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});de({feedback:z().min(1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),executeBudget:It.nullable().optional()});de({outboundBody:z().min(1).max(4e3).optional()});de({id:z(),identifier:z(),title:z(),description:z().optional(),url:z(),state:z().optional(),labels:at(z()).optional(),teamId:z().optional()});const e2=de({label:z().min(1),agentId:z().uuid()}),Cf=de({stateFilter:at(z()),teamId:z().nullable(),assigneeMe:At(),defaultAgentId:z().uuid().nullable(),syncEnabled:At(),routingRules:at(e2)});Cf.extend({persisted:Cf,envOverrides:de({stateFilter:At(),teamId:At()})});Cf.partial();de({connected:At(),viewer:de({id:z(),name:z(),email:z().optional()}).optional(),error:z().optional()});de({agentId:z().uuid(),reason:z()});de({host:z(),port:$e().int().min(1).max(65535),envOverride:At()});de({host:z().min(1).optional(),port:$e().int().min(1).max(65535).optional()});de({connected:At(),apiUrl:z(),mcpUrl:z(),deckCount:$e().optional(),envOverride:At(),error:z().optional()});de({agentId:z().uuid().optional(),autoAgent:At().optional(),planModel:z().nullable().optional()}).refine(t=>t.agentId!==void 0||t.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});de({planModel:z().nullable().optional(),planBudget:It.nullable().optional(),feedback:z().optional(),editedMarkdown:z().optional()});const t2=de({id:z(),label:z()});de({runtime:Bn,models:at(t2),source:Nt(["live","fallback"])});de({planReviewCount:$e(),resultReviewCount:$e(),maxConcurrent:$e(),planningActiveRuns:at(il),planningQueuedRuns:at(il),runningRuns:at(il),waitingExecution:at(il),resultReviewRuns:at(il),recentDone:at(il),awaitingPlanReview:at(il),awaitingAnswerRuns:at(il),openQuestionCounts:ms(z(),$e()),pendingSendCounts:ms(z(),$e()),sentRunIds:at(z()).optional(),autoApprovedRunIds:at(z()),runs:at(il),agentDeckOnline:At(),agents:at(Vy),agentIssueCount:$e()});function n2(t){return t||ps}function Gf({runtime:t,label:l,value:i,onChange:r,defaultModelId:s,disabled:o,compact:f}){const h=yf(t),[p,m]=V.useState((h==null?void 0:h.models)??[]),[x,y]=V.useState((h==null?void 0:h.source)??"fallback"),[k,v]=V.useState(!h);V.useEffect(()=>{const H=yf(t);if(H){m(H.models),y(H.source),v(!1);return}v(!0),$1(t).then(N=>{m(N.models),y(N.source)}).catch(()=>m([])).finally(()=>v(!1))},[t]);const _=V.useMemo(()=>{var H,N;if(t==="cursor_local"){const Z=n2(s);return((H=p.find(q=>q.id===Z))==null?void 0:H.label)??"Auto (subscription pool)"}return s?((N=p.find(Z=>Z.id===s))==null?void 0:N.label)??s:"runtime default"},[t,s,p]),R=t==="cursor_local"?k?"Loading models…":`Agent default (${_})`:k?"Loading models…":`Default (${_})`;return g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),g.jsxs("select",{className:"field text-sm",disabled:o||k,value:i,onChange:H=>r(H.target.value),children:[g.jsx("option",{value:"",children:R}),p.map(H=>g.jsx("option",{value:H.id,children:H.label},H.id))]}),t==="cursor_local"&&!k&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),x==="fallback"&&p.length>0&&!k&&t==="cursor_local"&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function ma({phase:t,runtime:l,model:i,onModelChange:r,budget:s,onBudgetChange:o,defaultModelId:f,disabled:h,showHint:p=!0}){const m=x=>o({...s,...x});return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"text-xs uppercase tracking-wide text-[#92E4DD]",children:t}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[g.jsx(Gf,{runtime:l,label:"Model",value:i,onChange:r,defaultModelId:f,disabled:h,compact:!0}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Turns"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:1,step:1,placeholder:"—",disabled:h,value:s.maxTurns,onChange:x=>m({maxTurns:x.target.value})})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max USD"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:.01,step:.01,placeholder:"—",disabled:h,value:s.maxBudgetUsd,onChange:x=>m({maxBudgetUsd:x.target.value})})]})]}),p&&g.jsx("p",{className:"text-xs text-white/40",children:"Leave blank for no cap on that field."})]})}function zg({value:t,onChange:l,agentDeckOnline:i,disabled:r}){const[s,o]=V.useState([]),[f,h]=V.useState([]);V.useEffect(()=>{W1().then(o).catch(()=>o([]))},[]),V.useEffect(()=>{if(!t.deckId){h([]);return}ev(t.deckId).then(h).catch(()=>h([]))},[t.deckId]);const p=m=>l({...t,...m});return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),g.jsxs("select",{className:"field",disabled:r,value:t.runtime,onChange:m=>{const x=m.target.value;p({runtime:x,...x==="cursor_local"?{defaultPlanModel:ps,defaultExecuteModel:ps}:{defaultPlanModel:"",defaultExecuteModel:""}})},children:[g.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),g.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"})]}),g.jsx(ma,{phase:"Plan",runtime:t.runtime,model:t.defaultPlanModel,onModelChange:m=>p({defaultPlanModel:m}),budget:t.defaultPlanBudget,onBudgetChange:m=>p({defaultPlanBudget:m}),disabled:r,showHint:!1}),g.jsx(ma,{phase:"Execution",runtime:t.runtime,model:t.defaultExecuteModel,onModelChange:m=>p({defaultExecuteModel:m}),budget:t.defaultExecuteBudget,onBudgetChange:m=>p({defaultExecuteBudget:m}),disabled:r}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (optional)"}),g.jsxs("select",{className:"field",disabled:r||!i,value:t.deckId,onChange:m=>p({deckId:m.target.value,playbookId:""}),children:[g.jsx("option",{value:"",children:i?"No deck — degraded mode":"Agent Deck offline"}),s.map(m=>g.jsxs("option",{value:m.id,children:["◆ ",m.name]},m.id))]}),t.deckId&&f.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Playbook (optional)"}),g.jsxs("select",{className:"field",disabled:r,value:t.playbookId,onChange:m=>p({playbookId:m.target.value}),children:[g.jsx("option",{value:"",children:"No playbook — agent uses task + plan only"}),f.map(m=>g.jsx("option",{value:m.id,children:m.title},m.id))]})]}),!t.deckId&&t.runtime&&g.jsx("p",{className:"text-xs text-white/45",children:"Degraded mode: no deck MCP. Audit trail still captured."})]})}function ws(t){if(t.agentName){const i=[t.agentName];return(t.deckName||t.deckId)&&i.push(`◆ ${t.deckName??t.deckId}`),t.planModel&&i.push(`plan:${t.planModel}`),t.executeModel&&i.push(`exec:${t.executeModel}`),i.join(" · ")}const l=[t.runtime??"no runtime"];return(t.deckName||t.deckId)&&l.push(`◆ ${t.deckName??t.deckId}`),t.playbookId&&l.push(`pb:${t.playbookId.slice(0,8)}…`),t.planModel&&l.push(`plan:${t.planModel}`),t.executeModel&&l.push(`exec:${t.executeModel}`),l.join(" · ")}function Ss({trace:t,label:l,showHeading:i=!0}){var r;return(r=t==null?void 0:t.entries)!=null&&r.length?g.jsxs("section",{className:"space-y-2",children:[i&&g.jsx("div",{className:"heading-section",children:l??"Reasoning trace"}),g.jsx("div",{className:"space-y-1 max-h-72 overflow-y-auto border border-white/10 rounded p-2 bg-black/20",children:t.entries.map((s,o)=>g.jsxs("div",{className:"text-sm font-mono",children:[g.jsx("span",{className:s.type==="human"?"text-[#C4B643]":s.type==="context"?"text-white/50":"text-[#92E4DD]",children:s.type}),s.toolName&&g.jsxs("span",{className:"text-white/40",children:[" · ",s.toolName]}),g.jsx("div",{className:"text-white/70 whitespace-pre-wrap mt-0.5",children:s.text})]},o))})]}):null}function Xy(t,l){return l!=null&&t>=l}function l2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`${t} / ${l} turn${l===1?"":"s"}`:`${t} turn${t===1?"":"s"}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function a2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`$${t.toFixed(4)} / $${l.toFixed(2)}`:`$${t.toFixed(4)}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function i2({line:t}){const{usage:l,maxTurns:i,maxBudgetUsd:r}=t,s=[];return l.model&&s.push(`model ${l.model}`),l.numTurns!=null&&s.push(g.jsx(l2,{used:l.numTurns,max:i},"turns")),l.totalCostUsd!=null&&s.push(g.jsx(a2,{used:l.totalCostUsd,max:r},"usd")),l.inputTokens!=null&&s.push(`${l.inputTokens} in`),l.outputTokens!=null&&s.push(`${l.outputTokens} out`),l.durationMs!=null&&s.push(Oy(l.durationMs)),g.jsx(g.Fragment,{children:s.map((o,f)=>g.jsxs("span",{children:[f>0&&" · ",o]},f))})}function _s({summary:t}){if(!(t!=null&&t.lines.length))return null;const l=t.lines.length>1;return g.jsxs("section",{className:"space-y-1.5",children:[g.jsx("div",{className:"heading-section",children:"Usage"}),t.lines.map((i,r)=>g.jsxs("p",{className:"text-sm text-white/50 font-mono",children:[g.jsxs("span",{className:"text-white/65",children:[i.label,":"]})," ",g.jsx(i2,{line:i})]},r)),l&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/85 font-mono pt-1 border-t border-white/10",children:[g.jsx("span",{className:"text-white/65",children:"total:"})," ",[t.total.numTurns>0&&`${t.total.numTurns} turn${t.total.numTurns===1?"":"s"}`,t.total.totalCostUsd>0&&`$${t.total.totalCostUsd.toFixed(4)}`,t.total.inputTokens>0&&`${t.total.inputTokens} in`,t.total.outputTokens>0&&`${t.total.outputTokens} out`,t.total.durationMs>0&&Oy(t.total.durationMs)].filter(Boolean).join(" · ")]})]})}function r2(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const u2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o2={};function Og(t,l){return(o2.jsx?s2:u2).test(t)}const c2=/[ \t\n\f\r]/g;function f2(t){return typeof t=="object"?t.type==="text"?Mg(t.value):!1:Mg(t)}function Mg(t){return t.replace(c2,"")===""}class Nr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}Nr.prototype.normal={};Nr.prototype.property={};Nr.prototype.space=void 0;function Jy(t,l){const i={},r={};for(const s of t)Object.assign(i,s.property),Object.assign(r,s.normal);return new Nr(i,r,l)}function jf(t){return t.toLowerCase()}class en{constructor(l,i){this.attribute=i,this.property=l}}en.prototype.attribute="";en.prototype.booleanish=!1;en.prototype.boolean=!1;en.prototype.commaOrSpaceSeparated=!1;en.prototype.commaSeparated=!1;en.prototype.defined=!1;en.prototype.mustUseProperty=!1;en.prototype.number=!1;en.prototype.overloadedBoolean=!1;en.prototype.property="";en.prototype.spaceSeparated=!1;en.prototype.space=void 0;let d2=0;const Ne=Sa(),kt=Sa(),Af=Sa(),ne=Sa(),lt=Sa(),pa=Sa(),cn=Sa();function Sa(){return 2**++d2}const Nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:kt,commaOrSpaceSeparated:cn,commaSeparated:pa,number:ne,overloadedBoolean:Af,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Pc=Object.keys(Nf);class Xf extends en{constructor(l,i,r,s){let o=-1;if(super(l,i),Rg(this,"space",s),typeof r=="number")for(;++o<Pc.length;){const f=Pc[o];Rg(this,Pc[o],(r&Nf[f])===Nf[f])}}}Xf.prototype.defined=!0;function Rg(t,l,i){i&&(t[l]=i)}function xi(t){const l={},i={};for(const[r,s]of Object.entries(t.properties)){const o=new Xf(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),l[r]=o,i[jf(r)]=r,i[jf(o.attribute)]=r}return new Nr(l,i,t.space)}const Ky=xi({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:lt,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ne,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:lt,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:kt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function $y(t,l){return l in t?t[l]:l}function Py(t,l){return $y(t,l.toLowerCase())}const h2=xi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pa,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alpha:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:lt,autoFocus:Ne,autoPlay:Ne,blocking:lt,capture:null,charSet:null,checked:Ne,cite:null,className:lt,closedBy:null,colorSpace:null,cols:ne,colSpan:ne,command:null,commandFor:null,content:null,contentEditable:kt,controls:Ne,controlsList:lt,coords:ne|pa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Af,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:lt,height:ne,hidden:Af,high:ne,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ne,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ne,pattern:null,ping:lt,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:lt,required:Ne,reversed:Ne,rows:ne,rowSpan:ne,sandbox:lt,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootCustomElementRegistry:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shadowRootSerializable:Ne,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:kt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ne,disablePictureInPicture:Ne,disableRemotePlayback:Ne,exportParts:pa,part:lt,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:Py}),m2=xi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cn,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:lt,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:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,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:pa,g2:pa,glyphName:pa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,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:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,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:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$y}),Wy=xi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),ex=xi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Py}),tx=xi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),p2={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"},g2=/[A-Z]/g,Lg=/-[a-z]/g,y2=/^data[-\w.:]+$/i;function x2(t,l){const i=jf(l);let r=l,s=en;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&y2.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(Lg,v2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!Lg.test(o)){let f=o.replace(g2,b2);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=Xf}return new s(r,l)}function b2(t){return"-"+t.toLowerCase()}function v2(t){return t.charAt(1).toUpperCase()}const k2=Jy([Ky,h2,Wy,ex,tx],"html"),Jf=Jy([Ky,m2,Wy,ex,tx],"svg");function w2(t){return t.join(" ").trim()}var oi={},Wc,Bg;function S2(){if(Bg)return Wc;Bg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
50
- `,m="/",x="*",y="",k="comment",v="declaration";function _(H,N){if(typeof H!="string")throw new TypeError("First argument must be a string");if(!H)return[];N=N||{};var Z=1,q=1;function te(re){var W=re.match(l);W&&(Z+=W.length);var T=re.lastIndexOf(p);q=~T?re.length-T:q+re.length}function ee(){var re={line:Z,column:q};return function(W){return W.position=new O(re),me(),W}}function O(re){this.start=re,this.end={line:Z,column:q},this.source=N.source}O.prototype.content=H;function P(re){var W=new Error(N.source+":"+Z+":"+q+": "+re);if(W.reason=re,W.filename=N.source,W.line=Z,W.column=q,W.source=H,!N.silent)throw W}function se(re){var W=re.exec(H);if(W){var T=W[0];return te(T),H=H.slice(T.length),W}}function me(){se(i)}function M(re){var W;for(re=re||[];W=I();)W!==!1&&re.push(W);return re}function I(){var re=ee();if(!(m!=H.charAt(0)||x!=H.charAt(1))){for(var W=2;y!=H.charAt(W)&&(x!=H.charAt(W)||m!=H.charAt(W+1));)++W;if(W+=2,y===H.charAt(W-1))return P("End of comment missing");var T=H.slice(2,W-2);return q+=2,te(T),H=H.slice(W),q+=2,re({type:k,comment:T})}}function $(){var re=ee(),W=se(r);if(W){if(I(),!se(s))return P("property missing ':'");var T=se(o),J=re({type:v,property:R(W[0].replace(t,y)),value:T?R(T[0].replace(t,y)):y});return se(f),J}}function xe(){var re=[];M(re);for(var W;W=$();)W!==!1&&(re.push(W),M(re));return re}return me(),xe()}function R(H){return H?H.replace(h,y):y}return Wc=_,Wc}var Ug;function _2(){if(Ug)return oi;Ug=1;var t=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=i;const l=t(S2());function i(r,s){let o=null;if(!r||typeof r!="string")return o;const f=(0,l.default)(r),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:x}=p;h?s(m,x,p):x&&(o=o||{},o[m]=x)}),o}return oi}var pr={},Hg;function E2(){if(Hg)return pr;Hg=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||i.test(m)||t.test(m)},f=function(m,x){return x.toUpperCase()},h=function(m,x){return"".concat(x,"-")},p=function(m,x){return x===void 0&&(x={}),o(m)?m:(m=m.toLowerCase(),x.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return pr.camelCase=p,pr}var gr,qg;function C2(){if(qg)return gr;qg=1;var t=gr&&gr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(_2()),i=E2();function r(s,o){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,i.camelCase)(h,o)]=p)}),f}return r.default=r,gr=r,gr}var j2=C2();const A2=Ay(j2),nx=lx("end"),Kf=lx("start");function lx(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function N2(t){const l=Kf(t),i=nx(t);if(l&&i)return{start:l,end:i}}function kr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vg(t.position):"start"in t||"end"in t?Vg(t):"line"in t||"column"in t?Tf(t):""}function Tf(t){return Yg(t&&t.line)+":"+Yg(t&&t.column)}function Vg(t){return Tf(t&&t.start)+"-"+Tf(t&&t.end)}function Yg(t){return t&&typeof t=="number"?t:1}class Ut extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",o={},f=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof l=="string"?s=l:!o.cause&&l&&(f=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?o.ruleId=r:(o.source=r.slice(0,p),o.ruleId=r.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=kr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;const $f={}.hasOwnProperty,T2=new Map,D2=/[A-Z]/g,z2=new Set(["table","tbody","thead","tfoot","tr"]),O2=new Set(["td","th"]),ax="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function M2(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Y2(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=V2(i,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Jf:k2,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=ix(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function ix(t,l,i){if(l.type==="element")return R2(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return L2(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return U2(t,l,i);if(l.type==="mdxjsEsm")return B2(t,l);if(l.type==="root")return H2(t,l,i);if(l.type==="text")return q2(t,l)}function R2(t,l,i){const r=t.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=ux(t,l.tagName,!1),f=I2(t,l);let h=Wf(t,l);return z2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!f2(p):!0})),rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function L2(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Cr(t,l.position)}function B2(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Cr(t,l.position)}function U2(t,l,i){const r=t.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:ux(t,l.name,!0),f=Z2(t,l),h=Wf(t,l);return rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function H2(t,l,i){const r={};return Pf(r,Wf(t,l)),t.create(l,t.Fragment,r,i)}function q2(t,l){return l.value}function rx(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Pf(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function V2(t,l,i){return r;function r(s,o,f,h){const m=Array.isArray(f.children)?i:l;return h?m(o,f,h):m(o,f)}}function Y2(t,l){return i;function i(r,s,o,f){const h=Array.isArray(o.children),p=Kf(r);return l(s,o,f,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function I2(t,l){const i={};let r,s;for(s in l.properties)if(s!=="children"&&$f.call(l.properties,s)){const o=F2(t,s,l.properties[s]);if(o){const[f,h]=o;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&O2.has(l.tagName)?r=h:i[f]=h}}if(r){const o=i.style||(i.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function Z2(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const o=r.data.estree.body[0];o.type;const f=o.expression;f.type;const h=f.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else Cr(t,l.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const h=r.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else Cr(t,l.position);else o=r.value===null?!0:r.value;i[s]=o}return i}function Wf(t,l){const i=[];let r=-1;const s=t.passKeys?new Map:T2;for(;++r<l.children.length;){const o=l.children[r];let f;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=ix(t,o,f);h!==void 0&&i.push(h)}return i}function F2(t,l,i){const r=x2(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?r2(i):w2(i)),r.property==="style"){let s=typeof i=="object"?i:Q2(t,String(i));return t.stylePropertyNameCase==="css"&&(s=G2(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&r.space?p2[r.property]||r.property:r.attribute,i]}}function Q2(t,l){try{return A2(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,s=new Ut("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=ax+"#cannot-parse-style-attribute",s}}function ux(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,f;for(;++o<s.length;){const h=Og(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}r=f}else r=Og(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return $f.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(r);Cr(t)}function Cr(t,l){const i=new Ut("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=ax+"#cannot-handle-mdx-estrees-without-createevaluater",i}function G2(t){const l={};let i;for(i in t)$f.call(t,i)&&(l[X2(i)]=t[i]);return l}function X2(t){let l=t.replace(D2,J2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function J2(t){return"-"+t.toLowerCase()}const ef={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"]},K2={};function ed(t,l){const i=K2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return sx(t,r,s)}function sx(t,l,i){if($2(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Ig(t.children,l,i)}return Array.isArray(t)?Ig(t,l,i):""}function Ig(t,l,i){const r=[];let s=-1;for(;++s<t.length;)r[s]=sx(t[s],l,i);return r.join("")}function $2(t){return!!(t&&typeof t=="object")}const Zg=document.createElement("i");function td(t){const l="&"+t+";";Zg.innerHTML=l;const i=Zg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function fn(t,l,i,r){const s=t.length;let o=0,f;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,i=i>0?i:0,r.length<1e4)f=Array.from(r),f.unshift(l,i),t.splice(...f);else for(i&&t.splice(l,i);o<r.length;)f=r.slice(o,o+1e4),f.unshift(l,0),t.splice(...f),o+=1e4,l+=1e4}function wn(t,l){return t.length>0?(fn(t,t.length,0,l),t):l}const Fg={}.hasOwnProperty;function ox(t){const l={};let i=-1;for(;++i<t.length;)P2(l,t[i]);return l}function P2(t,l){let i;for(i in l){const s=(Fg.call(t,i)?t[i]:void 0)||(t[i]={}),o=l[i];let f;if(o)for(f in o){Fg.call(s,f)||(s[f]=[]);const h=o[f];W2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function W2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);fn(t,0,0,r)}function cx(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function An(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Yt=Ql(/[A-Za-z]/),Bt=Ql(/[\dA-Za-z]/),ek=Ql(/[#-'*+\--9=?A-Z^-~]/);function gs(t){return t!==null&&(t<32||t===127)}const Df=Ql(/\d/),tk=Ql(/[\dA-Fa-f]/),nk=Ql(/[!-/:-@[-`{-~]/);function we(t){return t!==null&&t<-2}function it(t){return t!==null&&(t<0||t===32)}function Be(t){return t===-2||t===-1||t===32}const Es=Ql(new RegExp("\\p{P}|\\p{S}","u")),ka=Ql(/\s/);function Ql(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function bi(t){const l=[];let i=-1,r=0,s=0;for(;++i<t.length;){const o=t.charCodeAt(i);let f="";if(o===37&&Bt(t.charCodeAt(i+1))&&Bt(t.charCodeAt(i+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(f=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(i+1);o<56320&&h>56319&&h<57344?(f=String.fromCharCode(o,h),s=1):f="�"}else f=String.fromCharCode(o);f&&(l.push(t.slice(r,i),encodeURIComponent(f)),r=i+s+1,f=""),s&&(i+=s,s=0)}return l.join("")+t.slice(r)}function Ye(t,l,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return f;function f(p){return Be(p)?(t.enter(i),h(p)):l(p)}function h(p){return Be(p)&&o++<s?(t.consume(p),h):(t.exit(i),l(p))}}const lk={tokenize:ak};function ak(t){const l=t.attempt(this.parser.constructs.contentInitial,r,s);let i;return l;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Ye(t,l,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,f(h)}function f(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return we(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),f)}}const ik={tokenize:rk},Qg={tokenize:uk};function rk(t){const l=this,i=[];let r=0,s,o,f;return h;function h(q){if(r<i.length){const te=i[r];return l.containerState=te[1],t.attempt(te[0].continuation,p,m)(q)}return m(q)}function p(q){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Z();const te=l.events.length;let ee=te,O;for(;ee--;)if(l.events[ee][0]==="exit"&&l.events[ee][1].type==="chunkFlow"){O=l.events[ee][1].end;break}N(r);let P=te;for(;P<l.events.length;)l.events[P][1].end={...O},P++;return fn(l.events,ee+1,0,l.events.slice(te)),l.events.length=P,m(q)}return h(q)}function m(q){if(r===i.length){if(!s)return k(q);if(s.currentConstruct&&s.currentConstruct.concrete)return _(q);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Qg,x,y)(q)}function x(q){return s&&Z(),N(r),k(q)}function y(q){return l.parser.lazy[l.now().line]=r!==i.length,f=l.now().offset,_(q)}function k(q){return l.containerState={},t.attempt(Qg,v,_)(q)}function v(q){return r++,i.push([l.currentConstruct,l.containerState]),k(q)}function _(q){if(q===null){s&&Z(),N(0),t.consume(q);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),R(q)}function R(q){if(q===null){H(t.exit("chunkFlow"),!0),N(0),t.consume(q);return}return we(q)?(t.consume(q),H(t.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(t.consume(q),R)}function H(q,te){const ee=l.sliceStream(q);if(te&&ee.push(null),q.previous=o,o&&(o.next=q),o=q,s.defineSkip(q.start),s.write(ee),l.parser.lazy[q.start.line]){let O=s.events.length;for(;O--;)if(s.events[O][1].start.offset<f&&(!s.events[O][1].end||s.events[O][1].end.offset>f))return;const P=l.events.length;let se=P,me,M;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){if(me){M=l.events[se][1].end;break}me=!0}for(N(r),O=P;O<l.events.length;)l.events[O][1].end={...M},O++;fn(l.events,se+1,0,l.events.slice(P)),l.events.length=O}}function N(q){let te=i.length;for(;te-- >q;){const ee=i[te];l.containerState=ee[1],ee[0].exit.call(l,t)}i.length=q}function Z(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function uk(t,l,i){return Ye(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(t){if(t===null||it(t)||ka(t))return 1;if(Es(t))return 2}function Cs(t,l,i){const r=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!r.includes(o)&&(l=o(l,i),r.push(o))}return l}const zf={name:"attention",resolveAll:sk,tokenize:ok};function sk(t,l){let i=-1,r,s,o,f,h,p,m,x;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const y={...t[r][1].end},k={...t[i][1].start};Gg(y,-p),Gg(k,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:k},o={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},t[r][1].end={...f.start},t[i][1].start={...h.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=wn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=wn(m,[["enter",s,l],["enter",f,l],["exit",f,l],["enter",o,l]]),m=wn(m,Cs(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=wn(m,[["exit",o,l],["enter",h,l],["exit",h,l],["exit",s,l]]),t[i][1].end.offset-t[i][1].start.offset?(x=2,m=wn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):x=0,fn(t,r-1,i-r+3,m),i=r+m.length-x-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function ok(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=gi(r);let o;return f;function f(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),x=gi(p),y=!x||x===2&&s||i.includes(p),k=!s||s===2&&x||i.includes(r);return m._open=!!(o===42?y:y&&(s||!k)),m._close=!!(o===42?k:k&&(x||!y)),l(p)}}function Gg(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const ck={name:"autolink",tokenize:fk};function fk(t,l,i){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return Yt(v)?(t.consume(v),f):v===64?i(v):m(v)}function f(v){return v===43||v===45||v===46||Bt(v)?(r=1,h(v)):m(v)}function h(v){return v===58?(t.consume(v),r=0,p):(v===43||v===45||v===46||Bt(v))&&r++<32?(t.consume(v),h):(r=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):v===null||v===32||v===60||gs(v)?i(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),x):ek(v)?(t.consume(v),m):i(v)}function x(v){return Bt(v)?y(v):i(v)}function y(v){return v===46?(t.consume(v),r=0,x):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):k(v)}function k(v){if((v===45||Bt(v))&&r++<63){const _=v===45?k:y;return t.consume(v),_}return i(v)}}const Tr={partial:!0,tokenize:dk};function dk(t,l,i){return r;function r(o){return Be(o)?Ye(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||we(o)?l(o):i(o)}}const fx={continuation:{tokenize:mk},exit:pk,name:"blockQuote",tokenize:hk};function hk(t,l,i){const r=this;return s;function s(f){if(f===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),o}return i(f)}function o(f){return Be(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(f))}}function mk(t,l,i){const r=this;return s;function s(f){return Be(f)?Ye(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return t.attempt(fx,l,i)(f)}}function pk(t){t.exit("blockQuote")}const dx={name:"characterEscape",tokenize:gk};function gk(t,l,i){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return nk(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(o)}}const hx={name:"characterReference",tokenize:yk};function yk(t,l,i){const r=this;let s=0,o,f;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,f=Bt,x(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,f=tk,x):(t.enter("characterReferenceValue"),o=7,f=Df,x(y))}function x(y){if(y===59&&s){const k=t.exit("characterReferenceValue");return f===Bt&&!td(r.sliceSerialize(k))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return f(y)&&s++<o?(t.consume(y),x):i(y)}}const Xg={partial:!0,tokenize:bk},Jg={concrete:!0,name:"codeFenced",tokenize:xk};function xk(t,l,i){const r=this,s={partial:!0,tokenize:ee};let o=0,f=0,h;return p;function p(O){return m(O)}function m(O){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,h=O,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(O)}function x(O){return O===h?(f++,t.consume(O),x):f<3?i(O):(t.exit("codeFencedFenceSequence"),Be(O)?Ye(t,y,"whitespace")(O):y(O))}function y(O){return O===null||we(O)?(t.exit("codeFencedFence"),r.interrupt?l(O):t.check(Xg,R,te)(O)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(O)):Be(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ye(t,v,"whitespace")(O)):O===96&&O===h?i(O):(t.consume(O),k)}function v(O){return O===null||we(O)?y(O):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),_(O))}function _(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(O)):O===96&&O===h?i(O):(t.consume(O),_)}function R(O){return t.attempt(s,te,H)(O)}function H(O){return t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),N}function N(O){return o>0&&Be(O)?Ye(t,Z,"linePrefix",o+1)(O):Z(O)}function Z(O){return O===null||we(O)?t.check(Xg,R,te)(O):(t.enter("codeFlowValue"),q(O))}function q(O){return O===null||we(O)?(t.exit("codeFlowValue"),Z(O)):(t.consume(O),q)}function te(O){return t.exit("codeFenced"),l(O)}function ee(O,P,se){let me=0;return M;function M(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),I}function I(W){return O.enter("codeFencedFence"),Be(W)?Ye(O,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):$(W)}function $(W){return W===h?(O.enter("codeFencedFenceSequence"),xe(W)):se(W)}function xe(W){return W===h?(me++,O.consume(W),xe):me>=f?(O.exit("codeFencedFenceSequence"),Be(W)?Ye(O,re,"whitespace")(W):re(W)):se(W)}function re(W){return W===null||we(W)?(O.exit("codeFencedFence"),P(W)):se(W)}}}function bk(t,l,i){const r=this;return s;function s(f){return f===null?i(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}const tf={name:"codeIndented",tokenize:kk},vk={partial:!0,tokenize:wk};function kk(t,l,i){const r=this;return s;function s(m){return t.enter("codeIndented"),Ye(t,o,"linePrefix",5)(m)}function o(m){const x=r.events[r.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?f(m):i(m)}function f(m){return m===null?p(m):we(m)?t.attempt(vk,f,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||we(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),l(m)}}function wk(t,l,i){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?i(f):we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):Ye(t,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):we(f)?s(f):i(f)}}const Sk={name:"codeText",previous:Ek,resolve:_k,tokenize:Ck};function _k(t){let l=t.length-4,i=3,r,s;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)s===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(s=r):(r===l||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),l-=r-s-2,r=s+2),s=void 0);return t}function Ek(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ck(t,l,i){let r=0,s,o;return f;function f(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),r++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,x(y)):we(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||we(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function x(y){return y===96?(t.consume(y),s++,x):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",m(y))}}class jk{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const s=i||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&yr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),yr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),yr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);yr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);yr(this.left,i.reverse())}}}function yr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function mx(t){const l={};let i=-1,r,s,o,f,h,p,m;const x=new jk(t);for(;++i<x.length;){for(;i in l;)i=l[i];if(r=x.get(i),i&&r[1].type==="chunkFlow"&&x.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,Ak(x,i)),i=l[i],m=!0);else if(r[1]._container){for(o=i,s=void 0;o--;)if(f=x.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...x.get(s)[1].start},h=x.slice(s,i),h.unshift(r),x.splice(s,i-s+1,h))}}return fn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!m}function Ak(t,l){const i=t.get(l)[1],r=t.get(l)[2];let s=l-1;const o=[];let f=i._tokenizer;f||(f=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let x,y,k=-1,v=i,_=0,R=0;const H=[R];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(x=r.sliceStream(v),v.next||x.push(null),y&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(x),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++k<h.length;)h[k][0]==="exit"&&h[k-1][0]==="enter"&&h[k][1].type===h[k-1][1].type&&h[k][1].start.line!==h[k][1].end.line&&(R=k+1,H.push(R),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):H.pop(),k=H.length;k--;){const N=h.slice(H[k],H[k+1]),Z=o.pop();p.push([Z,Z+N.length-1]),t.splice(Z,2,N)}for(p.reverse(),k=-1;++k<p.length;)m[_+p[k][0]]=_+p[k][1],_+=p[k][1]-p[k][0]-1;return m}const Nk={resolve:Dk,tokenize:zk},Tk={partial:!0,tokenize:Ok};function Dk(t){return mx(t),t}function zk(t,l){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):we(h)?t.check(Tk,f,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),l(h)}function f(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function Ok(t,l,i){const r=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ye(t,o,"linePrefix")}function o(f){if(f===null||we(f))return i(f);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):t.interrupt(r.parser.constructs.flow,i,l)(f)}}function px(t,l,i,r,s,o,f,h,p){const m=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(N){return N===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(N),t.exit(o),k):N===null||N===32||N===41||gs(N)?i(N):(t.enter(r),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),R(N))}function k(N){return N===62?(t.enter(o),t.consume(N),t.exit(o),t.exit(s),t.exit(r),l):(t.enter(h),t.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(t.exit("chunkString"),t.exit(h),k(N)):N===null||N===60||we(N)?i(N):(t.consume(N),N===92?_:v)}function _(N){return N===60||N===62||N===92?(t.consume(N),v):v(N)}function R(N){return!x&&(N===null||N===41||it(N))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(r),l(N)):x<m&&N===40?(t.consume(N),x++,R):N===41?(t.consume(N),x--,R):N===null||N===32||N===40||gs(N)?i(N):(t.consume(N),N===92?H:R)}function H(N){return N===40||N===41||N===92?(t.consume(N),R):R(N)}}function gx(t,l,i,r,s,o){const f=this;let h=0,p;return m;function m(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),x}function x(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?i(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),l):we(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||we(v)||h++>999?(t.exit("chunkString"),x(v)):(t.consume(v),p||(p=!Be(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(t.consume(v),h++,y):y(v)}}function yx(t,l,i,r,s,o){let f;return h;function h(k){return k===34||k===39||k===40?(t.enter(r),t.enter(s),t.consume(k),t.exit(s),f=k===40?41:k,p):i(k)}function p(k){return k===f?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),l):(t.enter(o),m(k))}function m(k){return k===f?(t.exit(o),p(f)):k===null?i(k):we(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),Ye(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===f||k===null||we(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?y:x)}function y(k){return k===f||k===92?(t.consume(k),x):x(k)}}function wr(t,l){let i;return r;function r(s){return we(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,r):Be(s)?Ye(t,r,i?"linePrefix":"lineSuffix")(s):l(s)}}const Mk={name:"definition",tokenize:Lk},Rk={partial:!0,tokenize:Bk};function Lk(t,l,i){const r=this;let s;return o;function o(v){return t.enter("definition"),f(v)}function f(v){return gx.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return s=An(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):i(v)}function p(v){return it(v)?wr(t,m)(v):m(v)}function m(v){return px(t,x,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function x(v){return t.attempt(Rk,y,y)(v)}function y(v){return Be(v)?Ye(t,k,"whitespace")(v):k(v)}function k(v){return v===null||we(v)?(t.exit("definition"),r.parser.defined.push(s),l(v)):i(v)}}function Bk(t,l,i){return r;function r(h){return it(h)?wr(t,s)(h):i(h)}function s(h){return yx(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Be(h)?Ye(t,f,"whitespace")(h):f(h)}function f(h){return h===null||we(h)?l(h):i(h)}}const Uk={name:"hardBreakEscape",tokenize:Hk};function Hk(t,l,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return we(o)?(t.exit("hardBreakEscape"),l(o)):i(o)}}const qk={name:"headingAtx",resolve:Vk,tokenize:Yk};function Vk(t,l){let i=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},fn(t,r,i-r+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function Yk(t,l,i){let r=0;return s;function s(x){return t.enter("atxHeading"),o(x)}function o(x){return t.enter("atxHeadingSequence"),f(x)}function f(x){return x===35&&r++<6?(t.consume(x),f):x===null||it(x)?(t.exit("atxHeadingSequence"),h(x)):i(x)}function h(x){return x===35?(t.enter("atxHeadingSequence"),p(x)):x===null||we(x)?(t.exit("atxHeading"),l(x)):Be(x)?Ye(t,h,"whitespace")(x):(t.enter("atxHeadingText"),m(x))}function p(x){return x===35?(t.consume(x),p):(t.exit("atxHeadingSequence"),h(x))}function m(x){return x===null||x===35||it(x)?(t.exit("atxHeadingText"),h(x)):(t.consume(x),m)}}const Ik=["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"],Kg=["pre","script","style","textarea"],Zk={concrete:!0,name:"htmlFlow",resolveTo:Gk,tokenize:Xk},Fk={partial:!0,tokenize:Kk},Qk={partial:!0,tokenize:Jk};function Gk(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Xk(t,l,i){const r=this;let s,o,f,h,p;return m;function m(S){return x(S)}function x(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),y}function y(S){return S===33?(t.consume(S),k):S===47?(t.consume(S),o=!0,R):S===63?(t.consume(S),s=3,r.interrupt?l:E):Yt(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function k(S){return S===45?(t.consume(S),s=2,v):S===91?(t.consume(S),s=5,h=0,_):Yt(S)?(t.consume(S),s=4,r.interrupt?l:E):i(S)}function v(S){return S===45?(t.consume(S),r.interrupt?l:E):i(S)}function _(S){const ue="CDATA[";return S===ue.charCodeAt(h++)?(t.consume(S),h===ue.length?r.interrupt?l:$:_):i(S)}function R(S){return Yt(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function H(S){if(S===null||S===47||S===62||it(S)){const ue=S===47,ce=f.toLowerCase();return!ue&&!o&&Kg.includes(ce)?(s=1,r.interrupt?l(S):$(S)):Ik.includes(f.toLowerCase())?(s=6,ue?(t.consume(S),N):r.interrupt?l(S):$(S)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(S):o?Z(S):q(S))}return S===45||Bt(S)?(t.consume(S),f+=String.fromCharCode(S),H):i(S)}function N(S){return S===62?(t.consume(S),r.interrupt?l:$):i(S)}function Z(S){return Be(S)?(t.consume(S),Z):M(S)}function q(S){return S===47?(t.consume(S),M):S===58||S===95||Yt(S)?(t.consume(S),te):Be(S)?(t.consume(S),q):M(S)}function te(S){return S===45||S===46||S===58||S===95||Bt(S)?(t.consume(S),te):ee(S)}function ee(S){return S===61?(t.consume(S),O):Be(S)?(t.consume(S),ee):q(S)}function O(S){return S===null||S===60||S===61||S===62||S===96?i(S):S===34||S===39?(t.consume(S),p=S,P):Be(S)?(t.consume(S),O):se(S)}function P(S){return S===p?(t.consume(S),p=null,me):S===null||we(S)?i(S):(t.consume(S),P)}function se(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||it(S)?ee(S):(t.consume(S),se)}function me(S){return S===47||S===62||Be(S)?q(S):i(S)}function M(S){return S===62?(t.consume(S),I):i(S)}function I(S){return S===null||we(S)?$(S):Be(S)?(t.consume(S),I):i(S)}function $(S){return S===45&&s===2?(t.consume(S),T):S===60&&s===1?(t.consume(S),J):S===62&&s===4?(t.consume(S),j):S===63&&s===3?(t.consume(S),E):S===93&&s===5?(t.consume(S),Se):we(S)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Fk,F,xe)(S)):S===null||we(S)?(t.exit("htmlFlowData"),xe(S)):(t.consume(S),$)}function xe(S){return t.check(Qk,re,F)(S)}function re(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),W}function W(S){return S===null||we(S)?xe(S):(t.enter("htmlFlowData"),$(S))}function T(S){return S===45?(t.consume(S),E):$(S)}function J(S){return S===47?(t.consume(S),f="",ae):$(S)}function ae(S){if(S===62){const ue=f.toLowerCase();return Kg.includes(ue)?(t.consume(S),j):$(S)}return Yt(S)&&f.length<8?(t.consume(S),f+=String.fromCharCode(S),ae):$(S)}function Se(S){return S===93?(t.consume(S),E):$(S)}function E(S){return S===62?(t.consume(S),j):S===45&&s===2?(t.consume(S),E):$(S)}function j(S){return S===null||we(S)?(t.exit("htmlFlowData"),F(S)):(t.consume(S),j)}function F(S){return t.exit("htmlFlow"),l(S)}}function Jk(t,l,i){const r=this;return s;function s(f){return we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):i(f)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}function Kk(t,l,i){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Tr,l,i)}}const $k={name:"htmlText",tokenize:Pk};function Pk(t,l,i){const r=this;let s,o,f;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),p}function p(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),ee):E===63?(t.consume(E),q):Yt(E)?(t.consume(E),se):i(E)}function m(E){return E===45?(t.consume(E),x):E===91?(t.consume(E),o=0,_):Yt(E)?(t.consume(E),Z):i(E)}function x(E){return E===45?(t.consume(E),v):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),k):we(E)?(f=y,J(E)):(t.consume(E),y)}function k(E){return E===45?(t.consume(E),v):y(E)}function v(E){return E===62?T(E):E===45?k(E):y(E)}function _(E){const j="CDATA[";return E===j.charCodeAt(o++)?(t.consume(E),o===j.length?R:_):i(E)}function R(E){return E===null?i(E):E===93?(t.consume(E),H):we(E)?(f=R,J(E)):(t.consume(E),R)}function H(E){return E===93?(t.consume(E),N):R(E)}function N(E){return E===62?T(E):E===93?(t.consume(E),N):R(E)}function Z(E){return E===null||E===62?T(E):we(E)?(f=Z,J(E)):(t.consume(E),Z)}function q(E){return E===null?i(E):E===63?(t.consume(E),te):we(E)?(f=q,J(E)):(t.consume(E),q)}function te(E){return E===62?T(E):q(E)}function ee(E){return Yt(E)?(t.consume(E),O):i(E)}function O(E){return E===45||Bt(E)?(t.consume(E),O):P(E)}function P(E){return we(E)?(f=P,J(E)):Be(E)?(t.consume(E),P):T(E)}function se(E){return E===45||Bt(E)?(t.consume(E),se):E===47||E===62||it(E)?me(E):i(E)}function me(E){return E===47?(t.consume(E),T):E===58||E===95||Yt(E)?(t.consume(E),M):we(E)?(f=me,J(E)):Be(E)?(t.consume(E),me):T(E)}function M(E){return E===45||E===46||E===58||E===95||Bt(E)?(t.consume(E),M):I(E)}function I(E){return E===61?(t.consume(E),$):we(E)?(f=I,J(E)):Be(E)?(t.consume(E),I):me(E)}function $(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),s=E,xe):we(E)?(f=$,J(E)):Be(E)?(t.consume(E),$):(t.consume(E),re)}function xe(E){return E===s?(t.consume(E),s=void 0,W):E===null?i(E):we(E)?(f=xe,J(E)):(t.consume(E),xe)}function re(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||it(E)?me(E):(t.consume(E),re)}function W(E){return E===47||E===62||it(E)?me(E):i(E)}function T(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),l):i(E)}function J(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ae}function ae(E){return Be(E)?Ye(t,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Se(E)}function Se(E){return t.enter("htmlTextData"),f(E)}}const nd={name:"labelEnd",resolveAll:nw,resolveTo:lw,tokenize:aw},Wk={tokenize:iw},ew={tokenize:rw},tw={tokenize:uw};function nw(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",l+=s}}return t.length!==i.length&&fn(t,0,t.length,i),t}function lw(t,l){let i=t.length,r=0,s,o,f,h;for(;i--;)if(s=t[i][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(t[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=i,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=i);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[f][1].end}},x={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=wn(h,t.slice(o+1,o+r+3)),h=wn(h,[["enter",x,l]]),h=wn(h,Cs(l.parser.constructs.insideSpan.null,t.slice(o+r+4,f-3),l)),h=wn(h,[["exit",x,l],t[f-2],t[f-1],["exit",m,l]]),h=wn(h,t.slice(f+1)),h=wn(h,[["exit",p,l]]),fn(t,o,t.length,h),t}function aw(t,l,i){const r=this;let s=r.events.length,o,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return h;function h(k){return o?o._inactive?y(k):(f=r.parser.defined.includes(An(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(k),t.exit("labelMarker"),t.exit("labelEnd"),p):i(k)}function p(k){return k===40?t.attempt(Wk,x,f?x:y)(k):k===91?t.attempt(ew,x,f?m:y)(k):f?x(k):y(k)}function m(k){return t.attempt(tw,x,y)(k)}function x(k){return l(k)}function y(k){return o._balanced=!0,i(k)}}function iw(t,l,i){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return it(y)?wr(t,o)(y):o(y)}function o(y){return y===41?x(y):px(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return it(y)?wr(t,p)(y):x(y)}function h(y){return i(y)}function p(y){return y===34||y===39||y===40?yx(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function m(y){return it(y)?wr(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):i(y)}}function rw(t,l,i){const r=this;return s;function s(h){return gx.call(r,t,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return r.parser.defined.includes(An(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):i(h)}function f(h){return i(h)}}function uw(t,l,i){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):i(o)}}const sw={name:"labelStartImage",resolveAll:nd.resolveAll,tokenize:ow};function ow(t,l,i){const r=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),f):i(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):l(h)}}const cw={name:"labelStartLink",resolveAll:nd.resolveAll,tokenize:fw};function fw(t,l,i){const r=this;return s;function s(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),o}function o(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):l(f)}}const nf={name:"lineEnding",tokenize:dw};function dw(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ye(t,l,"linePrefix")}}const Wu={name:"thematicBreak",tokenize:hw};function hw(t,l,i){let r=0,s;return o;function o(m){return t.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||we(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===s?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Be(m)?Ye(t,h,"whitespace")(m):h(m))}}const Wt={continuation:{tokenize:yw},exit:bw,name:"list",tokenize:gw},mw={partial:!0,tokenize:vw},pw={partial:!0,tokenize:xw};function gw(t,l,i){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(v){const _=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:Df(v)){if(r.containerState.type||(r.containerState.type=_,t.enter(_,{_container:!0})),_==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Wu,i,m)(v):m(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return i(v)}function p(v){return Df(v)&&++f<10?(t.consume(v),p):(!r.interrupt||f<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):i(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(Tr,r.interrupt?i:x,t.attempt(mw,k,y))}function x(v){return r.containerState.initialBlankLine=!0,o++,k(v)}function y(v){return Be(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):i(v)}function k(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(v)}}function yw(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(Tr,s,o);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ye(t,l,"listItemIndent",r.containerState.size+1)(h)}function o(h){return r.containerState.furtherBlankLines||!Be(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(pw,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ye(t,t.attempt(Wt,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function xw(t,l,i){const r=this;return Ye(t,s,"listItemIndent",r.containerState.size+1);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===r.containerState.size?l(o):i(o)}}function bw(t){t.exit(this.containerState.type)}function vw(t,l,i){const r=this;return Ye(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const f=r.events[r.events.length-1];return!Be(o)&&f&&f[1].type==="listItemPrefixWhitespace"?l(o):i(o)}}const $g={name:"setextUnderline",resolveTo:kw,tokenize:ww};function kw(t,l){let i=t.length,r,s,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(s=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);const f={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",f,l]),t.splice(o+1,0,["exit",t[r][1],l]),t[r][1].end={...t[o][1].end}):t[r][1]=f,t.push(["exit",f,l]),t}function ww(t,l,i){const r=this;let s;return o;function o(m){let x=r.events.length,y;for(;x--;)if(r.events[x][1].type!=="lineEnding"&&r.events[x][1].type!=="linePrefix"&&r.events[x][1].type!=="content"){y=r.events[x][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(t.enter("setextHeadingLine"),s=m,f(m)):i(m)}function f(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),Be(m)?Ye(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||we(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const Sw={tokenize:_w};function _w(t){const l=this,i=t.attempt(Tr,r,t.attempt(this.parser.constructs.flowInitial,s,Ye(t,t.attempt(this.parser.constructs.flow,s,t.attempt(Nk,s)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const Ew={resolveAll:bx()},Cw=xx("string"),jw=xx("text");function xx(t){return{resolveAll:bx(t==="text"?Aw:void 0),tokenize:l};function l(i){const r=this,s=this.parser.constructs[t],o=i.attempt(s,f,h);return f;function f(x){return m(x)?o(x):h(x)}function h(x){if(x===null){i.consume(x);return}return i.enter("data"),i.consume(x),p}function p(x){return m(x)?(i.exit("data"),o(x)):(i.consume(x),p)}function m(x){if(x===null)return!0;const y=s[x];let k=-1;if(y)for(;++k<y.length;){const v=y[k];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function bx(t){return l;function l(i,r){let s=-1,o;for(;++s<=i.length;)o===void 0?i[s]&&i[s][1].type==="data"&&(o=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==o+2&&(i[o][1].end=i[s-1][1].end,i.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(i,r):i}}function Aw(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],s=l.sliceStream(r);let o=s.length,f=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(h=0),h){const m={type:i===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?f:r.start._bufferIndex+f,_index:r.start._index+o,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const Nw={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:fx},Tw={91:Mk},Dw={[-2]:tf,[-1]:tf,32:tf},zw={35:qk,42:Wu,45:[$g,Wu],60:Zk,61:$g,95:Wu,96:Jg,126:Jg},Ow={38:hx,92:dx},Mw={[-5]:nf,[-4]:nf,[-3]:nf,33:sw,38:hx,42:zf,60:[ck,$k],91:cw,92:[Uk,dx],93:nd,95:zf,96:Sk},Rw={null:[zf,Ew]},Lw={null:[42,95]},Bw={null:[]},Uw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Lw,contentInitial:Tw,disable:Bw,document:Nw,flow:zw,flowInitial:Dw,insideSpan:Rw,string:Ow,text:Mw},Symbol.toStringTag,{value:"Module"}));function Hw(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},o=[];let f=[],h=[];const p={attempt:P(ee),check:P(O),consume:Z,enter:q,exit:te,interrupt:P(O,{interrupt:!0})},m={code:null,containerState:{},defineSkip:R,events:[],now:_,parser:t,previous:null,sliceSerialize:k,sliceStream:v,write:y};let x=l.tokenize.call(m,p);return l.resolveAll&&o.push(l),m;function y(I){return f=wn(f,I),H(),f[f.length-1]!==null?[]:(se(l,0),m.events=Cs(o,m.events,m),m.events)}function k(I,$){return Vw(v(I),$)}function v(I){return qw(f,I)}function _(){const{_bufferIndex:I,_index:$,line:xe,column:re,offset:W}=r;return{_bufferIndex:I,_index:$,line:xe,column:re,offset:W}}function R(I){s[I.line]=I.column,M()}function H(){let I;for(;r._index<f.length;){const $=f[r._index];if(typeof $=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<$.length;)N($.charCodeAt(r._bufferIndex));else N($)}}function N(I){x=x(I)}function Z(I){we(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,M()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===f[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=I}function q(I,$){const xe=$||{};return xe.type=I,xe.start=_(),m.events.push(["enter",xe,m]),h.push(xe),xe}function te(I){const $=h.pop();return $.end=_(),m.events.push(["exit",$,m]),$}function ee(I,$){se(I,$.from)}function O(I,$){$.restore()}function P(I,$){return xe;function xe(re,W,T){let J,ae,Se,E;return Array.isArray(re)?F(re):"tokenize"in re?F([re]):j(re);function j(ge){return je;function je(pe){const Te=pe!==null&&ge[pe],ft=pe!==null&&ge.null,Tt=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return F(Tt)(pe)}}function F(ge){return J=ge,ae=0,ge.length===0?T:S(ge[ae])}function S(ge){return je;function je(pe){return E=me(),Se=ge,ge.partial||(m.currentConstruct=ge),ge.name&&m.parser.constructs.disable.null.includes(ge.name)?ce():ge.tokenize.call($?Object.assign(Object.create(m),$):m,p,ue,ce)(pe)}}function ue(ge){return I(Se,E),W}function ce(ge){return E.restore(),++ae<J.length?S(J[ae]):T}}}function se(I,$){I.resolveAll&&!o.includes(I)&&o.push(I),I.resolve&&fn(m.events,$,m.events.length-$,I.resolve(m.events.slice($),m)),I.resolveTo&&(m.events=I.resolveTo(m.events,m))}function me(){const I=_(),$=m.previous,xe=m.currentConstruct,re=m.events.length,W=Array.from(h);return{from:re,restore:T};function T(){r=I,m.previous=$,m.currentConstruct=xe,m.events.length=re,h=W,M()}}function M(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function qw(t,l){const i=l.start._index,r=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let f;if(i===s)f=[t[i].slice(r,o)];else{if(f=t.slice(i,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}o>0&&f.push(t[s].slice(0,o))}return f}function Vw(t,l){let i=-1;const r=[];let s;for(;++i<t.length;){const o=t[i];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
48
+ `+u.stack}}var ml=Object.prototype.hasOwnProperty,pl=t.unstable_scheduleCallback,gl=t.unstable_cancelCallback,vi=t.unstable_shouldYield,ki=t.unstable_requestPaint,gt=t.unstable_now,Ze=t.unstable_getCurrentPriorityLevel,Q=t.unstable_ImmediatePriority,ie=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,je=t.unstable_LowPriority,Xe=t.unstable_IdlePriority,tn=t.log,qn=t.unstable_setDisableYieldValue,Ht=null,_t=null;function Ft(e){if(typeof tn=="function"&&qn(e),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Ht,e)}catch{}}var tt=Math.clz32?Math.clz32:h0,yl=Math.log,_n=Math.LN2;function h0(e){return e>>>=0,e===0?32:31-(yl(e)/_n|0)|0}var zr=256,Or=262144,Mr=4194304;function Xl(e){var n=e&42;if(n!==0)return n;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 Rr(e,n,a){var u=e.pendingLanes;if(u===0)return 0;var c=0,d=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~d,u!==0?c=Xl(u):(b&=w,b!==0?c=Xl(b):a||(a=w&~e,a!==0&&(c=Xl(a))))):(w=u&~d,w!==0?c=Xl(w):b!==0?c=Xl(b):a||(a=u&~e,a!==0&&(c=Xl(a)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,a=n&-n,d>=a||d===32&&(a&4194048)!==0)?n:c}function wi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function m0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 gd(){var e=Mr;return Mr<<=1,(Mr&62914560)===0&&(Mr=4194304),e}function Ts(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function Si(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function p0(e,n,a,u,c,d){var b=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var w=e.entanglements,C=e.expirationTimes,B=e.hiddenUpdates;for(a=b&~a;0<a;){var G=31-tt(a),K=1<<G;w[G]=0,C[G]=-1;var U=B[G];if(U!==null)for(B[G]=null,G=0;G<U.length;G++){var I=U[G];I!==null&&(I.lane&=-536870913)}a&=~K}u!==0&&yd(e,u,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(b&~n))}function yd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|a&261930}function xd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var u=31-tt(a),c=1<<u;c&n|e[u]&n&&(e[u]|=n),a&=~c}}function bd(e,n){var a=n&-n;return a=(a&42)!==0?1:Ds(a),(a&(e.suspendedLanes|n))!==0?0:a}function Ds(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 zs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function vd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:ig(e.type))}function kd(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var xl=Math.random().toString(36).slice(2),Dt="__reactFiber$"+xl,Qt="__reactProps$"+xl,Ea="__reactContainer$"+xl,Os="__reactEvents$"+xl,g0="__reactListeners$"+xl,y0="__reactHandles$"+xl,wd="__reactResources$"+xl,_i="__reactMarker$"+xl;function Ms(e){delete e[Dt],delete e[Qt],delete e[Os],delete e[g0],delete e[y0]}function Ca(e){var n=e[Dt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[Ea]||a[Dt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=Yp(e);e!==null;){if(a=e[Dt])return a;e=Yp(e)}return n}e=a,a=e.parentNode}return null}function Aa(e){if(e=e[Dt]||e[Ea]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ei(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ja(e){var n=e[wd];return n||(n=e[wd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function Ct(e){e[_i]=!0}var Sd=new Set,_d={};function Jl(e,n){Na(e,n),Na(e+"Capture",n)}function Na(e,n){for(_d[e]=n,e=0;e<n.length;e++)Sd.add(n[e])}var x0=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]*$"),Ed={},Cd={};function b0(e){return ml.call(Cd,e)?!0:ml.call(Ed,e)?!1:x0.test(e)?Cd[e]=!0:(Ed[e]=!0,!1)}function Lr(e,n,a){if(b0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Br(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function Vn(e,n,a,u){if(u===null)e.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+u)}}function dn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ad(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function v0(e,n,a){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var c=u.get,d=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(b){a=""+b,d.call(this,b)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(b){a=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Rs(e){if(!e._valueTracker){var n=Ad(e)?"checked":"value";e._valueTracker=v0(e,n,""+e[n])}}function jd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),u="";return e&&(u=Ad(e)?e.checked?"true":"false":e.value),e=u,e!==a?(n.setValue(e),!0):!1}function Ur(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 k0=/[\n"\\]/g;function hn(e){return e.replace(k0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ls(e,n,a,u,c,d,b,w){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+dn(n)):e.value!==""+dn(n)&&(e.value=""+dn(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?Bs(e,b,dn(n)):a!=null?Bs(e,b,dn(a)):u!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+dn(w):e.removeAttribute("name")}function Nd(e,n,a,u,c,d,b,w){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Rs(e);return}a=a!=null?""+dn(a):"",n=n!=null?""+dn(n):a,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??c,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Rs(e)}function Bs(e,n,a){n==="number"&&Ur(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ta(e,n,a,u){if(e=e.options,n){n={};for(var c=0;c<a.length;c++)n["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=n.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&u&&(e[a].defaultSelected=!0)}else{for(a=""+dn(a),n=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,u&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function Td(e,n,a){if(n!=null&&(n=""+dn(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+dn(a):""}function Dd(e,n,a,u){if(n==null){if(u!=null){if(a!=null)throw Error(r(92));if(W(u)){if(1<u.length)throw Error(r(93));u=u[0]}a=u}a==null&&(a=""),n=a}a=dn(n),e.defaultValue=a,u=e.textContent,u===a&&u!==""&&u!==null&&(e.value=u),Rs(e)}function Da(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var w0=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 zd(e,n,a){var u=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,a):typeof a!="number"||a===0||w0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Od(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var c in n)u=n[c],n.hasOwnProperty(c)&&a[c]!==u&&zd(e,c,u)}else for(var d in n)n.hasOwnProperty(d)&&zd(e,d,n[d])}function Us(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 S0=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"]]),_0=/^[\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 Hr(e){return _0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function In(){}var Hs=null;function qs(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var za=null,Oa=null;function Md(e){var n=Aa(e);if(n&&(e=n.stateNode)){var a=e[Qt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ls(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+hn(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var u=a[n];if(u!==e&&u.form===e.form){var c=u[Qt]||null;if(!c)throw Error(r(90));Ls(u,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<a.length;n++)u=a[n],u.form===e.form&&jd(u)}break e;case"textarea":Td(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&Ta(e,!!a.multiple,n,!1)}}}var Vs=!1;function Rd(e,n,a){if(Vs)return e(n,a);Vs=!0;try{var u=e(n);return u}finally{if(Vs=!1,(za!==null||Oa!==null)&&(Cu(),za&&(n=za,e=Oa,Oa=za=null,Md(n),e)))for(n=0;n<e.length;n++)Md(e[n])}}function Ci(e,n){var a=e.stateNode;if(a===null)return null;var u=a[Qt]||null;if(u===null)return null;a=u[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Yn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Is=!1;if(Yn)try{var Ai={};Object.defineProperty(Ai,"passive",{get:function(){Is=!0}}),window.addEventListener("test",Ai,Ai),window.removeEventListener("test",Ai,Ai)}catch{Is=!1}var bl=null,Ys=null,qr=null;function Ld(){if(qr)return qr;var e,n=Ys,a=n.length,u,c="value"in bl?bl.value:bl.textContent,d=c.length;for(e=0;e<a&&n[e]===c[e];e++);var b=a-e;for(u=1;u<=b&&n[a-u]===c[d-u];u++);return qr=c.slice(e,1<u?1-u:void 0)}function Vr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Ir(){return!0}function Bd(){return!1}function Gt(e){function n(a,u,c,d,b){this._reactName=a,this._targetInst=c,this.type=u,this.nativeEvent=d,this.target=b,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(a=e[w],this[w]=a?a(d):d[w]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ir:Bd,this.isPropagationStopped=Bd,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ir)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ir)},persist:function(){},isPersistent:Ir}),n}var Kl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yr=Gt(Kl),ji=y({},Kl,{view:0,detail:0}),E0=Gt(ji),Zs,Fs,Ni,Zr=y({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gs,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!==Ni&&(Ni&&e.type==="mousemove"?(Zs=e.screenX-Ni.screenX,Fs=e.screenY-Ni.screenY):Fs=Zs=0,Ni=e),Zs)},movementY:function(e){return"movementY"in e?e.movementY:Fs}}),Ud=Gt(Zr),C0=y({},Zr,{dataTransfer:0}),A0=Gt(C0),j0=y({},ji,{relatedTarget:0}),Qs=Gt(j0),N0=y({},Kl,{animationName:0,elapsedTime:0,pseudoElement:0}),T0=Gt(N0),D0=y({},Kl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),z0=Gt(D0),O0=y({},Kl,{data:0}),Hd=Gt(O0),M0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},R0={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"},L0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function B0(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=L0[e])?!!n[e]:!1}function Gs(){return B0}var U0=y({},ji,{key:function(e){if(e.key){var n=M0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Vr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?R0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gs,charCode:function(e){return e.type==="keypress"?Vr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),H0=Gt(U0),q0=y({},Zr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qd=Gt(q0),V0=y({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gs}),I0=Gt(V0),Y0=y({},Kl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z0=Gt(Y0),F0=y({},Zr,{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}),Q0=Gt(F0),G0=y({},Kl,{newState:0,oldState:0}),X0=Gt(G0),J0=[9,13,27,32],Xs=Yn&&"CompositionEvent"in window,Ti=null;Yn&&"documentMode"in document&&(Ti=document.documentMode);var K0=Yn&&"TextEvent"in window&&!Ti,Vd=Yn&&(!Xs||Ti&&8<Ti&&11>=Ti),Id=" ",Yd=!1;function Zd(e,n){switch(e){case"keyup":return J0.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ma=!1;function $0(e,n){switch(e){case"compositionend":return Fd(n);case"keypress":return n.which!==32?null:(Yd=!0,Id);case"textInput":return e=n.data,e===Id&&Yd?null:e;default:return null}}function P0(e,n){if(Ma)return e==="compositionend"||!Xs&&Zd(e,n)?(e=Ld(),qr=Ys=bl=null,Ma=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Vd&&n.locale!=="ko"?null:n.data;default:return null}}var W0={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 Qd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!W0[e.type]:n==="textarea"}function Gd(e,n,a,u){za?Oa?Oa.push(u):Oa=[u]:za=u,n=Ou(n,"onChange"),0<n.length&&(a=new Yr("onChange","change",null,a,u),e.push({event:a,listeners:n}))}var Di=null,zi=null;function eb(e){Np(e,0)}function Fr(e){var n=Ei(e);if(jd(n))return e}function Xd(e,n){if(e==="change")return n}var Jd=!1;if(Yn){var Js;if(Yn){var Ks="oninput"in document;if(!Ks){var Kd=document.createElement("div");Kd.setAttribute("oninput","return;"),Ks=typeof Kd.oninput=="function"}Js=Ks}else Js=!1;Jd=Js&&(!document.documentMode||9<document.documentMode)}function $d(){Di&&(Di.detachEvent("onpropertychange",Pd),zi=Di=null)}function Pd(e){if(e.propertyName==="value"&&Fr(zi)){var n=[];Gd(n,zi,e,qs(e)),Rd(eb,n)}}function tb(e,n,a){e==="focusin"?($d(),Di=n,zi=a,Di.attachEvent("onpropertychange",Pd)):e==="focusout"&&$d()}function nb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Fr(zi)}function lb(e,n){if(e==="click")return Fr(n)}function ab(e,n){if(e==="input"||e==="change")return Fr(n)}function ib(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var nn=typeof Object.is=="function"?Object.is:ib;function Oi(e,n){if(nn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),u=Object.keys(n);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var c=a[u];if(!ml.call(n,c)||!nn(e[c],n[c]))return!1}return!0}function Wd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function eh(e,n){var a=Wd(e);e=0;for(var u;a;){if(a.nodeType===3){if(u=e+a.textContent.length,e<=n&&u>=n)return{node:a,offset:n-e};e=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Wd(a)}}function th(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?th(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ur(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ur(e.document)}return n}function $s(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var rb=Yn&&"documentMode"in document&&11>=document.documentMode,Ra=null,Ps=null,Mi=null,Ws=!1;function lh(e,n,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Ws||Ra==null||Ra!==Ur(u)||(u=Ra,"selectionStart"in u&&$s(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Mi&&Oi(Mi,u)||(Mi=u,u=Ou(Ps,"onSelect"),0<u.length&&(n=new Yr("onSelect","select",null,n,a),e.push({event:n,listeners:u}),n.target=Ra)))}function $l(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var La={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionrun:$l("Transition","TransitionRun"),transitionstart:$l("Transition","TransitionStart"),transitioncancel:$l("Transition","TransitionCancel"),transitionend:$l("Transition","TransitionEnd")},eo={},ah={};Yn&&(ah=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function Pl(e){if(eo[e])return eo[e];if(!La[e])return e;var n=La[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in ah)return eo[e]=n[a];return e}var ih=Pl("animationend"),rh=Pl("animationiteration"),uh=Pl("animationstart"),ub=Pl("transitionrun"),sb=Pl("transitionstart"),ob=Pl("transitioncancel"),sh=Pl("transitionend"),oh=new Map,to="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(" ");to.push("scrollEnd");function En(e,n){oh.set(e,n),Jl(n,[e])}var Qr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],Ba=0,no=0;function Gr(){for(var e=Ba,n=no=Ba=0;n<e;){var a=mn[n];mn[n++]=null;var u=mn[n];mn[n++]=null;var c=mn[n];mn[n++]=null;var d=mn[n];if(mn[n++]=null,u!==null&&c!==null){var b=u.pending;b===null?c.next=c:(c.next=b.next,b.next=c),u.pending=c}d!==0&&ch(a,c,d)}}function Xr(e,n,a,u){mn[Ba++]=e,mn[Ba++]=n,mn[Ba++]=a,mn[Ba++]=u,no|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function lo(e,n,a,u){return Xr(e,n,a,u),Jr(e)}function Wl(e,n){return Xr(e,null,null,n),Jr(e)}function ch(e,n,a){e.lanes|=a;var u=e.alternate;u!==null&&(u.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,u=d.alternate,u!==null&&(u.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-tt(a),e=d.hiddenUpdates,u=e[c],u===null?e[c]=[n]:u.push(n),n.lane=a|536870912),d):null}function Jr(e){if(50<nr)throw nr=0,hc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ua={};function cb(e,n,a,u){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,n,a,u){return new cb(e,n,a,u)}function ao(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,n){var a=e.alternate;return a===null?(a=ln(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function fh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Kr(e,n,a,u,c,d){var b=0;if(u=e,typeof e=="function")ao(e)&&(b=1);else if(typeof e=="string")b=p1(e,a,ue.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=ln(31,a,n,c),e.elementType=me,e.lanes=d,e;case R:return ea(a.children,c,d,n);case H:b=8,c|=24;break;case N:return e=ln(12,a,n,c|2),e.elementType=N,e.lanes=d,e;case ee:return e=ln(13,a,n,c),e.elementType=ee,e.lanes=d,e;case O:return e=ln(19,a,n,c),e.elementType=O,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q:b=10;break e;case Z:b=9;break e;case te:b=11;break e;case P:b=14;break e;case se:b=16,u=null;break e}b=29,a=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=ln(b,a,n,c),n.elementType=e,n.type=u,n.lanes=d,n}function ea(e,n,a,u){return e=ln(7,e,u,n),e.lanes=a,e}function io(e,n,a){return e=ln(6,e,null,n),e.lanes=a,e}function dh(e){var n=ln(18,null,null,0);return n.stateNode=e,n}function ro(e,n,a){return n=ln(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var hh=new WeakMap;function pn(e,n){if(typeof e=="object"&&e!==null){var a=hh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Gl(n)},hh.set(e,n),n)}return{value:e,source:n,stack:Gl(n)}}var Ha=[],qa=0,$r=null,Ri=0,gn=[],yn=0,vl=null,Tn=1,Dn="";function Fn(e,n){Ha[qa++]=Ri,Ha[qa++]=$r,$r=e,Ri=n}function mh(e,n,a){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,vl=e;var u=Tn;e=Dn;var c=32-tt(u)-1;u&=~(1<<c),a+=1;var d=32-tt(n)+c;if(30<d){var b=c-c%5;d=(u&(1<<b)-1).toString(32),u>>=b,c-=b,Tn=1<<32-tt(n)+c|a<<c|u,Dn=d+e}else Tn=1<<d|a<<c|u,Dn=e}function uo(e){e.return!==null&&(Fn(e,1),mh(e,1,0))}function so(e){for(;e===$r;)$r=Ha[--qa],Ha[qa]=null,Ri=Ha[--qa],Ha[qa]=null;for(;e===vl;)vl=gn[--yn],gn[yn]=null,Dn=gn[--yn],gn[yn]=null,Tn=gn[--yn],gn[yn]=null}function ph(e,n){gn[yn++]=Tn,gn[yn++]=Dn,gn[yn++]=vl,Tn=n.id,Dn=n.overflow,vl=e}var zt=null,rt=null,Ve=!1,kl=null,xn=!1,oo=Error(r(519));function wl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Li(pn(n,e)),oo}function gh(e){var n=e.stateNode,a=e.type,u=e.memoizedProps;switch(n[Dt]=e,n[Qt]=u,a){case"dialog":Le("cancel",n),Le("close",n);break;case"iframe":case"object":case"embed":Le("load",n);break;case"video":case"audio":for(a=0;a<ar.length;a++)Le(ar[a],n);break;case"source":Le("error",n);break;case"img":case"image":case"link":Le("error",n),Le("load",n);break;case"details":Le("toggle",n);break;case"input":Le("invalid",n),Nd(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Le("invalid",n);break;case"textarea":Le("invalid",n),Dd(n,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||u.suppressHydrationWarning===!0||Op(n.textContent,a)?(u.popover!=null&&(Le("beforetoggle",n),Le("toggle",n)),u.onScroll!=null&&Le("scroll",n),u.onScrollEnd!=null&&Le("scrollend",n),u.onClick!=null&&(n.onclick=In),n=!0):n=!1,n||wl(e,!0)}function yh(e){for(zt=e.return;zt;)switch(zt.tag){case 5:case 31:case 13:xn=!1;return;case 27:case 3:xn=!0;return;default:zt=zt.return}}function Va(e){if(e!==zt)return!1;if(!Ve)return yh(e),Ve=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||jc(e.type,e.memoizedProps)),a=!a),a&&rt&&wl(e),yh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Ip(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));rt=Ip(e)}else n===27?(n=rt,Ll(e.type)?(e=Oc,Oc=null,rt=e):rt=n):rt=zt?vn(e.stateNode.nextSibling):null;return!0}function ta(){rt=zt=null,Ve=!1}function co(){var e=kl;return e!==null&&($t===null?$t=e:$t.push.apply($t,e),kl=null),e}function Li(e){kl===null?kl=[e]:kl.push(e)}var fo=A(null),na=null,Qn=null;function Sl(e,n,a){S(fo,n._currentValue),n._currentValue=a}function Gn(e){e._currentValue=fo.current,F(fo)}function ho(e,n,a){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===a)break;e=e.return}}function mo(e,n,a,u){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var b=c.child;d=d.firstContext;e:for(;d!==null;){var w=d;d=c;for(var C=0;C<n.length;C++)if(w.context===n[C]){d.lanes|=a,w=d.alternate,w!==null&&(w.lanes|=a),ho(d.return,a,e),u||(b=null);break e}d=w.next}}else if(c.tag===18){if(b=c.return,b===null)throw Error(r(341));b.lanes|=a,d=b.alternate,d!==null&&(d.lanes|=a),ho(b,a,e),b=null}else b=c.child;if(b!==null)b.return=c;else for(b=c;b!==null;){if(b===e){b=null;break}if(c=b.sibling,c!==null){c.return=b.return,b=c;break}b=b.return}c=b}}function Ia(e,n,a,u){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var b=c.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var w=c.type;nn(c.pendingProps.value,b.value)||(e!==null?e.push(w):e=[w])}}else if(c===Ae.current){if(b=c.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(or):e=[or])}c=c.return}e!==null&&mo(n,e,a,u),n.flags|=262144}function Pr(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function la(e){na=e,Qn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(e){return xh(na,e)}function Wr(e,n){return na===null&&la(e),xh(e,n)}function xh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},Qn===null){if(e===null)throw Error(r(308));Qn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Qn=Qn.next=n;return a}var fb=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},db=t.unstable_scheduleCallback,hb=t.unstable_NormalPriority,yt={$$typeof:q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function po(){return{controller:new fb,data:new Map,refCount:0}}function Bi(e){e.refCount--,e.refCount===0&&db(hb,function(){e.controller.abort()})}var Ui=null,go=0,Ya=0,Za=null;function mb(e,n){if(Ui===null){var a=Ui=[];go=0,Ya=bc(),Za={status:"pending",value:void 0,then:function(u){a.push(u)}}}return go++,n.then(bh,bh),n}function bh(){if(--go===0&&Ui!==null){Za!==null&&(Za.status="fulfilled");var e=Ui;Ui=null,Ya=0,Za=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function pb(e,n){var a=[],u={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var c=0;c<a.length;c++)(0,a[c])(n)},function(c){for(u.status="rejected",u.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),u}var vh=T.S;T.S=function(e,n){lp=gt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&mb(e,n),vh!==null&&vh(e,n)};var aa=A(null);function yo(){var e=aa.current;return e!==null?e:nt.pooledCache}function eu(e,n){n===null?S(aa,aa.current):S(aa,n.pool)}function kh(){var e=yo();return e===null?null:{parent:yt._currentValue,pool:e}}var Fa=Error(r(460)),xo=Error(r(474)),tu=Error(r(542)),nu={then:function(){}};function wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Sh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(In,In),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e;default:if(typeof n.status=="string")n.then(In,In);else{if(e=nt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=u}},function(u){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Eh(e),e}throw ra=n,Fa}}function ia(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ra=a,Fa):a}}var ra=null;function _h(){if(ra===null)throw Error(r(459));var e=ra;return ra=null,e}function Eh(e){if(e===Fa||e===tu)throw Error(r(483))}var Qa=null,Hi=0;function lu(e){var n=Hi;return Hi+=1,Qa===null&&(Qa=[]),Sh(Qa,e,n)}function qi(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function au(e,n){throw n.$$typeof===k?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ch(e){function n(D,j){if(e){var L=D.deletions;L===null?(D.deletions=[j],D.flags|=16):L.push(j)}}function a(D,j){if(!e)return null;for(;j!==null;)n(D,j),j=j.sibling;return null}function u(D){for(var j=new Map;D!==null;)D.key!==null?j.set(D.key,D):j.set(D.index,D),D=D.sibling;return j}function c(D,j){return D=Zn(D,j),D.index=0,D.sibling=null,D}function d(D,j,L){return D.index=L,e?(L=D.alternate,L!==null?(L=L.index,L<j?(D.flags|=67108866,j):L):(D.flags|=67108866,j)):(D.flags|=1048576,j)}function b(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function w(D,j,L,X){return j===null||j.tag!==6?(j=io(L,D.mode,X),j.return=D,j):(j=c(j,L),j.return=D,j)}function C(D,j,L,X){var ke=L.type;return ke===R?G(D,j,L.props.children,X,L.key):j!==null&&(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&ia(ke)===j.type)?(j=c(j,L.props),qi(j,L),j.return=D,j):(j=Kr(L.type,L.key,L.props,null,D.mode,X),qi(j,L),j.return=D,j)}function B(D,j,L,X){return j===null||j.tag!==4||j.stateNode.containerInfo!==L.containerInfo||j.stateNode.implementation!==L.implementation?(j=ro(L,D.mode,X),j.return=D,j):(j=c(j,L.children||[]),j.return=D,j)}function G(D,j,L,X,ke){return j===null||j.tag!==7?(j=ea(L,D.mode,X,ke),j.return=D,j):(j=c(j,L),j.return=D,j)}function K(D,j,L){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=io(""+j,D.mode,L),j.return=D,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case v:return L=Kr(j.type,j.key,j.props,null,D.mode,L),qi(L,j),L.return=D,L;case _:return j=ro(j,D.mode,L),j.return=D,j;case se:return j=ia(j),K(D,j,L)}if(W(j)||$(j))return j=ea(j,D.mode,L,null),j.return=D,j;if(typeof j.then=="function")return K(D,lu(j),L);if(j.$$typeof===q)return K(D,Wr(D,j),L);au(D,j)}return null}function U(D,j,L,X){var ke=j!==null?j.key:null;if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return ke!==null?null:w(D,j,""+L,X);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case v:return L.key===ke?C(D,j,L,X):null;case _:return L.key===ke?B(D,j,L,X):null;case se:return L=ia(L),U(D,j,L,X)}if(W(L)||$(L))return ke!==null?null:G(D,j,L,X,null);if(typeof L.then=="function")return U(D,j,lu(L),X);if(L.$$typeof===q)return U(D,j,Wr(D,L),X);au(D,L)}return null}function I(D,j,L,X,ke){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return D=D.get(L)||null,w(j,D,""+X,ke);if(typeof X=="object"&&X!==null){switch(X.$$typeof){case v:return D=D.get(X.key===null?L:X.key)||null,C(j,D,X,ke);case _:return D=D.get(X.key===null?L:X.key)||null,B(j,D,X,ke);case se:return X=ia(X),I(D,j,L,X,ke)}if(W(X)||$(X))return D=D.get(L)||null,G(j,D,X,ke,null);if(typeof X.then=="function")return I(D,j,L,lu(X),ke);if(X.$$typeof===q)return I(D,j,L,Wr(j,X),ke);au(j,X)}return null}function he(D,j,L,X){for(var ke=null,Fe=null,ye=j,Oe=j=0,He=null;ye!==null&&Oe<L.length;Oe++){ye.index>Oe?(He=ye,ye=null):He=ye.sibling;var Qe=U(D,ye,L[Oe],X);if(Qe===null){ye===null&&(ye=He);break}e&&ye&&Qe.alternate===null&&n(D,ye),j=d(Qe,j,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe,ye=He}if(Oe===L.length)return a(D,ye),Ve&&Fn(D,Oe),ke;if(ye===null){for(;Oe<L.length;Oe++)ye=K(D,L[Oe],X),ye!==null&&(j=d(ye,j,Oe),Fe===null?ke=ye:Fe.sibling=ye,Fe=ye);return Ve&&Fn(D,Oe),ke}for(ye=u(ye);Oe<L.length;Oe++)He=I(ye,D,Oe,L[Oe],X),He!==null&&(e&&He.alternate!==null&&ye.delete(He.key===null?Oe:He.key),j=d(He,j,Oe),Fe===null?ke=He:Fe.sibling=He,Fe=He);return e&&ye.forEach(function(Vl){return n(D,Vl)}),Ve&&Fn(D,Oe),ke}function _e(D,j,L,X){if(L==null)throw Error(r(151));for(var ke=null,Fe=null,ye=j,Oe=j=0,He=null,Qe=L.next();ye!==null&&!Qe.done;Oe++,Qe=L.next()){ye.index>Oe?(He=ye,ye=null):He=ye.sibling;var Vl=U(D,ye,Qe.value,X);if(Vl===null){ye===null&&(ye=He);break}e&&ye&&Vl.alternate===null&&n(D,ye),j=d(Vl,j,Oe),Fe===null?ke=Vl:Fe.sibling=Vl,Fe=Vl,ye=He}if(Qe.done)return a(D,ye),Ve&&Fn(D,Oe),ke;if(ye===null){for(;!Qe.done;Oe++,Qe=L.next())Qe=K(D,Qe.value,X),Qe!==null&&(j=d(Qe,j,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe);return Ve&&Fn(D,Oe),ke}for(ye=u(ye);!Qe.done;Oe++,Qe=L.next())Qe=I(ye,D,Oe,Qe.value,X),Qe!==null&&(e&&Qe.alternate!==null&&ye.delete(Qe.key===null?Oe:Qe.key),j=d(Qe,j,Oe),Fe===null?ke=Qe:Fe.sibling=Qe,Fe=Qe);return e&&ye.forEach(function(C1){return n(D,C1)}),Ve&&Fn(D,Oe),ke}function et(D,j,L,X){if(typeof L=="object"&&L!==null&&L.type===R&&L.key===null&&(L=L.props.children),typeof L=="object"&&L!==null){switch(L.$$typeof){case v:e:{for(var ke=L.key;j!==null;){if(j.key===ke){if(ke=L.type,ke===R){if(j.tag===7){a(D,j.sibling),X=c(j,L.props.children),X.return=D,D=X;break e}}else if(j.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===se&&ia(ke)===j.type){a(D,j.sibling),X=c(j,L.props),qi(X,L),X.return=D,D=X;break e}a(D,j);break}else n(D,j);j=j.sibling}L.type===R?(X=ea(L.props.children,D.mode,X,L.key),X.return=D,D=X):(X=Kr(L.type,L.key,L.props,null,D.mode,X),qi(X,L),X.return=D,D=X)}return b(D);case _:e:{for(ke=L.key;j!==null;){if(j.key===ke)if(j.tag===4&&j.stateNode.containerInfo===L.containerInfo&&j.stateNode.implementation===L.implementation){a(D,j.sibling),X=c(j,L.children||[]),X.return=D,D=X;break e}else{a(D,j);break}else n(D,j);j=j.sibling}X=ro(L,D.mode,X),X.return=D,D=X}return b(D);case se:return L=ia(L),et(D,j,L,X)}if(W(L))return he(D,j,L,X);if($(L)){if(ke=$(L),typeof ke!="function")throw Error(r(150));return L=ke.call(L),_e(D,j,L,X)}if(typeof L.then=="function")return et(D,j,lu(L),X);if(L.$$typeof===q)return et(D,j,Wr(D,L),X);au(D,L)}return typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint"?(L=""+L,j!==null&&j.tag===6?(a(D,j.sibling),X=c(j,L),X.return=D,D=X):(a(D,j),X=io(L,D.mode,X),X.return=D,D=X),b(D)):a(D,j)}return function(D,j,L,X){try{Hi=0;var ke=et(D,j,L,X);return Qa=null,ke}catch(ye){if(ye===Fa||ye===tu)throw ye;var Fe=ln(29,ye,null,D.mode);return Fe.lanes=X,Fe.return=D,Fe}finally{}}}var ua=Ch(!0),Ah=Ch(!1),_l=!1;function bo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vo(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function El(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,n,a){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var c=u.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),u.pending=n,n=Jr(e),ch(e,null,a),n}return Xr(e,u,n,a),Jr(e)}function Vi(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}function ko(e,n){var a=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var b={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=b:d=d.next=b,a=a.next}while(a!==null);d===null?c=d=n:d=d.next=n}else c=d=n;a={baseState:u.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:u.shared,callbacks:u.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var wo=!1;function Ii(){if(wo){var e=Za;if(e!==null)throw e}}function Yi(e,n,a,u){wo=!1;var c=e.updateQueue;_l=!1;var d=c.firstBaseUpdate,b=c.lastBaseUpdate,w=c.shared.pending;if(w!==null){c.shared.pending=null;var C=w,B=C.next;C.next=null,b===null?d=B:b.next=B,b=C;var G=e.alternate;G!==null&&(G=G.updateQueue,w=G.lastBaseUpdate,w!==b&&(w===null?G.firstBaseUpdate=B:w.next=B,G.lastBaseUpdate=C))}if(d!==null){var K=c.baseState;b=0,G=B=C=null,w=d;do{var U=w.lane&-536870913,I=U!==w.lane;if(I?(Ue&U)===U:(u&U)===U){U!==0&&U===Ya&&(wo=!0),G!==null&&(G=G.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var he=e,_e=w;U=n;var et=a;switch(_e.tag){case 1:if(he=_e.payload,typeof he=="function"){K=he.call(et,K,U);break e}K=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=_e.payload,U=typeof he=="function"?he.call(et,K,U):he,U==null)break e;K=y({},K,U);break e;case 2:_l=!0}}U=w.callback,U!==null&&(e.flags|=64,I&&(e.flags|=8192),I=c.callbacks,I===null?c.callbacks=[U]:I.push(U))}else I={lane:U,tag:w.tag,payload:w.payload,callback:w.callback,next:null},G===null?(B=G=I,C=K):G=G.next=I,b|=U;if(w=w.next,w===null){if(w=c.shared.pending,w===null)break;I=w,w=I.next,I.next=null,c.lastBaseUpdate=I,c.shared.pending=null}}while(!0);G===null&&(C=K),c.baseState=C,c.firstBaseUpdate=B,c.lastBaseUpdate=G,d===null&&(c.shared.lanes=0),Dl|=b,e.lanes=b,e.memoizedState=K}}function jh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Nh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)jh(a[e],n)}var Ga=A(null),iu=A(0);function Th(e,n){e=nl,S(iu,e),S(Ga,n),nl=e|n.baseLanes}function So(){S(iu,nl),S(Ga,Ga.current)}function _o(){nl=iu.current,F(Ga),F(iu)}var an=A(null),bn=null;function Al(e){var n=e.alternate;S(mt,mt.current&1),S(an,e),bn===null&&(n===null||Ga.current!==null||n.memoizedState!==null)&&(bn=e)}function Eo(e){S(mt,mt.current),S(an,e),bn===null&&(bn=e)}function Dh(e){e.tag===22?(S(mt,mt.current),S(an,e),bn===null&&(bn=e)):jl()}function jl(){S(mt,mt.current),S(an,an.current)}function rn(e){F(an),bn===e&&(bn=null),F(mt)}var mt=A(0);function ru(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Dc(a)||zc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Xn=0,ze=null,Pe=null,xt=null,uu=!1,Xa=!1,sa=!1,su=0,Zi=0,Ja=null,gb=0;function dt(){throw Error(r(321))}function Co(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!nn(e[a],n[a]))return!1;return!0}function Ao(e,n,a,u,c,d){return Xn=d,ze=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,T.H=e===null||e.memoizedState===null?mm:Io,sa=!1,d=a(u,c),sa=!1,Xa&&(d=Oh(n,a,u,c)),zh(e),d}function zh(e){T.H=Gi;var n=Pe!==null&&Pe.next!==null;if(Xn=0,xt=Pe=ze=null,uu=!1,Zi=0,Ja=null,n)throw Error(r(300));e===null||bt||(e=e.dependencies,e!==null&&Pr(e)&&(bt=!0))}function Oh(e,n,a,u){ze=e;var c=0;do{if(Xa&&(Ja=null),Zi=0,Xa=!1,25<=c)throw Error(r(301));if(c+=1,xt=Pe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}T.H=pm,d=n(a,u)}while(Xa);return d}function yb(){var e=T.H,n=e.useState()[0];return n=typeof n.then=="function"?Fi(n):n,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(ze.flags|=1024),n}function jo(){var e=su!==0;return su=0,e}function No(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function To(e){if(uu){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}uu=!1}Xn=0,xt=Pe=ze=null,Xa=!1,Zi=su=0,Ja=null}function qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xt===null?ze.memoizedState=xt=e:xt=xt.next=e,xt}function pt(){if(Pe===null){var e=ze.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var n=xt===null?ze.memoizedState:xt.next;if(n!==null)xt=n,Pe=e;else{if(e===null)throw ze.alternate===null?Error(r(467)):Error(r(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},xt===null?ze.memoizedState=xt=e:xt=xt.next=e}return xt}function ou(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fi(e){var n=Zi;return Zi+=1,Ja===null&&(Ja=[]),e=Sh(Ja,e,n),n=ze,(xt===null?n.memoizedState:xt.next)===null&&(n=n.alternate,T.H=n===null||n.memoizedState===null?mm:Io),e}function cu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Fi(e);if(e.$$typeof===q)return Ot(e)}throw Error(r(438,String(e)))}function Do(e){var n=null,a=ze.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var u=ze.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=ou(),ze.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),u=0;u<e;u++)a[u]=M;return n.index++,a}function Jn(e,n){return typeof n=="function"?n(e):n}function fu(e){var n=pt();return zo(n,Pe,e)}function zo(e,n,a){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=a;var c=e.baseQueue,d=u.pending;if(d!==null){if(c!==null){var b=c.next;c.next=d.next,d.next=b}n.baseQueue=c=d,u.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var w=b=null,C=null,B=n,G=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Ue&K)===K:(Xn&K)===K){var U=B.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Ya&&(G=!0);else if((Xn&U)===U){B=B.next,U===Ya&&(G=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=K,b=d):C=C.next=K,ze.lanes|=U,Dl|=U;K=B.action,sa&&a(d,K),d=B.hasEagerState?B.eagerState:a(d,K)}else U={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},C===null?(w=C=U,b=d):C=C.next=U,ze.lanes|=K,Dl|=K;B=B.next}while(B!==null&&B!==n);if(C===null?b=d:C.next=w,!nn(d,e.memoizedState)&&(bt=!0,G&&(a=Za,a!==null)))throw a;e.memoizedState=d,e.baseState=b,e.baseQueue=C,u.lastRenderedState=d}return c===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function Oo(e){var n=pt(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var u=a.dispatch,c=a.pending,d=n.memoizedState;if(c!==null){a.pending=null;var b=c=c.next;do d=e(d,b.action),b=b.next;while(b!==c);nn(d,n.memoizedState)||(bt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),a.lastRenderedState=d}return[d,u]}function Mh(e,n,a){var u=ze,c=pt(),d=Ve;if(d){if(a===void 0)throw Error(r(407));a=a()}else a=n();var b=!nn((Pe||c).memoizedState,a);if(b&&(c.memoizedState=a,bt=!0),c=c.queue,Lo(Bh.bind(null,u,c,e),[e]),c.getSnapshot!==n||b||xt!==null&&xt.memoizedState.tag&1){if(u.flags|=2048,Ka(9,{destroy:void 0},Lh.bind(null,u,c,a,n),null),nt===null)throw Error(r(349));d||(Xn&127)!==0||Rh(u,n,a)}return a}function Rh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=ze.updateQueue,n===null?(n=ou(),ze.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Lh(e,n,a,u){n.value=a,n.getSnapshot=u,Uh(n)&&Hh(e)}function Bh(e,n,a){return a(function(){Uh(n)&&Hh(e)})}function Uh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!nn(e,a)}catch{return!0}}function Hh(e){var n=Wl(e,2);n!==null&&Pt(n,e,2)}function Mo(e){var n=qt();if(typeof e=="function"){var a=e;if(e=a(),sa){Ft(!0);try{a()}finally{Ft(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:e},n}function qh(e,n,a,u){return e.baseState=a,zo(e,Pe,typeof u=="function"?u:Jn)}function xb(e,n,a,u,c){if(mu(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){d.listeners.push(b)}};T.T!==null?a(!0):d.isTransition=!1,u(d),a=n.pending,a===null?(d.next=n.pending=d,Vh(n,d)):(d.next=a.next,n.pending=a.next=d)}}function Vh(e,n){var a=n.action,u=n.payload,c=e.state;if(n.isTransition){var d=T.T,b={};T.T=b;try{var w=a(c,u),C=T.S;C!==null&&C(b,w),Ih(e,n,w)}catch(B){Ro(e,n,B)}finally{d!==null&&b.types!==null&&(d.types=b.types),T.T=d}}else try{d=a(c,u),Ih(e,n,d)}catch(B){Ro(e,n,B)}}function Ih(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){Yh(e,n,u)},function(u){return Ro(e,n,u)}):Yh(e,n,a)}function Yh(e,n,a){n.status="fulfilled",n.value=a,Zh(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,Vh(e,a)))}function Ro(e,n,a){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=a,Zh(n),n=n.next;while(n!==u)}e.action=null}function Zh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function Fh(e,n){return n}function Qh(e,n){if(Ve){var a=nt.formState;if(a!==null){e:{var u=ze;if(Ve){if(rt){t:{for(var c=rt,d=xn;c.nodeType!==8;){if(!d){c=null;break t}if(c=vn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){rt=vn(c.nextSibling),u=c.data==="F!";break e}}wl(u)}u=!1}u&&(n=a[0])}}return a=qt(),a.memoizedState=a.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fh,lastRenderedState:n},a.queue=u,a=fm.bind(null,ze,u),u.dispatch=a,u=Mo(!1),d=Vo.bind(null,ze,!1,u.queue),u=qt(),c={state:n,dispatch:null,action:e,pending:null},u.queue=c,a=xb.bind(null,ze,c,d,a),c.dispatch=a,u.memoizedState=e,[n,a,!1]}function Gh(e){var n=pt();return Xh(n,Pe,e)}function Xh(e,n,a){if(n=zo(e,n,Fh)[0],e=fu(Jn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=Fi(n)}catch(b){throw b===Fa?tu:b}else u=n;n=pt();var c=n.queue,d=c.dispatch;return a!==n.memoizedState&&(ze.flags|=2048,Ka(9,{destroy:void 0},bb.bind(null,c,a),null)),[u,d,e]}function bb(e,n){e.action=n}function Jh(e){var n=pt(),a=Pe;if(a!==null)return Xh(n,a,e);pt(),n=n.memoizedState,a=pt();var u=a.queue.dispatch;return a.memoizedState=e,[n,u,!1]}function Ka(e,n,a,u){return e={tag:e,create:a,deps:u,inst:n,next:null},n=ze.updateQueue,n===null&&(n=ou(),ze.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(u=a.next,a.next=e,e.next=u,n.lastEffect=e),e}function Kh(){return pt().memoizedState}function du(e,n,a,u){var c=qt();ze.flags|=e,c.memoizedState=Ka(1|n,{destroy:void 0},a,u===void 0?null:u)}function hu(e,n,a,u){var c=pt();u=u===void 0?null:u;var d=c.memoizedState.inst;Pe!==null&&u!==null&&Co(u,Pe.memoizedState.deps)?c.memoizedState=Ka(n,d,a,u):(ze.flags|=e,c.memoizedState=Ka(1|n,d,a,u))}function $h(e,n){du(8390656,8,e,n)}function Lo(e,n){hu(2048,8,e,n)}function vb(e){ze.flags|=4;var n=ze.updateQueue;if(n===null)n=ou(),ze.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Ph(e){var n=pt().memoizedState;return vb({ref:n,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Wh(e,n){return hu(4,2,e,n)}function em(e,n){return hu(4,4,e,n)}function tm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function nm(e,n,a){a=a!=null?a.concat([e]):null,hu(4,4,tm.bind(null,n,e),a)}function Bo(){}function lm(e,n){var a=pt();n=n===void 0?null:n;var u=a.memoizedState;return n!==null&&Co(n,u[1])?u[0]:(a.memoizedState=[e,n],e)}function am(e,n){var a=pt();n=n===void 0?null:n;var u=a.memoizedState;if(n!==null&&Co(n,u[1]))return u[0];if(u=e(),sa){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[u,n],u}function Uo(e,n,a){return a===void 0||(Xn&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=ip(),ze.lanes|=e,Dl|=e,a)}function im(e,n,a,u){return nn(a,n)?a:Ga.current!==null?(e=Uo(e,a,u),nn(e,n)||(bt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Ue&261930)===0?(bt=!0,e.memoizedState=a):(e=ip(),ze.lanes|=e,Dl|=e,n)}function rm(e,n,a,u,c){var d=J.p;J.p=d!==0&&8>d?d:8;var b=T.T,w={};T.T=w,Vo(e,!1,n,a);try{var C=c(),B=T.S;if(B!==null&&B(w,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=pb(C,u);Qi(e,n,G,on(e))}else Qi(e,n,u,on(e))}catch(K){Qi(e,n,{then:function(){},status:"rejected",reason:K},on())}finally{J.p=d,b!==null&&w.types!==null&&(b.types=w.types),T.T=b}}function kb(){}function Ho(e,n,a,u){if(e.tag!==5)throw Error(r(476));var c=um(e).queue;rm(e,c,n,ae,a===null?kb:function(){return sm(e),a(u)})}function um(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:ae},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function sm(e){var n=um(e);n.next===null&&(n=e.alternate.memoizedState),Qi(e,n.next.queue,{},on())}function qo(){return Ot(or)}function om(){return pt().memoizedState}function cm(){return pt().memoizedState}function wb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=on();e=El(a);var u=Cl(n,e,a);u!==null&&(Pt(u,n,a),Vi(u,n,a)),n={cache:po()},e.payload=n;return}n=n.return}}function Sb(e,n,a){var u=on();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},mu(e)?dm(n,a):(a=lo(e,n,a,u),a!==null&&(Pt(a,e,u),hm(a,n,u)))}function fm(e,n,a){var u=on();Qi(e,n,a,u)}function Qi(e,n,a,u){var c={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(mu(e))dm(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var b=n.lastRenderedState,w=d(b,a);if(c.hasEagerState=!0,c.eagerState=w,nn(w,b))return Xr(e,n,c,0),nt===null&&Gr(),!1}catch{}finally{}if(a=lo(e,n,c,u),a!==null)return Pt(a,e,u),hm(a,n,u),!0}return!1}function Vo(e,n,a,u){if(u={lane:2,revertLane:bc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},mu(e)){if(n)throw Error(r(479))}else n=lo(e,a,u,2),n!==null&&Pt(n,e,2)}function mu(e){var n=e.alternate;return e===ze||n!==null&&n===ze}function dm(e,n){Xa=uu=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function hm(e,n,a){if((a&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,a|=u,n.lanes=a,xd(e,a)}}var Gi={readContext:Ot,use:cu,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};Gi.useEffectEvent=dt;var mm={readContext:Ot,use:cu,useCallback:function(e,n){return qt().memoizedState=[e,n===void 0?null:n],e},useContext:Ot,useEffect:$h,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,du(4194308,4,tm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return du(4194308,4,e,n)},useInsertionEffect:function(e,n){du(4,2,e,n)},useMemo:function(e,n){var a=qt();n=n===void 0?null:n;var u=e();if(sa){Ft(!0);try{e()}finally{Ft(!1)}}return a.memoizedState=[u,n],u},useReducer:function(e,n,a){var u=qt();if(a!==void 0){var c=a(n);if(sa){Ft(!0);try{a(n)}finally{Ft(!1)}}}else c=n;return u.memoizedState=u.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},u.queue=e,e=e.dispatch=Sb.bind(null,ze,e),[u.memoizedState,e]},useRef:function(e){var n=qt();return e={current:e},n.memoizedState=e},useState:function(e){e=Mo(e);var n=e.queue,a=fm.bind(null,ze,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Bo,useDeferredValue:function(e,n){var a=qt();return Uo(a,e,n)},useTransition:function(){var e=Mo(!1);return e=rm.bind(null,ze,e.queue,!0,!1),qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var u=ze,c=qt();if(Ve){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),nt===null)throw Error(r(349));(Ue&127)!==0||Rh(u,n,a)}c.memoizedState=a;var d={value:a,getSnapshot:n};return c.queue=d,$h(Bh.bind(null,u,d,e),[e]),u.flags|=2048,Ka(9,{destroy:void 0},Lh.bind(null,u,d,a,n),null),a},useId:function(){var e=qt(),n=nt.identifierPrefix;if(Ve){var a=Dn,u=Tn;a=(u&~(1<<32-tt(u)-1)).toString(32)+a,n="_"+n+"R_"+a,a=su++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=gb++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:qo,useFormState:Qh,useActionState:Qh,useOptimistic:function(e){var n=qt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Vo.bind(null,ze,!0,a),a.dispatch=n,[e,n]},useMemoCache:Do,useCacheRefresh:function(){return qt().memoizedState=wb.bind(null,ze)},useEffectEvent:function(e){var n=qt(),a={impl:e};return n.memoizedState=a,function(){if((Ge&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Io={readContext:Ot,use:cu,useCallback:lm,useContext:Ot,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:fu,useRef:Kh,useState:function(){return fu(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=pt();return im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=fu(Jn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Fi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Gh,useActionState:Gh,useOptimistic:function(e,n){var a=pt();return qh(a,Pe,e,n)},useMemoCache:Do,useCacheRefresh:cm};Io.useEffectEvent=Ph;var pm={readContext:Ot,use:cu,useCallback:lm,useContext:Ot,useEffect:Lo,useImperativeHandle:nm,useInsertionEffect:Wh,useLayoutEffect:em,useMemo:am,useReducer:Oo,useRef:Kh,useState:function(){return Oo(Jn)},useDebugValue:Bo,useDeferredValue:function(e,n){var a=pt();return Pe===null?Uo(a,e,n):im(a,Pe.memoizedState,e,n)},useTransition:function(){var e=Oo(Jn)[0],n=pt().memoizedState;return[typeof e=="boolean"?e:Fi(e),n]},useSyncExternalStore:Mh,useId:om,useHostTransitionStatus:qo,useFormState:Jh,useActionState:Jh,useOptimistic:function(e,n){var a=pt();return Pe!==null?qh(a,Pe,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Do,useCacheRefresh:cm};pm.useEffectEvent=Ph;function Yo(e,n,a,u){n=e.memoizedState,a=a(u,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Zo={enqueueSetState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&(Pt(n,e,u),Vi(n,e,u))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var u=on(),c=El(u);c.tag=1,c.payload=n,a!=null&&(c.callback=a),n=Cl(e,c,u),n!==null&&(Pt(n,e,u),Vi(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=on(),u=El(a);u.tag=2,n!=null&&(u.callback=n),n=Cl(e,u,a),n!==null&&(Pt(n,e,a),Vi(n,e,a))}};function gm(e,n,a,u,c,d,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,d,b):n.prototype&&n.prototype.isPureReactComponent?!Oi(a,u)||!Oi(c,d):!0}function ym(e,n,a,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,u),n.state!==e&&Zo.enqueueReplaceState(n,n.state,null)}function oa(e,n){var a=n;if("ref"in n){a={};for(var u in n)u!=="ref"&&(a[u]=n[u])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function xm(e){Qr(e)}function bm(e){console.error(e)}function vm(e){Qr(e)}function pu(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function km(e,n,a){try{var u=e.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Fo(e,n,a){return a=El(a),a.tag=3,a.payload={element:null},a.callback=function(){pu(e,n)},a}function wm(e){return e=El(e),e.tag=3,e}function Sm(e,n,a,u){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=u.value;e.payload=function(){return c(d)},e.callback=function(){km(n,a,u)}}var b=a.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){km(n,a,u),typeof c!="function"&&(zl===null?zl=new Set([this]):zl.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function _b(e,n,a,u,c){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=a.alternate,n!==null&&Ia(n,a,c,!0),a=an.current,a!==null){switch(a.tag){case 31:case 13:return bn===null?Au():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=c,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([u]):n.add(u),gc(e,u,c)),!1;case 22:return a.flags|=65536,u===nu?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([u]):a.add(u)),gc(e,u,c)),!1}throw Error(r(435,a.tag))}return gc(e,u,c),Au(),!1}if(Ve)return n=an.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,u!==oo&&(e=Error(r(422),{cause:u}),Li(pn(e,a)))):(u!==oo&&(n=Error(r(423),{cause:u}),Li(pn(n,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,u=pn(u,a),c=Fo(e.stateNode,u,c),ko(e,c),ht!==4&&(ht=2)),!1;var d=Error(r(520),{cause:u});if(d=pn(d,a),tr===null?tr=[d]:tr.push(d),ht!==4&&(ht=2),n===null)return!0;u=pn(u,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Fo(a.stateNode,u,e),ko(a,e),!1;case 1:if(n=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(zl===null||!zl.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=wm(c),Sm(c,e,a,u),ko(a,c),!1}a=a.return}while(a!==null);return!1}var Qo=Error(r(461)),bt=!1;function Mt(e,n,a,u){n.child=e===null?Ah(n,null,a,u):ua(n,e.child,a,u)}function _m(e,n,a,u,c){a=a.render;var d=n.ref;if("ref"in u){var b={};for(var w in u)w!=="ref"&&(b[w]=u[w])}else b=u;return la(n),u=Ao(e,n,a,b,d,c),w=jo(),e!==null&&!bt?(No(e,n,c),Kn(e,n,c)):(Ve&&w&&uo(n),n.flags|=1,Mt(e,n,u,c),n.child)}function Em(e,n,a,u,c){if(e===null){var d=a.type;return typeof d=="function"&&!ao(d)&&d.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=d,Cm(e,n,d,u,c)):(e=Kr(a.type,null,u,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!ec(e,c)){var b=d.memoizedProps;if(a=a.compare,a=a!==null?a:Oi,a(b,u)&&e.ref===n.ref)return Kn(e,n,c)}return n.flags|=1,e=Zn(d,u),e.ref=n.ref,e.return=n,n.child=e}function Cm(e,n,a,u,c){if(e!==null){var d=e.memoizedProps;if(Oi(d,u)&&e.ref===n.ref)if(bt=!1,n.pendingProps=u=d,ec(e,c))(e.flags&131072)!==0&&(bt=!0);else return n.lanes=e.lanes,Kn(e,n,c)}return Go(e,n,a,u,c)}function Am(e,n,a,u){var c=u.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(u=n.child=e.child,c=0;u!==null;)c=c|u.lanes|u.childLanes,u=u.sibling;u=c&~d}else u=0,n.child=null;return jm(e,n,d,a,u)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&eu(n,d!==null?d.cachePool:null),d!==null?Th(n,d):So(),Dh(n);else return u=n.lanes=536870912,jm(e,n,d!==null?d.baseLanes|a:a,a,u)}else d!==null?(eu(n,d.cachePool),Th(n,d),jl(),n.memoizedState=null):(e!==null&&eu(n,null),So(),jl());return Mt(e,n,c,a),n.child}function Xi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function jm(e,n,a,u,c){var d=yo();return d=d===null?null:{parent:yt._currentValue,pool:d},n.memoizedState={baseLanes:a,cachePool:d},e!==null&&eu(n,null),So(),Dh(n),e!==null&&Ia(e,n,u,!0),n.childLanes=c,null}function gu(e,n){return n=xu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Nm(e,n,a){return ua(n,e.child,null,a),e=gu(n,n.pendingProps),e.flags|=2,rn(n),n.memoizedState=null,e}function Eb(e,n,a){var u=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ve){if(u.mode==="hidden")return e=gu(n,u),n.lanes=536870912,Xi(null,e);if(Eo(n),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,zt=n,rt=null)):e=null,e===null)throw wl(n);return n.lanes=536870912,null}return gu(n,u)}var d=e.memoizedState;if(d!==null){var b=d.dehydrated;if(Eo(n),c)if(n.flags&256)n.flags&=-257,n=Nm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(bt||Ia(e,n,a,!1),c=(a&e.childLanes)!==0,bt||c){if(u=nt,u!==null&&(b=bd(u,a),b!==0&&b!==d.retryLane))throw d.retryLane=b,Wl(e,b),Pt(u,e,b),Qo;Au(),n=Nm(e,n,a)}else e=d.treeContext,rt=vn(b.nextSibling),zt=n,Ve=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=gu(n,u),n.flags|=4096;return n}return e=Zn(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function yu(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function Go(e,n,a,u,c){return la(n),a=Ao(e,n,a,u,void 0,c),u=jo(),e!==null&&!bt?(No(e,n,c),Kn(e,n,c)):(Ve&&u&&uo(n),n.flags|=1,Mt(e,n,a,c),n.child)}function Tm(e,n,a,u,c,d){return la(n),n.updateQueue=null,a=Oh(n,u,a,c),zh(e),u=jo(),e!==null&&!bt?(No(e,n,d),Kn(e,n,d)):(Ve&&u&&uo(n),n.flags|=1,Mt(e,n,a,d),n.child)}function Dm(e,n,a,u,c){if(la(n),n.stateNode===null){var d=Ua,b=a.contextType;typeof b=="object"&&b!==null&&(d=Ot(b)),d=new a(u,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Zo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=u,d.state=n.memoizedState,d.refs={},bo(n),b=a.contextType,d.context=typeof b=="object"&&b!==null?Ot(b):Ua,d.state=n.memoizedState,b=a.getDerivedStateFromProps,typeof b=="function"&&(Yo(n,a,b,u),d.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(b=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),b!==d.state&&Zo.enqueueReplaceState(d,d.state,null),Yi(n,u,d,c),Ii(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){d=n.stateNode;var w=n.memoizedProps,C=oa(a,w);d.props=C;var B=d.context,G=a.contextType;b=Ua,typeof G=="object"&&G!==null&&(b=Ot(G));var K=a.getDerivedStateFromProps;G=typeof K=="function"||typeof d.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,G||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(w||B!==b)&&ym(n,d,u,b),_l=!1;var U=n.memoizedState;d.state=U,Yi(n,u,d,c),Ii(),B=n.memoizedState,w||U!==B||_l?(typeof K=="function"&&(Yo(n,a,K,u),B=n.memoizedState),(C=_l||gm(n,a,C,u,U,B,b))?(G||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=B),d.props=u,d.state=B,d.context=b,u=C):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{d=n.stateNode,vo(e,n),b=n.memoizedProps,G=oa(a,b),d.props=G,K=n.pendingProps,U=d.context,B=a.contextType,C=Ua,typeof B=="object"&&B!==null&&(C=Ot(B)),w=a.getDerivedStateFromProps,(B=typeof w=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b!==K||U!==C)&&ym(n,d,u,C),_l=!1,U=n.memoizedState,d.state=U,Yi(n,u,d,c),Ii();var I=n.memoizedState;b!==K||U!==I||_l||e!==null&&e.dependencies!==null&&Pr(e.dependencies)?(typeof w=="function"&&(Yo(n,a,w,u),I=n.memoizedState),(G=_l||gm(n,a,G,u,U,I,C)||e!==null&&e.dependencies!==null&&Pr(e.dependencies))?(B||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(u,I,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(u,I,C)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=I),d.props=u,d.state=I,d.context=C,u=G):(typeof d.componentDidUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&U===e.memoizedState||(n.flags|=1024),u=!1)}return d=u,yu(e,n),u=(n.flags&128)!==0,d||u?(d=n.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&u?(n.child=ua(n,e.child,null,c),n.child=ua(n,null,a,c)):Mt(e,n,a,c),n.memoizedState=d.state,e=n.child):e=Kn(e,n,c),e}function zm(e,n,a,u){return ta(),n.flags|=256,Mt(e,n,a,u),n.child}var Xo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jo(e){return{baseLanes:e,cachePool:kh()}}function Ko(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=sn),e}function Om(e,n,a){var u=n.pendingProps,c=!1,d=(n.flags&128)!==0,b;if((b=d)||(b=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),b&&(c=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ve){if(c?Al(n):jl(),(e=rt)?(e=Vp(e,xn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:vl!==null?{id:Tn,overflow:Dn}:null,retryLane:536870912,hydrationErrors:null},a=dh(e),a.return=n,n.child=a,zt=n,rt=null)):e=null,e===null)throw wl(n);return zc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,c?(jl(),c=n.mode,w=xu({mode:"hidden",children:w},c),u=ea(u,c,a,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,b,a),n.memoizedState=Xo,Xi(null,u)):(Al(n),$o(n,w))}var C=e.memoizedState;if(C!==null&&(w=C.dehydrated,w!==null)){if(d)n.flags&256?(Al(n),n.flags&=-257,n=Po(e,n,a)):n.memoizedState!==null?(jl(),n.child=e.child,n.flags|=128,n=null):(jl(),w=u.fallback,c=n.mode,u=xu({mode:"visible",children:u.children},c),w=ea(w,c,a,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,ua(n,e.child,null,a),u=n.child,u.memoizedState=Jo(a),u.childLanes=Ko(e,b,a),n.memoizedState=Xo,n=Xi(null,u));else if(Al(n),zc(w)){if(b=w.nextSibling&&w.nextSibling.dataset,b)var B=b.dgst;b=B,u=Error(r(419)),u.stack="",u.digest=b,Li({value:u,source:null,stack:null}),n=Po(e,n,a)}else if(bt||Ia(e,n,a,!1),b=(a&e.childLanes)!==0,bt||b){if(b=nt,b!==null&&(u=bd(b,a),u!==0&&u!==C.retryLane))throw C.retryLane=u,Wl(e,u),Pt(b,e,u),Qo;Dc(w)||Au(),n=Po(e,n,a)}else Dc(w)?(n.flags|=192,n.child=e.child,n=null):(e=C.treeContext,rt=vn(w.nextSibling),zt=n,Ve=!0,kl=null,xn=!1,e!==null&&ph(n,e),n=$o(n,u.children),n.flags|=4096);return n}return c?(jl(),w=u.fallback,c=n.mode,C=e.child,B=C.sibling,u=Zn(C,{mode:"hidden",children:u.children}),u.subtreeFlags=C.subtreeFlags&65011712,B!==null?w=Zn(B,w):(w=ea(w,c,a,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,Xi(null,u),u=n.child,w=e.child.memoizedState,w===null?w=Jo(a):(c=w.cachePool,c!==null?(C=yt._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=kh(),w={baseLanes:w.baseLanes|a,cachePool:c}),u.memoizedState=w,u.childLanes=Ko(e,b,a),n.memoizedState=Xo,Xi(e.child,u)):(Al(n),a=e.child,e=a.sibling,a=Zn(a,{mode:"visible",children:u.children}),a.return=n,a.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=a,n.memoizedState=null,a)}function $o(e,n){return n=xu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function xu(e,n){return e=ln(22,e,null,n),e.lanes=0,e}function Po(e,n,a){return ua(n,e.child,null,a),e=$o(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mm(e,n,a){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),ho(e.return,n,a)}function Wo(e,n,a,u,c,d){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:c,treeForkCount:d}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=u,b.tail=a,b.tailMode=c,b.treeForkCount=d)}function Rm(e,n,a){var u=n.pendingProps,c=u.revealOrder,d=u.tail;u=u.children;var b=mt.current,w=(b&2)!==0;if(w?(b=b&1|2,n.flags|=128):b&=1,S(mt,b),Mt(e,n,u,a),u=Ve?Ri:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mm(e,a,n);else if(e.tag===19)Mm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=n.child,c=null;a!==null;)e=a.alternate,e!==null&&ru(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=n.child,n.child=null):(c=a.sibling,a.sibling=null),Wo(n,!1,c,a,d,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&ru(e)===null){n.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Wo(n,!0,a,null,d,u);break;case"together":Wo(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function Kn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),Dl|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ia(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Zn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Zn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function ec(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Pr(e)))}function Cb(e,n,a){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Sl(n,yt,e.memoizedState.cache),ta();break;case 27:case 5:ft(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Sl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Eo(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Al(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Om(e,n,a):(Al(n),e=Kn(e,n,a),e!==null?e.sibling:null);Al(n);break;case 19:var c=(e.flags&128)!==0;if(u=(a&n.childLanes)!==0,u||(Ia(e,n,a,!1),u=(a&n.childLanes)!==0),c){if(u)return Rm(e,n,a);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),S(mt,mt.current),u)break;return null;case 22:return n.lanes=0,Am(e,n,a,n.pendingProps);case 24:Sl(n,yt,e.memoizedState.cache)}return Kn(e,n,a)}function Lm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)bt=!0;else{if(!ec(e,a)&&(n.flags&128)===0)return bt=!1,Cb(e,n,a);bt=(e.flags&131072)!==0}else bt=!1,Ve&&(n.flags&1048576)!==0&&mh(n,Ri,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=ia(n.elementType),n.type=e,typeof e=="function")ao(e)?(u=oa(e,u),n.tag=1,n=Dm(null,n,e,u,a)):(n.tag=0,n=Go(null,n,e,u,a));else{if(e!=null){var c=e.$$typeof;if(c===te){n.tag=11,n=_m(null,n,e,u,a);break e}else if(c===P){n.tag=14,n=Em(null,n,e,u,a);break e}}throw n=re(e)||e,Error(r(306,n,""))}}return n;case 0:return Go(e,n,n.type,n.pendingProps,a);case 1:return u=n.type,c=oa(u,n.pendingProps),Dm(e,n,u,c,a);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var d=n.memoizedState;c=d.element,vo(e,n),Yi(n,u,null,a);var b=n.memoizedState;if(u=b.cache,Sl(n,yt,u),u!==d.cache&&mo(n,[yt],a,!0),Ii(),u=b.element,d.isDehydrated)if(d={element:u,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=zm(e,n,u,a);break e}else if(u!==c){c=pn(Error(r(424)),n),Li(c),n=zm(e,n,u,a);break e}else{switch(e=n.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(rt=vn(e.firstChild),zt=n,Ve=!0,kl=null,xn=!0,a=Ah(n,null,u,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if(ta(),u===c){n=Kn(e,n,a);break e}Mt(e,n,u,a)}n=n.child}return n;case 26:return yu(e,n),e===null?(a=Gp(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ve||(a=n.type,e=n.pendingProps,u=Mu(ge.current).createElement(a),u[Dt]=n,u[Qt]=e,Rt(u,a,e),Ct(u),n.stateNode=u):n.memoizedState=Gp(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return ft(n),e===null&&Ve&&(u=n.stateNode=Zp(n.type,n.pendingProps,ge.current),zt=n,xn=!0,c=rt,Ll(n.type)?(Oc=c,rt=vn(u.firstChild)):rt=c),Mt(e,n,n.pendingProps.children,a),yu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ve&&((c=u=rt)&&(u=n1(u,n.type,n.pendingProps,xn),u!==null?(n.stateNode=u,zt=n,rt=vn(u.firstChild),xn=!1,c=!0):c=!1),c||wl(n)),ft(n),c=n.type,d=n.pendingProps,b=e!==null?e.memoizedProps:null,u=d.children,jc(c,d)?u=null:b!==null&&jc(c,b)&&(n.flags|=32),n.memoizedState!==null&&(c=Ao(e,n,yb,null,null,a),or._currentValue=c),yu(e,n),Mt(e,n,u,a),n.child;case 6:return e===null&&Ve&&((e=a=rt)&&(a=l1(a,n.pendingProps,xn),a!==null?(n.stateNode=a,zt=n,rt=null,e=!0):e=!1),e||wl(n)),null;case 13:return Om(e,n,a);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=ua(n,null,u,a):Mt(e,n,u,a),n.child;case 11:return _m(e,n,n.type,n.pendingProps,a);case 7:return Mt(e,n,n.pendingProps,a),n.child;case 8:return Mt(e,n,n.pendingProps.children,a),n.child;case 12:return Mt(e,n,n.pendingProps.children,a),n.child;case 10:return u=n.pendingProps,Sl(n,n.type,u.value),Mt(e,n,u.children,a),n.child;case 9:return c=n.type._context,u=n.pendingProps.children,la(n),c=Ot(c),u=u(c),n.flags|=1,Mt(e,n,u,a),n.child;case 14:return Em(e,n,n.type,n.pendingProps,a);case 15:return Cm(e,n,n.type,n.pendingProps,a);case 19:return Rm(e,n,a);case 31:return Eb(e,n,a);case 22:return Am(e,n,a,n.pendingProps);case 24:return la(n),u=Ot(yt),e===null?(c=yo(),c===null&&(c=nt,d=po(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),n.memoizedState={parent:u,cache:c},bo(n),Sl(n,yt,c)):((e.lanes&a)!==0&&(vo(e,n),Yi(n,null,null,a),Ii()),c=e.memoizedState,d=n.memoizedState,c.parent!==u?(c={parent:u,cache:u},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),Sl(n,yt,u)):(u=d.cache,Sl(n,yt,u),u!==c.cache&&mo(n,[yt],a,!0))),Mt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function $n(e){e.flags|=4}function tc(e,n,a,u,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(op())e.flags|=8192;else throw ra=nu,xo}else e.flags&=-16777217}function Bm(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pp(n))if(op())e.flags|=8192;else throw ra=nu,xo}function bu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?gd():536870912,e.lanes|=n,ei|=n)}function Ji(e,n){if(!Ve)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function ut(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,u=0;if(n)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags&65011712,u|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,u|=c.subtreeFlags,u|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=u,e.childLanes=a,n}function Ab(e,n,a){var u=n.pendingProps;switch(so(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ut(n),null;case 1:return ut(n),null;case 3:return a=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),Gn(yt),Te(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Va(n)?$n(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,co())),ut(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?($n(n),d!==null?(ut(n),Bm(n,d)):(ut(n),tc(n,c,null,u,a))):d?d!==e.memoizedState?($n(n),ut(n),Bm(n,d)):(ut(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&$n(n),ut(n),tc(n,c,e,u,a)),null;case 27:if(Tt(n),a=ge.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}e=ue.current,Va(n)?gh(n):(e=Zp(c,u,a),n.stateNode=e,$n(n))}return ut(n),null;case 5:if(Tt(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return ut(n),null}if(d=ue.current,Va(n))gh(n);else{var b=Mu(ge.current);switch(d){case 1:d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=b.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=b.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=b.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof u.is=="string"?b.createElement("select",{is:u.is}):b.createElement("select"),u.multiple?d.multiple=!0:u.size&&(d.size=u.size);break;default:d=typeof u.is=="string"?b.createElement(c,{is:u.is}):b.createElement(c)}}d[Dt]=n,d[Qt]=u;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)d.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=d;e:switch(Rt(d,c,u),c){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&$n(n)}}return ut(n),tc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&$n(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=ge.current,Va(n)){if(e=n.stateNode,a=n.memoizedProps,u=null,c=zt,c!==null)switch(c.tag){case 27:case 5:u=c.memoizedProps}e[Dt]=n,e=!!(e.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||Op(e.nodeValue,a)),e||wl(n,!0)}else e=Mu(e).createTextNode(u),e[Dt]=n,n.stateNode=e}return ut(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(u=Va(n),a!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[Dt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),e=!1}else a=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(rn(n),n):(rn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return ut(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Va(n),u!==null&&u.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[Dt]=n}else ta(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;ut(n),c=!1}else c=co(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(rn(n),n):(rn(n),null)}return rn(n),(n.flags&128)!==0?(n.lanes=a,n):(a=u!==null,e=e!==null&&e.memoizedState!==null,a&&(u=n.child,c=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(c=u.alternate.memoizedState.cachePool.pool),d=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(d=u.memoizedState.cachePool.pool),d!==c&&(u.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),bu(n,n.updateQueue),ut(n),null);case 4:return Te(),e===null&&Sc(n.stateNode.containerInfo),ut(n),null;case 10:return Gn(n.type),ut(n),null;case 19:if(F(mt),u=n.memoizedState,u===null)return ut(n),null;if(c=(n.flags&128)!==0,d=u.rendering,d===null)if(c)Ji(u,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=ru(e),d!==null){for(n.flags|=128,Ji(u,!1),e=d.updateQueue,n.updateQueue=e,bu(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)fh(a,e),a=a.sibling;return S(mt,mt.current&1|2),Ve&&Fn(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&gt()>_u&&(n.flags|=128,c=!0,Ji(u,!1),n.lanes=4194304)}else{if(!c)if(e=ru(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,bu(n,e),Ji(u,!0),u.tail===null&&u.tailMode==="hidden"&&!d.alternate&&!Ve)return ut(n),null}else 2*gt()-u.renderingStartTime>_u&&a!==536870912&&(n.flags|=128,c=!0,Ji(u,!1),n.lanes=4194304);u.isBackwards?(d.sibling=n.child,n.child=d):(e=u.last,e!==null?e.sibling=d:n.child=d,u.last=d)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=gt(),e.sibling=null,a=mt.current,S(mt,c?a&1|2:a&1),Ve&&Fn(n,u.treeForkCount),e):(ut(n),null);case 22:case 23:return rn(n),_o(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(a&536870912)!==0&&(n.flags&128)===0&&(ut(n),n.subtreeFlags&6&&(n.flags|=8192)):ut(n),a=n.updateQueue,a!==null&&bu(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==a&&(n.flags|=2048),e!==null&&F(aa),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Gn(yt),ut(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function jb(e,n){switch(so(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Gn(yt),Te(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Tt(n),null;case 31:if(n.memoizedState!==null){if(rn(n),n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(rn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ta()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(mt),null;case 4:return Te(),null;case 10:return Gn(n.type),null;case 22:case 23:return rn(n),_o(),e!==null&&F(aa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Gn(yt),null;case 25:return null;default:return null}}function Um(e,n){switch(so(n),n.tag){case 3:Gn(yt),Te();break;case 26:case 27:case 5:Tt(n);break;case 4:Te();break;case 31:n.memoizedState!==null&&rn(n);break;case 13:rn(n);break;case 19:F(mt);break;case 10:Gn(n.type);break;case 22:case 23:rn(n),_o(),e!==null&&F(aa);break;case 24:Gn(yt)}}function Ki(e,n){try{var a=n.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var c=u.next;a=c;do{if((a.tag&e)===e){u=void 0;var d=a.create,b=a.inst;u=d(),b.destroy=u}a=a.next}while(a!==c)}}catch(w){Ke(n,n.return,w)}}function Nl(e,n,a){try{var u=n.updateQueue,c=u!==null?u.lastEffect:null;if(c!==null){var d=c.next;u=d;do{if((u.tag&e)===e){var b=u.inst,w=b.destroy;if(w!==void 0){b.destroy=void 0,c=n;var C=a,B=w;try{B()}catch(G){Ke(c,C,G)}}}u=u.next}while(u!==d)}}catch(G){Ke(n,n.return,G)}}function Hm(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Nh(n,a)}catch(u){Ke(e,e.return,u)}}}function qm(e,n,a){a.props=oa(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(u){Ke(e,n,u)}}function $i(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof a=="function"?e.refCleanup=a(u):a.current=u}}catch(c){Ke(e,n,c)}}function zn(e,n){var a=e.ref,u=e.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(c){Ke(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){Ke(e,n,c)}else a.current=null}function Vm(e){var n=e.type,a=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(c){Ke(e,e.return,c)}}function nc(e,n,a){try{var u=e.stateNode;Kb(u,e.type,a,n),u[Qt]=n}catch(c){Ke(e,e.return,c)}}function Im(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Im(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&&Ll(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,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=In));else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(ac(e,n,a),e=e.sibling;e!==null;)ac(e,n,a),e=e.sibling}function vu(e,n,a){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(u!==4&&(u===27&&Ll(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(vu(e,n,a),e=e.sibling;e!==null;)vu(e,n,a),e=e.sibling}function Ym(e){var n=e.stateNode,a=e.memoizedProps;try{for(var u=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Rt(n,u,a),n[Dt]=e,n[Qt]=a}catch(d){Ke(e,e.return,d)}}var Pn=!1,vt=!1,ic=!1,Zm=typeof WeakSet=="function"?WeakSet:Set,At=null;function Nb(e,n){if(e=e.containerInfo,Cc=Vu,e=nh(e),$s(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var c=u.anchorOffset,d=u.focusNode;u=u.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var b=0,w=-1,C=-1,B=0,G=0,K=e,U=null;t:for(;;){for(var I;K!==a||c!==0&&K.nodeType!==3||(w=b+c),K!==d||u!==0&&K.nodeType!==3||(C=b+u),K.nodeType===3&&(b+=K.nodeValue.length),(I=K.firstChild)!==null;)U=K,K=I;for(;;){if(K===e)break t;if(U===a&&++B===c&&(w=b),U===d&&++G===u&&(C=b),(I=K.nextSibling)!==null)break;K=U,U=K.parentNode}K=I}a=w===-1||C===-1?null:{start:w,end:C}}else a=null}a=a||{start:0,end:0}}else a=null;for(Ac={focusedElem:e,selectionRange:a},Vu=!1,At=n;At!==null;)if(n=At,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,At=e;else for(;At!==null;){switch(n=At,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=n,c=d.memoizedProps,d=d.memoizedState,u=a.stateNode;try{var he=oa(a.type,c);e=u.getSnapshotBeforeUpdate(he,d),u.__reactInternalSnapshotBeforeUpdate=e}catch(_e){Ke(a,a.return,_e)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Tc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Tc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,At=e;break}At=n.return}}function Fm(e,n,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:el(e,a),u&4&&Ki(5,a);break;case 1:if(el(e,a),u&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(b){Ke(a,a.return,b)}else{var c=oa(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ke(a,a.return,b)}}u&64&&Hm(a),u&512&&$i(a,a.return);break;case 3:if(el(e,a),u&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Nh(e,n)}catch(b){Ke(a,a.return,b)}}break;case 27:n===null&&u&4&&Ym(a);case 26:case 5:el(e,a),n===null&&u&4&&Vm(a),u&512&&$i(a,a.return);break;case 12:el(e,a);break;case 31:el(e,a),u&4&&Xm(e,a);break;case 13:el(e,a),u&4&&Jm(e,a),u&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Ub.bind(null,a),a1(e,a))));break;case 22:if(u=a.memoizedState!==null||Pn,!u){n=n!==null&&n.memoizedState!==null||vt,c=Pn;var d=vt;Pn=u,(vt=n)&&!d?tl(e,a,(a.subtreeFlags&8772)!==0):el(e,a),Pn=c,vt=d}break;case 30:break;default:el(e,a)}}function Qm(e){var n=e.alternate;n!==null&&(e.alternate=null,Qm(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ms(n)),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 ct=null,Xt=!1;function Wn(e,n,a){for(a=a.child;a!==null;)Gm(e,n,a),a=a.sibling}function Gm(e,n,a){if(_t&&typeof _t.onCommitFiberUnmount=="function")try{_t.onCommitFiberUnmount(Ht,a)}catch{}switch(a.tag){case 26:vt||zn(a,n),Wn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:vt||zn(a,n);var u=ct,c=Xt;Ll(a.type)&&(ct=a.stateNode,Xt=!1),Wn(e,n,a),rr(a.stateNode),ct=u,Xt=c;break;case 5:vt||zn(a,n);case 6:if(u=ct,c=Xt,ct=null,Wn(e,n,a),ct=u,Xt=c,ct!==null)if(Xt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(a.stateNode)}catch(d){Ke(a,n,d)}else try{ct.removeChild(a.stateNode)}catch(d){Ke(a,n,d)}break;case 18:ct!==null&&(Xt?(e=ct,Hp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),si(e)):Hp(ct,a.stateNode));break;case 4:u=ct,c=Xt,ct=a.stateNode.containerInfo,Xt=!0,Wn(e,n,a),ct=u,Xt=c;break;case 0:case 11:case 14:case 15:Nl(2,a,n),vt||Nl(4,a,n),Wn(e,n,a);break;case 1:vt||(zn(a,n),u=a.stateNode,typeof u.componentWillUnmount=="function"&&qm(a,n,u)),Wn(e,n,a);break;case 21:Wn(e,n,a);break;case 22:vt=(u=vt)||a.memoizedState!==null,Wn(e,n,a),vt=u;break;default:Wn(e,n,a)}}function Xm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{si(e)}catch(a){Ke(n,n.return,a)}}}function Jm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{si(e)}catch(a){Ke(n,n.return,a)}}function Tb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Zm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Zm),n;default:throw Error(r(435,e.tag))}}function ku(e,n){var a=Tb(e);n.forEach(function(u){if(!a.has(u)){a.add(u);var c=Hb.bind(null,e,u);u.then(c,c)}})}function Jt(e,n){var a=n.deletions;if(a!==null)for(var u=0;u<a.length;u++){var c=a[u],d=e,b=n,w=b;e:for(;w!==null;){switch(w.tag){case 27:if(Ll(w.type)){ct=w.stateNode,Xt=!1;break e}break;case 5:ct=w.stateNode,Xt=!1;break e;case 3:case 4:ct=w.stateNode.containerInfo,Xt=!0;break e}w=w.return}if(ct===null)throw Error(r(160));Gm(d,b,c),ct=null,Xt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Km(n,e),n=n.sibling}var Cn=null;function Km(e,n){var a=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Jt(n,e),Kt(e),u&4&&(Nl(3,e,e.return),Ki(3,e),Nl(5,e,e.return));break;case 1:Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),u&64&&Pn&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var c=Cn;if(Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),u&4){var d=a!==null?a.memoizedState:null;if(u=e.memoizedState,a===null)if(u===null)if(e.stateNode===null){e:{u=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(u){case"title":d=c.getElementsByTagName("title")[0],(!d||d[_i]||d[Dt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(u),c.head.insertBefore(d,c.querySelector("head > title"))),Rt(d,u,a),d[Dt]=e,Ct(d),u=d;break e;case"link":var b=Kp("link","href",c).get(u+(a.href||""));if(b){for(var w=0;w<b.length;w++)if(d=b[w],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){b.splice(w,1);break t}}d=c.createElement(u),Rt(d,u,a),c.head.appendChild(d);break;case"meta":if(b=Kp("meta","content",c).get(u+(a.content||""))){for(w=0;w<b.length;w++)if(d=b[w],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){b.splice(w,1);break t}}d=c.createElement(u),Rt(d,u,a),c.head.appendChild(d);break;default:throw Error(r(468,u))}d[Dt]=e,Ct(d),u=d}e.stateNode=u}else $p(c,e.type,e.stateNode);else e.stateNode=Jp(c,u,e.memoizedProps);else d!==u?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,u===null?$p(c,e.type,e.stateNode):Jp(c,u,e.memoizedProps)):u===null&&e.stateNode!==null&&nc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),a!==null&&u&4&&nc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Jt(n,e),Kt(e),u&512&&(vt||a===null||zn(a,a.return)),e.flags&32){c=e.stateNode;try{Da(c,"")}catch(he){Ke(e,e.return,he)}}u&4&&e.stateNode!=null&&(c=e.memoizedProps,nc(e,c,a!==null?a.memoizedProps:c)),u&1024&&(ic=!0);break;case 6:if(Jt(n,e),Kt(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,a=e.stateNode;try{a.nodeValue=u}catch(he){Ke(e,e.return,he)}}break;case 3:if(Bu=null,c=Cn,Cn=Ru(n.containerInfo),Jt(n,e),Cn=c,Kt(e),u&4&&a!==null&&a.memoizedState.isDehydrated)try{si(n.containerInfo)}catch(he){Ke(e,e.return,he)}ic&&(ic=!1,$m(e));break;case 4:u=Cn,Cn=Ru(e.stateNode.containerInfo),Jt(n,e),Kt(e),Cn=u;break;case 12:Jt(n,e),Kt(e);break;case 31:Jt(n,e),Kt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 13:Jt(n,e),Kt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Su=gt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 22:c=e.memoizedState!==null;var C=a!==null&&a.memoizedState!==null,B=Pn,G=vt;if(Pn=B||c,vt=G||C,Jt(n,e),vt=G,Pn=B,Kt(e),u&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(a===null||C||Pn||vt||ca(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){C=a=n;try{if(d=C.stateNode,c)b=d.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{w=C.stateNode;var K=C.memoizedProps.style,U=K!=null&&K.hasOwnProperty("display")?K.display:null;w.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(he){Ke(C,C.return,he)}}}else if(n.tag===6){if(a===null){C=n;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(he){Ke(C,C.return,he)}}}else if(n.tag===18){if(a===null){C=n;try{var I=C.stateNode;c?qp(I,!0):qp(C.stateNode,!1)}catch(he){Ke(C,C.return,he)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,ku(e,a))));break;case 19:Jt(n,e),Kt(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,ku(e,u)));break;case 30:break;case 21:break;default:Jt(n,e),Kt(e)}}function Kt(e){var n=e.flags;if(n&2){try{for(var a,u=e.return;u!==null;){if(Im(u)){a=u;break}u=u.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var c=a.stateNode,d=lc(e);vu(e,d,c);break;case 5:var b=a.stateNode;a.flags&32&&(Da(b,""),a.flags&=-33);var w=lc(e);vu(e,w,b);break;case 3:case 4:var C=a.stateNode.containerInfo,B=lc(e);ac(e,B,C);break;default:throw Error(r(161))}}catch(G){Ke(e,e.return,G)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function $m(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;$m(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function el(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)Fm(e,n.alternate,n),n=n.sibling}function ca(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Nl(4,n,n.return),ca(n);break;case 1:zn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&qm(n,n.return,a),ca(n);break;case 27:rr(n.stateNode);case 26:case 5:zn(n,n.return),ca(n);break;case 22:n.memoizedState===null&&ca(n);break;case 30:ca(n);break;default:ca(n)}e=e.sibling}}function tl(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,c=e,d=n,b=d.flags;switch(d.tag){case 0:case 11:case 15:tl(c,d,a),Ki(4,d);break;case 1:if(tl(c,d,a),u=d,c=u.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(B){Ke(u,u.return,B)}if(u=d,c=u.updateQueue,c!==null){var w=u.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)jh(C[c],w)}catch(B){Ke(u,u.return,B)}}a&&b&64&&Hm(d),$i(d,d.return);break;case 27:Ym(d);case 26:case 5:tl(c,d,a),a&&u===null&&b&4&&Vm(d),$i(d,d.return);break;case 12:tl(c,d,a);break;case 31:tl(c,d,a),a&&b&4&&Xm(c,d);break;case 13:tl(c,d,a),a&&b&4&&Jm(c,d);break;case 22:d.memoizedState===null&&tl(c,d,a),$i(d,d.return);break;case 30:break;default:tl(c,d,a)}n=n.sibling}}function rc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Bi(a))}function uc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bi(e))}function An(e,n,a,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Pm(e,n,a,u),n=n.sibling}function Pm(e,n,a,u){var c=n.flags;switch(n.tag){case 0:case 11:case 15:An(e,n,a,u),c&2048&&Ki(9,n);break;case 1:An(e,n,a,u);break;case 3:An(e,n,a,u),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bi(e)));break;case 12:if(c&2048){An(e,n,a,u),e=n.stateNode;try{var d=n.memoizedProps,b=d.id,w=d.onPostCommit;typeof w=="function"&&w(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ke(n,n.return,C)}}else An(e,n,a,u);break;case 31:An(e,n,a,u);break;case 13:An(e,n,a,u);break;case 23:break;case 22:d=n.stateNode,b=n.alternate,n.memoizedState!==null?d._visibility&2?An(e,n,a,u):Pi(e,n):d._visibility&2?An(e,n,a,u):(d._visibility|=2,$a(e,n,a,u,(n.subtreeFlags&10256)!==0||!1)),c&2048&&rc(b,n);break;case 24:An(e,n,a,u),c&2048&&uc(n.alternate,n);break;default:An(e,n,a,u)}}function $a(e,n,a,u,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,b=n,w=a,C=u,B=b.flags;switch(b.tag){case 0:case 11:case 15:$a(d,b,w,C,c),Ki(8,b);break;case 23:break;case 22:var G=b.stateNode;b.memoizedState!==null?G._visibility&2?$a(d,b,w,C,c):Pi(d,b):(G._visibility|=2,$a(d,b,w,C,c)),c&&B&2048&&rc(b.alternate,b);break;case 24:$a(d,b,w,C,c),c&&B&2048&&uc(b.alternate,b);break;default:$a(d,b,w,C,c)}n=n.sibling}}function Pi(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,u=n,c=u.flags;switch(u.tag){case 22:Pi(a,u),c&2048&&rc(u.alternate,u);break;case 24:Pi(a,u),c&2048&&uc(u.alternate,u);break;default:Pi(a,u)}n=n.sibling}}var Wi=8192;function Pa(e,n,a){if(e.subtreeFlags&Wi)for(e=e.child;e!==null;)Wm(e,n,a),e=e.sibling}function Wm(e,n,a){switch(e.tag){case 26:Pa(e,n,a),e.flags&Wi&&e.memoizedState!==null&&g1(a,Cn,e.memoizedState,e.memoizedProps);break;case 5:Pa(e,n,a);break;case 3:case 4:var u=Cn;Cn=Ru(e.stateNode.containerInfo),Pa(e,n,a),Cn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=Wi,Wi=16777216,Pa(e,n,a),Wi=u):Pa(e,n,a));break;default:Pa(e,n,a)}}function ep(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function er(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];At=u,np(u,e)}ep(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)tp(e),e=e.sibling}function tp(e){switch(e.tag){case 0:case 11:case 15:er(e),e.flags&2048&&Nl(9,e,e.return);break;case 3:er(e);break;case 12:er(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,wu(e)):er(e);break;default:er(e)}}function wu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var u=n[a];At=u,np(u,e)}ep(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Nl(8,n,n.return),wu(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,wu(n));break;default:wu(n)}e=e.sibling}}function np(e,n){for(;At!==null;){var a=At;switch(a.tag){case 0:case 11:case 15:Nl(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Bi(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,At=u;else e:for(a=e;At!==null;){u=At;var c=u.sibling,d=u.return;if(Qm(u),u===a){At=null;break e}if(c!==null){c.return=d,At=c;break e}At=d}}}var Db={getCacheForType:function(e){var n=Ot(yt),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return Ot(yt).controller.signal}},zb=typeof WeakMap=="function"?WeakMap:Map,Ge=0,nt=null,Re=null,Ue=0,Je=0,un=null,Tl=!1,Wa=!1,sc=!1,nl=0,ht=0,Dl=0,fa=0,oc=0,sn=0,ei=0,tr=null,$t=null,cc=!1,Su=0,lp=0,_u=1/0,Eu=null,zl=null,Et=0,Ol=null,ti=null,ll=0,fc=0,dc=null,ap=null,nr=0,hc=null;function on(){return(Ge&2)!==0&&Ue!==0?Ue&-Ue:T.T!==null?bc():vd()}function ip(){if(sn===0)if((Ue&536870912)===0||Ve){var e=Or;Or<<=1,(Or&3932160)===0&&(Or=262144),sn=e}else sn=536870912;return e=an.current,e!==null&&(e.flags|=32),sn}function Pt(e,n,a){(e===nt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(ni(e,0),Ml(e,Ue,sn,!1)),Si(e,a),((Ge&2)===0||e!==nt)&&(e===nt&&((Ge&2)===0&&(fa|=a),ht===4&&Ml(e,Ue,sn,!1)),On(e))}function rp(e,n,a){if((Ge&6)!==0)throw Error(r(327));var u=!a&&(n&127)===0&&(n&e.expiredLanes)===0||wi(e,n),c=u?Rb(e,n):pc(e,n,!0),d=u;do{if(c===0){Wa&&!u&&Ml(e,n,0,!1);break}else{if(a=e.current.alternate,d&&!Ob(a)){c=pc(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var w=e;c=tr;var C=w.current.memoizedState.isDehydrated;if(C&&(ni(w,b).flags|=256),b=pc(w,b,!1),b!==2){if(sc&&!C){w.errorRecoveryDisabledLanes|=d,fa|=d,c=4;break e}d=$t,$t=c,d!==null&&($t===null?$t=d:$t.push.apply($t,d))}c=b}if(d=!1,c!==2)continue}}if(c===1){ni(e,0),Ml(e,n,0,!0);break}e:{switch(u=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Ml(u,n,sn,!Tl);break e;case 2:$t=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Su+300-gt(),10<c)){if(Ml(u,n,sn,!Tl),Rr(u,0,!0)!==0)break e;ll=n,u.timeoutHandle=Bp(up.bind(null,u,a,$t,Eu,cc,n,sn,fa,ei,Tl,d,"Throttled",-0,0),c);break e}up(u,a,$t,Eu,cc,n,sn,fa,ei,Tl,d,null,-0,0)}}break}while(!0);On(e)}function up(e,n,a,u,c,d,b,w,C,B,G,K,U,I){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:In},Wm(n,d,K);var he=(d&62914560)===d?Su-gt():(d&4194048)===d?lp-gt():0;if(he=y1(K,he),he!==null){ll=d,e.cancelPendingCommit=he(pp.bind(null,e,n,d,a,u,c,b,w,C,G,K,null,U,I)),Ml(e,d,b,!B);return}}pp(e,n,d,a,u,c,b,w,C)}function Ob(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var c=a[u],d=c.getSnapshot;c=c.value;try{if(!nn(d(),c))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Ml(e,n,a,u){n&=~oc,n&=~fa,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var c=n;0<c;){var d=31-tt(c),b=1<<d;u[d]=-1,c&=~b}a!==0&&yd(e,a,n)}function Cu(){return(Ge&6)===0?(lr(0),!1):!0}function mc(){if(Re!==null){if(Je===0)var e=Re.return;else e=Re,Qn=na=null,To(e),Qa=null,Hi=0,e=Re;for(;e!==null;)Um(e.alternate,e),e=e.return;Re=null}}function ni(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Wb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ll=0,mc(),nt=e,Re=a=Zn(e.current,null),Ue=n,Je=0,un=null,Tl=!1,Wa=wi(e,n),sc=!1,ei=sn=oc=fa=Dl=ht=0,$t=tr=null,cc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var c=31-tt(u),d=1<<c;n|=e[c],u&=~d}return nl=n,Gr(),a}function sp(e,n){ze=null,T.H=Gi,n===Fa||n===tu?(n=_h(),Je=3):n===xo?(n=_h(),Je=4):Je=n===Qo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,un=n,Re===null&&(ht=1,pu(e,pn(n,e.current)))}function op(){var e=an.current;return e===null?!0:(Ue&4194048)===Ue?bn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===bn:!1}function cp(){var e=T.H;return T.H=Gi,e===null?Gi:e}function fp(){var e=T.A;return T.A=Db,e}function Au(){ht=4,Tl||(Ue&4194048)!==Ue&&an.current!==null||(Wa=!0),(Dl&134217727)===0&&(fa&134217727)===0||nt===null||Ml(nt,Ue,sn,!1)}function pc(e,n,a){var u=Ge;Ge|=2;var c=cp(),d=fp();(nt!==e||Ue!==n)&&(Eu=null,ni(e,n)),n=!1;var b=ht;e:do try{if(Je!==0&&Re!==null){var w=Re,C=un;switch(Je){case 8:mc(),b=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(n=!0);var B=Je;if(Je=0,un=null,li(e,w,C,B),a&&Wa){b=0;break e}break;default:B=Je,Je=0,un=null,li(e,w,C,B)}}Mb(),b=ht;break}catch(G){sp(e,G)}while(!0);return n&&e.shellSuspendCounter++,Qn=na=null,Ge=u,T.H=c,T.A=d,Re===null&&(nt=null,Ue=0,Gr()),b}function Mb(){for(;Re!==null;)dp(Re)}function Rb(e,n){var a=Ge;Ge|=2;var u=cp(),c=fp();nt!==e||Ue!==n?(Eu=null,_u=gt()+500,ni(e,n)):Wa=wi(e,n);e:do try{if(Je!==0&&Re!==null){n=Re;var d=un;t:switch(Je){case 1:Je=0,un=null,li(e,n,d,1);break;case 2:case 9:if(wh(d)){Je=0,un=null,hp(n);break}n=function(){Je!==2&&Je!==9||nt!==e||(Je=7),On(e)},d.then(n,n);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:wh(d)?(Je=0,un=null,hp(n)):(Je=0,un=null,li(e,n,d,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var w=Re;if(b?Pp(b):w.stateNode.complete){Je=0,un=null;var C=w.sibling;if(C!==null)Re=C;else{var B=w.return;B!==null?(Re=B,ju(B)):Re=null}break t}}Je=0,un=null,li(e,n,d,5);break;case 6:Je=0,un=null,li(e,n,d,6);break;case 8:mc(),ht=6;break e;default:throw Error(r(462))}}Lb();break}catch(G){sp(e,G)}while(!0);return Qn=na=null,T.H=u,T.A=c,Ge=a,Re!==null?0:(nt=null,Ue=0,Gr(),ht)}function Lb(){for(;Re!==null&&!vi();)dp(Re)}function dp(e){var n=Lm(e.alternate,e,nl);e.memoizedProps=e.pendingProps,n===null?ju(e):Re=n}function hp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Tm(a,n,n.pendingProps,n.type,void 0,Ue);break;case 11:n=Tm(a,n,n.pendingProps,n.type.render,n.ref,Ue);break;case 5:To(n);default:Um(a,n),n=Re=fh(n,nl),n=Lm(a,n,nl)}e.memoizedProps=e.pendingProps,n===null?ju(e):Re=n}function li(e,n,a,u){Qn=na=null,To(n),Qa=null,Hi=0;var c=n.return;try{if(_b(e,c,n,a,Ue)){ht=1,pu(e,pn(a,e.current)),Re=null;return}}catch(d){if(c!==null)throw Re=c,d;ht=1,pu(e,pn(a,e.current)),Re=null;return}n.flags&32768?(Ve||u===1?e=!0:Wa||(Ue&536870912)!==0?e=!1:(Tl=e=!0,(u===2||u===9||u===3||u===6)&&(u=an.current,u!==null&&u.tag===13&&(u.flags|=16384))),mp(n,e)):ju(n)}function ju(e){var n=e;do{if((n.flags&32768)!==0){mp(n,Tl);return}e=n.return;var a=Ab(n.alternate,n,nl);if(a!==null){Re=a;return}if(n=n.sibling,n!==null){Re=n;return}Re=n=e}while(n!==null);ht===0&&(ht=5)}function mp(e,n){do{var a=jb(e.alternate,e);if(a!==null){a.flags&=32767,Re=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Re=e;return}Re=e=a}while(e!==null);ht=6,Re=null}function pp(e,n,a,u,c,d,b,w,C){e.cancelPendingCommit=null;do Nu();while(Et!==0);if((Ge&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=no,p0(e,a,d,b,w,C),e===nt&&(Re=nt=null,Ue=0),ti=n,Ol=e,ll=a,fc=d,dc=c,ap=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,qb(ve,function(){return vp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=T.T,T.T=null,c=J.p,J.p=2,b=Ge,Ge|=4;try{Nb(e,n,a)}finally{Ge=b,J.p=c,T.T=u}}Et=1,gp(),yp(),xp()}}function gp(){if(Et===1){Et=0;var e=Ol,n=ti,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=T.T,T.T=null;var u=J.p;J.p=2;var c=Ge;Ge|=4;try{Km(n,e);var d=Ac,b=nh(e.containerInfo),w=d.focusedElem,C=d.selectionRange;if(b!==w&&w&&w.ownerDocument&&th(w.ownerDocument.documentElement,w)){if(C!==null&&$s(w)){var B=C.start,G=C.end;if(G===void 0&&(G=B),"selectionStart"in w)w.selectionStart=B,w.selectionEnd=Math.min(G,w.value.length);else{var K=w.ownerDocument||document,U=K&&K.defaultView||window;if(U.getSelection){var I=U.getSelection(),he=w.textContent.length,_e=Math.min(C.start,he),et=C.end===void 0?_e:Math.min(C.end,he);!I.extend&&_e>et&&(b=et,et=_e,_e=b);var D=eh(w,_e),j=eh(w,et);if(D&&j&&(I.rangeCount!==1||I.anchorNode!==D.node||I.anchorOffset!==D.offset||I.focusNode!==j.node||I.focusOffset!==j.offset)){var L=K.createRange();L.setStart(D.node,D.offset),I.removeAllRanges(),_e>et?(I.addRange(L),I.extend(j.node,j.offset)):(L.setEnd(j.node,j.offset),I.addRange(L))}}}}for(K=[],I=w;I=I.parentNode;)I.nodeType===1&&K.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<K.length;w++){var X=K[w];X.element.scrollLeft=X.left,X.element.scrollTop=X.top}}Vu=!!Cc,Ac=Cc=null}finally{Ge=c,J.p=u,T.T=a}}e.current=n,Et=2}}function yp(){if(Et===2){Et=0;var e=Ol,n=ti,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=T.T,T.T=null;var u=J.p;J.p=2;var c=Ge;Ge|=4;try{Fm(e,n.alternate,n)}finally{Ge=c,J.p=u,T.T=a}}Et=3}}function xp(){if(Et===4||Et===3){Et=0,ki();var e=Ol,n=ti,a=ll,u=ap;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Et=5:(Et=0,ti=Ol=null,bp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(zl=null),zs(a),n=n.stateNode,_t&&typeof _t.onCommitFiberRoot=="function")try{_t.onCommitFiberRoot(Ht,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=T.T,c=J.p,J.p=2,T.T=null;try{for(var d=e.onRecoverableError,b=0;b<u.length;b++){var w=u[b];d(w.value,{componentStack:w.stack})}}finally{T.T=n,J.p=c}}(ll&3)!==0&&Nu(),On(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===hc?nr++:(nr=0,hc=e):nr=0,lr(0)}}function bp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Bi(n)))}function Nu(){return gp(),yp(),xp(),vp()}function vp(){if(Et!==5)return!1;var e=Ol,n=fc;fc=0;var a=zs(ll),u=T.T,c=J.p;try{J.p=32>a?32:a,T.T=null,a=dc,dc=null;var d=Ol,b=ll;if(Et=0,ti=Ol=null,ll=0,(Ge&6)!==0)throw Error(r(331));var w=Ge;if(Ge|=4,tp(d.current),Pm(d,d.current,b,a),Ge=w,lr(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Ht,d)}catch{}return!0}finally{J.p=c,T.T=u,bp(e,n)}}function kp(e,n,a){n=pn(a,n),n=Fo(e.stateNode,n,2),e=Cl(e,n,2),e!==null&&(Si(e,2),On(e))}function Ke(e,n,a){if(e.tag===3)kp(e,e,a);else for(;n!==null;){if(n.tag===3){kp(n,e,a);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(zl===null||!zl.has(u))){e=pn(a,e),a=wm(2),u=Cl(n,a,2),u!==null&&(Sm(a,u,n,e),Si(u,2),On(u));break}}n=n.return}}function gc(e,n,a){var u=e.pingCache;if(u===null){u=e.pingCache=new zb;var c=new Set;u.set(n,c)}else c=u.get(n),c===void 0&&(c=new Set,u.set(n,c));c.has(a)||(sc=!0,c.add(a),e=Bb.bind(null,e,n,a),n.then(e,e))}function Bb(e,n,a){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,nt===e&&(Ue&a)===a&&(ht===4||ht===3&&(Ue&62914560)===Ue&&300>gt()-Su?(Ge&2)===0&&ni(e,0):oc|=a,ei===Ue&&(ei=0)),On(e)}function wp(e,n){n===0&&(n=gd()),e=Wl(e,n),e!==null&&(Si(e,n),On(e))}function Ub(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),wp(e,a)}function Hb(e,n){var a=0;switch(e.tag){case 31:case 13:var u=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),wp(e,a)}function qb(e,n){return pl(e,n)}var Tu=null,ai=null,yc=!1,Du=!1,xc=!1,Rl=0;function On(e){e!==ai&&e.next===null&&(ai===null?Tu=ai=e:ai=ai.next=e),Du=!0,yc||(yc=!0,Ib())}function lr(e,n){if(!xc&&Du){xc=!0;do for(var a=!1,u=Tu;u!==null;){if(e!==0){var c=u.pendingLanes;if(c===0)var d=0;else{var b=u.suspendedLanes,w=u.pingedLanes;d=(1<<31-tt(42|e)+1)-1,d&=c&~(b&~w),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Cp(u,d))}else d=Ue,d=Rr(u,u===nt?d:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(d&3)===0||wi(u,d)||(a=!0,Cp(u,d));u=u.next}while(a);xc=!1}}function Vb(){Sp()}function Sp(){Du=yc=!1;var e=0;Rl!==0&&Pb()&&(e=Rl);for(var n=gt(),a=null,u=Tu;u!==null;){var c=u.next,d=_p(u,n);d===0?(u.next=null,a===null?Tu=c:a.next=c,c===null&&(ai=a)):(a=u,(e!==0||(d&3)!==0)&&(Du=!0)),u=c}Et!==0&&Et!==5||lr(e),Rl!==0&&(Rl=0)}function _p(e,n){for(var a=e.suspendedLanes,u=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var b=31-tt(d),w=1<<b,C=c[b];C===-1?((w&a)===0||(w&u)!==0)&&(c[b]=m0(w,n)):C<=n&&(e.expiredLanes|=w),d&=~w}if(n=nt,a=Ue,a=Rr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,a===0||e===n&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&gl(u),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||wi(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(u!==null&&gl(u),zs(a)){case 2:case 8:a=ie;break;case 32:a=ve;break;case 268435456:a=Xe;break;default:a=ve}return u=Ep.bind(null,e),a=pl(a,u),e.callbackPriority=n,e.callbackNode=a,n}return u!==null&&u!==null&&gl(u),e.callbackPriority=2,e.callbackNode=null,2}function Ep(e,n){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Nu()&&e.callbackNode!==a)return null;var u=Ue;return u=Rr(e,e===nt?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(rp(e,u,n),_p(e,gt()),e.callbackNode!=null&&e.callbackNode===a?Ep.bind(null,e):null)}function Cp(e,n){if(Nu())return null;rp(e,n,!0)}function Ib(){e1(function(){(Ge&6)!==0?pl(Q,Vb):Sp()})}function bc(){if(Rl===0){var e=Ya;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),Rl=e}return Rl}function Ap(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Hr(""+e)}function jp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function Yb(e,n,a,u,c){if(n==="submit"&&a&&a.stateNode===c){var d=Ap((c[Qt]||null).action),b=u.submitter;b&&(n=(n=b[Qt]||null)?Ap(n.formAction):b.getAttribute("formAction"),n!==null&&(d=n,b=null));var w=new Yr("action","action",null,u,c);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Rl!==0){var C=b?jp(c,b):new FormData(c);Ho(a,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(w.preventDefault(),C=b?jp(c,b):new FormData(c),Ho(a,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var vc=0;vc<to.length;vc++){var kc=to[vc],Zb=kc.toLowerCase(),Fb=kc[0].toUpperCase()+kc.slice(1);En(Zb,"on"+Fb)}En(ih,"onAnimationEnd"),En(rh,"onAnimationIteration"),En(uh,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(ub,"onTransitionRun"),En(sb,"onTransitionStart"),En(ob,"onTransitionCancel"),En(sh,"onTransitionEnd"),Na("onMouseEnter",["mouseout","mouseover"]),Na("onMouseLeave",["mouseout","mouseover"]),Na("onPointerEnter",["pointerout","pointerover"]),Na("onPointerLeave",["pointerout","pointerover"]),Jl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ar="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(" "),Qb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ar));function Np(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var u=e[a],c=u.event;u=u.listeners;e:{var d=void 0;if(n)for(var b=u.length-1;0<=b;b--){var w=u[b],C=w.instance,B=w.currentTarget;if(w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}else for(b=0;b<u.length;b++){if(w=u[b],C=w.instance,B=w.currentTarget,w=w.listener,C!==d&&c.isPropagationStopped())break e;d=w,c.currentTarget=B;try{d(c)}catch(G){Qr(G)}c.currentTarget=null,d=C}}}}function Le(e,n){var a=n[Os];a===void 0&&(a=n[Os]=new Set);var u=e+"__bubble";a.has(u)||(Tp(n,e,2,!1),a.add(u))}function wc(e,n,a){var u=0;n&&(u|=4),Tp(a,e,u,n)}var zu="_reactListening"+Math.random().toString(36).slice(2);function Sc(e){if(!e[zu]){e[zu]=!0,Sd.forEach(function(a){a!=="selectionchange"&&(Qb.has(a)||wc(a,!1,e),wc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[zu]||(n[zu]=!0,wc("selectionchange",!1,n))}}function Tp(e,n,a,u){switch(ig(n)){case 2:var c=v1;break;case 8:c=k1;break;default:c=Uc}a=c.bind(null,n,a,e),c=void 0,!Is||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),u?c!==void 0?e.addEventListener(n,a,{capture:!0,passive:c}):e.addEventListener(n,a,!0):c!==void 0?e.addEventListener(n,a,{passive:c}):e.addEventListener(n,a,!1)}function _c(e,n,a,u,c){var d=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var b=u.tag;if(b===3||b===4){var w=u.stateNode.containerInfo;if(w===c)break;if(b===4)for(b=u.return;b!==null;){var C=b.tag;if((C===3||C===4)&&b.stateNode.containerInfo===c)return;b=b.return}for(;w!==null;){if(b=Ca(w),b===null)return;if(C=b.tag,C===5||C===6||C===26||C===27){u=d=b;continue e}w=w.parentNode}}u=u.return}Rd(function(){var B=d,G=qs(a),K=[];e:{var U=oh.get(e);if(U!==void 0){var I=Yr,he=e;switch(e){case"keypress":if(Vr(a)===0)break e;case"keydown":case"keyup":I=H0;break;case"focusin":he="focus",I=Qs;break;case"focusout":he="blur",I=Qs;break;case"beforeblur":case"afterblur":I=Qs;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=Ud;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=A0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=I0;break;case ih:case rh:case uh:I=T0;break;case sh:I=Z0;break;case"scroll":case"scrollend":I=E0;break;case"wheel":I=Q0;break;case"copy":case"cut":case"paste":I=z0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=qd;break;case"toggle":case"beforetoggle":I=X0}var _e=(n&4)!==0,et=!_e&&(e==="scroll"||e==="scrollend"),D=_e?U!==null?U+"Capture":null:U;_e=[];for(var j=B,L;j!==null;){var X=j;if(L=X.stateNode,X=X.tag,X!==5&&X!==26&&X!==27||L===null||D===null||(X=Ci(j,D),X!=null&&_e.push(ir(j,X,L))),et)break;j=j.return}0<_e.length&&(U=new I(U,he,null,a,G),K.push({event:U,listeners:_e}))}}if((n&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",I=e==="mouseout"||e==="pointerout",U&&a!==Hs&&(he=a.relatedTarget||a.fromElement)&&(Ca(he)||he[Ea]))break e;if((I||U)&&(U=G.window===G?G:(U=G.ownerDocument)?U.defaultView||U.parentWindow:window,I?(he=a.relatedTarget||a.toElement,I=B,he=he?Ca(he):null,he!==null&&(et=o(he),_e=he.tag,he!==et||_e!==5&&_e!==27&&_e!==6)&&(he=null)):(I=null,he=B),I!==he)){if(_e=Ud,X="onMouseLeave",D="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(_e=qd,X="onPointerLeave",D="onPointerEnter",j="pointer"),et=I==null?U:Ei(I),L=he==null?U:Ei(he),U=new _e(X,j+"leave",I,a,G),U.target=et,U.relatedTarget=L,X=null,Ca(G)===B&&(_e=new _e(D,j+"enter",he,a,G),_e.target=L,_e.relatedTarget=et,X=_e),et=X,I&&he)t:{for(_e=Gb,D=I,j=he,L=0,X=D;X;X=_e(X))L++;X=0;for(var ke=j;ke;ke=_e(ke))X++;for(;0<L-X;)D=_e(D),L--;for(;0<X-L;)j=_e(j),X--;for(;L--;){if(D===j||j!==null&&D===j.alternate){_e=D;break t}D=_e(D),j=_e(j)}_e=null}else _e=null;I!==null&&Dp(K,U,I,_e,!1),he!==null&&et!==null&&Dp(K,et,he,_e,!0)}}e:{if(U=B?Ei(B):window,I=U.nodeName&&U.nodeName.toLowerCase(),I==="select"||I==="input"&&U.type==="file")var Fe=Xd;else if(Qd(U))if(Jd)Fe=ab;else{Fe=nb;var ye=tb}else I=U.nodeName,!I||I.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?B&&Us(B.elementType)&&(Fe=Xd):Fe=lb;if(Fe&&(Fe=Fe(e,B))){Gd(K,Fe,a,G);break e}ye&&ye(e,U,B),e==="focusout"&&B&&U.type==="number"&&B.memoizedProps.value!=null&&Bs(U,"number",U.value)}switch(ye=B?Ei(B):window,e){case"focusin":(Qd(ye)||ye.contentEditable==="true")&&(Ra=ye,Ps=B,Mi=null);break;case"focusout":Mi=Ps=Ra=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,lh(K,a,G);break;case"selectionchange":if(rb)break;case"keydown":case"keyup":lh(K,a,G)}var Oe;if(Xs)e:{switch(e){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Ma?Zd(e,a)&&(He="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(He="onCompositionStart");He&&(Vd&&a.locale!=="ko"&&(Ma||He!=="onCompositionStart"?He==="onCompositionEnd"&&Ma&&(Oe=Ld()):(bl=G,Ys="value"in bl?bl.value:bl.textContent,Ma=!0)),ye=Ou(B,He),0<ye.length&&(He=new Hd(He,e,null,a,G),K.push({event:He,listeners:ye}),Oe?He.data=Oe:(Oe=Fd(a),Oe!==null&&(He.data=Oe)))),(Oe=K0?$0(e,a):P0(e,a))&&(He=Ou(B,"onBeforeInput"),0<He.length&&(ye=new Hd("onBeforeInput","beforeinput",null,a,G),K.push({event:ye,listeners:He}),ye.data=Oe)),Yb(K,e,B,a,G)}Np(K,n)})}function ir(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Ou(e,n){for(var a=n+"Capture",u=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ci(e,a),c!=null&&u.unshift(ir(e,c,d)),c=Ci(e,n),c!=null&&u.push(ir(e,c,d))),e.tag===3)return u;e=e.return}return[]}function Gb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Dp(e,n,a,u,c){for(var d=n._reactName,b=[];a!==null&&a!==u;){var w=a,C=w.alternate,B=w.stateNode;if(w=w.tag,C!==null&&C===u)break;w!==5&&w!==26&&w!==27||B===null||(C=B,c?(B=Ci(a,d),B!=null&&b.unshift(ir(a,B,C))):c||(B=Ci(a,d),B!=null&&b.push(ir(a,B,C)))),a=a.return}b.length!==0&&e.push({event:n,listeners:b})}var Xb=/\r\n?/g,Jb=/\u0000|\uFFFD/g;function zp(e){return(typeof e=="string"?e:""+e).replace(Xb,`
49
+ `).replace(Jb,"")}function Op(e,n){return n=zp(n),zp(e)===n}function We(e,n,a,u,c,d){switch(a){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Da(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Da(e,""+u);break;case"className":Br(e,"class",u);break;case"tabIndex":Br(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Br(e,a,u);break;case"style":Od(e,u,d);break;case"data":if(n!=="object"){Br(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(a,"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 d=="function"&&(a==="formAction"?(n!=="input"&&We(e,n,"name",c.name,c,null),We(e,n,"formEncType",c.formEncType,c,null),We(e,n,"formMethod",c.formMethod,c,null),We(e,n,"formTarget",c.formTarget,c,null)):(We(e,n,"encType",c.encType,c,null),We(e,n,"method",c.method,c,null),We(e,n,"target",c.target,c,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(a);break}u=Hr(""+u),e.setAttribute(a,u);break;case"onClick":u!=null&&(e.onclick=In);break;case"onScroll":u!=null&&Le("scroll",e);break;case"onScrollEnd":u!=null&&Le("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}a=Hr(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""+u):e.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":u===!0?e.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(a,u):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(a,u):e.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(a):e.setAttribute(a,u);break;case"popover":Le("beforetoggle",e),Le("toggle",e),Lr(e,"popover",u);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Lr(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=S0.get(a)||a,Lr(e,a,u))}}function Ec(e,n,a,u,c,d){switch(a){case"style":Od(e,u,d);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(a=u.__html,a!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof u=="string"?Da(e,u):(typeof u=="number"||typeof u=="bigint")&&Da(e,""+u);break;case"onScroll":u!=null&&Le("scroll",e);break;case"onScrollEnd":u!=null&&Le("scrollend",e);break;case"onClick":u!=null&&(e.onclick=In);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!_d.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),n=a.slice(2,c?a.length-7:void 0),d=e[Qt]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof u=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,u,c);break e}a in e?e[a]=u:u===!0?e.setAttribute(a,""):Lr(e,a,u)}}}function Rt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",e),Le("load",e);var u=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var b=a[d];if(b!=null)switch(d){case"src":u=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,d,b,a,null)}}c&&We(e,n,"srcSet",a.srcSet,a,null),u&&We(e,n,"src",a.src,a,null);return;case"input":Le("invalid",e);var w=d=b=c=null,C=null,B=null;for(u in a)if(a.hasOwnProperty(u)){var G=a[u];if(G!=null)switch(u){case"name":c=G;break;case"type":b=G;break;case"checked":C=G;break;case"defaultChecked":B=G;break;case"value":d=G;break;case"defaultValue":w=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(r(137,n));break;default:We(e,n,u,G,a,null)}}Nd(e,d,w,C,B,b,c,!1);return;case"select":Le("invalid",e),u=b=d=null;for(c in a)if(a.hasOwnProperty(c)&&(w=a[c],w!=null))switch(c){case"value":d=w;break;case"defaultValue":b=w;break;case"multiple":u=w;default:We(e,n,c,w,a,null)}n=d,a=b,e.multiple=!!u,n!=null?Ta(e,!!u,n,!1):a!=null&&Ta(e,!!u,a,!0);return;case"textarea":Le("invalid",e),d=c=u=null;for(b in a)if(a.hasOwnProperty(b)&&(w=a[b],w!=null))switch(b){case"value":u=w;break;case"defaultValue":c=w;break;case"children":d=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:We(e,n,b,w,a,null)}Dd(e,u,c,d);return;case"option":for(C in a)if(a.hasOwnProperty(C)&&(u=a[C],u!=null))switch(C){case"selected":e.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:We(e,n,C,u,a,null)}return;case"dialog":Le("beforetoggle",e),Le("toggle",e),Le("cancel",e),Le("close",e);break;case"iframe":case"object":Le("load",e);break;case"video":case"audio":for(u=0;u<ar.length;u++)Le(ar[u],e);break;case"image":Le("error",e),Le("load",e);break;case"details":Le("toggle",e);break;case"embed":case"source":case"link":Le("error",e),Le("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(B in a)if(a.hasOwnProperty(B)&&(u=a[B],u!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:We(e,n,B,u,a,null)}return;default:if(Us(n)){for(G in a)a.hasOwnProperty(G)&&(u=a[G],u!==void 0&&Ec(e,n,G,u,a,void 0));return}}for(w in a)a.hasOwnProperty(w)&&(u=a[w],u!=null&&We(e,n,w,u,a,null))}function Kb(e,n,a,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,b=null,w=null,C=null,B=null,G=null;for(I in a){var K=a[I];if(a.hasOwnProperty(I)&&K!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":C=K;default:u.hasOwnProperty(I)||We(e,n,I,null,u,K)}}for(var U in u){var I=u[U];if(K=a[U],u.hasOwnProperty(U)&&(I!=null||K!=null))switch(U){case"type":d=I;break;case"name":c=I;break;case"checked":B=I;break;case"defaultChecked":G=I;break;case"value":b=I;break;case"defaultValue":w=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(r(137,n));break;default:I!==K&&We(e,n,U,I,u,K)}}Ls(e,b,w,C,B,G,d,c);return;case"select":I=b=w=U=null;for(d in a)if(C=a[d],a.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":I=C;default:u.hasOwnProperty(d)||We(e,n,d,null,u,C)}for(c in u)if(d=u[c],C=a[c],u.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":U=d;break;case"defaultValue":w=d;break;case"multiple":b=d;default:d!==C&&We(e,n,c,d,u,C)}n=w,a=b,u=I,U!=null?Ta(e,!!a,U,!1):!!u!=!!a&&(n!=null?Ta(e,!!a,n,!0):Ta(e,!!a,a?[]:"",!1));return;case"textarea":I=U=null;for(w in a)if(c=a[w],a.hasOwnProperty(w)&&c!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:We(e,n,w,null,u,c)}for(b in u)if(c=u[b],d=a[b],u.hasOwnProperty(b)&&(c!=null||d!=null))switch(b){case"value":U=c;break;case"defaultValue":I=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&We(e,n,b,c,u,d)}Td(e,U,I);return;case"option":for(var he in a)if(U=a[he],a.hasOwnProperty(he)&&U!=null&&!u.hasOwnProperty(he))switch(he){case"selected":e.selected=!1;break;default:We(e,n,he,null,u,U)}for(C in u)if(U=u[C],I=a[C],u.hasOwnProperty(C)&&U!==I&&(U!=null||I!=null))switch(C){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:We(e,n,C,U,u,I)}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 _e in a)U=a[_e],a.hasOwnProperty(_e)&&U!=null&&!u.hasOwnProperty(_e)&&We(e,n,_e,null,u,U);for(B in u)if(U=u[B],I=a[B],u.hasOwnProperty(B)&&U!==I&&(U!=null||I!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(r(137,n));break;default:We(e,n,B,U,u,I)}return;default:if(Us(n)){for(var et in a)U=a[et],a.hasOwnProperty(et)&&U!==void 0&&!u.hasOwnProperty(et)&&Ec(e,n,et,void 0,u,U);for(G in u)U=u[G],I=a[G],!u.hasOwnProperty(G)||U===I||U===void 0&&I===void 0||Ec(e,n,G,U,u,I);return}}for(var D in a)U=a[D],a.hasOwnProperty(D)&&U!=null&&!u.hasOwnProperty(D)&&We(e,n,D,null,u,U);for(K in u)U=u[K],I=a[K],!u.hasOwnProperty(K)||U===I||U==null&&I==null||We(e,n,K,U,u,I)}function Mp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $b(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var c=a[u],d=c.transferSize,b=c.initiatorType,w=c.duration;if(d&&w&&Mp(b)){for(b=0,w=c.responseEnd,u+=1;u<a.length;u++){var C=a[u],B=C.startTime;if(B>w)break;var G=C.transferSize,K=C.initiatorType;G&&Mp(K)&&(C=C.responseEnd,b+=G*(C<w?1:(w-B)/(C-B)))}if(--u,n+=8*(d+b)/(c.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Cc=null,Ac=null;function Mu(e){return e.nodeType===9?e:e.ownerDocument}function Rp(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 Lp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function jc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Nc=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===Nc?!1:(Nc=e,!0):(Nc=null,!1)}var Bp=typeof setTimeout=="function"?setTimeout:void 0,Wb=typeof clearTimeout=="function"?clearTimeout:void 0,Up=typeof Promise=="function"?Promise:void 0,e1=typeof queueMicrotask=="function"?queueMicrotask:typeof Up<"u"?function(e){return Up.resolve(null).then(e).catch(t1)}:Bp;function t1(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function Hp(e,n){var a=n,u=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(u===0){e.removeChild(c),si(n);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")rr(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,rr(a);for(var d=a.firstChild;d;){var b=d.nextSibling,w=d.nodeName;d[_i]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=b}}else a==="body"&&rr(e.ownerDocument.body);a=c}while(a);si(n)}function qp(e,n){var a=e;e=0;do{var u=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=u}while(a)}function Tc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Tc(a),Ms(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function n1(e,n,a,u){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[_i])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function l1(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=vn(e.nextSibling),e===null))return null;return e}function Vp(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function Dc(e){return e.data==="$?"||e.data==="$~"}function zc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a1(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var u=function(){n(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function vn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Oc=null;function Ip(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return vn(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function Yp(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function Zp(e,n,a){switch(n=Mu(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function rr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ms(e)}var kn=new Map,Fp=new Set;function Ru(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var al=J.d;J.d={f:i1,r:r1,D:u1,C:s1,L:o1,m:c1,X:d1,S:f1,M:h1};function i1(){var e=al.f(),n=Cu();return e||n}function r1(e){var n=Aa(e);n!==null&&n.tag===5&&n.type==="form"?sm(n):al.r(e)}var ii=typeof document>"u"?null:document;function Qp(e,n,a){var u=ii;if(u&&typeof n=="string"&&n){var c=hn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),Fp.has(c)||(Fp.add(c),e={rel:e,crossOrigin:a,href:n},u.querySelector(c)===null&&(n=u.createElement("link"),Rt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function u1(e){al.D(e),Qp("dns-prefetch",e,null)}function s1(e,n){al.C(e,n),Qp("preconnect",e,n)}function o1(e,n,a){al.L(e,n,a);var u=ii;if(u&&e&&n){var c='link[rel="preload"][as="'+hn(n)+'"]';n==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+hn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+hn(a.imageSizes)+'"]')):c+='[href="'+hn(e)+'"]';var d=c;switch(n){case"style":d=ri(e);break;case"script":d=ui(e)}kn.has(d)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),kn.set(d,e),u.querySelector(c)!==null||n==="style"&&u.querySelector(ur(d))||n==="script"&&u.querySelector(sr(d))||(n=u.createElement("link"),Rt(n,"link",e),Ct(n),u.head.appendChild(n)))}}function c1(e,n){al.m(e,n);var a=ii;if(a&&e){var u=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+hn(u)+'"][href="'+hn(e)+'"]',d=c;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=ui(e)}if(!kn.has(d)&&(e=y({rel:"modulepreload",href:e},n),kn.set(d,e),a.querySelector(c)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(sr(d)))return}u=a.createElement("link"),Rt(u,"link",e),Ct(u),a.head.appendChild(u)}}}function f1(e,n,a){al.S(e,n,a);var u=ii;if(u&&e){var c=ja(u).hoistableStyles,d=ri(e);n=n||"default";var b=c.get(d);if(!b){var w={loading:0,preload:null};if(b=u.querySelector(ur(d)))w.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=kn.get(d))&&Mc(e,a);var C=b=u.createElement("link");Ct(C),Rt(C,"link",e),C._p=new Promise(function(B,G){C.onload=B,C.onerror=G}),C.addEventListener("load",function(){w.loading|=1}),C.addEventListener("error",function(){w.loading|=2}),w.loading|=4,Lu(b,n,u)}b={type:"stylesheet",instance:b,count:1,state:w},c.set(d,b)}}}function d1(e,n){al.X(e,n);var a=ii;if(a&&e){var u=ja(a).hoistableScripts,c=ui(e),d=u.get(c);d||(d=a.querySelector(sr(c)),d||(e=y({src:e,async:!0},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Rt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function h1(e,n){al.M(e,n);var a=ii;if(a&&e){var u=ja(a).hoistableScripts,c=ui(e),d=u.get(c);d||(d=a.querySelector(sr(c)),d||(e=y({src:e,async:!0,type:"module"},n),(n=kn.get(c))&&Rc(e,n),d=a.createElement("script"),Ct(d),Rt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},u.set(c,d))}}function Gp(e,n,a,u){var c=(c=ge.current)?Ru(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=ri(a.href),a=ja(c).hoistableStyles,u=a.get(n),u||(u={type:"style",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=ri(a.href);var d=ja(c).hoistableStyles,b=d.get(e);if(b||(c=c.ownerDocument||c,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,b),(d=c.querySelector(ur(e)))&&!d._p&&(b.instance=d,b.state.loading=5),kn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},kn.set(e,a),d||m1(c,e,a,b.state))),n&&u===null)throw Error(r(528,""));return b}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=ui(a),a=ja(c).hoistableScripts,u=a.get(n),u||(u={type:"script",instance:null,count:0,state:null},a.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function ri(e){return'href="'+hn(e)+'"'}function ur(e){return'link[rel="stylesheet"]['+e+"]"}function Xp(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function m1(e,n,a,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Rt(n,"link",a),Ct(n),e.head.appendChild(n))}function ui(e){return'[src="'+hn(e)+'"]'}function sr(e){return"script[async]"+e}function Jp(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+hn(a.href)+'"]');if(u)return n.instance=u,Ct(u),u;var c=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),Ct(u),Rt(u,"style",c),Lu(u,a.precedence,e),n.instance=u;case"stylesheet":c=ri(a.href);var d=e.querySelector(ur(c));if(d)return n.state.loading|=4,n.instance=d,Ct(d),d;u=Xp(a),(c=kn.get(c))&&Mc(u,c),d=(e.ownerDocument||e).createElement("link"),Ct(d);var b=d;return b._p=new Promise(function(w,C){b.onload=w,b.onerror=C}),Rt(d,"link",u),n.state.loading|=4,Lu(d,a.precedence,e),n.instance=d;case"script":return d=ui(a.src),(c=e.querySelector(sr(d)))?(n.instance=c,Ct(c),c):(u=a,(c=kn.get(d))&&(u=y({},a),Rc(u,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ct(c),Rt(c,"link",u),e.head.appendChild(c),n.instance=c);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,Lu(u,a.precedence,e));return n.instance}function Lu(e,n,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=u.length?u[u.length-1]:null,d=c,b=0;b<u.length;b++){var w=u[b];if(w.dataset.precedence===n)d=w;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Mc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Rc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Bu=null;function Kp(e,n,a){if(Bu===null){var u=new Map,c=Bu=new Map;c.set(a,u)}else c=Bu,u=c.get(a),u||(u=new Map,c.set(a,u));if(u.has(e))return u;for(u.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[_i]||d[Dt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var b=d.getAttribute(n)||"";b=e+b;var w=u.get(b);w?w.push(d):u.set(b,[d])}}return u}function $p(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function p1(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;switch(n.rel){case"stylesheet":return e=n.disabled,typeof n.precedence=="string"&&e==null;default:return!0}case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Pp(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function g1(e,n,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=ri(u.href),d=n.querySelector(ur(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Uu.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=d,Ct(d);return}d=n.ownerDocument||n,u=Xp(u),(c=kn.get(c))&&Mc(u,c),d=d.createElement("link"),Ct(d);var b=d;b._p=new Promise(function(w,C){b.onload=w,b.onerror=C}),Rt(d,"link",u),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Uu.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Lc=0;function y1(e,n){return e.stylesheets&&e.count===0&&qu(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var u=setTimeout(function(){if(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Lc===0&&(Lc=62500*$b());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&qu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Lc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(c)}}:null}function Uu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)qu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Hu=null;function qu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Hu=new Map,n.forEach(x1,e),Hu=null,Uu.call(e))}function x1(e,n){if(!(n.state.loading&4)){var a=Hu.get(e);if(a)var u=a.get(null);else{a=new Map,Hu.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var b=c[d];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(a.set(b.dataset.precedence,b),u=b)}u&&a.set(null,u)}c=n.instance,b=c.getAttribute("data-precedence"),d=a.get(b)||u,d===u&&a.set(null,c),a.set(b,c),this.count++,u=Uu.bind(this),c.addEventListener("load",u),c.addEventListener("error",u),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var or={$$typeof:q,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function b1(e,n,a,u,c,d,b,w,C){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=Ts(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.hiddenUpdates=Ts(null),this.identifierPrefix=u,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Wp(e,n,a,u,c,d,b,w,C,B,G,K){return e=new b1(e,n,a,b,C,B,G,K,w),n=1,d===!0&&(n|=24),d=ln(3,null,null,n),e.current=d,d.stateNode=e,n=po(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:u,isDehydrated:a,cache:n},bo(d),e}function eg(e){return e?(e=Ua,e):Ua}function tg(e,n,a,u,c,d){c=eg(c),u.context===null?u.context=c:u.pendingContext=c,u=El(n),u.payload={element:a},d=d===void 0?null:d,d!==null&&(u.callback=d),a=Cl(e,u,n),a!==null&&(Pt(a,e,n),Vi(a,e,n))}function ng(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Bc(e,n){ng(e,n),(e=e.alternate)&&ng(e,n)}function lg(e){if(e.tag===13||e.tag===31){var n=Wl(e,67108864);n!==null&&Pt(n,e,67108864),Bc(e,67108864)}}function ag(e){if(e.tag===13||e.tag===31){var n=on();n=Ds(n);var a=Wl(e,n);a!==null&&Pt(a,e,n),Bc(e,n)}}var Vu=!0;function v1(e,n,a,u){var c=T.T;T.T=null;var d=J.p;try{J.p=2,Uc(e,n,a,u)}finally{J.p=d,T.T=c}}function k1(e,n,a,u){var c=T.T;T.T=null;var d=J.p;try{J.p=8,Uc(e,n,a,u)}finally{J.p=d,T.T=c}}function Uc(e,n,a,u){if(Vu){var c=Hc(u);if(c===null)_c(e,n,u,Iu,a),rg(e,u);else if(S1(c,e,n,a,u))u.stopPropagation();else if(rg(e,u),n&4&&-1<w1.indexOf(e)){for(;c!==null;){var d=Aa(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var b=Xl(d.pendingLanes);if(b!==0){var w=d;for(w.pendingLanes|=2,w.entangledLanes|=2;b;){var C=1<<31-tt(b);w.entanglements[1]|=C,b&=~C}On(d),(Ge&6)===0&&(_u=gt()+500,lr(0))}}break;case 31:case 13:w=Wl(d,2),w!==null&&Pt(w,d,2),Cu(),Bc(d,2)}if(d=Hc(u),d===null&&_c(e,n,u,Iu,a),d===c)break;c=d}c!==null&&u.stopPropagation()}else _c(e,n,u,null,a)}}function Hc(e){return e=qs(e),qc(e)}var Iu=null;function qc(e){if(Iu=null,e=Ca(e),e!==null){var n=o(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=f(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Iu=e,null}function ig(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(Ze()){case Q:return 2;case ie:return 8;case ve:case je:return 32;case Xe:return 268435456;default:return 32}default:return 32}}var Vc=!1,Bl=null,Ul=null,Hl=null,cr=new Map,fr=new Map,ql=[],w1="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 rg(e,n){switch(e){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Ul=null;break;case"mouseover":case"mouseout":Hl=null;break;case"pointerover":case"pointerout":cr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":fr.delete(n.pointerId)}}function dr(e,n,a,u,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:a,eventSystemFlags:u,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Aa(n),n!==null&&lg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function S1(e,n,a,u,c){switch(n){case"focusin":return Bl=dr(Bl,e,n,a,u,c),!0;case"dragenter":return Ul=dr(Ul,e,n,a,u,c),!0;case"mouseover":return Hl=dr(Hl,e,n,a,u,c),!0;case"pointerover":var d=c.pointerId;return cr.set(d,dr(cr.get(d)||null,e,n,a,u,c)),!0;case"gotpointercapture":return d=c.pointerId,fr.set(d,dr(fr.get(d)||null,e,n,a,u,c)),!0}return!1}function ug(e){var n=Ca(e.target);if(n!==null){var a=o(n);if(a!==null){if(n=a.tag,n===13){if(n=f(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,kd(e.priority,function(){ag(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Yu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Hc(e.nativeEvent);if(a===null){a=e.nativeEvent;var u=new a.constructor(a.type,a);Hs=u,a.target.dispatchEvent(u),Hs=null}else return n=Aa(a),n!==null&&lg(n),e.blockedOn=a,!1;n.shift()}return!0}function sg(e,n,a){Yu(e)&&a.delete(n)}function _1(){Vc=!1,Bl!==null&&Yu(Bl)&&(Bl=null),Ul!==null&&Yu(Ul)&&(Ul=null),Hl!==null&&Yu(Hl)&&(Hl=null),cr.forEach(sg),fr.forEach(sg)}function Zu(e,n){e.blockedOn===n&&(e.blockedOn=null,Vc||(Vc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,_1)))}var Fu=null;function og(e){Fu!==e&&(Fu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Fu===e&&(Fu=null);for(var n=0;n<e.length;n+=3){var a=e[n],u=e[n+1],c=e[n+2];if(typeof u!="function"){if(qc(u||a)===null)continue;break}var d=Aa(a);d!==null&&(e.splice(n,3),n-=3,Ho(d,{pending:!0,data:c,method:a.method,action:u},u,c))}}))}function si(e){function n(C){return Zu(C,e)}Bl!==null&&Zu(Bl,e),Ul!==null&&Zu(Ul,e),Hl!==null&&Zu(Hl,e),cr.forEach(n),fr.forEach(n);for(var a=0;a<ql.length;a++){var u=ql[a];u.blockedOn===e&&(u.blockedOn=null)}for(;0<ql.length&&(a=ql[0],a.blockedOn===null);)ug(a),a.blockedOn===null&&ql.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var c=a[u],d=a[u+1],b=c[Qt]||null;if(typeof d=="function")b||og(a);else if(b){var w=null;if(d&&d.hasAttribute("formAction")){if(c=d,b=d[Qt]||null)w=b.formAction;else if(qc(c)!==null)continue}else w=b.action;typeof w=="function"?a[u+1]=w:(a.splice(u,3),u-=3),og(a)}}}function cg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(b){return c=b})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Ic(e){this._internalRoot=e}Qu.prototype.render=Ic.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,u=on();tg(a,u,e,n,null,null)},Qu.prototype.unmount=Ic.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;tg(e.current,2,null,e,null,null),Cu(),n[Ea]=null}};function Qu(e){this._internalRoot=e}Qu.prototype.unstable_scheduleHydration=function(e){if(e){var n=vd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<ql.length&&n!==0&&n<ql[a].priority;a++);ql.splice(a,0,e),a===0&&ug(e)}};var fg=l.version;if(fg!=="19.2.7")throw Error(r(527,fg,"19.2.7"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var E1={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gu.isDisabled&&Gu.supportsFiber)try{Ht=Gu.inject(E1),_t=Gu}catch{}}return mr.createRoot=function(e,n){if(!s(e))throw Error(r(299));var a=!1,u="",c=xm,d=bm,b=vm;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Wp(e,1,!1,null,null,a,u,null,c,d,b,cg),e[Ea]=n.current,Sc(e),new Ic(n)},mr.hydrateRoot=function(e,n,a){if(!s(e))throw Error(r(299));var u=!1,c="",d=xm,b=bm,w=vm,C=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError),a.formState!==void 0&&(C=a.formState)),n=Wp(e,1,!0,n,a??null,u,c,C,d,b,w,cg),n.context=eg(null),a=n.current,u=on(),u=Ds(u),c=El(u),c.callback=null,Cl(a,c,u),a=u,n.current.lanes=a,Si(n,a),On(n),e[Ea]=n.current,Sc(e),new Qu(n)},mr.version="19.2.7",mr}var kg;function R1(){if(kg)return Fc.exports;kg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(l){console.error(l)}}return t(),Fc.exports=M1(),Fc.exports}var L1=R1();const Ny=new Map,Jc=new Map;function yf(t){return Ny.get(t)??null}function B1(t,l){l.models.length!==0&&Ny.set(t,l)}function U1(t,l){const i=yf(t);if(i)return Promise.resolve(i);const r=Jc.get(t);if(r)return r;const s=l().then(o=>(B1(t,o),o)).finally(()=>Jc.delete(t));return Jc.set(t,s),s}const ot="";async function Ty(t){const l=await t.text();try{const i=JSON.parse(l),r=i.error??i.message;if(typeof r=="string"&&r.trim())return r.replace(/^Error:\s*/i,"")}catch{}return l}async function wg(){const t=await fetch(`${ot}/api/snapshot`);if(!t.ok)throw new Error("Failed to fetch snapshot");return t.json()}async function hi(t){const l=await fetch(`${ot}/api/runs/${t}`);if(!l.ok)throw new Error("Not found");return l.json()}async function H1(){const t=await fetch(`${ot}/api/intake/linear`);if(!t.ok)throw new Error(await t.text());return(await t.json()).candidates??[]}async function es(){const t=await fetch(`${ot}/api/intake/linear/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function qf(){const t=await fetch(`${ot}/api/intake/linear/config`);if(!t.ok)throw new Error(await t.text());return t.json()}async function q1(t){const l=await fetch(`${ot}/api/intake/linear/config`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function V1(t,l){const i=await fetch(`${ot}/api/intake/linear/${t}/promote`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function I1(t){const l=await fetch(`${ot}/api/agents`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Y1(t,l){const i=await fetch(`${ot}/api/agents/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)});if(!i.ok)throw new Error(await i.text());return i.json()}async function Z1(t){const l=await fetch(`${ot}/api/agents/${t}`,{method:"DELETE"});if(!l.ok)throw new Error(await l.text())}async function Vf(t){const l=await fetch(`${ot}/api/runs/${t}/cancel`,{method:"POST"});if(!l.ok)throw new Error(await l.text());return l.json()}async function F1(t){const l=await fetch(`${ot}/api/runs`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!l.ok)throw new Error(await l.text());return l.json()}async function Kc(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/plan`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({planMarkdown:l,approve:i,...(r==null?void 0:r.planModel)!==void 0?{planModel:r.planModel}:{},...(r==null?void 0:r.executeModel)!==void 0?{executeModel:r.executeModel}:{},...(r==null?void 0:r.planBudget)!==void 0?{planBudget:r.planBudget}:{},...(r==null?void 0:r.executeBudget)!==void 0?{executeBudget:r.executeBudget}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function Q1(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/draft-plan`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!==void 0?{planModel:l}:{},...i!==void 0?{planBudget:i}:{},...(r==null?void 0:r.feedback)!==void 0?{feedback:r.feedback}:{},...(r==null?void 0:r.editedMarkdown)!==void 0?{editedMarkdown:r.editedMarkdown}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function G1(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/kick`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l!=null&&l.trim()?{executeModel:l.trim()}:{},...i!==void 0?{executeBudget:i}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function X1(t,l,i){const r=await fetch(`${ot}/api/runs/${t}/plan/answers`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({answers:l,...(i==null?void 0:i.executeModel)!==void 0?{executeModel:i.executeModel}:{},...(i==null?void 0:i.executeBudget)!==void 0?{executeBudget:i.executeBudget}:{}})});if(!r.ok)throw new Error(await r.text());return r.json()}async function J1(t,l){const i=await fetch(`${ot}/api/runs/${t}/approve`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l?{outboundBody:l}:{})});if(!i.ok)throw new Error(await Ty(i));return i.json()}async function Dy(t,l){const i=await fetch(`${ot}/api/runs/${t}/qa`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({question:l})});if(!i.ok)throw new Error(await Ty(i));return i.json()}async function K1(t,l,i,r){const s=await fetch(`${ot}/api/runs/${t}/retry`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({feedback:l,...i!==void 0?{executeModel:i}:{},...r!==void 0?{executeBudget:r}:{}})});if(!s.ok)throw new Error(await s.text());return s.json()}async function $1(t,l){return U1(t,async()=>{const r=await fetch(`${ot}/api/runtimes/${t}/models`);if(!r.ok)throw new Error(await r.text());return r.json()})}async function P1(){const t=await fetch(`${ot}/api/agent-deck/status`);if(!t.ok)throw new Error(await t.text());return t.json()}async function W1(){return(await(await fetch(`${ot}/api/agent-deck/decks`)).json()).data??[]}async function ev(t){return(await(await fetch(`${ot}/api/agent-deck/decks/${t}/playbooks`)).json()).data??[]}function tv(t){const l=new EventSource(`${ot}/api/events`);return l.onmessage=i=>{try{t(JSON.parse(i.data))}catch{}},l.onerror=()=>{l.close()},()=>l.close()}async function nv(t,l="transcript"){const i=await fetch(`${ot}/api/runs/${t}/log-tail?kind=${l}`);if(!i.ok)throw new Error(await i.text());return(await i.json()).content}function ol(t){if(!t.contentJson)return null;try{return JSON.parse(t.contentJson)}catch{return null}}function ts(t){if(!t.contentJson)return t.blobPath??"";try{const l=JSON.parse(t.contentJson);return l.markdown??l.resultText??l.excerpt??t.contentJson}catch{return t.contentJson}}function Vt(t,l){return[...t].reverse().find(i=>i.kind===l)}function lv(t){var i;const l=Vt(t,"task_snapshot");if(!(l!=null&&l.contentJson))return null;try{const s=(i=JSON.parse(l.contentJson).url)==null?void 0:i.trim();return s!=null&&s.startsWith("http")?s:null}catch{return null}}function zy(t,l,i){const r=t.filter(o=>o.kind===l);for(let o=r.length-1;o>=0;o--){const f=ol(r[o]);if(f&&f.phase===i)return f}const s=r[r.length-1];return s?ol(s):null}function ns(t,l=Date.now()){const i=l-new Date(t).getTime();if(i<0)return"just now";const r=Math.floor(i/1e3);if(r<60)return"just now";const s=Math.floor(r/60);if(s<60)return`${s}m ago`;const o=Math.floor(s/60);if(o<24)return`${o}h ago`;const f=Math.floor(o/24);return f<7?`${f}d ago`:new Date(t).toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Oy(t){if(t<1e3)return`${Math.round(t)}ms`;const l=Math.round(t/1e3),i=Math.floor(l/60),r=l%60;if(i>=60){const s=Math.floor(i/60),o=i%60;return o>0?`${s}h ${o}m`:`${s}h`}return i>0?r>0?`${i}m ${r}s`:`${i}m`:`${r}s`}function ga(t){return t==="claude_code"?"Claude":t==="cursor_local"?"Cursor":"No agent"}function vs(t){return t==="claude_code"?"bg-[#D4A574]/20 text-[#E8C9A8] border-[#D4A574]/40":t==="cursor_local"?"bg-[#7EB8FF]/15 text-[#A8D4FF] border-[#7EB8FF]/35":"bg-white/5 text-white/50 border-white/15"}function If(t){return{code:"Code",communication:"Slack",email:"Email",research:"Research",content:"Content",other:"Other"}[t]??t}function ls(t){return t.source==="linear"&&t.externalLabel?t.externalLabel:t.source==="linear"&&t.externalId?t.externalId:t.source==="linear"?"Linear":"Manual"}function My(t,l){switch(t){case"plan_pending":return{label:"Planning",hint:"Agent is writing the plan",tone:"bg-cyber-violet/15 text-cyber-violet-light border-cyber-violet/35",accent:"border-l-cyber-violet"};case"plan_approved":return{label:"Queued",hint:"Approved — waiting for slot",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"queued":return{label:"Queued",tone:"bg-sky-500/15 text-sky-200 border-sky-400/30",accent:"border-l-sky-400"};case"running":return{label:"Running",hint:"Agent executing",tone:"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35",accent:"border-l-[#92E4DD]"};case"review":return{label:"Needs Review",hint:"Your sign-off required",tone:"bg-[#C4B643]/20 text-[#E8DC7A] border-[#C4B643]/40",accent:"border-l-[#C4B643]"};case"done":return{label:"Done",tone:"bg-emerald-500/10 text-emerald-300/90 border-emerald-400/25",accent:"border-l-emerald-400/60"};case"failed":return{label:"Failed",hint:"Retry from result review",tone:"bg-red-500/15 text-red-300 border-red-400/30",accent:"border-l-red-400"};case"cancelled":return{label:"Removed",hint:"Dismissed from Operations",tone:"bg-white/5 text-white/40 border-white/10",accent:"border-l-white/20"};default:return{label:t,tone:"bg-white/5 text-white/60 border-white/15",accent:"border-l-white/20"}}}function Yf(t){return t.deckName?t.deckName:t.deckId?`deck ${t.deckId.slice(0,8)}…`:null}function st({children:t,className:l="",title:i}){return g.jsx("span",{title:i,className:`inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium uppercase tracking-wide border ${l}`,children:t})}function Ry({index:t,total:l,onPrev:i,onNext:r,label:s="In Queue"}){return l<=1?null:g.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45 hidden sm:inline",children:s}),g.jsx("button",{type:"button",onClick:i,disabled:t<=0,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Previous","aria-label":"Previous in queue",children:"←"}),g.jsxs("span",{className:"text-sm tabular-nums text-white/60 min-w-[3.5rem] text-center",children:[t+1," / ",l]}),g.jsx("button",{type:"button",onClick:r,disabled:t>=l-1,className:"btn-ghost px-2.5 py-1.5 disabled:opacity-30",title:"Next","aria-label":"Next in queue",children:"→"})]})}var Ye;(function(t){t.assertEqual=s=>{};function l(s){}t.assertIs=l;function i(s){throw new Error}t.assertNever=i,t.arrayToEnum=s=>{const o={};for(const f of s)o[f]=f;return o},t.getValidEnumValues=s=>{const o=t.objectKeys(s).filter(h=>typeof s[s[h]]!="number"),f={};for(const h of o)f[h]=s[h];return t.objectValues(f)},t.objectValues=s=>t.objectKeys(s).map(function(o){return s[o]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const o=[];for(const f in s)Object.prototype.hasOwnProperty.call(s,f)&&o.push(f);return o},t.find=(s,o)=>{for(const f of s)if(o(f))return f},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&Number.isFinite(s)&&Math.floor(s)===s;function r(s,o=" | "){return s.map(f=>typeof f=="string"?`'${f}'`:f).join(o)}t.joinValues=r,t.jsonStringifyReplacer=(s,o)=>typeof o=="bigint"?o.toString():o})(Ye||(Ye={}));var Sg;(function(t){t.mergeShapes=(l,i)=>({...l,...i})})(Sg||(Sg={}));const fe=Ye.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Yl=t=>{switch(typeof t){case"undefined":return fe.undefined;case"string":return fe.string;case"number":return Number.isNaN(t)?fe.nan:fe.number;case"boolean":return fe.boolean;case"function":return fe.function;case"bigint":return fe.bigint;case"symbol":return fe.symbol;case"object":return Array.isArray(t)?fe.array:t===null?fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?fe.promise:typeof Map<"u"&&t instanceof Map?fe.map:typeof Set<"u"&&t instanceof Set?fe.set:typeof Date<"u"&&t instanceof Date?fe.date:fe.object;default:return fe.unknown}},le=Ye.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class cl extends Error{get errors(){return this.issues}constructor(l){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const i=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,i):this.__proto__=i,this.name="ZodError",this.issues=l}format(l){const i=l||function(o){return o.message},r={_errors:[]},s=o=>{for(const f of o.issues)if(f.code==="invalid_union")f.unionErrors.map(s);else if(f.code==="invalid_return_type")s(f.returnTypeError);else if(f.code==="invalid_arguments")s(f.argumentsError);else if(f.path.length===0)r._errors.push(i(f));else{let h=r,p=0;for(;p<f.path.length;){const m=f.path[p];p===f.path.length-1?(h[m]=h[m]||{_errors:[]},h[m]._errors.push(i(f))):h[m]=h[m]||{_errors:[]},h=h[m],p++}}};return s(this),r}static assert(l){if(!(l instanceof cl))throw new Error(`Not a ZodError: ${l}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ye.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(l=i=>i.message){const i={},r=[];for(const s of this.issues)if(s.path.length>0){const o=s.path[0];i[o]=i[o]||[],i[o].push(l(s))}else r.push(l(s));return{formErrors:r,fieldErrors:i}}get formErrors(){return this.flatten()}}cl.create=t=>new cl(t);const xf=(t,l)=>{let i;switch(t.code){case le.invalid_type:t.received===fe.undefined?i="Required":i=`Expected ${t.expected}, received ${t.received}`;break;case le.invalid_literal:i=`Invalid literal value, expected ${JSON.stringify(t.expected,Ye.jsonStringifyReplacer)}`;break;case le.unrecognized_keys:i=`Unrecognized key(s) in object: ${Ye.joinValues(t.keys,", ")}`;break;case le.invalid_union:i="Invalid input";break;case le.invalid_union_discriminator:i=`Invalid discriminator value. Expected ${Ye.joinValues(t.options)}`;break;case le.invalid_enum_value:i=`Invalid enum value. Expected ${Ye.joinValues(t.options)}, received '${t.received}'`;break;case le.invalid_arguments:i="Invalid function arguments";break;case le.invalid_return_type:i="Invalid function return type";break;case le.invalid_date:i="Invalid date";break;case le.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(i=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(i=`${i} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?i=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?i=`Invalid input: must end with "${t.validation.endsWith}"`:Ye.assertNever(t.validation):t.validation!=="regex"?i=`Invalid ${t.validation}`:i="Invalid";break;case le.too_small:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?i=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:i="Invalid input";break;case le.too_big:t.type==="array"?i=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?i=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?i=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?i=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?i=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:i="Invalid input";break;case le.custom:i="Invalid input";break;case le.invalid_intersection_types:i="Intersection results could not be merged";break;case le.not_multiple_of:i=`Number must be a multiple of ${t.multipleOf}`;break;case le.not_finite:i="Number must be finite";break;default:i=l.defaultError,Ye.assertNever(t)}return{message:i}};let av=xf;function iv(){return av}const rv=t=>{const{data:l,path:i,errorMaps:r,issueData:s}=t,o=[...i,...s.path||[]],f={...s,path:o};if(s.message!==void 0)return{...s,path:o,message:s.message};let h="";const p=r.filter(m=>!!m).slice().reverse();for(const m of p)h=m(f,{data:l,defaultError:h}).message;return{...s,path:o,message:h}};function oe(t,l){const i=iv(),r=rv({issueData:l,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,i,i===xf?void 0:xf].filter(s=>!!s)});t.common.issues.push(r)}class Zt{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(l,i){const r=[];for(const s of i){if(s.status==="aborted")return Ee;s.status==="dirty"&&l.dirty(),r.push(s.value)}return{status:l.value,value:r}}static async mergeObjectAsync(l,i){const r=[];for(const s of i){const o=await s.key,f=await s.value;r.push({key:o,value:f})}return Zt.mergeObjectSync(l,r)}static mergeObjectSync(l,i){const r={};for(const s of i){const{key:o,value:f}=s;if(o.status==="aborted"||f.status==="aborted")return Ee;o.status==="dirty"&&l.dirty(),f.status==="dirty"&&l.dirty(),o.value!=="__proto__"&&(typeof f.value<"u"||s.alwaysSet)&&(r[o.value]=f.value)}return{status:l.value,value:r}}}const Ee=Object.freeze({status:"aborted"}),br=t=>({status:"dirty",value:t}),Sn=t=>({status:"valid",value:t}),_g=t=>t.status==="aborted",Eg=t=>t.status==="dirty",mi=t=>t.status==="valid",as=t=>typeof Promise<"u"&&t instanceof Promise;var be;(function(t){t.errToObj=l=>typeof l=="string"?{message:l}:l||{},t.toString=l=>typeof l=="string"?l:l==null?void 0:l.message})(be||(be={}));class Ln{constructor(l,i,r,s){this._cachedPath=[],this.parent=l,this.data=i,this._path=r,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Cg=(t,l)=>{if(mi(l))return{success:!0,data:l.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const i=new cl(t.common.issues);return this._error=i,this._error}}};function Me(t){if(!t)return{};const{errorMap:l,invalid_type_error:i,required_error:r,description:s}=t;if(l&&(i||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return l?{errorMap:l,description:s}:{errorMap:(f,h)=>{const{message:p}=t;return f.code==="invalid_enum_value"?{message:p??h.defaultError}:typeof h.data>"u"?{message:p??r??h.defaultError}:f.code!=="invalid_type"?{message:h.defaultError}:{message:p??i??h.defaultError}},description:s}}class qe{get description(){return this._def.description}_getType(l){return Yl(l.data)}_getOrReturnCtx(l,i){return i||{common:l.parent.common,data:l.data,parsedType:Yl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}_processInputParams(l){return{status:new Zt,ctx:{common:l.parent.common,data:l.data,parsedType:Yl(l.data),schemaErrorMap:this._def.errorMap,path:l.path,parent:l.parent}}}_parseSync(l){const i=this._parse(l);if(as(i))throw new Error("Synchronous parse encountered promise.");return i}_parseAsync(l){const i=this._parse(l);return Promise.resolve(i)}parse(l,i){const r=this.safeParse(l,i);if(r.success)return r.data;throw r.error}safeParse(l,i){const r={common:{issues:[],async:(i==null?void 0:i.async)??!1,contextualErrorMap:i==null?void 0:i.errorMap},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)},s=this._parseSync({data:l,path:r.path,parent:r});return Cg(r,s)}"~validate"(l){var r,s;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)};if(!this["~standard"].async)try{const o=this._parseSync({data:l,path:[],parent:i});return mi(o)?{value:o.value}:{issues:i.common.issues}}catch(o){(s=(r=o==null?void 0:o.message)==null?void 0:r.toLowerCase())!=null&&s.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:l,path:[],parent:i}).then(o=>mi(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(l,i){const r=await this.safeParseAsync(l,i);if(r.success)return r.data;throw r.error}async safeParseAsync(l,i){const r={common:{issues:[],contextualErrorMap:i==null?void 0:i.errorMap,async:!0},path:(i==null?void 0:i.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:l,parsedType:Yl(l)},s=this._parse({data:l,path:r.path,parent:r}),o=await(as(s)?s:Promise.resolve(s));return Cg(r,o)}refine(l,i){const r=s=>typeof i=="string"||typeof i>"u"?{message:i}:typeof i=="function"?i(s):i;return this._refinement((s,o)=>{const f=l(s),h=()=>o.addIssue({code:le.custom,...r(s)});return typeof Promise<"u"&&f instanceof Promise?f.then(p=>p?!0:(h(),!1)):f?!0:(h(),!1)})}refinement(l,i){return this._refinement((r,s)=>l(r)?!0:(s.addIssue(typeof i=="function"?i(r,s):i),!1))}_refinement(l){return new ba({schema:this,typeName:Ce.ZodEffects,effect:{type:"refinement",refinement:l}})}superRefine(l){return this._refinement(l)}constructor(l){this.spa=this.safeParseAsync,this._def=l,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:i=>this["~validate"](i)}}optional(){return sl.create(this,this._def)}nullable(){return va.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Rn.create(this)}promise(){return cs.create(this,this._def)}or(l){return rs.create([this,l],this._def)}and(l){return us.create(this,l,this._def)}transform(l){return new ba({...Me(this._def),schema:this,typeName:Ce.ZodEffects,effect:{type:"transform",transform:l}})}default(l){const i=typeof l=="function"?l:()=>l;return new fs({...Me(this._def),innerType:this,defaultValue:i,typeName:Ce.ZodDefault})}brand(){return new Hy({typeName:Ce.ZodBranded,type:this,...Me(this._def)})}catch(l){const i=typeof l=="function"?l:()=>l;return new ds({...Me(this._def),innerType:this,catchValue:i,typeName:Ce.ZodCatch})}describe(l){const i=this.constructor;return new i({...this._def,description:l})}pipe(l){return Ff.create(this,l)}readonly(){return hs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const uv=/^c[^\s-]{8,}$/i,sv=/^[0-9a-z]+$/,ov=/^[0-9A-HJKMNP-TV-Z]{26}$/i,cv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,fv=/^[a-z0-9_-]{21}$/i,dv=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,pv="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let $c;const gv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bv=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,vv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,kv=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ly="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",wv=new RegExp(`^${Ly}$`);function By(t){let l="[0-5]\\d";t.precision?l=`${l}\\.\\d{${t.precision}}`:t.precision==null&&(l=`${l}(\\.\\d+)?`);const i=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${l})${i}`}function Sv(t){return new RegExp(`^${By(t)}$`)}function _v(t){let l=`${Ly}T${By(t)}`;const i=[];return i.push(t.local?"Z?":"Z"),t.offset&&i.push("([+-]\\d{2}:?\\d{2})"),l=`${l}(${i.join("|")})`,new RegExp(`^${l}$`)}function Ev(t,l){return!!((l==="v4"||!l)&&gv.test(t)||(l==="v6"||!l)&&xv.test(t))}function Cv(t,l){if(!dv.test(t))return!1;try{const[i]=t.split(".");if(!i)return!1;const r=i.replace(/-/g,"+").replace(/_/g,"/").padEnd(i.length+(4-i.length%4)%4,"="),s=JSON.parse(atob(r));return!(typeof s!="object"||s===null||"typ"in s&&(s==null?void 0:s.typ)!=="JWT"||!s.alg||l&&s.alg!==l)}catch{return!1}}function Av(t,l){return!!((l==="v4"||!l)&&yv.test(t)||(l==="v6"||!l)&&bv.test(t))}class ul extends qe{_parse(l){if(this._def.coerce&&(l.data=String(l.data)),this._getType(l)!==fe.string){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.string,received:o.parsedType}),Ee}const r=new Zt;let s;for(const o of this._def.checks)if(o.kind==="min")l.data.length<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")l.data.length>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const f=l.data.length>o.value,h=l.data.length<o.value;(f||h)&&(s=this._getOrReturnCtx(l,s),f?oe(s,{code:le.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):h&&oe(s,{code:le.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")mv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"email",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")$c||($c=new RegExp(pv,"u")),$c.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"emoji",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")cv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"uuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")fv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"nanoid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")uv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")sv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cuid2",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")ov.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ulid",code:le.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(l.data)}catch{s=this._getOrReturnCtx(l,s),oe(s,{validation:"url",code:le.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"regex",code:le.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?l.data=l.data.trim():o.kind==="includes"?l.data.includes(o.value,o.position)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?l.data=l.data.toLowerCase():o.kind==="toUpperCase"?l.data=l.data.toUpperCase():o.kind==="startsWith"?l.data.startsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?l.data.endsWith(o.value)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?_v(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?wv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?Sv(o).test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{code:le.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?hv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"duration",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?Ev(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"ip",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?Cv(l.data,o.alg)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"jwt",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?Av(l.data,o.version)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"cidr",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?vv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64",code:le.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?kv.test(l.data)||(s=this._getOrReturnCtx(l,s),oe(s,{validation:"base64url",code:le.invalid_string,message:o.message}),r.dirty()):Ye.assertNever(o);return{status:r.value,value:l.data}}_regex(l,i,r){return this.refinement(s=>l.test(s),{validation:i,code:le.invalid_string,...be.errToObj(r)})}_addCheck(l){return new ul({...this._def,checks:[...this._def.checks,l]})}email(l){return this._addCheck({kind:"email",...be.errToObj(l)})}url(l){return this._addCheck({kind:"url",...be.errToObj(l)})}emoji(l){return this._addCheck({kind:"emoji",...be.errToObj(l)})}uuid(l){return this._addCheck({kind:"uuid",...be.errToObj(l)})}nanoid(l){return this._addCheck({kind:"nanoid",...be.errToObj(l)})}cuid(l){return this._addCheck({kind:"cuid",...be.errToObj(l)})}cuid2(l){return this._addCheck({kind:"cuid2",...be.errToObj(l)})}ulid(l){return this._addCheck({kind:"ulid",...be.errToObj(l)})}base64(l){return this._addCheck({kind:"base64",...be.errToObj(l)})}base64url(l){return this._addCheck({kind:"base64url",...be.errToObj(l)})}jwt(l){return this._addCheck({kind:"jwt",...be.errToObj(l)})}ip(l){return this._addCheck({kind:"ip",...be.errToObj(l)})}cidr(l){return this._addCheck({kind:"cidr",...be.errToObj(l)})}datetime(l){return typeof l=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:l}):this._addCheck({kind:"datetime",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,offset:(l==null?void 0:l.offset)??!1,local:(l==null?void 0:l.local)??!1,...be.errToObj(l==null?void 0:l.message)})}date(l){return this._addCheck({kind:"date",message:l})}time(l){return typeof l=="string"?this._addCheck({kind:"time",precision:null,message:l}):this._addCheck({kind:"time",precision:typeof(l==null?void 0:l.precision)>"u"?null:l==null?void 0:l.precision,...be.errToObj(l==null?void 0:l.message)})}duration(l){return this._addCheck({kind:"duration",...be.errToObj(l)})}regex(l,i){return this._addCheck({kind:"regex",regex:l,...be.errToObj(i)})}includes(l,i){return this._addCheck({kind:"includes",value:l,position:i==null?void 0:i.position,...be.errToObj(i==null?void 0:i.message)})}startsWith(l,i){return this._addCheck({kind:"startsWith",value:l,...be.errToObj(i)})}endsWith(l,i){return this._addCheck({kind:"endsWith",value:l,...be.errToObj(i)})}min(l,i){return this._addCheck({kind:"min",value:l,...be.errToObj(i)})}max(l,i){return this._addCheck({kind:"max",value:l,...be.errToObj(i)})}length(l,i){return this._addCheck({kind:"length",value:l,...be.errToObj(i)})}nonempty(l){return this.min(1,be.errToObj(l))}trim(){return new ul({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ul({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(l=>l.kind==="datetime")}get isDate(){return!!this._def.checks.find(l=>l.kind==="date")}get isTime(){return!!this._def.checks.find(l=>l.kind==="time")}get isDuration(){return!!this._def.checks.find(l=>l.kind==="duration")}get isEmail(){return!!this._def.checks.find(l=>l.kind==="email")}get isURL(){return!!this._def.checks.find(l=>l.kind==="url")}get isEmoji(){return!!this._def.checks.find(l=>l.kind==="emoji")}get isUUID(){return!!this._def.checks.find(l=>l.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(l=>l.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(l=>l.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(l=>l.kind==="cuid2")}get isULID(){return!!this._def.checks.find(l=>l.kind==="ulid")}get isIP(){return!!this._def.checks.find(l=>l.kind==="ip")}get isCIDR(){return!!this._def.checks.find(l=>l.kind==="cidr")}get isBase64(){return!!this._def.checks.find(l=>l.kind==="base64")}get isBase64url(){return!!this._def.checks.find(l=>l.kind==="base64url")}get minLength(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxLength(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}ul.create=t=>new ul({checks:[],typeName:Ce.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...Me(t)});function jv(t,l){const i=(t.toString().split(".")[1]||"").length,r=(l.toString().split(".")[1]||"").length,s=i>r?i:r,o=Number.parseInt(t.toFixed(s).replace(".","")),f=Number.parseInt(l.toFixed(s).replace(".",""));return o%f/10**s}class pi extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(l){if(this._def.coerce&&(l.data=Number(l.data)),this._getType(l)!==fe.number){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.number,received:o.parsedType}),Ee}let r;const s=new Zt;for(const o of this._def.checks)o.kind==="int"?Ye.isInteger(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.invalid_type,expected:"integer",received:"float",message:o.message}),s.dirty()):o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),s.dirty()):o.kind==="multipleOf"?jv(l.data,o.value)!==0&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):o.kind==="finite"?Number.isFinite(l.data)||(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_finite,message:o.message}),s.dirty()):Ye.assertNever(o);return{status:s.value,value:l.data}}gte(l,i){return this.setLimit("min",l,!0,be.toString(i))}gt(l,i){return this.setLimit("min",l,!1,be.toString(i))}lte(l,i){return this.setLimit("max",l,!0,be.toString(i))}lt(l,i){return this.setLimit("max",l,!1,be.toString(i))}setLimit(l,i,r,s){return new pi({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:be.toString(s)}]})}_addCheck(l){return new pi({...this._def,checks:[...this._def.checks,l]})}int(l){return this._addCheck({kind:"int",message:be.toString(l)})}positive(l){return this._addCheck({kind:"min",value:0,inclusive:!1,message:be.toString(l)})}negative(l){return this._addCheck({kind:"max",value:0,inclusive:!1,message:be.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:0,inclusive:!0,message:be.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:0,inclusive:!0,message:be.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:be.toString(i)})}finite(l){return this._addCheck({kind:"finite",message:be.toString(l)})}safe(l){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:be.toString(l)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:be.toString(l)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}get isInt(){return!!this._def.checks.find(l=>l.kind==="int"||l.kind==="multipleOf"&&Ye.isInteger(l.value))}get isFinite(){let l=null,i=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(i===null||r.value>i)&&(i=r.value):r.kind==="max"&&(l===null||r.value<l)&&(l=r.value)}return Number.isFinite(i)&&Number.isFinite(l)}}pi.create=t=>new pi({checks:[],typeName:Ce.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});class _r extends qe{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(l){if(this._def.coerce)try{l.data=BigInt(l.data)}catch{return this._getInvalidInput(l)}if(this._getType(l)!==fe.bigint)return this._getInvalidInput(l);let r;const s=new Zt;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?l.data<o.value:l.data<=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="max"?(o.inclusive?l.data>o.value:l.data>=o.value)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),s.dirty()):o.kind==="multipleOf"?l.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(l,r),oe(r,{code:le.not_multiple_of,multipleOf:o.value,message:o.message}),s.dirty()):Ye.assertNever(o);return{status:s.value,value:l.data}}_getInvalidInput(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:fe.bigint,received:i.parsedType}),Ee}gte(l,i){return this.setLimit("min",l,!0,be.toString(i))}gt(l,i){return this.setLimit("min",l,!1,be.toString(i))}lte(l,i){return this.setLimit("max",l,!0,be.toString(i))}lt(l,i){return this.setLimit("max",l,!1,be.toString(i))}setLimit(l,i,r,s){return new _r({...this._def,checks:[...this._def.checks,{kind:l,value:i,inclusive:r,message:be.toString(s)}]})}_addCheck(l){return new _r({...this._def,checks:[...this._def.checks,l]})}positive(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:be.toString(l)})}negative(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:be.toString(l)})}nonpositive(l){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:be.toString(l)})}nonnegative(l){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:be.toString(l)})}multipleOf(l,i){return this._addCheck({kind:"multipleOf",value:l,message:be.toString(i)})}get minValue(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l}get maxValue(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l}}_r.create=t=>new _r({checks:[],typeName:Ce.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...Me(t)});class bf extends qe{_parse(l){if(this._def.coerce&&(l.data=!!l.data),this._getType(l)!==fe.boolean){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.boolean,received:r.parsedType}),Ee}return Sn(l.data)}}bf.create=t=>new bf({typeName:Ce.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Me(t)});class is extends qe{_parse(l){if(this._def.coerce&&(l.data=new Date(l.data)),this._getType(l)!==fe.date){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_type,expected:fe.date,received:o.parsedType}),Ee}if(Number.isNaN(l.data.getTime())){const o=this._getOrReturnCtx(l);return oe(o,{code:le.invalid_date}),Ee}const r=new Zt;let s;for(const o of this._def.checks)o.kind==="min"?l.data.getTime()<o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?l.data.getTime()>o.value&&(s=this._getOrReturnCtx(l,s),oe(s,{code:le.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Ye.assertNever(o);return{status:r.value,value:new Date(l.data.getTime())}}_addCheck(l){return new is({...this._def,checks:[...this._def.checks,l]})}min(l,i){return this._addCheck({kind:"min",value:l.getTime(),message:be.toString(i)})}max(l,i){return this._addCheck({kind:"max",value:l.getTime(),message:be.toString(i)})}get minDate(){let l=null;for(const i of this._def.checks)i.kind==="min"&&(l===null||i.value>l)&&(l=i.value);return l!=null?new Date(l):null}get maxDate(){let l=null;for(const i of this._def.checks)i.kind==="max"&&(l===null||i.value<l)&&(l=i.value);return l!=null?new Date(l):null}}is.create=t=>new is({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Ce.ZodDate,...Me(t)});class Ag extends qe{_parse(l){if(this._getType(l)!==fe.symbol){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.symbol,received:r.parsedType}),Ee}return Sn(l.data)}}Ag.create=t=>new Ag({typeName:Ce.ZodSymbol,...Me(t)});class vf extends qe{_parse(l){if(this._getType(l)!==fe.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.undefined,received:r.parsedType}),Ee}return Sn(l.data)}}vf.create=t=>new vf({typeName:Ce.ZodUndefined,...Me(t)});class kf extends qe{_parse(l){if(this._getType(l)!==fe.null){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.null,received:r.parsedType}),Ee}return Sn(l.data)}}kf.create=t=>new kf({typeName:Ce.ZodNull,...Me(t)});class jg extends qe{constructor(){super(...arguments),this._any=!0}_parse(l){return Sn(l.data)}}jg.create=t=>new jg({typeName:Ce.ZodAny,...Me(t)});class wf extends qe{constructor(){super(...arguments),this._unknown=!0}_parse(l){return Sn(l.data)}}wf.create=t=>new wf({typeName:Ce.ZodUnknown,...Me(t)});class Fl extends qe{_parse(l){const i=this._getOrReturnCtx(l);return oe(i,{code:le.invalid_type,expected:fe.never,received:i.parsedType}),Ee}}Fl.create=t=>new Fl({typeName:Ce.ZodNever,...Me(t)});class Ng extends qe{_parse(l){if(this._getType(l)!==fe.undefined){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.void,received:r.parsedType}),Ee}return Sn(l.data)}}Ng.create=t=>new Ng({typeName:Ce.ZodVoid,...Me(t)});class Rn extends qe{_parse(l){const{ctx:i,status:r}=this._processInputParams(l),s=this._def;if(i.parsedType!==fe.array)return oe(i,{code:le.invalid_type,expected:fe.array,received:i.parsedType}),Ee;if(s.exactLength!==null){const f=i.data.length>s.exactLength.value,h=i.data.length<s.exactLength.value;(f||h)&&(oe(i,{code:f?le.too_big:le.too_small,minimum:h?s.exactLength.value:void 0,maximum:f?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&i.data.length<s.minLength.value&&(oe(i,{code:le.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&i.data.length>s.maxLength.value&&(oe(i,{code:le.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),i.common.async)return Promise.all([...i.data].map((f,h)=>s.type._parseAsync(new Ln(i,f,i.path,h)))).then(f=>Zt.mergeArray(r,f));const o=[...i.data].map((f,h)=>s.type._parseSync(new Ln(i,f,i.path,h)));return Zt.mergeArray(r,o)}get element(){return this._def.type}min(l,i){return new Rn({...this._def,minLength:{value:l,message:be.toString(i)}})}max(l,i){return new Rn({...this._def,maxLength:{value:l,message:be.toString(i)}})}length(l,i){return new Rn({...this._def,exactLength:{value:l,message:be.toString(i)}})}nonempty(l){return this.min(1,l)}}Rn.create=(t,l)=>new Rn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Ce.ZodArray,...Me(l)});function ci(t){if(t instanceof wt){const l={};for(const i in t.shape){const r=t.shape[i];l[i]=sl.create(ci(r))}return new wt({...t._def,shape:()=>l})}else return t instanceof Rn?new Rn({...t._def,type:ci(t.element)}):t instanceof sl?sl.create(ci(t.unwrap())):t instanceof va?va.create(ci(t.unwrap())):t instanceof ya?ya.create(t.items.map(l=>ci(l))):t}class wt extends qe{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const l=this._def.shape(),i=Ye.objectKeys(l);return this._cached={shape:l,keys:i},this._cached}_parse(l){if(this._getType(l)!==fe.object){const m=this._getOrReturnCtx(l);return oe(m,{code:le.invalid_type,expected:fe.object,received:m.parsedType}),Ee}const{status:r,ctx:s}=this._processInputParams(l),{shape:o,keys:f}=this._getCached(),h=[];if(!(this._def.catchall instanceof Fl&&this._def.unknownKeys==="strip"))for(const m in s.data)f.includes(m)||h.push(m);const p=[];for(const m of f){const x=o[m],y=s.data[m];p.push({key:{status:"valid",value:m},value:x._parse(new Ln(s,y,s.path,m)),alwaysSet:m in s.data})}if(this._def.catchall instanceof Fl){const m=this._def.unknownKeys;if(m==="passthrough")for(const x of h)p.push({key:{status:"valid",value:x},value:{status:"valid",value:s.data[x]}});else if(m==="strict")h.length>0&&(oe(s,{code:le.unrecognized_keys,keys:h}),r.dirty());else if(m!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const m=this._def.catchall;for(const x of h){const y=s.data[x];p.push({key:{status:"valid",value:x},value:m._parse(new Ln(s,y,s.path,x)),alwaysSet:x in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const m=[];for(const x of p){const y=await x.key,k=await x.value;m.push({key:y,value:k,alwaysSet:x.alwaysSet})}return m}).then(m=>Zt.mergeObjectSync(r,m)):Zt.mergeObjectSync(r,p)}get shape(){return this._def.shape()}strict(l){return be.errToObj,new wt({...this._def,unknownKeys:"strict",...l!==void 0?{errorMap:(i,r)=>{var o,f;const s=((f=(o=this._def).errorMap)==null?void 0:f.call(o,i,r).message)??r.defaultError;return i.code==="unrecognized_keys"?{message:be.errToObj(l).message??s}:{message:s}}}:{}})}strip(){return new wt({...this._def,unknownKeys:"strip"})}passthrough(){return new wt({...this._def,unknownKeys:"passthrough"})}extend(l){return new wt({...this._def,shape:()=>({...this._def.shape(),...l})})}merge(l){return new wt({unknownKeys:l._def.unknownKeys,catchall:l._def.catchall,shape:()=>({...this._def.shape(),...l._def.shape()}),typeName:Ce.ZodObject})}setKey(l,i){return this.augment({[l]:i})}catchall(l){return new wt({...this._def,catchall:l})}pick(l){const i={};for(const r of Ye.objectKeys(l))l[r]&&this.shape[r]&&(i[r]=this.shape[r]);return new wt({...this._def,shape:()=>i})}omit(l){const i={};for(const r of Ye.objectKeys(this.shape))l[r]||(i[r]=this.shape[r]);return new wt({...this._def,shape:()=>i})}deepPartial(){return ci(this)}partial(l){const i={};for(const r of Ye.objectKeys(this.shape)){const s=this.shape[r];l&&!l[r]?i[r]=s:i[r]=s.optional()}return new wt({...this._def,shape:()=>i})}required(l){const i={};for(const r of Ye.objectKeys(this.shape))if(l&&!l[r])i[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof sl;)o=o._def.innerType;i[r]=o}return new wt({...this._def,shape:()=>i})}keyof(){return Uy(Ye.objectKeys(this.shape))}}wt.create=(t,l)=>new wt({shape:()=>t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});wt.strictCreate=(t,l)=>new wt({shape:()=>t,unknownKeys:"strict",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});wt.lazycreate=(t,l)=>new wt({shape:t,unknownKeys:"strip",catchall:Fl.create(),typeName:Ce.ZodObject,...Me(l)});class rs extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r=this._def.options;function s(o){for(const h of o)if(h.result.status==="valid")return h.result;for(const h of o)if(h.result.status==="dirty")return i.common.issues.push(...h.ctx.common.issues),h.result;const f=o.map(h=>new cl(h.ctx.common.issues));return oe(i,{code:le.invalid_union,unionErrors:f}),Ee}if(i.common.async)return Promise.all(r.map(async o=>{const f={...i,common:{...i.common,issues:[]},parent:null};return{result:await o._parseAsync({data:i.data,path:i.path,parent:f}),ctx:f}})).then(s);{let o;const f=[];for(const p of r){const m={...i,common:{...i.common,issues:[]},parent:null},x=p._parseSync({data:i.data,path:i.path,parent:m});if(x.status==="valid")return x;x.status==="dirty"&&!o&&(o={result:x,ctx:m}),m.common.issues.length&&f.push(m.common.issues)}if(o)return i.common.issues.push(...o.ctx.common.issues),o.result;const h=f.map(p=>new cl(p));return oe(i,{code:le.invalid_union,unionErrors:h}),Ee}}get options(){return this._def.options}}rs.create=(t,l)=>new rs({options:t,typeName:Ce.ZodUnion,...Me(l)});const rl=t=>t instanceof _f?rl(t.schema):t instanceof ba?rl(t.innerType()):t instanceof os?[t.value]:t instanceof xa?t.options:t instanceof Ef?Ye.objectValues(t.enum):t instanceof fs?rl(t._def.innerType):t instanceof vf?[void 0]:t instanceof kf?[null]:t instanceof sl?[void 0,...rl(t.unwrap())]:t instanceof va?[null,...rl(t.unwrap())]:t instanceof Hy||t instanceof hs?rl(t.unwrap()):t instanceof ds?rl(t._def.innerType):[];class Zf extends qe{_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==fe.object)return oe(i,{code:le.invalid_type,expected:fe.object,received:i.parsedType}),Ee;const r=this.discriminator,s=i.data[r],o=this.optionsMap.get(s);return o?i.common.async?o._parseAsync({data:i.data,path:i.path,parent:i}):o._parseSync({data:i.data,path:i.path,parent:i}):(oe(i,{code:le.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),Ee)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(l,i,r){const s=new Map;for(const o of i){const f=rl(o.shape[l]);if(!f.length)throw new Error(`A discriminator value for key \`${l}\` could not be extracted from all schema options`);for(const h of f){if(s.has(h))throw new Error(`Discriminator property ${String(l)} has duplicate value ${String(h)}`);s.set(h,o)}}return new Zf({typeName:Ce.ZodDiscriminatedUnion,discriminator:l,options:i,optionsMap:s,...Me(r)})}}function Sf(t,l){const i=Yl(t),r=Yl(l);if(t===l)return{valid:!0,data:t};if(i===fe.object&&r===fe.object){const s=Ye.objectKeys(l),o=Ye.objectKeys(t).filter(h=>s.indexOf(h)!==-1),f={...t,...l};for(const h of o){const p=Sf(t[h],l[h]);if(!p.valid)return{valid:!1};f[h]=p.data}return{valid:!0,data:f}}else if(i===fe.array&&r===fe.array){if(t.length!==l.length)return{valid:!1};const s=[];for(let o=0;o<t.length;o++){const f=t[o],h=l[o],p=Sf(f,h);if(!p.valid)return{valid:!1};s.push(p.data)}return{valid:!0,data:s}}else return i===fe.date&&r===fe.date&&+t==+l?{valid:!0,data:t}:{valid:!1}}class us extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=(o,f)=>{if(_g(o)||_g(f))return Ee;const h=Sf(o.value,f.value);return h.valid?((Eg(o)||Eg(f))&&i.dirty(),{status:i.value,value:h.data}):(oe(r,{code:le.invalid_intersection_types}),Ee)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,f])=>s(o,f)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}us.create=(t,l,i)=>new us({left:t,right:l,typeName:Ce.ZodIntersection,...Me(i)});class ya extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.array)return oe(r,{code:le.invalid_type,expected:fe.array,received:r.parsedType}),Ee;if(r.data.length<this._def.items.length)return oe(r,{code:le.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Ee;!this._def.rest&&r.data.length>this._def.items.length&&(oe(r,{code:le.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.dirty());const o=[...r.data].map((f,h)=>{const p=this._def.items[h]||this._def.rest;return p?p._parse(new Ln(r,f,r.path,h)):null}).filter(f=>!!f);return r.common.async?Promise.all(o).then(f=>Zt.mergeArray(i,f)):Zt.mergeArray(i,o)}get items(){return this._def.items}rest(l){return new ya({...this._def,rest:l})}}ya.create=(t,l)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ya({items:t,typeName:Ce.ZodTuple,rest:null,...Me(l)})};class ss extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.object)return oe(r,{code:le.invalid_type,expected:fe.object,received:r.parsedType}),Ee;const s=[],o=this._def.keyType,f=this._def.valueType;for(const h in r.data)s.push({key:o._parse(new Ln(r,h,r.path,h)),value:f._parse(new Ln(r,r.data[h],r.path,h)),alwaysSet:h in r.data});return r.common.async?Zt.mergeObjectAsync(i,s):Zt.mergeObjectSync(i,s)}get element(){return this._def.valueType}static create(l,i,r){return i instanceof qe?new ss({keyType:l,valueType:i,typeName:Ce.ZodRecord,...Me(r)}):new ss({keyType:ul.create(),valueType:l,typeName:Ce.ZodRecord,...Me(i)})}}class Tg extends qe{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.map)return oe(r,{code:le.invalid_type,expected:fe.map,received:r.parsedType}),Ee;const s=this._def.keyType,o=this._def.valueType,f=[...r.data.entries()].map(([h,p],m)=>({key:s._parse(new Ln(r,h,r.path,[m,"key"])),value:o._parse(new Ln(r,p,r.path,[m,"value"]))}));if(r.common.async){const h=new Map;return Promise.resolve().then(async()=>{for(const p of f){const m=await p.key,x=await p.value;if(m.status==="aborted"||x.status==="aborted")return Ee;(m.status==="dirty"||x.status==="dirty")&&i.dirty(),h.set(m.value,x.value)}return{status:i.value,value:h}})}else{const h=new Map;for(const p of f){const m=p.key,x=p.value;if(m.status==="aborted"||x.status==="aborted")return Ee;(m.status==="dirty"||x.status==="dirty")&&i.dirty(),h.set(m.value,x.value)}return{status:i.value,value:h}}}}Tg.create=(t,l,i)=>new Tg({valueType:l,keyType:t,typeName:Ce.ZodMap,...Me(i)});class Er extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.parsedType!==fe.set)return oe(r,{code:le.invalid_type,expected:fe.set,received:r.parsedType}),Ee;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(oe(r,{code:le.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),i.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(oe(r,{code:le.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),i.dirty());const o=this._def.valueType;function f(p){const m=new Set;for(const x of p){if(x.status==="aborted")return Ee;x.status==="dirty"&&i.dirty(),m.add(x.value)}return{status:i.value,value:m}}const h=[...r.data.values()].map((p,m)=>o._parse(new Ln(r,p,r.path,m)));return r.common.async?Promise.all(h).then(p=>f(p)):f(h)}min(l,i){return new Er({...this._def,minSize:{value:l,message:be.toString(i)}})}max(l,i){return new Er({...this._def,maxSize:{value:l,message:be.toString(i)}})}size(l,i){return this.min(l,i).max(l,i)}nonempty(l){return this.min(1,l)}}Er.create=(t,l)=>new Er({valueType:t,minSize:null,maxSize:null,typeName:Ce.ZodSet,...Me(l)});class _f extends qe{get schema(){return this._def.getter()}_parse(l){const{ctx:i}=this._processInputParams(l);return this._def.getter()._parse({data:i.data,path:i.path,parent:i})}}_f.create=(t,l)=>new _f({getter:t,typeName:Ce.ZodLazy,...Me(l)});class os extends qe{_parse(l){if(l.data!==this._def.value){const i=this._getOrReturnCtx(l);return oe(i,{received:i.data,code:le.invalid_literal,expected:this._def.value}),Ee}return{status:"valid",value:l.data}}get value(){return this._def.value}}os.create=(t,l)=>new os({value:t,typeName:Ce.ZodLiteral,...Me(l)});function Uy(t,l){return new xa({values:t,typeName:Ce.ZodEnum,...Me(l)})}class xa extends qe{_parse(l){if(typeof l.data!="string"){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{expected:Ye.joinValues(r),received:i.parsedType,code:le.invalid_type}),Ee}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(l.data)){const i=this._getOrReturnCtx(l),r=this._def.values;return oe(i,{received:i.data,code:le.invalid_enum_value,options:r}),Ee}return Sn(l.data)}get options(){return this._def.values}get enum(){const l={};for(const i of this._def.values)l[i]=i;return l}get Values(){const l={};for(const i of this._def.values)l[i]=i;return l}get Enum(){const l={};for(const i of this._def.values)l[i]=i;return l}extract(l,i=this._def){return xa.create(l,{...this._def,...i})}exclude(l,i=this._def){return xa.create(this.options.filter(r=>!l.includes(r)),{...this._def,...i})}}xa.create=Uy;class Ef extends qe{_parse(l){const i=Ye.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(l);if(r.parsedType!==fe.string&&r.parsedType!==fe.number){const s=Ye.objectValues(i);return oe(r,{expected:Ye.joinValues(s),received:r.parsedType,code:le.invalid_type}),Ee}if(this._cache||(this._cache=new Set(Ye.getValidEnumValues(this._def.values))),!this._cache.has(l.data)){const s=Ye.objectValues(i);return oe(r,{received:r.data,code:le.invalid_enum_value,options:s}),Ee}return Sn(l.data)}get enum(){return this._def.values}}Ef.create=(t,l)=>new Ef({values:t,typeName:Ce.ZodNativeEnum,...Me(l)});class cs extends qe{unwrap(){return this._def.type}_parse(l){const{ctx:i}=this._processInputParams(l);if(i.parsedType!==fe.promise&&i.common.async===!1)return oe(i,{code:le.invalid_type,expected:fe.promise,received:i.parsedType}),Ee;const r=i.parsedType===fe.promise?i.data:Promise.resolve(i.data);return Sn(r.then(s=>this._def.type.parseAsync(s,{path:i.path,errorMap:i.common.contextualErrorMap})))}}cs.create=(t,l)=>new cs({type:t,typeName:Ce.ZodPromise,...Me(l)});class ba extends qe{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Ce.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(l){const{status:i,ctx:r}=this._processInputParams(l),s=this._def.effect||null,o={addIssue:f=>{oe(r,f),f.fatal?i.abort():i.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),s.type==="preprocess"){const f=s.transform(r.data,o);if(r.common.async)return Promise.resolve(f).then(async h=>{if(i.value==="aborted")return Ee;const p=await this._def.schema._parseAsync({data:h,path:r.path,parent:r});return p.status==="aborted"?Ee:p.status==="dirty"||i.value==="dirty"?br(p.value):p});{if(i.value==="aborted")return Ee;const h=this._def.schema._parseSync({data:f,path:r.path,parent:r});return h.status==="aborted"?Ee:h.status==="dirty"||i.value==="dirty"?br(h.value):h}}if(s.type==="refinement"){const f=h=>{const p=s.refinement(h,o);if(r.common.async)return Promise.resolve(p);if(p instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return h};if(r.common.async===!1){const h=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return h.status==="aborted"?Ee:(h.status==="dirty"&&i.dirty(),f(h.value),{status:i.value,value:h.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(h=>h.status==="aborted"?Ee:(h.status==="dirty"&&i.dirty(),f(h.value).then(()=>({status:i.value,value:h.value}))))}if(s.type==="transform")if(r.common.async===!1){const f=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!mi(f))return Ee;const h=s.transform(f.value,o);if(h instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:i.value,value:h}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(f=>mi(f)?Promise.resolve(s.transform(f.value,o)).then(h=>({status:i.value,value:h})):Ee);Ye.assertNever(s)}}ba.create=(t,l,i)=>new ba({schema:t,typeName:Ce.ZodEffects,effect:l,...Me(i)});ba.createWithPreprocess=(t,l,i)=>new ba({schema:l,effect:{type:"preprocess",transform:t},typeName:Ce.ZodEffects,...Me(i)});class sl extends qe{_parse(l){return this._getType(l)===fe.undefined?Sn(void 0):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}sl.create=(t,l)=>new sl({innerType:t,typeName:Ce.ZodOptional,...Me(l)});class va extends qe{_parse(l){return this._getType(l)===fe.null?Sn(null):this._def.innerType._parse(l)}unwrap(){return this._def.innerType}}va.create=(t,l)=>new va({innerType:t,typeName:Ce.ZodNullable,...Me(l)});class fs extends qe{_parse(l){const{ctx:i}=this._processInputParams(l);let r=i.data;return i.parsedType===fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:i.path,parent:i})}removeDefault(){return this._def.innerType}}fs.create=(t,l)=>new fs({innerType:t,typeName:Ce.ZodDefault,defaultValue:typeof l.default=="function"?l.default:()=>l.default,...Me(l)});class ds extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r={...i,common:{...i.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return as(s)?s.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new cl(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}ds.create=(t,l)=>new ds({innerType:t,typeName:Ce.ZodCatch,catchValue:typeof l.catch=="function"?l.catch:()=>l.catch,...Me(l)});class Dg extends qe{_parse(l){if(this._getType(l)!==fe.nan){const r=this._getOrReturnCtx(l);return oe(r,{code:le.invalid_type,expected:fe.nan,received:r.parsedType}),Ee}return{status:"valid",value:l.data}}}Dg.create=t=>new Dg({typeName:Ce.ZodNaN,...Me(t)});class Hy extends qe{_parse(l){const{ctx:i}=this._processInputParams(l),r=i.data;return this._def.type._parse({data:r,path:i.path,parent:i})}unwrap(){return this._def.type}}class Ff extends qe{_parse(l){const{status:i,ctx:r}=this._processInputParams(l);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?Ee:o.status==="dirty"?(i.dirty(),br(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?Ee:s.status==="dirty"?(i.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(l,i){return new Ff({in:l,out:i,typeName:Ce.ZodPipeline})}}class hs extends qe{_parse(l){const i=this._def.innerType._parse(l),r=s=>(mi(s)&&(s.value=Object.freeze(s.value)),s);return as(i)?i.then(s=>r(s)):r(i)}unwrap(){return this._def.innerType}}hs.create=(t,l)=>new hs({innerType:t,typeName:Ce.ZodReadonly,...Me(l)});var Ce;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(Ce||(Ce={}));const z=ul.create,$e=pi.create,jt=bf.create,qy=wf.create;Fl.create;const at=Rn.create,de=wt.create;rs.create;const Nv=Zf.create;us.create;ya.create;const ms=ss.create,fi=os.create,Nt=xa.create;cs.create;sl.create;va.create;const Bn=Nt(["claude_code","cursor_local"]),Yt=de({maxTurns:$e().positive().nullable().optional(),maxBudgetUsd:$e().positive().nullable().optional()}),Qf=de({plan:Yt.optional(),execute:Yt.optional(),reflect:Yt.optional()});function Tv(t){if(!(t!=null&&t.trim()))return null;try{const l=Yt.parse(JSON.parse(t));return l.maxTurns==null&&l.maxBudgetUsd==null?null:l}catch{return null}}function Dv(t){if(!(t!=null&&t.trim()))return{};try{const l=JSON.parse(t);return l&&typeof l=="object"&&!("plan"in l)&&!("execute"in l)&&!("reflect"in l)&&("maxTurns"in l||"maxBudgetUsd"in l)?{execute:Yt.parse({maxTurns:l.maxTurns??null,maxBudgetUsd:l.maxBudgetUsd??null})}:Qf.parse(l)}catch{return{}}}const zv="00000000-0000-4000-a000-000000000001",ps="auto",Ov=de({code:Nt(["cli_missing","runtime_auth","deck_offline","workspace_missing","mcp_not_registered"]),message:z()}),Mv=de({id:z().uuid(),name:z(),runtime:Bn,workspaceRoot:z().nullable(),deckId:z().uuid().nullable(),deckName:z().nullable(),playbookId:z().nullable(),defaultPlanModel:z().nullable(),defaultExecuteModel:z().nullable(),defaultPlanBudgetJson:z().nullable(),defaultExecuteBudgetJson:z().nullable(),isBuiltin:jt(),createdAt:z(),updatedAt:z()}),Vy=Mv.extend({healthy:jt(),issues:at(Ov)});de({name:z().min(1),runtime:Bn,workspaceRoot:z().min(1),deckId:z().uuid().optional(),playbookId:z().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:Yt.nullable().optional(),defaultExecuteBudget:Yt.nullable().optional()});de({name:z().min(1).optional(),runtime:Bn.optional(),workspaceRoot:z().nullable().optional(),deckId:z().uuid().nullable().optional(),playbookId:z().nullable().optional(),defaultPlanModel:z().nullable().optional(),defaultExecuteModel:z().nullable().optional(),defaultPlanBudget:Yt.nullable().optional(),defaultExecuteBudget:Yt.nullable().optional()});de({agents:at(Vy),issueCount:$e()});function Rv(t){if(!(t!=null&&t.trim()))return{detected:!1};const l=t.match(/\*\*Blocker:\*\*\s*([^\n]+)/i);if(l)return{detected:!0,summary:l[1].trim()};const i=t.match(/^Blocker:\s*([^\n]+)/im);return i?{detected:!0,summary:i[1].trim()}:[/can't complete the deliverable/i,/cannot complete the deliverable/i,/needs explicit approval/i,/permission grant i can't obtain/i,/no prompt available in this session/i,/were both blocked/i,/without that permission being pre-approved/i,/can't obtain \(no prompt available/i].some(s=>s.test(t))?{detected:!0,summary:(t.trim().split(/\n/)[0]??"Execution blocked").slice(0,220)}:{detected:!1}}function Iy(t){var i,r,s;if((i=t.blocker)!=null&&i.summary)return{detected:!0,summary:t.blocker.summary};const l=Rv(t.resultText);return l.detected?l:t.isError||t.exitCode!==0?{detected:!0,summary:((s=(r=t.resultText)==null?void 0:r.trim().split(/\n/)[0])==null?void 0:s.slice(0,220))||(t.exitCode!==0?`Process exited with code ${t.exitCode}`:"Agent reported an error")}:{detected:!1}}const Lv=de({label:z().min(1).max(60),description:z().max(200).optional()}),Yy=de({id:z().regex(/^q\d+$/),question:z().min(1).max(300),options:at(Lv).min(2).max(4)}),Zy=Nt(["trivial","needs_review"]);de({verdict:Zy,rationale:z().min(1).max(300),questions:at(Yy).max(3).default([])}).refine(t=>t.verdict!=="trivial"||t.questions.length===0,{message:"trivial verdict cannot carry questions"});de({verdict:Zy,rationale:z(),questions:at(Yy),sessionId:z().optional(),parseFallback:jt(),consumed:jt().default(!1)});const Fy=de({questionId:z(),selectedLabel:z().max(60).optional(),freeText:z().min(1).max(2e3).optional()}).refine(t=>t.selectedLabel?!t.freeText:!!t.freeText,{message:"Provide exactly one of selectedLabel or freeText"});de({answers:at(Fy).min(1),executeModel:z().nullable().optional(),executeBudget:Yt.nullable().optional()});de({answers:at(Fy),outcome:Nt(["approved","redraft","delegated"]),answeredAt:z()});const Bv=Nt(["slack_message","email","service_tool_call"]),Uv=de({target:z().min(1).max(120),body:z().min(1).max(4e3)}),Hv=de({serviceName:z().min(1).max(120),toolName:z().min(1).max(120),arguments:ms(qy())}),qv=de({actionType:Bv,summary:Uv,toolCall:Hv}),Vv=Nt(["pending","sent","rejected"]);de({draft:qv,status:Vv,sentAt:z().optional(),rejectedAt:z().optional(),bodyMismatch:jt().optional()});de({draftArtifactId:z().uuid(),sentAt:z(),toolResult:ms(qy()),permalink:z().url().optional()});const Iv=["text","body","message"];function Yv(t,l){if(t.actionType==="service_tool_call")return{...t,summary:{...t.summary,body:l}};const i={...t.toolCall.arguments},r=Iv.find(s=>typeof i[s]=="string");return r?i[r]=l:i.text=l,{...t,summary:{...t.summary,body:l},toolCall:{...t.toolCall,arguments:i}}}const Zv=Nt(["pending","answered","failed"]);de({exchangeId:z().min(1),question:z().min(1).max(2e3),answer:z().optional(),status:Zv,sessionResumed:jt(),askedAt:z(),answeredAt:z().optional(),error:z().optional()});de({question:z().trim().min(1).max(2e3)});function Fv(t){const l=new Map;for(const i of t)l.set(i.exchangeId,i);return[...l.values()].sort((i,r)=>i.askedAt.localeCompare(r.askedAt))}const Qv=de({failure_summary:z().min(1),user_feedback_excerpt:z().min(1),corrected_output_hint:z().optional()}),Gv=Nv("op",[de({op:fi("add_item"),section:z().min(1),text:z().min(1)}),de({op:fi("amend_item"),section:z().min(1),anchor:z().min(1),text:z().min(1)}),de({op:fi("remove_item"),section:z().min(1),anchor:z().min(1)}),de({op:fi("set_triggers"),triggers:at(z())}),de({op:fi("rewrite_body"),text:z()})]);de({rationale:z().min(1),ops:at(Gv).min(1),evidence:Qv.optional()});const Xv=Nt(["queued","plan_pending","plan_approved","running","review","done","failed","cancelled"]),Qy=Nt(["code","communication","email","research","content","other"]),Jv=Nt(["task_snapshot","draft_plan","approved_plan","plan_triage","plan_answers","acceptance_criteria","transcript","stream_trace","usage","agent_session","execution_result","diff","pr","email_draft","slack_draft","service_draft","document","research_brief","deliverable","feedback","playbook_patch","reflect_status","linear_sync","send_receipt","result_qa"]),ks=Nt(["plan","execute","reflect","qa"]),Gy=Nt(["retry","approve"]);de({patchId:z(),playbookId:z().optional(),playbookTitle:z().optional(),rationale:z().optional(),status:fi("proposed"),trigger:Gy,dashboardUrl:z().optional()});de({status:Nt(["pending","completed","failed","skipped"]),trigger:Gy,error:z().optional()});const Kv=de({type:Nt(["system","human","context","thinking","assistant","tool","rate_limit","result"]),text:z(),toolName:z().optional()});de({phase:ks,runtime:Bn,entries:at(Kv)});const $v=de({phase:ks,runtime:Bn,totalCostUsd:$e().optional(),inputTokens:$e().optional(),outputTokens:$e().optional(),cacheReadTokens:$e().optional(),cacheWriteTokens:$e().optional(),durationMs:$e().optional(),model:z().optional(),numTurns:$e().optional(),maxTurns:$e().optional(),maxBudgetUsd:$e().optional()}),Pv=de({label:z(),usage:$v,maxTurns:$e().optional(),maxBudgetUsd:$e().optional()});de({lines:at(Pv),total:de({totalCostUsd:$e(),inputTokens:$e(),outputTokens:$e(),durationMs:$e(),numTurns:$e()})});de({phase:ks,runtime:Bn,sessionId:z()});de({phase:ks,exitCode:$e(),resultText:z().optional(),isError:jt().optional(),blocker:de({summary:z().optional()}).optional()});de({path:z(),title:z(),markdown:z()});de({markdown:z(),sessionId:z().optional()});const Wv=Nt(["manual","linear"]);de({id:z(),title:z(),description:z().optional(),url:z().optional()});const il=de({id:z().uuid(),source:Wv,externalId:z().nullable(),externalLabel:z().nullable(),taskCategory:Qy,title:z(),description:z().nullable(),repo:z().nullable(),artifactWorkspace:z().nullable(),agentId:z().uuid().nullable(),agentName:z().nullable(),deckId:z().nullable(),deckName:z().nullable(),playbookId:z().nullable(),runtime:Bn.nullable(),planModel:z().nullable(),executeModel:z().nullable(),status:Xv,lineageId:z().uuid().nullable(),acceptanceCriteria:z().nullable(),approvalGatesJson:z().nullable(),budgetJson:z().nullable(),createdAt:z(),updatedAt:z()});de({id:z().uuid(),runId:z().uuid(),kind:Jv,contentJson:z().nullable(),blobPath:z().nullable(),author:Nt(["human","agent","system"]),createdAt:z()});de({id:z().uuid(),runId:z().uuid(),type:z(),payloadJson:z().nullable(),ts:z()});de({title:z().min(1),description:z().optional(),taskCategory:Qy.default("other"),repo:z().optional(),artifactWorkspace:z().optional(),acceptanceCriteria:z().optional(),status:Nt(["queued","plan_pending","plan_approved"]).default("plan_pending"),agentId:z().uuid(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});de({runtime:Bn,deckId:z().uuid().optional(),playbookId:z().optional(),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),budget:Qf.optional()});de({planMarkdown:z(),approve:jt().default(!1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),planBudget:Yt.nullable().optional(),executeBudget:Yt.nullable().optional()});de({runtime:Bn.optional(),deckId:z().uuid().optional(),playbookId:z().optional(),executeModel:z().nullable().optional(),executeBudget:Yt.nullable().optional()});de({feedback:z().min(1),planModel:z().nullable().optional(),executeModel:z().nullable().optional(),executeBudget:Yt.nullable().optional()});de({outboundBody:z().min(1).max(4e3).optional()});de({id:z(),identifier:z(),title:z(),description:z().optional(),url:z(),state:z().optional(),labels:at(z()).optional(),teamId:z().optional()});const e2=de({label:z().min(1),agentId:z().uuid()}),Cf=de({stateFilter:at(z()),teamId:z().nullable(),assigneeMe:jt(),defaultAgentId:z().uuid().nullable(),syncEnabled:jt(),routingRules:at(e2)});Cf.extend({persisted:Cf,envOverrides:de({stateFilter:jt(),teamId:jt()})});Cf.partial();de({connected:jt(),viewer:de({id:z(),name:z(),email:z().optional()}).optional(),error:z().optional()});de({agentId:z().uuid(),reason:z()});de({host:z(),port:$e().int().min(1).max(65535),envOverride:jt()});de({host:z().min(1).optional(),port:$e().int().min(1).max(65535).optional()});de({connected:jt(),apiUrl:z(),mcpUrl:z(),deckCount:$e().optional(),envOverride:jt(),error:z().optional()});de({agentId:z().uuid().optional(),autoAgent:jt().optional(),planModel:z().nullable().optional()}).refine(t=>t.agentId!==void 0||t.autoAgent===!0,{message:"Provide agentId or autoAgent: true"});de({planModel:z().nullable().optional(),planBudget:Yt.nullable().optional(),feedback:z().optional(),editedMarkdown:z().optional()});const t2=de({id:z(),label:z()});de({runtime:Bn,models:at(t2),source:Nt(["live","fallback"])});de({planReviewCount:$e(),resultReviewCount:$e(),maxConcurrent:$e(),planningActiveRuns:at(il),planningQueuedRuns:at(il),runningRuns:at(il),waitingExecution:at(il),resultReviewRuns:at(il),recentDone:at(il),awaitingPlanReview:at(il),awaitingAnswerRuns:at(il),openQuestionCounts:ms(z(),$e()),pendingSendCounts:ms(z(),$e()),sentRunIds:at(z()).optional(),autoApprovedRunIds:at(z()),runs:at(il),agentDeckOnline:jt(),agents:at(Vy),agentIssueCount:$e()});function n2(t){return t||ps}function Gf({runtime:t,label:l,value:i,onChange:r,defaultModelId:s,disabled:o,compact:f}){const h=yf(t),[p,m]=V.useState((h==null?void 0:h.models)??[]),[x,y]=V.useState((h==null?void 0:h.source)??"fallback"),[k,v]=V.useState(!h);V.useEffect(()=>{const H=yf(t);if(H){m(H.models),y(H.source),v(!1);return}v(!0),$1(t).then(N=>{m(N.models),y(N.source)}).catch(()=>m([])).finally(()=>v(!1))},[t]);const _=V.useMemo(()=>{var H,N;if(t==="cursor_local"){const Z=n2(s);return((H=p.find(q=>q.id===Z))==null?void 0:H.label)??"Auto (subscription pool)"}return s?((N=p.find(Z=>Z.id===s))==null?void 0:N.label)??s:"runtime default"},[t,s,p]),R=t==="cursor_local"?k?"Loading models…":`Agent default (${_})`:k?"Loading models…":`Default (${_})`;return g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:l}),g.jsxs("select",{className:"field text-sm",disabled:o||k,value:i,onChange:H=>r(H.target.value),children:[g.jsx("option",{value:"",children:R}),p.map(H=>g.jsx("option",{value:H.id,children:H.label},H.id))]}),t==="cursor_local"&&!k&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Auto and Composer use your Cursor subscription pool. Other models draw API credits."}),x==="fallback"&&p.length>0&&!k&&t==="cursor_local"&&!f&&g.jsx("p",{className:"text-xs text-white/40",children:"Run cursor-agent login to load the full model list."})]})}function ma({phase:t,runtime:l,model:i,onModelChange:r,budget:s,onBudgetChange:o,defaultModelId:f,disabled:h,showHint:p=!0}){const m=x=>o({...s,...x});return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"text-xs uppercase tracking-wide text-[#92E4DD]",children:t}),g.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-2",children:[g.jsx(Gf,{runtime:l,label:"Model",value:i,onChange:r,defaultModelId:f,disabled:h,compact:!0}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Turns"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:1,step:1,placeholder:"—",disabled:h,value:s.maxTurns,onChange:x=>m({maxTurns:x.target.value})})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Max USD"}),g.jsx("input",{className:"field text-sm w-full",type:"number",min:.01,step:.01,placeholder:"—",disabled:h,value:s.maxBudgetUsd,onChange:x=>m({maxBudgetUsd:x.target.value})})]})]}),p&&g.jsx("p",{className:"text-xs text-white/40",children:"Leave blank for no cap on that field."})]})}function zg({value:t,onChange:l,agentDeckOnline:i,disabled:r}){const[s,o]=V.useState([]),[f,h]=V.useState([]);V.useEffect(()=>{W1().then(o).catch(()=>o([]))},[]),V.useEffect(()=>{if(!t.deckId){h([]);return}ev(t.deckId).then(h).catch(()=>h([]))},[t.deckId]);const p=m=>l({...t,...m});return g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"text-base uppercase tracking-wide text-[#92E4DD]",children:"Agent"}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Runtime (required)"}),g.jsxs("select",{className:"field",disabled:r,value:t.runtime,onChange:m=>{const x=m.target.value;p({runtime:x,...x==="cursor_local"?{defaultPlanModel:ps,defaultExecuteModel:ps}:{defaultPlanModel:"",defaultExecuteModel:""}})},children:[g.jsx("option",{value:"claude_code",children:"Claude Code (claude -p)"}),g.jsx("option",{value:"cursor_local",children:"Cursor local (cursor-agent -p)"})]}),g.jsx(ma,{phase:"Plan",runtime:t.runtime,model:t.defaultPlanModel,onModelChange:m=>p({defaultPlanModel:m}),budget:t.defaultPlanBudget,onBudgetChange:m=>p({defaultPlanBudget:m}),disabled:r,showHint:!1}),g.jsx(ma,{phase:"Execution",runtime:t.runtime,model:t.defaultExecuteModel,onModelChange:m=>p({defaultExecuteModel:m}),budget:t.defaultExecuteBudget,onBudgetChange:m=>p({defaultExecuteBudget:m}),disabled:r}),g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Agent Deck (optional)"}),g.jsxs("select",{className:"field",disabled:r||!i,value:t.deckId,onChange:m=>p({deckId:m.target.value,playbookId:""}),children:[g.jsx("option",{value:"",children:i?"No deck — degraded mode":"Agent Deck offline"}),s.map(m=>g.jsxs("option",{value:m.id,children:["◆ ",m.name]},m.id))]}),t.deckId&&f.length>0&&g.jsxs(g.Fragment,{children:[g.jsx("label",{className:"text-xs text-[#A8C4C0] uppercase",children:"Playbook (optional)"}),g.jsxs("select",{className:"field",disabled:r,value:t.playbookId,onChange:m=>p({playbookId:m.target.value}),children:[g.jsx("option",{value:"",children:"No playbook — agent uses task + plan only"}),f.map(m=>g.jsx("option",{value:m.id,children:m.title},m.id))]})]}),!t.deckId&&t.runtime&&g.jsx("p",{className:"text-xs text-white/45",children:"Degraded mode: no deck MCP. Audit trail still captured."})]})}function ws(t){if(t.agentName){const i=[t.agentName];return(t.deckName||t.deckId)&&i.push(`◆ ${t.deckName??t.deckId}`),t.planModel&&i.push(`plan:${t.planModel}`),t.executeModel&&i.push(`exec:${t.executeModel}`),i.join(" · ")}const l=[t.runtime??"no runtime"];return(t.deckName||t.deckId)&&l.push(`◆ ${t.deckName??t.deckId}`),t.playbookId&&l.push(`pb:${t.playbookId.slice(0,8)}…`),t.planModel&&l.push(`plan:${t.planModel}`),t.executeModel&&l.push(`exec:${t.executeModel}`),l.join(" · ")}function Ss({trace:t,label:l,showHeading:i=!0}){var r;return(r=t==null?void 0:t.entries)!=null&&r.length?g.jsxs("section",{className:"space-y-2",children:[i&&g.jsx("div",{className:"heading-section",children:l??"Reasoning trace"}),g.jsx("div",{className:"space-y-1 max-h-72 overflow-y-auto border border-white/10 rounded p-2 bg-black/20",children:t.entries.map((s,o)=>g.jsxs("div",{className:"text-sm font-mono",children:[g.jsx("span",{className:s.type==="human"?"text-[#C4B643]":s.type==="context"?"text-white/50":"text-[#92E4DD]",children:s.type}),s.toolName&&g.jsxs("span",{className:"text-white/40",children:[" · ",s.toolName]}),g.jsx("div",{className:"text-white/70 whitespace-pre-wrap mt-0.5",children:s.text})]},o))})]}):null}function Xy(t,l){return l!=null&&t>=l}function l2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`${t} / ${l} turn${l===1?"":"s"}`:`${t} turn${t===1?"":"s"}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function a2({used:t,max:l}){const i=Xy(t,l),r=l!=null?`$${t.toFixed(4)} / $${l.toFixed(2)}`:`$${t.toFixed(4)}`;return g.jsx("span",{className:i?"text-red-400 font-bold":void 0,children:r})}function i2({line:t}){const{usage:l,maxTurns:i,maxBudgetUsd:r}=t,s=[];return l.model&&s.push(`model ${l.model}`),l.numTurns!=null&&s.push(g.jsx(l2,{used:l.numTurns,max:i},"turns")),l.totalCostUsd!=null&&s.push(g.jsx(a2,{used:l.totalCostUsd,max:r},"usd")),l.inputTokens!=null&&s.push(`${l.inputTokens} in`),l.outputTokens!=null&&s.push(`${l.outputTokens} out`),l.durationMs!=null&&s.push(Oy(l.durationMs)),g.jsx(g.Fragment,{children:s.map((o,f)=>g.jsxs("span",{children:[f>0&&" · ",o]},f))})}function _s({summary:t}){if(!(t!=null&&t.lines.length))return null;const l=t.lines.length>1;return g.jsxs("section",{className:"space-y-1.5",children:[g.jsx("div",{className:"heading-section",children:"Usage"}),t.lines.map((i,r)=>g.jsxs("p",{className:"text-sm text-white/50 font-mono",children:[g.jsxs("span",{className:"text-white/65",children:[i.label,":"]})," ",g.jsx(i2,{line:i})]},r)),l&&g.jsxs("p",{className:"text-sm text-[#92E4DD]/85 font-mono pt-1 border-t border-white/10",children:[g.jsx("span",{className:"text-white/65",children:"total:"})," ",[t.total.numTurns>0&&`${t.total.numTurns} turn${t.total.numTurns===1?"":"s"}`,t.total.totalCostUsd>0&&`$${t.total.totalCostUsd.toFixed(4)}`,t.total.inputTokens>0&&`${t.total.inputTokens} in`,t.total.outputTokens>0&&`${t.total.outputTokens} out`,t.total.durationMs>0&&Oy(t.total.durationMs)].filter(Boolean).join(" · ")]})]})}function r2(t,l){const i={};return(t[t.length-1]===""?[...t,""]:t).join((i.padRight?" ":"")+","+(i.padLeft===!1?"":" ")).trim()}const u2=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,s2=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,o2={};function Og(t,l){return(o2.jsx?s2:u2).test(t)}const c2=/[ \t\n\f\r]/g;function f2(t){return typeof t=="object"?t.type==="text"?Mg(t.value):!1:Mg(t)}function Mg(t){return t.replace(c2,"")===""}class Nr{constructor(l,i,r){this.normal=i,this.property=l,r&&(this.space=r)}}Nr.prototype.normal={};Nr.prototype.property={};Nr.prototype.space=void 0;function Jy(t,l){const i={},r={};for(const s of t)Object.assign(i,s.property),Object.assign(r,s.normal);return new Nr(i,r,l)}function Af(t){return t.toLowerCase()}class en{constructor(l,i){this.attribute=i,this.property=l}}en.prototype.attribute="";en.prototype.booleanish=!1;en.prototype.boolean=!1;en.prototype.commaOrSpaceSeparated=!1;en.prototype.commaSeparated=!1;en.prototype.defined=!1;en.prototype.mustUseProperty=!1;en.prototype.number=!1;en.prototype.overloadedBoolean=!1;en.prototype.property="";en.prototype.spaceSeparated=!1;en.prototype.space=void 0;let d2=0;const Ne=Sa(),kt=Sa(),jf=Sa(),ne=Sa(),lt=Sa(),pa=Sa(),cn=Sa();function Sa(){return 2**++d2}const Nf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:kt,commaOrSpaceSeparated:cn,commaSeparated:pa,number:ne,overloadedBoolean:jf,spaceSeparated:lt},Symbol.toStringTag,{value:"Module"})),Pc=Object.keys(Nf);class Xf extends en{constructor(l,i,r,s){let o=-1;if(super(l,i),Rg(this,"space",s),typeof r=="number")for(;++o<Pc.length;){const f=Pc[o];Rg(this,Pc[o],(r&Nf[f])===Nf[f])}}}Xf.prototype.defined=!0;function Rg(t,l,i){i&&(t[l]=i)}function xi(t){const l={},i={};for(const[r,s]of Object.entries(t.properties)){const o=new Xf(r,t.transform(t.attributes||{},r),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),l[r]=o,i[Af(r)]=r,i[Af(o.attribute)]=r}return new Nr(l,i,t.space)}const Ky=xi({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:ne,ariaColIndex:ne,ariaColSpan:ne,ariaControls:lt,ariaCurrent:null,ariaDescribedBy:lt,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:lt,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:lt,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:lt,ariaLevel:ne,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:lt,ariaPlaceholder:null,ariaPosInSet:ne,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:lt,ariaRowCount:ne,ariaRowIndex:ne,ariaRowSpan:ne,ariaSelected:kt,ariaSetSize:ne,ariaSort:null,ariaValueMax:ne,ariaValueMin:ne,ariaValueNow:ne,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function $y(t,l){return l in t?t[l]:l}function Py(t,l){return $y(t,l.toLowerCase())}const h2=xi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pa,acceptCharset:lt,accessKey:lt,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alpha:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:lt,autoFocus:Ne,autoPlay:Ne,blocking:lt,capture:null,charSet:null,checked:Ne,cite:null,className:lt,closedBy:null,colorSpace:null,cols:ne,colSpan:ne,command:null,commandFor:null,content:null,contentEditable:kt,controls:Ne,controlsList:lt,coords:ne|pa,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:jf,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:lt,height:ne,hidden:jf,high:ne,href:null,hrefLang:null,htmlFor:lt,httpEquiv:lt,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:lt,itemRef:lt,itemScope:Ne,itemType:lt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:ne,manifest:null,max:null,maxLength:ne,media:null,method:null,min:null,minLength:ne,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:ne,pattern:null,ping:lt,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:lt,required:Ne,reversed:Ne,rows:ne,rowSpan:ne,sandbox:lt,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootCustomElementRegistry:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shadowRootSerializable:Ne,shape:null,size:ne,sizes:null,slot:null,span:ne,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ne,step:null,style:null,tabIndex:ne,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:kt,width:ne,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:lt,axis:null,background:null,bgColor:null,border:ne,borderColor:null,bottomMargin:ne,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:ne,leftMargin:ne,link:null,longDesc:null,lowSrc:null,marginHeight:ne,marginWidth:ne,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:ne,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:ne,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ne,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ne,disablePictureInPicture:Ne,disableRemotePlayback:Ne,exportParts:pa,part:lt,prefix:null,property:null,results:ne,security:null,unselectable:null},space:"html",transform:Py}),m2=xi({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:cn,accentHeight:ne,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ne,amplitude:ne,arabicForm:null,ascent:ne,attributeName:null,attributeType:null,azimuth:ne,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ne,by:null,calcMode:null,capHeight:ne,className:lt,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:ne,diffuseConstant:ne,direction:null,display:null,dur:null,divisor:ne,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:ne,enableBackground:null,end:null,event:null,exponent:ne,externalResourcesRequired:null,fill:null,fillOpacity:ne,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:pa,g2:pa,glyphName:pa,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ne,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ne,horizOriginX:ne,horizOriginY:ne,id:null,ideographic:ne,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ne,k:ne,k1:ne,k2:ne,k3:ne,k4:ne,kernelMatrix:cn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ne,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ne,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:ne,overlineThickness:ne,paintOrder:null,panose1:null,path:null,pathLength:ne,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:lt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ne,pointsAtY:ne,pointsAtZ:ne,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:cn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:cn,rev:cn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:cn,requiredFeatures:cn,requiredFonts:cn,requiredFormats:cn,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:ne,specularExponent:ne,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ne,strikethroughThickness:ne,string:null,stroke:null,strokeDashArray:cn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ne,strokeOpacity:ne,strokeWidth:null,style:null,surfaceScale:ne,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:cn,tabIndex:ne,tableValues:null,target:null,targetX:ne,targetY:ne,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:cn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ne,underlineThickness:ne,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ne,values:null,vAlphabetic:ne,vMathematical:ne,vectorEffect:null,vHanging:ne,vIdeographic:ne,version:null,vertAdvY:ne,vertOriginX:ne,vertOriginY:ne,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ne,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:$y}),Wy=xi({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),ex=xi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Py}),tx=xi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),p2={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"},g2=/[A-Z]/g,Lg=/-[a-z]/g,y2=/^data[-\w.:]+$/i;function x2(t,l){const i=Af(l);let r=l,s=en;if(i in t.normal)return t.property[t.normal[i]];if(i.length>4&&i.slice(0,4)==="data"&&y2.test(l)){if(l.charAt(4)==="-"){const o=l.slice(5).replace(Lg,v2);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=l.slice(4);if(!Lg.test(o)){let f=o.replace(g2,b2);f.charAt(0)!=="-"&&(f="-"+f),l="data"+f}}s=Xf}return new s(r,l)}function b2(t){return"-"+t.toLowerCase()}function v2(t){return t.charAt(1).toUpperCase()}const k2=Jy([Ky,h2,Wy,ex,tx],"html"),Jf=Jy([Ky,m2,Wy,ex,tx],"svg");function w2(t){return t.join(" ").trim()}var oi={},Wc,Bg;function S2(){if(Bg)return Wc;Bg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,i=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,h=/^\s+|\s+$/g,p=`
50
+ `,m="/",x="*",y="",k="comment",v="declaration";function _(H,N){if(typeof H!="string")throw new TypeError("First argument must be a string");if(!H)return[];N=N||{};var Z=1,q=1;function te(re){var W=re.match(l);W&&(Z+=W.length);var T=re.lastIndexOf(p);q=~T?re.length-T:q+re.length}function ee(){var re={line:Z,column:q};return function(W){return W.position=new O(re),me(),W}}function O(re){this.start=re,this.end={line:Z,column:q},this.source=N.source}O.prototype.content=H;function P(re){var W=new Error(N.source+":"+Z+":"+q+": "+re);if(W.reason=re,W.filename=N.source,W.line=Z,W.column=q,W.source=H,!N.silent)throw W}function se(re){var W=re.exec(H);if(W){var T=W[0];return te(T),H=H.slice(T.length),W}}function me(){se(i)}function M(re){var W;for(re=re||[];W=Y();)W!==!1&&re.push(W);return re}function Y(){var re=ee();if(!(m!=H.charAt(0)||x!=H.charAt(1))){for(var W=2;y!=H.charAt(W)&&(x!=H.charAt(W)||m!=H.charAt(W+1));)++W;if(W+=2,y===H.charAt(W-1))return P("End of comment missing");var T=H.slice(2,W-2);return q+=2,te(T),H=H.slice(W),q+=2,re({type:k,comment:T})}}function $(){var re=ee(),W=se(r);if(W){if(Y(),!se(s))return P("property missing ':'");var T=se(o),J=re({type:v,property:R(W[0].replace(t,y)),value:T?R(T[0].replace(t,y)):y});return se(f),J}}function xe(){var re=[];M(re);for(var W;W=$();)W!==!1&&(re.push(W),M(re));return re}return me(),xe()}function R(H){return H?H.replace(h,y):y}return Wc=_,Wc}var Ug;function _2(){if(Ug)return oi;Ug=1;var t=oi&&oi.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(oi,"__esModule",{value:!0}),oi.default=i;const l=t(S2());function i(r,s){let o=null;if(!r||typeof r!="string")return o;const f=(0,l.default)(r),h=typeof s=="function";return f.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:x}=p;h?s(m,x,p):x&&(o=o||{},o[m]=x)}),o}return oi}var pr={},Hg;function E2(){if(Hg)return pr;Hg=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,i=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||i.test(m)||t.test(m)},f=function(m,x){return x.toUpperCase()},h=function(m,x){return"".concat(x,"-")},p=function(m,x){return x===void 0&&(x={}),o(m)?m:(m=m.toLowerCase(),x.reactCompat?m=m.replace(s,h):m=m.replace(r,h),m.replace(l,f))};return pr.camelCase=p,pr}var gr,qg;function C2(){if(qg)return gr;qg=1;var t=gr&&gr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},l=t(_2()),i=E2();function r(s,o){var f={};return!s||typeof s!="string"||(0,l.default)(s,function(h,p){h&&p&&(f[(0,i.camelCase)(h,o)]=p)}),f}return r.default=r,gr=r,gr}var A2=C2();const j2=jy(A2),nx=lx("end"),Kf=lx("start");function lx(t){return l;function l(i){const r=i&&i.position&&i.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function N2(t){const l=Kf(t),i=nx(t);if(l&&i)return{start:l,end:i}}function kr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Vg(t.position):"start"in t||"end"in t?Vg(t):"line"in t||"column"in t?Tf(t):""}function Tf(t){return Ig(t&&t.line)+":"+Ig(t&&t.column)}function Vg(t){return Tf(t&&t.start)+"-"+Tf(t&&t.end)}function Ig(t){return t&&typeof t=="number"?t:1}class Ut extends Error{constructor(l,i,r){super(),typeof i=="string"&&(r=i,i=void 0);let s="",o={},f=!1;if(i&&("line"in i&&"column"in i?o={place:i}:"start"in i&&"end"in i?o={place:i}:"type"in i?o={ancestors:[i],place:i.position}:o={...i}),typeof l=="string"?s=l:!o.cause&&l&&(f=!0,s=l.message,o.cause=l),!o.ruleId&&!o.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?o.ruleId=r:(o.source=r.slice(0,p),o.ruleId=r.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.position)}const h=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=h?h.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=h?h.line:void 0,this.name=kr(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=f&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ut.prototype.file="";Ut.prototype.name="";Ut.prototype.reason="";Ut.prototype.message="";Ut.prototype.stack="";Ut.prototype.column=void 0;Ut.prototype.line=void 0;Ut.prototype.ancestors=void 0;Ut.prototype.cause=void 0;Ut.prototype.fatal=void 0;Ut.prototype.place=void 0;Ut.prototype.ruleId=void 0;Ut.prototype.source=void 0;const $f={}.hasOwnProperty,T2=new Map,D2=/[A-Z]/g,z2=new Set(["table","tbody","thead","tfoot","tr"]),O2=new Set(["td","th"]),ax="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function M2(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const i=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=I2(i,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=V2(i,l.jsx,l.jsxs)}const s={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:i,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Jf:k2,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},o=ix(s,t,void 0);return o&&typeof o!="string"?o:s.create(t,s.Fragment,{children:o||void 0},void 0)}function ix(t,l,i){if(l.type==="element")return R2(t,l,i);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return L2(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return U2(t,l,i);if(l.type==="mdxjsEsm")return B2(t,l);if(l.type==="root")return H2(t,l,i);if(l.type==="text")return q2(t,l)}function R2(t,l,i){const r=t.schema;let s=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=ux(t,l.tagName,!1),f=Y2(t,l);let h=Wf(t,l);return z2.has(l.tagName)&&(h=h.filter(function(p){return typeof p=="string"?!f2(p):!0})),rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function L2(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Cr(t,l.position)}function B2(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Cr(t,l.position)}function U2(t,l,i){const r=t.schema;let s=r;l.name==="svg"&&r.space==="html"&&(s=Jf,t.schema=s),t.ancestors.push(l);const o=l.name===null?t.Fragment:ux(t,l.name,!0),f=Z2(t,l),h=Wf(t,l);return rx(t,f,o,l),Pf(f,h),t.ancestors.pop(),t.schema=r,t.create(l,o,f,i)}function H2(t,l,i){const r={};return Pf(r,Wf(t,l)),t.create(l,t.Fragment,r,i)}function q2(t,l){return l.value}function rx(t,l,i,r){typeof i!="string"&&i!==t.Fragment&&t.passNode&&(l.node=r)}function Pf(t,l){if(l.length>0){const i=l.length>1?l:l[0];i&&(t.children=i)}}function V2(t,l,i){return r;function r(s,o,f,h){const m=Array.isArray(f.children)?i:l;return h?m(o,f,h):m(o,f)}}function I2(t,l){return i;function i(r,s,o,f){const h=Array.isArray(o.children),p=Kf(r);return l(s,o,f,h,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function Y2(t,l){const i={};let r,s;for(s in l.properties)if(s!=="children"&&$f.call(l.properties,s)){const o=F2(t,s,l.properties[s]);if(o){const[f,h]=o;t.tableCellAlignToStyle&&f==="align"&&typeof h=="string"&&O2.has(l.tagName)?r=h:i[f]=h}}if(r){const o=i.style||(i.style={});o[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return i}function Z2(t,l){const i={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const o=r.data.estree.body[0];o.type;const f=o.expression;f.type;const h=f.properties[0];h.type,Object.assign(i,t.evaluater.evaluateExpression(h.argument))}else Cr(t,l.position);else{const s=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const h=r.value.data.estree.body[0];h.type,o=t.evaluater.evaluateExpression(h.expression)}else Cr(t,l.position);else o=r.value===null?!0:r.value;i[s]=o}return i}function Wf(t,l){const i=[];let r=-1;const s=t.passKeys?new Map:T2;for(;++r<l.children.length;){const o=l.children[r];let f;if(t.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const m=s.get(p)||0;f=p+"-"+m,s.set(p,m+1)}}const h=ix(t,o,f);h!==void 0&&i.push(h)}return i}function F2(t,l,i){const r=x2(t.schema,l);if(!(i==null||typeof i=="number"&&Number.isNaN(i))){if(Array.isArray(i)&&(i=r.commaSeparated?r2(i):w2(i)),r.property==="style"){let s=typeof i=="object"?i:Q2(t,String(i));return t.stylePropertyNameCase==="css"&&(s=G2(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&r.space?p2[r.property]||r.property:r.attribute,i]}}function Q2(t,l){try{return j2(l,{reactCompat:!0})}catch(i){if(t.ignoreInvalidStyle)return{};const r=i,s=new Ut("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=ax+"#cannot-parse-style-attribute",s}}function ux(t,l,i){let r;if(!i)r={type:"Literal",value:l};else if(l.includes(".")){const s=l.split(".");let o=-1,f;for(;++o<s.length;){const h=Og(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};f=f?{type:"MemberExpression",object:f,property:h,computed:!!(o&&h.type==="Literal"),optional:!1}:h}r=f}else r=Og(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const s=r.value;return $f.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(r);Cr(t)}function Cr(t,l){const i=new Ut("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=ax+"#cannot-handle-mdx-estrees-without-createevaluater",i}function G2(t){const l={};let i;for(i in t)$f.call(t,i)&&(l[X2(i)]=t[i]);return l}function X2(t){let l=t.replace(D2,J2);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function J2(t){return"-"+t.toLowerCase()}const ef={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"]},K2={};function ed(t,l){const i=K2,r=typeof i.includeImageAlt=="boolean"?i.includeImageAlt:!0,s=typeof i.includeHtml=="boolean"?i.includeHtml:!0;return sx(t,r,s)}function sx(t,l,i){if($2(t)){if("value"in t)return t.type==="html"&&!i?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Yg(t.children,l,i)}return Array.isArray(t)?Yg(t,l,i):""}function Yg(t,l,i){const r=[];let s=-1;for(;++s<t.length;)r[s]=sx(t[s],l,i);return r.join("")}function $2(t){return!!(t&&typeof t=="object")}const Zg=document.createElement("i");function td(t){const l="&"+t+";";Zg.innerHTML=l;const i=Zg.textContent;return i.charCodeAt(i.length-1)===59&&t!=="semi"||i===l?!1:i}function fn(t,l,i,r){const s=t.length;let o=0,f;if(l<0?l=-l>s?0:s+l:l=l>s?s:l,i=i>0?i:0,r.length<1e4)f=Array.from(r),f.unshift(l,i),t.splice(...f);else for(i&&t.splice(l,i);o<r.length;)f=r.slice(o,o+1e4),f.unshift(l,0),t.splice(...f),o+=1e4,l+=1e4}function wn(t,l){return t.length>0?(fn(t,t.length,0,l),t):l}const Fg={}.hasOwnProperty;function ox(t){const l={};let i=-1;for(;++i<t.length;)P2(l,t[i]);return l}function P2(t,l){let i;for(i in l){const s=(Fg.call(t,i)?t[i]:void 0)||(t[i]={}),o=l[i];let f;if(o)for(f in o){Fg.call(s,f)||(s[f]=[]);const h=o[f];W2(s[f],Array.isArray(h)?h:h?[h]:[])}}}function W2(t,l){let i=-1;const r=[];for(;++i<l.length;)(l[i].add==="after"?t:r).push(l[i]);fn(t,0,0,r)}function cx(t,l){const i=Number.parseInt(t,l);return i<9||i===11||i>13&&i<32||i>126&&i<160||i>55295&&i<57344||i>64975&&i<65008||(i&65535)===65535||(i&65535)===65534||i>1114111?"�":String.fromCodePoint(i)}function jn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const It=Ql(/[A-Za-z]/),Bt=Ql(/[\dA-Za-z]/),ek=Ql(/[#-'*+\--9=?A-Z^-~]/);function gs(t){return t!==null&&(t<32||t===127)}const Df=Ql(/\d/),tk=Ql(/[\dA-Fa-f]/),nk=Ql(/[!-/:-@[-`{-~]/);function we(t){return t!==null&&t<-2}function it(t){return t!==null&&(t<0||t===32)}function Be(t){return t===-2||t===-1||t===32}const Es=Ql(new RegExp("\\p{P}|\\p{S}","u")),ka=Ql(/\s/);function Ql(t){return l;function l(i){return i!==null&&i>-1&&t.test(String.fromCharCode(i))}}function bi(t){const l=[];let i=-1,r=0,s=0;for(;++i<t.length;){const o=t.charCodeAt(i);let f="";if(o===37&&Bt(t.charCodeAt(i+1))&&Bt(t.charCodeAt(i+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(f=String.fromCharCode(o));else if(o>55295&&o<57344){const h=t.charCodeAt(i+1);o<56320&&h>56319&&h<57344?(f=String.fromCharCode(o,h),s=1):f="�"}else f=String.fromCharCode(o);f&&(l.push(t.slice(r,i),encodeURIComponent(f)),r=i+s+1,f=""),s&&(i+=s,s=0)}return l.join("")+t.slice(r)}function Ie(t,l,i,r){const s=r?r-1:Number.POSITIVE_INFINITY;let o=0;return f;function f(p){return Be(p)?(t.enter(i),h(p)):l(p)}function h(p){return Be(p)&&o++<s?(t.consume(p),h):(t.exit(i),l(p))}}const lk={tokenize:ak};function ak(t){const l=t.attempt(this.parser.constructs.contentInitial,r,s);let i;return l;function r(h){if(h===null){t.consume(h);return}return t.enter("lineEnding"),t.consume(h),t.exit("lineEnding"),Ie(t,l,"linePrefix")}function s(h){return t.enter("paragraph"),o(h)}function o(h){const p=t.enter("chunkText",{contentType:"text",previous:i});return i&&(i.next=p),i=p,f(h)}function f(h){if(h===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(h);return}return we(h)?(t.consume(h),t.exit("chunkText"),o):(t.consume(h),f)}}const ik={tokenize:rk},Qg={tokenize:uk};function rk(t){const l=this,i=[];let r=0,s,o,f;return h;function h(q){if(r<i.length){const te=i[r];return l.containerState=te[1],t.attempt(te[0].continuation,p,m)(q)}return m(q)}function p(q){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,s&&Z();const te=l.events.length;let ee=te,O;for(;ee--;)if(l.events[ee][0]==="exit"&&l.events[ee][1].type==="chunkFlow"){O=l.events[ee][1].end;break}N(r);let P=te;for(;P<l.events.length;)l.events[P][1].end={...O},P++;return fn(l.events,ee+1,0,l.events.slice(te)),l.events.length=P,m(q)}return h(q)}function m(q){if(r===i.length){if(!s)return k(q);if(s.currentConstruct&&s.currentConstruct.concrete)return _(q);l.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Qg,x,y)(q)}function x(q){return s&&Z(),N(r),k(q)}function y(q){return l.parser.lazy[l.now().line]=r!==i.length,f=l.now().offset,_(q)}function k(q){return l.containerState={},t.attempt(Qg,v,_)(q)}function v(q){return r++,i.push([l.currentConstruct,l.containerState]),k(q)}function _(q){if(q===null){s&&Z(),N(0),t.consume(q);return}return s=s||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),R(q)}function R(q){if(q===null){H(t.exit("chunkFlow"),!0),N(0),t.consume(q);return}return we(q)?(t.consume(q),H(t.exit("chunkFlow")),r=0,l.interrupt=void 0,h):(t.consume(q),R)}function H(q,te){const ee=l.sliceStream(q);if(te&&ee.push(null),q.previous=o,o&&(o.next=q),o=q,s.defineSkip(q.start),s.write(ee),l.parser.lazy[q.start.line]){let O=s.events.length;for(;O--;)if(s.events[O][1].start.offset<f&&(!s.events[O][1].end||s.events[O][1].end.offset>f))return;const P=l.events.length;let se=P,me,M;for(;se--;)if(l.events[se][0]==="exit"&&l.events[se][1].type==="chunkFlow"){if(me){M=l.events[se][1].end;break}me=!0}for(N(r),O=P;O<l.events.length;)l.events[O][1].end={...M},O++;fn(l.events,se+1,0,l.events.slice(P)),l.events.length=O}}function N(q){let te=i.length;for(;te-- >q;){const ee=i[te];l.containerState=ee[1],ee[0].exit.call(l,t)}i.length=q}function Z(){s.write([null]),o=void 0,s=void 0,l.containerState._closeFlow=void 0}}function uk(t,l,i){return Ie(t,t.attempt(this.parser.constructs.document,l,i),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gi(t){if(t===null||it(t)||ka(t))return 1;if(Es(t))return 2}function Cs(t,l,i){const r=[];let s=-1;for(;++s<t.length;){const o=t[s].resolveAll;o&&!r.includes(o)&&(l=o(l,i),r.push(o))}return l}const zf={name:"attention",resolveAll:sk,tokenize:ok};function sk(t,l){let i=-1,r,s,o,f,h,p,m,x;for(;++i<t.length;)if(t[i][0]==="enter"&&t[i][1].type==="attentionSequence"&&t[i][1]._close){for(r=i;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[i][1]).charCodeAt(0)){if((t[r][1]._close||t[i][1]._open)&&(t[i][1].end.offset-t[i][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[i][1].end.offset-t[i][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[i][1].end.offset-t[i][1].start.offset>1?2:1;const y={...t[r][1].end},k={...t[i][1].start};Gg(y,-p),Gg(k,p),f={type:p>1?"strongSequence":"emphasisSequence",start:y,end:{...t[r][1].end}},h={type:p>1?"strongSequence":"emphasisSequence",start:{...t[i][1].start},end:k},o={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[i][1].start}},s={type:p>1?"strong":"emphasis",start:{...f.start},end:{...h.end}},t[r][1].end={...f.start},t[i][1].start={...h.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=wn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=wn(m,[["enter",s,l],["enter",f,l],["exit",f,l],["enter",o,l]]),m=wn(m,Cs(l.parser.constructs.insideSpan.null,t.slice(r+1,i),l)),m=wn(m,[["exit",o,l],["enter",h,l],["exit",h,l],["exit",s,l]]),t[i][1].end.offset-t[i][1].start.offset?(x=2,m=wn(m,[["enter",t[i][1],l],["exit",t[i][1],l]])):x=0,fn(t,r-1,i-r+3,m),i=r+m.length-x-2;break}}for(i=-1;++i<t.length;)t[i][1].type==="attentionSequence"&&(t[i][1].type="data");return t}function ok(t,l){const i=this.parser.constructs.attentionMarkers.null,r=this.previous,s=gi(r);let o;return f;function f(p){return o=p,t.enter("attentionSequence"),h(p)}function h(p){if(p===o)return t.consume(p),h;const m=t.exit("attentionSequence"),x=gi(p),y=!x||x===2&&s||i.includes(p),k=!s||s===2&&x||i.includes(r);return m._open=!!(o===42?y:y&&(s||!k)),m._close=!!(o===42?k:k&&(x||!y)),l(p)}}function Gg(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const ck={name:"autolink",tokenize:fk};function fk(t,l,i){let r=0;return s;function s(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),o}function o(v){return It(v)?(t.consume(v),f):v===64?i(v):m(v)}function f(v){return v===43||v===45||v===46||Bt(v)?(r=1,h(v)):m(v)}function h(v){return v===58?(t.consume(v),r=0,p):(v===43||v===45||v===46||Bt(v))&&r++<32?(t.consume(v),h):(r=0,m(v))}function p(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):v===null||v===32||v===60||gs(v)?i(v):(t.consume(v),p)}function m(v){return v===64?(t.consume(v),x):ek(v)?(t.consume(v),m):i(v)}function x(v){return Bt(v)?y(v):i(v)}function y(v){return v===46?(t.consume(v),r=0,x):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),l):k(v)}function k(v){if((v===45||Bt(v))&&r++<63){const _=v===45?k:y;return t.consume(v),_}return i(v)}}const Tr={partial:!0,tokenize:dk};function dk(t,l,i){return r;function r(o){return Be(o)?Ie(t,s,"linePrefix")(o):s(o)}function s(o){return o===null||we(o)?l(o):i(o)}}const fx={continuation:{tokenize:mk},exit:pk,name:"blockQuote",tokenize:hk};function hk(t,l,i){const r=this;return s;function s(f){if(f===62){const h=r.containerState;return h.open||(t.enter("blockQuote",{_container:!0}),h.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),o}return i(f)}function o(f){return Be(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(f))}}function mk(t,l,i){const r=this;return s;function s(f){return Be(f)?Ie(t,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):o(f)}function o(f){return t.attempt(fx,l,i)(f)}}function pk(t){t.exit("blockQuote")}const dx={name:"characterEscape",tokenize:gk};function gk(t,l,i){return r;function r(o){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(o),t.exit("escapeMarker"),s}function s(o){return nk(o)?(t.enter("characterEscapeValue"),t.consume(o),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):i(o)}}const hx={name:"characterReference",tokenize:yk};function yk(t,l,i){const r=this;let s=0,o,f;return h;function h(y){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),p}function p(y){return y===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(y),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),o=31,f=Bt,x(y))}function m(y){return y===88||y===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(y),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),o=6,f=tk,x):(t.enter("characterReferenceValue"),o=7,f=Df,x(y))}function x(y){if(y===59&&s){const k=t.exit("characterReferenceValue");return f===Bt&&!td(r.sliceSerialize(k))?i(y):(t.enter("characterReferenceMarker"),t.consume(y),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return f(y)&&s++<o?(t.consume(y),x):i(y)}}const Xg={partial:!0,tokenize:bk},Jg={concrete:!0,name:"codeFenced",tokenize:xk};function xk(t,l,i){const r=this,s={partial:!0,tokenize:ee};let o=0,f=0,h;return p;function p(O){return m(O)}function m(O){const P=r.events[r.events.length-1];return o=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,h=O,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),x(O)}function x(O){return O===h?(f++,t.consume(O),x):f<3?i(O):(t.exit("codeFencedFenceSequence"),Be(O)?Ie(t,y,"whitespace")(O):y(O))}function y(O){return O===null||we(O)?(t.exit("codeFencedFence"),r.interrupt?l(O):t.check(Xg,R,te)(O)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),k(O))}function k(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),y(O)):Be(O)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ie(t,v,"whitespace")(O)):O===96&&O===h?i(O):(t.consume(O),k)}function v(O){return O===null||we(O)?y(O):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),_(O))}function _(O){return O===null||we(O)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),y(O)):O===96&&O===h?i(O):(t.consume(O),_)}function R(O){return t.attempt(s,te,H)(O)}function H(O){return t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),N}function N(O){return o>0&&Be(O)?Ie(t,Z,"linePrefix",o+1)(O):Z(O)}function Z(O){return O===null||we(O)?t.check(Xg,R,te)(O):(t.enter("codeFlowValue"),q(O))}function q(O){return O===null||we(O)?(t.exit("codeFlowValue"),Z(O)):(t.consume(O),q)}function te(O){return t.exit("codeFenced"),l(O)}function ee(O,P,se){let me=0;return M;function M(W){return O.enter("lineEnding"),O.consume(W),O.exit("lineEnding"),Y}function Y(W){return O.enter("codeFencedFence"),Be(W)?Ie(O,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(W):$(W)}function $(W){return W===h?(O.enter("codeFencedFenceSequence"),xe(W)):se(W)}function xe(W){return W===h?(me++,O.consume(W),xe):me>=f?(O.exit("codeFencedFenceSequence"),Be(W)?Ie(O,re,"whitespace")(W):re(W)):se(W)}function re(W){return W===null||we(W)?(O.exit("codeFencedFence"),P(W)):se(W)}}}function bk(t,l,i){const r=this;return s;function s(f){return f===null?i(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}const tf={name:"codeIndented",tokenize:kk},vk={partial:!0,tokenize:wk};function kk(t,l,i){const r=this;return s;function s(m){return t.enter("codeIndented"),Ie(t,o,"linePrefix",5)(m)}function o(m){const x=r.events[r.events.length-1];return x&&x[1].type==="linePrefix"&&x[2].sliceSerialize(x[1],!0).length>=4?f(m):i(m)}function f(m){return m===null?p(m):we(m)?t.attempt(vk,f,p)(m):(t.enter("codeFlowValue"),h(m))}function h(m){return m===null||we(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),h)}function p(m){return t.exit("codeIndented"),l(m)}}function wk(t,l,i){const r=this;return s;function s(f){return r.parser.lazy[r.now().line]?i(f):we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):Ie(t,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):we(f)?s(f):i(f)}}const Sk={name:"codeText",previous:Ek,resolve:_k,tokenize:Ck};function _k(t){let l=t.length-4,i=3,r,s;if((t[i][1].type==="lineEnding"||t[i][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=i;++r<l;)if(t[r][1].type==="codeTextData"){t[i][1].type="codeTextPadding",t[l][1].type="codeTextPadding",i+=2,l-=2;break}}for(r=i-1,l++;++r<=l;)s===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(s=r):(r===l||t[r][1].type==="lineEnding")&&(t[s][1].type="codeTextData",r!==s+2&&(t[s][1].end=t[r-1][1].end,t.splice(s+2,r-s-2),l-=r-s-2,r=s+2),s=void 0);return t}function Ek(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Ck(t,l,i){let r=0,s,o;return f;function f(y){return t.enter("codeText"),t.enter("codeTextSequence"),h(y)}function h(y){return y===96?(t.consume(y),r++,h):(t.exit("codeTextSequence"),p(y))}function p(y){return y===null?i(y):y===32?(t.enter("space"),t.consume(y),t.exit("space"),p):y===96?(o=t.enter("codeTextSequence"),s=0,x(y)):we(y)?(t.enter("lineEnding"),t.consume(y),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(y))}function m(y){return y===null||y===32||y===96||we(y)?(t.exit("codeTextData"),p(y)):(t.consume(y),m)}function x(y){return y===96?(t.consume(y),s++,x):s===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(y)):(o.type="codeTextData",m(y))}}class Ak{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,i){const r=i??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,i,r){const s=i||0;this.setCursor(Math.trunc(l));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&yr(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),yr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),yr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const i=this.left.splice(l,Number.POSITIVE_INFINITY);yr(this.right,i.reverse())}else{const i=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);yr(this.left,i.reverse())}}}function yr(t,l){let i=0;if(l.length<1e4)t.push(...l);else for(;i<l.length;)t.push(...l.slice(i,i+1e4)),i+=1e4}function mx(t){const l={};let i=-1,r,s,o,f,h,p,m;const x=new Ak(t);for(;++i<x.length;){for(;i in l;)i=l[i];if(r=x.get(i),i&&r[1].type==="chunkFlow"&&x.get(i-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,jk(x,i)),i=l[i],m=!0);else if(r[1]._container){for(o=i,s=void 0;o--;)if(f=x.get(o),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(x.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=o);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(r[1].end={...x.get(s)[1].start},h=x.slice(s,i),h.unshift(r),x.splice(s,i-s+1,h))}}return fn(t,0,Number.POSITIVE_INFINITY,x.slice(0)),!m}function jk(t,l){const i=t.get(l)[1],r=t.get(l)[2];let s=l-1;const o=[];let f=i._tokenizer;f||(f=r.parser[i.contentType](i.start),i._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const h=f.events,p=[],m={};let x,y,k=-1,v=i,_=0,R=0;const H=[R];for(;v;){for(;t.get(++s)[1]!==v;);o.push(s),v._tokenizer||(x=r.sliceStream(v),v.next||x.push(null),y&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(x),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),y=v,v=v.next}for(v=i;++k<h.length;)h[k][0]==="exit"&&h[k-1][0]==="enter"&&h[k][1].type===h[k-1][1].type&&h[k][1].start.line!==h[k][1].end.line&&(R=k+1,H.push(R),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):H.pop(),k=H.length;k--;){const N=h.slice(H[k],H[k+1]),Z=o.pop();p.push([Z,Z+N.length-1]),t.splice(Z,2,N)}for(p.reverse(),k=-1;++k<p.length;)m[_+p[k][0]]=_+p[k][1],_+=p[k][1]-p[k][0]-1;return m}const Nk={resolve:Dk,tokenize:zk},Tk={partial:!0,tokenize:Ok};function Dk(t){return mx(t),t}function zk(t,l){let i;return r;function r(h){return t.enter("content"),i=t.enter("chunkContent",{contentType:"content"}),s(h)}function s(h){return h===null?o(h):we(h)?t.check(Tk,f,o)(h):(t.consume(h),s)}function o(h){return t.exit("chunkContent"),t.exit("content"),l(h)}function f(h){return t.consume(h),t.exit("chunkContent"),i.next=t.enter("chunkContent",{contentType:"content",previous:i}),i=i.next,s}}function Ok(t,l,i){const r=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ie(t,o,"linePrefix")}function o(f){if(f===null||we(f))return i(f);const h=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?l(f):t.interrupt(r.parser.constructs.flow,i,l)(f)}}function px(t,l,i,r,s,o,f,h,p){const m=p||Number.POSITIVE_INFINITY;let x=0;return y;function y(N){return N===60?(t.enter(r),t.enter(s),t.enter(o),t.consume(N),t.exit(o),k):N===null||N===32||N===41||gs(N)?i(N):(t.enter(r),t.enter(f),t.enter(h),t.enter("chunkString",{contentType:"string"}),R(N))}function k(N){return N===62?(t.enter(o),t.consume(N),t.exit(o),t.exit(s),t.exit(r),l):(t.enter(h),t.enter("chunkString",{contentType:"string"}),v(N))}function v(N){return N===62?(t.exit("chunkString"),t.exit(h),k(N)):N===null||N===60||we(N)?i(N):(t.consume(N),N===92?_:v)}function _(N){return N===60||N===62||N===92?(t.consume(N),v):v(N)}function R(N){return!x&&(N===null||N===41||it(N))?(t.exit("chunkString"),t.exit(h),t.exit(f),t.exit(r),l(N)):x<m&&N===40?(t.consume(N),x++,R):N===41?(t.consume(N),x--,R):N===null||N===32||N===40||gs(N)?i(N):(t.consume(N),N===92?H:R)}function H(N){return N===40||N===41||N===92?(t.consume(N),R):R(N)}}function gx(t,l,i,r,s,o){const f=this;let h=0,p;return m;function m(v){return t.enter(r),t.enter(s),t.consume(v),t.exit(s),t.enter(o),x}function x(v){return h>999||v===null||v===91||v===93&&!p||v===94&&!h&&"_hiddenFootnoteSupport"in f.parser.constructs?i(v):v===93?(t.exit(o),t.enter(s),t.consume(v),t.exit(s),t.exit(r),l):we(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),x):(t.enter("chunkString",{contentType:"string"}),y(v))}function y(v){return v===null||v===91||v===93||we(v)||h++>999?(t.exit("chunkString"),x(v)):(t.consume(v),p||(p=!Be(v)),v===92?k:y)}function k(v){return v===91||v===92||v===93?(t.consume(v),h++,y):y(v)}}function yx(t,l,i,r,s,o){let f;return h;function h(k){return k===34||k===39||k===40?(t.enter(r),t.enter(s),t.consume(k),t.exit(s),f=k===40?41:k,p):i(k)}function p(k){return k===f?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),l):(t.enter(o),m(k))}function m(k){return k===f?(t.exit(o),p(f)):k===null?i(k):we(k)?(t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),Ie(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),x(k))}function x(k){return k===f||k===null||we(k)?(t.exit("chunkString"),m(k)):(t.consume(k),k===92?y:x)}function y(k){return k===f||k===92?(t.consume(k),x):x(k)}}function wr(t,l){let i;return r;function r(s){return we(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),i=!0,r):Be(s)?Ie(t,r,i?"linePrefix":"lineSuffix")(s):l(s)}}const Mk={name:"definition",tokenize:Lk},Rk={partial:!0,tokenize:Bk};function Lk(t,l,i){const r=this;let s;return o;function o(v){return t.enter("definition"),f(v)}function f(v){return gx.call(r,t,h,i,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function h(v){return s=jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),p):i(v)}function p(v){return it(v)?wr(t,m)(v):m(v)}function m(v){return px(t,x,i,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function x(v){return t.attempt(Rk,y,y)(v)}function y(v){return Be(v)?Ie(t,k,"whitespace")(v):k(v)}function k(v){return v===null||we(v)?(t.exit("definition"),r.parser.defined.push(s),l(v)):i(v)}}function Bk(t,l,i){return r;function r(h){return it(h)?wr(t,s)(h):i(h)}function s(h){return yx(t,o,i,"definitionTitle","definitionTitleMarker","definitionTitleString")(h)}function o(h){return Be(h)?Ie(t,f,"whitespace")(h):f(h)}function f(h){return h===null||we(h)?l(h):i(h)}}const Uk={name:"hardBreakEscape",tokenize:Hk};function Hk(t,l,i){return r;function r(o){return t.enter("hardBreakEscape"),t.consume(o),s}function s(o){return we(o)?(t.exit("hardBreakEscape"),l(o)):i(o)}}const qk={name:"headingAtx",resolve:Vk,tokenize:Ik};function Vk(t,l){let i=t.length-2,r=3,s,o;return t[r][1].type==="whitespace"&&(r+=2),i-2>r&&t[i][1].type==="whitespace"&&(i-=2),t[i][1].type==="atxHeadingSequence"&&(r===i-1||i-4>r&&t[i-2][1].type==="whitespace")&&(i-=r+1===i?2:4),i>r&&(s={type:"atxHeadingText",start:t[r][1].start,end:t[i][1].end},o={type:"chunkText",start:t[r][1].start,end:t[i][1].end,contentType:"text"},fn(t,r,i-r+1,[["enter",s,l],["enter",o,l],["exit",o,l],["exit",s,l]])),t}function Ik(t,l,i){let r=0;return s;function s(x){return t.enter("atxHeading"),o(x)}function o(x){return t.enter("atxHeadingSequence"),f(x)}function f(x){return x===35&&r++<6?(t.consume(x),f):x===null||it(x)?(t.exit("atxHeadingSequence"),h(x)):i(x)}function h(x){return x===35?(t.enter("atxHeadingSequence"),p(x)):x===null||we(x)?(t.exit("atxHeading"),l(x)):Be(x)?Ie(t,h,"whitespace")(x):(t.enter("atxHeadingText"),m(x))}function p(x){return x===35?(t.consume(x),p):(t.exit("atxHeadingSequence"),h(x))}function m(x){return x===null||x===35||it(x)?(t.exit("atxHeadingText"),h(x)):(t.consume(x),m)}}const Yk=["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"],Kg=["pre","script","style","textarea"],Zk={concrete:!0,name:"htmlFlow",resolveTo:Gk,tokenize:Xk},Fk={partial:!0,tokenize:Kk},Qk={partial:!0,tokenize:Jk};function Gk(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Xk(t,l,i){const r=this;let s,o,f,h,p;return m;function m(S){return x(S)}function x(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),y}function y(S){return S===33?(t.consume(S),k):S===47?(t.consume(S),o=!0,R):S===63?(t.consume(S),s=3,r.interrupt?l:E):It(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function k(S){return S===45?(t.consume(S),s=2,v):S===91?(t.consume(S),s=5,h=0,_):It(S)?(t.consume(S),s=4,r.interrupt?l:E):i(S)}function v(S){return S===45?(t.consume(S),r.interrupt?l:E):i(S)}function _(S){const ue="CDATA[";return S===ue.charCodeAt(h++)?(t.consume(S),h===ue.length?r.interrupt?l:$:_):i(S)}function R(S){return It(S)?(t.consume(S),f=String.fromCharCode(S),H):i(S)}function H(S){if(S===null||S===47||S===62||it(S)){const ue=S===47,ce=f.toLowerCase();return!ue&&!o&&Kg.includes(ce)?(s=1,r.interrupt?l(S):$(S)):Yk.includes(f.toLowerCase())?(s=6,ue?(t.consume(S),N):r.interrupt?l(S):$(S)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?i(S):o?Z(S):q(S))}return S===45||Bt(S)?(t.consume(S),f+=String.fromCharCode(S),H):i(S)}function N(S){return S===62?(t.consume(S),r.interrupt?l:$):i(S)}function Z(S){return Be(S)?(t.consume(S),Z):M(S)}function q(S){return S===47?(t.consume(S),M):S===58||S===95||It(S)?(t.consume(S),te):Be(S)?(t.consume(S),q):M(S)}function te(S){return S===45||S===46||S===58||S===95||Bt(S)?(t.consume(S),te):ee(S)}function ee(S){return S===61?(t.consume(S),O):Be(S)?(t.consume(S),ee):q(S)}function O(S){return S===null||S===60||S===61||S===62||S===96?i(S):S===34||S===39?(t.consume(S),p=S,P):Be(S)?(t.consume(S),O):se(S)}function P(S){return S===p?(t.consume(S),p=null,me):S===null||we(S)?i(S):(t.consume(S),P)}function se(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||it(S)?ee(S):(t.consume(S),se)}function me(S){return S===47||S===62||Be(S)?q(S):i(S)}function M(S){return S===62?(t.consume(S),Y):i(S)}function Y(S){return S===null||we(S)?$(S):Be(S)?(t.consume(S),Y):i(S)}function $(S){return S===45&&s===2?(t.consume(S),T):S===60&&s===1?(t.consume(S),J):S===62&&s===4?(t.consume(S),A):S===63&&s===3?(t.consume(S),E):S===93&&s===5?(t.consume(S),Se):we(S)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(Fk,F,xe)(S)):S===null||we(S)?(t.exit("htmlFlowData"),xe(S)):(t.consume(S),$)}function xe(S){return t.check(Qk,re,F)(S)}function re(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),W}function W(S){return S===null||we(S)?xe(S):(t.enter("htmlFlowData"),$(S))}function T(S){return S===45?(t.consume(S),E):$(S)}function J(S){return S===47?(t.consume(S),f="",ae):$(S)}function ae(S){if(S===62){const ue=f.toLowerCase();return Kg.includes(ue)?(t.consume(S),A):$(S)}return It(S)&&f.length<8?(t.consume(S),f+=String.fromCharCode(S),ae):$(S)}function Se(S){return S===93?(t.consume(S),E):$(S)}function E(S){return S===62?(t.consume(S),A):S===45&&s===2?(t.consume(S),E):$(S)}function A(S){return S===null||we(S)?(t.exit("htmlFlowData"),F(S)):(t.consume(S),A)}function F(S){return t.exit("htmlFlow"),l(S)}}function Jk(t,l,i){const r=this;return s;function s(f){return we(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):i(f)}function o(f){return r.parser.lazy[r.now().line]?i(f):l(f)}}function Kk(t,l,i){return r;function r(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(Tr,l,i)}}const $k={name:"htmlText",tokenize:Pk};function Pk(t,l,i){const r=this;let s,o,f;return h;function h(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),p}function p(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),ee):E===63?(t.consume(E),q):It(E)?(t.consume(E),se):i(E)}function m(E){return E===45?(t.consume(E),x):E===91?(t.consume(E),o=0,_):It(E)?(t.consume(E),Z):i(E)}function x(E){return E===45?(t.consume(E),v):i(E)}function y(E){return E===null?i(E):E===45?(t.consume(E),k):we(E)?(f=y,J(E)):(t.consume(E),y)}function k(E){return E===45?(t.consume(E),v):y(E)}function v(E){return E===62?T(E):E===45?k(E):y(E)}function _(E){const A="CDATA[";return E===A.charCodeAt(o++)?(t.consume(E),o===A.length?R:_):i(E)}function R(E){return E===null?i(E):E===93?(t.consume(E),H):we(E)?(f=R,J(E)):(t.consume(E),R)}function H(E){return E===93?(t.consume(E),N):R(E)}function N(E){return E===62?T(E):E===93?(t.consume(E),N):R(E)}function Z(E){return E===null||E===62?T(E):we(E)?(f=Z,J(E)):(t.consume(E),Z)}function q(E){return E===null?i(E):E===63?(t.consume(E),te):we(E)?(f=q,J(E)):(t.consume(E),q)}function te(E){return E===62?T(E):q(E)}function ee(E){return It(E)?(t.consume(E),O):i(E)}function O(E){return E===45||Bt(E)?(t.consume(E),O):P(E)}function P(E){return we(E)?(f=P,J(E)):Be(E)?(t.consume(E),P):T(E)}function se(E){return E===45||Bt(E)?(t.consume(E),se):E===47||E===62||it(E)?me(E):i(E)}function me(E){return E===47?(t.consume(E),T):E===58||E===95||It(E)?(t.consume(E),M):we(E)?(f=me,J(E)):Be(E)?(t.consume(E),me):T(E)}function M(E){return E===45||E===46||E===58||E===95||Bt(E)?(t.consume(E),M):Y(E)}function Y(E){return E===61?(t.consume(E),$):we(E)?(f=Y,J(E)):Be(E)?(t.consume(E),Y):me(E)}function $(E){return E===null||E===60||E===61||E===62||E===96?i(E):E===34||E===39?(t.consume(E),s=E,xe):we(E)?(f=$,J(E)):Be(E)?(t.consume(E),$):(t.consume(E),re)}function xe(E){return E===s?(t.consume(E),s=void 0,W):E===null?i(E):we(E)?(f=xe,J(E)):(t.consume(E),xe)}function re(E){return E===null||E===34||E===39||E===60||E===61||E===96?i(E):E===47||E===62||it(E)?me(E):(t.consume(E),re)}function W(E){return E===47||E===62||it(E)?me(E):i(E)}function T(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),l):i(E)}function J(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ae}function ae(E){return Be(E)?Ie(t,Se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):Se(E)}function Se(E){return t.enter("htmlTextData"),f(E)}}const nd={name:"labelEnd",resolveAll:nw,resolveTo:lw,tokenize:aw},Wk={tokenize:iw},ew={tokenize:rw},tw={tokenize:uw};function nw(t){let l=-1;const i=[];for(;++l<t.length;){const r=t[l][1];if(i.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const s=r.type==="labelImage"?4:2;r.type="data",l+=s}}return t.length!==i.length&&fn(t,0,t.length,i),t}function lw(t,l){let i=t.length,r=0,s,o,f,h;for(;i--;)if(s=t[i][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[i][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(t[i][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=i,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(f=i);const p={type:t[o][1].type==="labelLink"?"link":"image",start:{...t[o][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[o][1].start},end:{...t[f][1].end}},x={type:"labelText",start:{...t[o+r+2][1].end},end:{...t[f-2][1].start}};return h=[["enter",p,l],["enter",m,l]],h=wn(h,t.slice(o+1,o+r+3)),h=wn(h,[["enter",x,l]]),h=wn(h,Cs(l.parser.constructs.insideSpan.null,t.slice(o+r+4,f-3),l)),h=wn(h,[["exit",x,l],t[f-2],t[f-1],["exit",m,l]]),h=wn(h,t.slice(f+1)),h=wn(h,[["exit",p,l]]),fn(t,o,t.length,h),t}function aw(t,l,i){const r=this;let s=r.events.length,o,f;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){o=r.events[s][1];break}return h;function h(k){return o?o._inactive?y(k):(f=r.parser.defined.includes(jn(r.sliceSerialize({start:o.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(k),t.exit("labelMarker"),t.exit("labelEnd"),p):i(k)}function p(k){return k===40?t.attempt(Wk,x,f?x:y)(k):k===91?t.attempt(ew,x,f?m:y)(k):f?x(k):y(k)}function m(k){return t.attempt(tw,x,y)(k)}function x(k){return l(k)}function y(k){return o._balanced=!0,i(k)}}function iw(t,l,i){return r;function r(y){return t.enter("resource"),t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),s}function s(y){return it(y)?wr(t,o)(y):o(y)}function o(y){return y===41?x(y):px(t,f,h,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(y)}function f(y){return it(y)?wr(t,p)(y):x(y)}function h(y){return i(y)}function p(y){return y===34||y===39||y===40?yx(t,m,i,"resourceTitle","resourceTitleMarker","resourceTitleString")(y):x(y)}function m(y){return it(y)?wr(t,x)(y):x(y)}function x(y){return y===41?(t.enter("resourceMarker"),t.consume(y),t.exit("resourceMarker"),t.exit("resource"),l):i(y)}}function rw(t,l,i){const r=this;return s;function s(h){return gx.call(r,t,o,f,"reference","referenceMarker","referenceString")(h)}function o(h){return r.parser.defined.includes(jn(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(h):i(h)}function f(h){return i(h)}}function uw(t,l,i){return r;function r(o){return t.enter("reference"),t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),s}function s(o){return o===93?(t.enter("referenceMarker"),t.consume(o),t.exit("referenceMarker"),t.exit("reference"),l):i(o)}}const sw={name:"labelStartImage",resolveAll:nd.resolveAll,tokenize:ow};function ow(t,l,i){const r=this;return s;function s(h){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(h),t.exit("labelImageMarker"),o}function o(h){return h===91?(t.enter("labelMarker"),t.consume(h),t.exit("labelMarker"),t.exit("labelImage"),f):i(h)}function f(h){return h===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(h):l(h)}}const cw={name:"labelStartLink",resolveAll:nd.resolveAll,tokenize:fw};function fw(t,l,i){const r=this;return s;function s(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),o}function o(f){return f===94&&"_hiddenFootnoteSupport"in r.parser.constructs?i(f):l(f)}}const nf={name:"lineEnding",tokenize:dw};function dw(t,l){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ie(t,l,"linePrefix")}}const Wu={name:"thematicBreak",tokenize:hw};function hw(t,l,i){let r=0,s;return o;function o(m){return t.enter("thematicBreak"),f(m)}function f(m){return s=m,h(m)}function h(m){return m===s?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||we(m))?(t.exit("thematicBreak"),l(m)):i(m)}function p(m){return m===s?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Be(m)?Ie(t,h,"whitespace")(m):h(m))}}const Wt={continuation:{tokenize:yw},exit:bw,name:"list",tokenize:gw},mw={partial:!0,tokenize:vw},pw={partial:!0,tokenize:xw};function gw(t,l,i){const r=this,s=r.events[r.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,f=0;return h;function h(v){const _=r.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||v===r.containerState.marker:Df(v)){if(r.containerState.type||(r.containerState.type=_,t.enter(_,{_container:!0})),_==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(Wu,i,m)(v):m(v);if(!r.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(v)}return i(v)}function p(v){return Df(v)&&++f<10?(t.consume(v),p):(!r.interrupt||f<2)&&(r.containerState.marker?v===r.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):i(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||v,t.check(Tr,r.interrupt?i:x,t.attempt(mw,k,y))}function x(v){return r.containerState.initialBlankLine=!0,o++,k(v)}function y(v){return Be(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),k):i(v)}function k(v){return r.containerState.size=o+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(v)}}function yw(t,l,i){const r=this;return r.containerState._closeFlow=void 0,t.check(Tr,s,o);function s(h){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ie(t,l,"listItemIndent",r.containerState.size+1)(h)}function o(h){return r.containerState.furtherBlankLines||!Be(h)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,f(h)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(pw,l,f)(h))}function f(h){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ie(t,t.attempt(Wt,l,i),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(h)}}function xw(t,l,i){const r=this;return Ie(t,s,"listItemIndent",r.containerState.size+1);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===r.containerState.size?l(o):i(o)}}function bw(t){t.exit(this.containerState.type)}function vw(t,l,i){const r=this;return Ie(t,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const f=r.events[r.events.length-1];return!Be(o)&&f&&f[1].type==="listItemPrefixWhitespace"?l(o):i(o)}}const $g={name:"setextUnderline",resolveTo:kw,tokenize:ww};function kw(t,l){let i=t.length,r,s,o;for(;i--;)if(t[i][0]==="enter"){if(t[i][1].type==="content"){r=i;break}t[i][1].type==="paragraph"&&(s=i)}else t[i][1].type==="content"&&t.splice(i,1),!o&&t[i][1].type==="definition"&&(o=i);const f={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[s][1].type="setextHeadingText",o?(t.splice(s,0,["enter",f,l]),t.splice(o+1,0,["exit",t[r][1],l]),t[r][1].end={...t[o][1].end}):t[r][1]=f,t.push(["exit",f,l]),t}function ww(t,l,i){const r=this;let s;return o;function o(m){let x=r.events.length,y;for(;x--;)if(r.events[x][1].type!=="lineEnding"&&r.events[x][1].type!=="linePrefix"&&r.events[x][1].type!=="content"){y=r.events[x][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||y)?(t.enter("setextHeadingLine"),s=m,f(m)):i(m)}function f(m){return t.enter("setextHeadingLineSequence"),h(m)}function h(m){return m===s?(t.consume(m),h):(t.exit("setextHeadingLineSequence"),Be(m)?Ie(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||we(m)?(t.exit("setextHeadingLine"),l(m)):i(m)}}const Sw={tokenize:_w};function _w(t){const l=this,i=t.attempt(Tr,r,t.attempt(this.parser.constructs.flowInitial,s,Ie(t,t.attempt(this.parser.constructs.flow,s,t.attempt(Nk,s)),"linePrefix")));return i;function r(o){if(o===null){t.consume(o);return}return t.enter("lineEndingBlank"),t.consume(o),t.exit("lineEndingBlank"),l.currentConstruct=void 0,i}function s(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),l.currentConstruct=void 0,i}}const Ew={resolveAll:bx()},Cw=xx("string"),Aw=xx("text");function xx(t){return{resolveAll:bx(t==="text"?jw:void 0),tokenize:l};function l(i){const r=this,s=this.parser.constructs[t],o=i.attempt(s,f,h);return f;function f(x){return m(x)?o(x):h(x)}function h(x){if(x===null){i.consume(x);return}return i.enter("data"),i.consume(x),p}function p(x){return m(x)?(i.exit("data"),o(x)):(i.consume(x),p)}function m(x){if(x===null)return!0;const y=s[x];let k=-1;if(y)for(;++k<y.length;){const v=y[k];if(!v.previous||v.previous.call(r,r.previous))return!0}return!1}}}function bx(t){return l;function l(i,r){let s=-1,o;for(;++s<=i.length;)o===void 0?i[s]&&i[s][1].type==="data"&&(o=s,s++):(!i[s]||i[s][1].type!=="data")&&(s!==o+2&&(i[o][1].end=i[s-1][1].end,i.splice(o+2,s-o-2),s=o+2),o=void 0);return t?t(i,r):i}}function jw(t,l){let i=0;for(;++i<=t.length;)if((i===t.length||t[i][1].type==="lineEnding")&&t[i-1][1].type==="data"){const r=t[i-1][1],s=l.sliceStream(r);let o=s.length,f=-1,h=0,p;for(;o--;){const m=s[o];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)h++,f--;if(f)break;f=-1}else if(m===-2)p=!0,h++;else if(m!==-1){o++;break}}if(l._contentTypeTextTrailing&&i===t.length&&(h=0),h){const m={type:i===t.length||p||h<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?f:r.start._bufferIndex+f,_index:r.start._index+o,line:r.end.line,column:r.end.column-h,offset:r.end.offset-h},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(i,0,["enter",m,l],["exit",m,l]),i+=2)}i++}return t}const Nw={42:Wt,43:Wt,45:Wt,48:Wt,49:Wt,50:Wt,51:Wt,52:Wt,53:Wt,54:Wt,55:Wt,56:Wt,57:Wt,62:fx},Tw={91:Mk},Dw={[-2]:tf,[-1]:tf,32:tf},zw={35:qk,42:Wu,45:[$g,Wu],60:Zk,61:$g,95:Wu,96:Jg,126:Jg},Ow={38:hx,92:dx},Mw={[-5]:nf,[-4]:nf,[-3]:nf,33:sw,38:hx,42:zf,60:[ck,$k],91:cw,92:[Uk,dx],93:nd,95:zf,96:Sk},Rw={null:[zf,Ew]},Lw={null:[42,95]},Bw={null:[]},Uw=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Lw,contentInitial:Tw,disable:Bw,document:Nw,flow:zw,flowInitial:Dw,insideSpan:Rw,string:Ow,text:Mw},Symbol.toStringTag,{value:"Module"}));function Hw(t,l,i){let r={_bufferIndex:-1,_index:0,line:i&&i.line||1,column:i&&i.column||1,offset:i&&i.offset||0};const s={},o=[];let f=[],h=[];const p={attempt:P(ee),check:P(O),consume:Z,enter:q,exit:te,interrupt:P(O,{interrupt:!0})},m={code:null,containerState:{},defineSkip:R,events:[],now:_,parser:t,previous:null,sliceSerialize:k,sliceStream:v,write:y};let x=l.tokenize.call(m,p);return l.resolveAll&&o.push(l),m;function y(Y){return f=wn(f,Y),H(),f[f.length-1]!==null?[]:(se(l,0),m.events=Cs(o,m.events,m),m.events)}function k(Y,$){return Vw(v(Y),$)}function v(Y){return qw(f,Y)}function _(){const{_bufferIndex:Y,_index:$,line:xe,column:re,offset:W}=r;return{_bufferIndex:Y,_index:$,line:xe,column:re,offset:W}}function R(Y){s[Y.line]=Y.column,M()}function H(){let Y;for(;r._index<f.length;){const $=f[r._index];if(typeof $=="string")for(Y=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===Y&&r._bufferIndex<$.length;)N($.charCodeAt(r._bufferIndex));else N($)}}function N(Y){x=x(Y)}function Z(Y){we(Y)?(r.line++,r.column=1,r.offset+=Y===-3?2:1,M()):Y!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===f[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=Y}function q(Y,$){const xe=$||{};return xe.type=Y,xe.start=_(),m.events.push(["enter",xe,m]),h.push(xe),xe}function te(Y){const $=h.pop();return $.end=_(),m.events.push(["exit",$,m]),$}function ee(Y,$){se(Y,$.from)}function O(Y,$){$.restore()}function P(Y,$){return xe;function xe(re,W,T){let J,ae,Se,E;return Array.isArray(re)?F(re):"tokenize"in re?F([re]):A(re);function A(ge){return Ae;function Ae(pe){const Te=pe!==null&&ge[pe],ft=pe!==null&&ge.null,Tt=[...Array.isArray(Te)?Te:Te?[Te]:[],...Array.isArray(ft)?ft:ft?[ft]:[]];return F(Tt)(pe)}}function F(ge){return J=ge,ae=0,ge.length===0?T:S(ge[ae])}function S(ge){return Ae;function Ae(pe){return E=me(),Se=ge,ge.partial||(m.currentConstruct=ge),ge.name&&m.parser.constructs.disable.null.includes(ge.name)?ce():ge.tokenize.call($?Object.assign(Object.create(m),$):m,p,ue,ce)(pe)}}function ue(ge){return Y(Se,E),W}function ce(ge){return E.restore(),++ae<J.length?S(J[ae]):T}}}function se(Y,$){Y.resolveAll&&!o.includes(Y)&&o.push(Y),Y.resolve&&fn(m.events,$,m.events.length-$,Y.resolve(m.events.slice($),m)),Y.resolveTo&&(m.events=Y.resolveTo(m.events,m))}function me(){const Y=_(),$=m.previous,xe=m.currentConstruct,re=m.events.length,W=Array.from(h);return{from:re,restore:T};function T(){r=Y,m.previous=$,m.currentConstruct=xe,m.events.length=re,h=W,M()}}function M(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function qw(t,l){const i=l.start._index,r=l.start._bufferIndex,s=l.end._index,o=l.end._bufferIndex;let f;if(i===s)f=[t[i].slice(r,o)];else{if(f=t.slice(i,s),r>-1){const h=f[0];typeof h=="string"?f[0]=h.slice(r):f.shift()}o>0&&f.push(t[s].slice(0,o))}return f}function Vw(t,l){let i=-1;const r=[];let s;for(;++i<t.length;){const o=t[i];let f;if(typeof o=="string")f=o;else switch(o){case-5:{f="\r";break}case-4:{f=`
51
51
  `;break}case-3:{f=`\r
52
- `;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&s)continue;f=" ";break}default:f=String.fromCharCode(o)}s=o===-2,r.push(f)}return r.join("")}function Yw(t){const r={constructs:ox([Uw,...(t||{}).extensions||[]]),content:s(lk),defined:[],document:s(ik),flow:s(Sw),lazy:{},string:s(Cw),text:s(jw)};return r;function s(o){return f;function f(h){return Hw(r,o,h)}}}function Iw(t){for(;!mx(t););return t}const Pg=/[\0\t\n\r]/g;function Zw(){let t=1,l="",i=!0,r;return s;function s(o,f,h){const p=[];let m,x,y,k,v;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o)),y=0,l="",i&&(o.charCodeAt(0)===65279&&y++,i=void 0);y<o.length;){if(Pg.lastIndex=y,m=Pg.exec(o),k=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(k),!m){l=o.slice(y);break}if(v===10&&y===k&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),y<k&&(p.push(o.slice(y,k)),t+=k-y),v){case 0:{p.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,p.push(-2);t++<x;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}y=k+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const Fw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qw(t){return t.replace(Fw,Gw)}function Gw(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),o=s===120||s===88;return cx(i.slice(o?2:1),o?16:10)}return td(i)||t}const vx={}.hasOwnProperty;function Xw(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),Jw(i)(Iw(Yw(i).document().write(Zw()(t,l,!0))))}function Jw(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ml),autolinkProtocol:me,autolinkEmail:me,atxHeading:o(hl),blockQuote:o(ft),characterEscape:me,characterReference:me,codeFenced:o(Tt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:o(Tt,f),codeText:o(dl,f),codeTextData:me,data:me,codeFlowValue:me,definition:o(Hn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:o(St),hardBreakEscape:o(Nn),hardBreakTrailing:o(Nn),htmlFlow:o(_a,f),htmlFlowData:me,htmlText:o(_a,f),htmlTextData:me,image:o(Gl),label:f,link:o(ml),listItem:o(gl),listItemValue:k,listOrdered:o(pl,y),listUnordered:o(pl),paragraph:o(vi),reference:S,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:o(hl),strong:o(ki),thematicBreak:o(Ze)},exit:{atxHeading:p(),atxHeadingSequence:ee,autolink:p(),autolinkEmail:Te,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ge,characterReference:je,codeFenced:p(H),codeFencedFence:R,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:p(N),codeText:p(W),codeTextData:M,data:M,definition:p(),definitionDestinationString:te,definitionLabelString:Z,definitionTitleString:q,emphasis:p(),hardBreakEscape:p($),hardBreakTrailing:p($),htmlFlow:p(xe),htmlFlowData:M,htmlText:p(re),htmlTextData:M,image:p(J),label:Se,labelText:ae,lineEnding:I,link:p(T),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:E,resourceTitleString:j,resource:F,setextHeading:p(se),setextHeadingLineSequence:P,setextHeadingText:O,strong:p(),thematicBreak:p()}};kx(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(Q){let ie={type:"root",children:[]};const ve={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:x,data:i},Ae=[];let Xe=-1;for(;++Xe<Q.length;)if(Q[Xe][1].type==="listOrdered"||Q[Xe][1].type==="listUnordered")if(Q[Xe][0]==="enter")Ae.push(Xe);else{const tn=Ae.pop();Xe=s(Q,tn,Xe)}for(Xe=-1;++Xe<Q.length;){const tn=l[Q[Xe][0]];vx.call(tn,Q[Xe][1].type)&&tn[Q[Xe][1].type].call(Object.assign({sliceSerialize:Q[Xe][2].sliceSerialize},ve),Q[Xe][1])}if(ve.tokenStack.length>0){const tn=ve.tokenStack[ve.tokenStack.length-1];(tn[1]||Wg).call(ve,void 0,tn[0])}for(ie.position={start:Yl(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Yl(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<l.transforms.length;)ie=l.transforms[Xe](ie)||ie;return ie}function s(Q,ie,ve){let Ae=ie-1,Xe=-1,tn=!1,qn,Ht,_t,Ft;for(;++Ae<=ve;){const tt=Q[Ae];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Xe++:Xe--,Ft=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(qn&&!Ft&&!Xe&&!_t&&(_t=Ae),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!Xe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Xe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(qn){let yl=Ae;for(Ht=void 0;yl--;){const _n=Q[yl];if(_n[1].type==="lineEnding"||_n[1].type==="lineEndingBlank"){if(_n[0]==="exit")continue;Ht&&(Q[Ht][1].type="lineEndingBlank",tn=!0),_n[1].type="lineEnding",Ht=yl}else if(!(_n[1].type==="linePrefix"||_n[1].type==="blockQuotePrefix"||_n[1].type==="blockQuotePrefixWhitespace"||_n[1].type==="blockQuoteMarker"||_n[1].type==="listItemIndent"))break}_t&&(!Ht||_t<Ht)&&(qn._spread=!0),qn.end=Object.assign({},Ht?Q[Ht][1].start:tt[1].end),Q.splice(Ht||Ae,0,["exit",qn,tt[2]]),Ae++,ve++}if(tt[1].type==="listItemPrefix"){const yl={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};qn=yl,Q.splice(Ae,0,["enter",yl,tt[2]]),Ae++,ve++,_t=void 0,Ft=!0}}}return Q[ie][1]._spread=tn,ve}function o(Q,ie){return ve;function ve(Ae){h.call(this,Q(Ae),Ae),ie&&ie.call(this,Ae)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(Q,ie,ve){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ie,ve||void 0]),Q.position={start:Yl(ie.start),end:void 0}}function p(Q){return ie;function ie(ve){Q&&Q.call(this,ve),m.call(this,ve)}}function m(Q,ie){const ve=this.stack.pop(),Ae=this.tokenStack.pop();if(Ae)Ae[0].type!==Q.type&&(ie?ie.call(this,Q,Ae[0]):(Ae[1]||Wg).call(this,Q,Ae[0]));else throw new Error("Cannot close `"+Q.type+"` ("+kr({start:Q.start,end:Q.end})+"): it’s not open");ve.position.end=Yl(Q.end)}function x(){return ed(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(Q){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=Q}function _(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=Q}function R(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function H(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/(\r?\n|\r)$/g,"")}function Z(Q){const ie=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ie,ve.identifier=An(this.sliceSerialize(Q)).toLowerCase()}function q(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function te(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function ee(Q){const ie=this.stack[this.stack.length-1];if(!ie.depth){const ve=this.sliceSerialize(Q).length;ie.depth=ve}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function P(Q){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function me(Q){const ve=this.stack[this.stack.length-1].children;let Ae=ve[ve.length-1];(!Ae||Ae.type!=="text")&&(Ae=gt(),Ae.position={start:Yl(Q.start),end:void 0},ve.push(Ae)),this.stack.push(Ae)}function M(Q){const ie=this.stack.pop();ie.value+=this.sliceSerialize(Q),ie.position.end=Yl(Q.end)}function I(Q){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ie.children[ie.children.length-1];ve.position.end=Yl(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(me.call(this,Q),M.call(this,Q))}function $(){this.data.atHardBreak=!0}function xe(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function re(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function W(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function T(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function J(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ae(Q){const ie=this.sliceSerialize(Q),ve=this.stack[this.stack.length-2];ve.label=Qw(ie),ve.identifier=An(ie).toLowerCase()}function Se(){const Q=this.stack[this.stack.length-1],ie=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const Ae=Q.children;ve.children=Ae}else ve.alt=ie}function E(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function j(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function F(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ue(Q){const ie=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ie,ve.identifier=An(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function ce(Q){this.data.characterReferenceType=Q.type}function ge(Q){const ie=this.sliceSerialize(Q),ve=this.data.characterReferenceType;let Ae;ve?(Ae=cx(ie,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ae=td(ie);const Xe=this.stack[this.stack.length-1];Xe.value+=Ae}function je(Q){const ie=this.stack.pop();ie.position.end=Yl(Q.end)}function pe(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(Q)}function Te(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(Q)}function ft(){return{type:"blockquote",children:[]}}function Tt(){return{type:"code",lang:null,meta:null,value:""}}function dl(){return{type:"inlineCode",value:""}}function Hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function St(){return{type:"emphasis",children:[]}}function hl(){return{type:"heading",depth:0,children:[]}}function Nn(){return{type:"break"}}function _a(){return{type:"html",value:""}}function Gl(){return{type:"image",title:null,url:"",alt:null}}function ml(){return{type:"link",title:null,url:"",children:[]}}function pl(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function gl(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function vi(){return{type:"paragraph",children:[]}}function ki(){return{type:"strong",children:[]}}function gt(){return{type:"text",value:""}}function Ze(){return{type:"thematicBreak"}}}function Yl(t){return{line:t.line,column:t.column,offset:t.offset}}function kx(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?kx(t,r):Kw(t,r)}}function Kw(t,l){let i;for(i in l)if(vx.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function Wg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+kr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+kr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+kr({start:l.start,end:l.end})+") is still open")}function $w(t){const l=this;l.parser=i;function i(r){return Xw(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function Pw(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function Ww(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
52
+ `;break}case-2:{f=l?" ":" ";break}case-1:{if(!l&&s)continue;f=" ";break}default:f=String.fromCharCode(o)}s=o===-2,r.push(f)}return r.join("")}function Iw(t){const r={constructs:ox([Uw,...(t||{}).extensions||[]]),content:s(lk),defined:[],document:s(ik),flow:s(Sw),lazy:{},string:s(Cw),text:s(Aw)};return r;function s(o){return f;function f(h){return Hw(r,o,h)}}}function Yw(t){for(;!mx(t););return t}const Pg=/[\0\t\n\r]/g;function Zw(){let t=1,l="",i=!0,r;return s;function s(o,f,h){const p=[];let m,x,y,k,v;for(o=l+(typeof o=="string"?o.toString():new TextDecoder(f||void 0).decode(o)),y=0,l="",i&&(o.charCodeAt(0)===65279&&y++,i=void 0);y<o.length;){if(Pg.lastIndex=y,m=Pg.exec(o),k=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(k),!m){l=o.slice(y);break}if(v===10&&y===k&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),y<k&&(p.push(o.slice(y,k)),t+=k-y),v){case 0:{p.push(65533),t++;break}case 9:{for(x=Math.ceil(t/4)*4,p.push(-2);t++<x;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}y=k+1}return h&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const Fw=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qw(t){return t.replace(Fw,Gw)}function Gw(t,l,i){if(l)return l;if(i.charCodeAt(0)===35){const s=i.charCodeAt(1),o=s===120||s===88;return cx(i.slice(o?2:1),o?16:10)}return td(i)||t}const vx={}.hasOwnProperty;function Xw(t,l,i){return l&&typeof l=="object"&&(i=l,l=void 0),Jw(i)(Yw(Iw(i).document().write(Zw()(t,l,!0))))}function Jw(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(ml),autolinkProtocol:me,autolinkEmail:me,atxHeading:o(hl),blockQuote:o(ft),characterEscape:me,characterReference:me,codeFenced:o(Tt),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:o(Tt,f),codeText:o(dl,f),codeTextData:me,data:me,codeFlowValue:me,definition:o(Hn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:o(St),hardBreakEscape:o(Nn),hardBreakTrailing:o(Nn),htmlFlow:o(_a,f),htmlFlowData:me,htmlText:o(_a,f),htmlTextData:me,image:o(Gl),label:f,link:o(ml),listItem:o(gl),listItemValue:k,listOrdered:o(pl,y),listUnordered:o(pl),paragraph:o(vi),reference:S,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:o(hl),strong:o(ki),thematicBreak:o(Ze)},exit:{atxHeading:p(),atxHeadingSequence:ee,autolink:p(),autolinkEmail:Te,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ce,characterReferenceMarkerNumeric:ce,characterReferenceValue:ge,characterReference:Ae,codeFenced:p(H),codeFencedFence:R,codeFencedFenceInfo:v,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:p(N),codeText:p(W),codeTextData:M,data:M,definition:p(),definitionDestinationString:te,definitionLabelString:Z,definitionTitleString:q,emphasis:p(),hardBreakEscape:p($),hardBreakTrailing:p($),htmlFlow:p(xe),htmlFlowData:M,htmlText:p(re),htmlTextData:M,image:p(J),label:Se,labelText:ae,lineEnding:Y,link:p(T),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ue,resourceDestinationString:E,resourceTitleString:A,resource:F,setextHeading:p(se),setextHeadingLineSequence:P,setextHeadingText:O,strong:p(),thematicBreak:p()}};kx(l,(t||{}).mdastExtensions||[]);const i={};return r;function r(Q){let ie={type:"root",children:[]};const ve={stack:[ie],tokenStack:[],config:l,enter:h,exit:m,buffer:f,resume:x,data:i},je=[];let Xe=-1;for(;++Xe<Q.length;)if(Q[Xe][1].type==="listOrdered"||Q[Xe][1].type==="listUnordered")if(Q[Xe][0]==="enter")je.push(Xe);else{const tn=je.pop();Xe=s(Q,tn,Xe)}for(Xe=-1;++Xe<Q.length;){const tn=l[Q[Xe][0]];vx.call(tn,Q[Xe][1].type)&&tn[Q[Xe][1].type].call(Object.assign({sliceSerialize:Q[Xe][2].sliceSerialize},ve),Q[Xe][1])}if(ve.tokenStack.length>0){const tn=ve.tokenStack[ve.tokenStack.length-1];(tn[1]||Wg).call(ve,void 0,tn[0])}for(ie.position={start:Il(Q.length>0?Q[0][1].start:{line:1,column:1,offset:0}),end:Il(Q.length>0?Q[Q.length-2][1].end:{line:1,column:1,offset:0})},Xe=-1;++Xe<l.transforms.length;)ie=l.transforms[Xe](ie)||ie;return ie}function s(Q,ie,ve){let je=ie-1,Xe=-1,tn=!1,qn,Ht,_t,Ft;for(;++je<=ve;){const tt=Q[je];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Xe++:Xe--,Ft=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(qn&&!Ft&&!Xe&&!_t&&(_t=je),Ft=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ft=void 0}if(!Xe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Xe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(qn){let yl=je;for(Ht=void 0;yl--;){const _n=Q[yl];if(_n[1].type==="lineEnding"||_n[1].type==="lineEndingBlank"){if(_n[0]==="exit")continue;Ht&&(Q[Ht][1].type="lineEndingBlank",tn=!0),_n[1].type="lineEnding",Ht=yl}else if(!(_n[1].type==="linePrefix"||_n[1].type==="blockQuotePrefix"||_n[1].type==="blockQuotePrefixWhitespace"||_n[1].type==="blockQuoteMarker"||_n[1].type==="listItemIndent"))break}_t&&(!Ht||_t<Ht)&&(qn._spread=!0),qn.end=Object.assign({},Ht?Q[Ht][1].start:tt[1].end),Q.splice(Ht||je,0,["exit",qn,tt[2]]),je++,ve++}if(tt[1].type==="listItemPrefix"){const yl={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};qn=yl,Q.splice(je,0,["enter",yl,tt[2]]),je++,ve++,_t=void 0,Ft=!0}}}return Q[ie][1]._spread=tn,ve}function o(Q,ie){return ve;function ve(je){h.call(this,Q(je),je),ie&&ie.call(this,je)}}function f(){this.stack.push({type:"fragment",children:[]})}function h(Q,ie,ve){this.stack[this.stack.length-1].children.push(Q),this.stack.push(Q),this.tokenStack.push([ie,ve||void 0]),Q.position={start:Il(ie.start),end:void 0}}function p(Q){return ie;function ie(ve){Q&&Q.call(this,ve),m.call(this,ve)}}function m(Q,ie){const ve=this.stack.pop(),je=this.tokenStack.pop();if(je)je[0].type!==Q.type&&(ie?ie.call(this,Q,je[0]):(je[1]||Wg).call(this,Q,je[0]));else throw new Error("Cannot close `"+Q.type+"` ("+kr({start:Q.start,end:Q.end})+"): it’s not open");ve.position.end=Il(Q.end)}function x(){return ed(this.stack.pop())}function y(){this.data.expectingFirstListItemValue=!0}function k(Q){if(this.data.expectingFirstListItemValue){const ie=this.stack[this.stack.length-2];ie.start=Number.parseInt(this.sliceSerialize(Q),10),this.data.expectingFirstListItemValue=void 0}}function v(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.lang=Q}function _(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.meta=Q}function R(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function H(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q.replace(/(\r?\n|\r)$/g,"")}function Z(Q){const ie=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ie,ve.identifier=jn(this.sliceSerialize(Q)).toLowerCase()}function q(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function te(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function ee(Q){const ie=this.stack[this.stack.length-1];if(!ie.depth){const ve=this.sliceSerialize(Q).length;ie.depth=ve}}function O(){this.data.setextHeadingSlurpLineEnding=!0}function P(Q){const ie=this.stack[this.stack.length-1];ie.depth=this.sliceSerialize(Q).codePointAt(0)===61?1:2}function se(){this.data.setextHeadingSlurpLineEnding=void 0}function me(Q){const ve=this.stack[this.stack.length-1].children;let je=ve[ve.length-1];(!je||je.type!=="text")&&(je=gt(),je.position={start:Il(Q.start),end:void 0},ve.push(je)),this.stack.push(je)}function M(Q){const ie=this.stack.pop();ie.value+=this.sliceSerialize(Q),ie.position.end=Il(Q.end)}function Y(Q){const ie=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=ie.children[ie.children.length-1];ve.position.end=Il(Q.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(ie.type)&&(me.call(this,Q),M.call(this,Q))}function $(){this.data.atHardBreak=!0}function xe(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function re(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function W(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.value=Q}function T(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function J(){const Q=this.stack[this.stack.length-1];if(this.data.inReference){const ie=this.data.referenceType||"shortcut";Q.type+="Reference",Q.referenceType=ie,delete Q.url,delete Q.title}else delete Q.identifier,delete Q.label;this.data.referenceType=void 0}function ae(Q){const ie=this.sliceSerialize(Q),ve=this.stack[this.stack.length-2];ve.label=Qw(ie),ve.identifier=jn(ie).toLowerCase()}function Se(){const Q=this.stack[this.stack.length-1],ie=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const je=Q.children;ve.children=je}else ve.alt=ie}function E(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.url=Q}function A(){const Q=this.resume(),ie=this.stack[this.stack.length-1];ie.title=Q}function F(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ue(Q){const ie=this.resume(),ve=this.stack[this.stack.length-1];ve.label=ie,ve.identifier=jn(this.sliceSerialize(Q)).toLowerCase(),this.data.referenceType="full"}function ce(Q){this.data.characterReferenceType=Q.type}function ge(Q){const ie=this.sliceSerialize(Q),ve=this.data.characterReferenceType;let je;ve?(je=cx(ie,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):je=td(ie);const Xe=this.stack[this.stack.length-1];Xe.value+=je}function Ae(Q){const ie=this.stack.pop();ie.position.end=Il(Q.end)}function pe(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url=this.sliceSerialize(Q)}function Te(Q){M.call(this,Q);const ie=this.stack[this.stack.length-1];ie.url="mailto:"+this.sliceSerialize(Q)}function ft(){return{type:"blockquote",children:[]}}function Tt(){return{type:"code",lang:null,meta:null,value:""}}function dl(){return{type:"inlineCode",value:""}}function Hn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function St(){return{type:"emphasis",children:[]}}function hl(){return{type:"heading",depth:0,children:[]}}function Nn(){return{type:"break"}}function _a(){return{type:"html",value:""}}function Gl(){return{type:"image",title:null,url:"",alt:null}}function ml(){return{type:"link",title:null,url:"",children:[]}}function pl(Q){return{type:"list",ordered:Q.type==="listOrdered",start:null,spread:Q._spread,children:[]}}function gl(Q){return{type:"listItem",spread:Q._spread,checked:null,children:[]}}function vi(){return{type:"paragraph",children:[]}}function ki(){return{type:"strong",children:[]}}function gt(){return{type:"text",value:""}}function Ze(){return{type:"thematicBreak"}}}function Il(t){return{line:t.line,column:t.column,offset:t.offset}}function kx(t,l){let i=-1;for(;++i<l.length;){const r=l[i];Array.isArray(r)?kx(t,r):Kw(t,r)}}function Kw(t,l){let i;for(i in l)if(vx.call(l,i))switch(i){case"canContainEols":{const r=l[i];r&&t[i].push(...r);break}case"transforms":{const r=l[i];r&&t[i].push(...r);break}case"enter":case"exit":{const r=l[i];r&&Object.assign(t[i],r);break}}}function Wg(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+kr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+kr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+kr({start:l.start,end:l.end})+") is still open")}function $w(t){const l=this;l.parser=i;function i(r){return Xw(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function Pw(t,l){const i={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,i),t.applyData(l,i)}function Ww(t,l){const i={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,i),[t.applyData(l,i),{type:"text",value:`
53
53
  `}]}function eS(t,l){const i=l.value?l.value+`
54
54
  `:"",r={},s=l.lang?l.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:i}]};return l.meta&&(o.data={meta:l.meta}),t.patch(l,o),o=t.applyData(l,o),o={type:"element",tagName:"pre",properties:{},children:[o]},t.patch(l,o),o}function tS(t,l){const i={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function nS(t,l){const i={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function lS(t,l){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),s=bi(r.toLowerCase()),o=t.footnoteOrder.indexOf(r);let f,h=t.footnoteCounts.get(r);h===void 0?(h=0,t.footnoteOrder.push(r),f=t.footnoteOrder.length):f=o+1,h+=1,t.footnoteCounts.set(r,h);const p={type:"element",tagName:"a",properties:{href:"#"+i+"fn-"+s,id:i+"fnref-"+s+(h>1?"-"+h:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function aS(t,l){const i={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function iS(t,l){if(t.options.allowDangerousHtml){const i={type:"raw",value:l.value};return t.patch(l,i),t.applyData(l,i)}}function wx(t,l){const i=l.referenceType;let r="]";if(i==="collapsed"?r+="[]":i==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const s=t.all(l),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=r:s.push({type:"text",value:r}),s}function rS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return wx(t,l);const s={src:bi(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"img",properties:s,children:[]};return t.patch(l,o),t.applyData(l,o)}function uS(t,l){const i={src:bi(l.url)};l.alt!==null&&l.alt!==void 0&&(i.alt=l.alt),l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(l,r),t.applyData(l,r)}function sS(t,l){const i={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,i);const r={type:"element",tagName:"code",properties:{},children:[i]};return t.patch(l,r),t.applyData(l,r)}function oS(t,l){const i=String(l.identifier).toUpperCase(),r=t.definitionById.get(i);if(!r)return wx(t,l);const s={href:bi(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const o={type:"element",tagName:"a",properties:s,children:t.all(l)};return t.patch(l,o),t.applyData(l,o)}function cS(t,l){const i={href:bi(l.url)};l.title!==null&&l.title!==void 0&&(i.title=l.title);const r={type:"element",tagName:"a",properties:i,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function fS(t,l,i){const r=t.all(l),s=i?dS(i):Sx(l),o={},f=[];if(typeof l.checked=="boolean"){const x=r[0];let y;x&&x.type==="element"&&x.tagName==="p"?y=x:(y={type:"element",tagName:"p",properties:{},children:[]},r.unshift(y)),y.children.length>0&&y.children.unshift({type:"text",value:" "}),y.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let h=-1;for(;++h<r.length;){const x=r[h];(s||h!==0||x.type!=="element"||x.tagName!=="p")&&f.push({type:"text",value:`
55
55
  `}),x.type==="element"&&x.tagName==="p"&&!s?f.push(...x.children):f.push(x)}const p=r[r.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
56
- `});const m={type:"element",tagName:"li",properties:o,children:f};return t.patch(l,m),t.applyData(l,m)}function dS(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=Sx(i[r])}return l}function Sx(t){const l=t.spread;return l??t.children.length>1}function hS(t,l){const i={},r=t.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++s<r.length;){const f=r[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,o),t.applyData(l,o)}function mS(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function pS(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function gS(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function yS(t,l){const i=t.all(l),r=i.shift(),s=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],f),s.push(f)}if(i.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=Kf(l.children[1]),p=nx(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,o),t.applyData(l,o)}function xS(t,l,i){const r=i?i.children:void 0,o=(r?r.indexOf(l):1)===0?"th":"td",f=i&&i.type==="table"?i.align:void 0,h=f?f.length:l.children.length;let p=-1;const m=[];for(;++p<h;){const y=l.children[p],k={},v=f?f[p]:void 0;v&&(k.align=v);let _={type:"element",tagName:o,properties:k,children:[]};y&&(_.children=t.all(y),t.patch(y,_),_=t.applyData(y,_)),m.push(_)}const x={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,x),t.applyData(l,x)}function bS(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const ey=9,ty=32;function vS(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),s=0;const o=[];for(;r;)o.push(ny(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(l);return o.push(ny(l.slice(s),s>0,!1)),o.join("")}function ny(t,l,i){let r=0,s=t.length;if(l){let o=t.codePointAt(r);for(;o===ey||o===ty;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(s-1);for(;o===ey||o===ty;)s--,o=t.codePointAt(s-1)}return s>r?t.slice(r,s):""}function kS(t,l){const i={type:"text",value:vS(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function wS(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const SS={blockquote:Pw,break:Ww,code:eS,delete:tS,emphasis:nS,footnoteReference:lS,heading:aS,html:iS,imageReference:rS,image:uS,inlineCode:sS,linkReference:oS,link:cS,listItem:fS,list:hS,paragraph:mS,root:pS,strong:gS,table:yS,tableCell:bS,tableRow:xS,text:kS,thematicBreak:wS,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const _x=-1,js=0,Sr=1,ys=2,ld=3,ad=4,id=5,rd=6,Ex=7,Cx=8,_S=typeof self=="object"?self:globalThis,ly=(t,l)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new _S[t](l)},ES=(t,l)=>{const i=(s,o)=>(t.set(o,s),s),r=s=>{if(t.has(s))return t.get(s);const[o,f]=l[s];switch(o){case js:case _x:return i(f,s);case Sr:{const h=i([],s);for(const p of f)h.push(r(p));return h}case ys:{const h=i({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case ld:return i(new Date(f),s);case ad:{const{source:h,flags:p}=f;return i(new RegExp(h,p),s)}case id:{const h=i(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case rd:{const h=i(new Set,s);for(const p of f)h.add(r(p));return h}case Ex:{const{name:h,message:p}=f;return i(ly(h,p),s)}case Cx:return i(BigInt(f),s);case"BigInt":return i(Object(BigInt(f)),s);case"ArrayBuffer":return i(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return i(new DataView(h),f)}}return i(ly(o,f),s)};return r},ay=t=>ES(new Map,t)(0),ha="",{toString:CS}={},{keys:jS}=Object,xr=t=>{const l=typeof t;if(l!=="object"||!t)return[js,l];const i=CS.call(t).slice(8,-1);switch(i){case"Array":return[Sr,ha];case"Object":return[ys,ha];case"Date":return[ld,ha];case"RegExp":return[ad,ha];case"Map":return[id,ha];case"Set":return[rd,ha];case"DataView":return[Sr,i]}return i.includes("Array")?[Sr,i]:i.includes("Error")?[Ex,i]:[ys,i]},Ju=([t,l])=>t===js&&(l==="function"||l==="symbol"),AS=(t,l,i,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return i.set(h,p),p},o=f=>{if(i.has(f))return i.get(f);let[h,p]=xr(f);switch(h){case js:{let x=f;switch(p){case"bigint":h=Cx,x=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([_x],f)}return s([h,x],f)}case Sr:{if(p){let k=f;return p==="DataView"?k=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(k=new Uint8Array(f)),s([p,[...k]],f)}const x=[],y=s([h,x],f);for(const k of f)x.push(o(k));return y}case ys:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(l&&"toJSON"in f)return o(f.toJSON());const x=[],y=s([h,x],f);for(const k of jS(f))(t||!Ju(xr(f[k])))&&x.push([o(k),o(f[k])]);return y}case ld:return s([h,isNaN(f.getTime())?ha:f.toISOString()],f);case ad:{const{source:x,flags:y}=f;return s([h,{source:x,flags:y}],f)}case id:{const x=[],y=s([h,x],f);for(const[k,v]of f)(t||!(Ju(xr(k))||Ju(xr(v))))&&x.push([o(k),o(v)]);return y}case rd:{const x=[],y=s([h,x],f);for(const k of f)(t||!Ju(xr(k)))&&x.push(o(k));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return o},iy=(t,{json:l,lossy:i}={})=>{const r=[];return AS(!(l||i),!!l,new Map,r)(t),r},xs=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ay(iy(t,l)):structuredClone(t):(t,l)=>ay(iy(t,l));function NS(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function TS(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function DS(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||NS,r=t.options.footnoteBackLabel||TS,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const x=t.all(m),y=String(m.identifier).toUpperCase(),k=bi(y.toLowerCase());let v=0;const _=[],R=t.footnoteCounts.get(y);for(;R!==void 0&&++v<=R;){_.length>0&&_.push({type:"text",value:" "});let Z=typeof i=="string"?i:i(p,v);typeof Z=="string"&&(Z={type:"text",value:Z}),_.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+k+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,v),className:["data-footnote-backref"]},children:Array.isArray(Z)?Z:[Z]})}const H=x[x.length-1];if(H&&H.type==="element"&&H.tagName==="p"){const Z=H.children[H.children.length-1];Z&&Z.type==="text"?Z.value+=" ":H.children.push({type:"text",value:" "}),H.children.push(..._)}else x.push(..._);const N={type:"element",tagName:"li",properties:{id:l+"fn-"+k},children:t.wrap(x,!0)};t.patch(m,N),h.push(N)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xs(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
56
+ `});const m={type:"element",tagName:"li",properties:o,children:f};return t.patch(l,m),t.applyData(l,m)}function dS(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const i=t.children;let r=-1;for(;!l&&++r<i.length;)l=Sx(i[r])}return l}function Sx(t){const l=t.spread;return l??t.children.length>1}function hS(t,l){const i={},r=t.all(l);let s=-1;for(typeof l.start=="number"&&l.start!==1&&(i.start=l.start);++s<r.length;){const f=r[s];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){i.className=["contains-task-list"];break}}const o={type:"element",tagName:l.ordered?"ol":"ul",properties:i,children:t.wrap(r,!0)};return t.patch(l,o),t.applyData(l,o)}function mS(t,l){const i={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function pS(t,l){const i={type:"root",children:t.wrap(t.all(l))};return t.patch(l,i),t.applyData(l,i)}function gS(t,l){const i={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}function yS(t,l){const i=t.all(l),r=i.shift(),s=[];if(r){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],f),s.push(f)}if(i.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(i,!0)},h=Kf(l.children[1]),p=nx(l.children[l.children.length-1]);h&&p&&(f.position={start:h,end:p}),s.push(f)}const o={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(l,o),t.applyData(l,o)}function xS(t,l,i){const r=i?i.children:void 0,o=(r?r.indexOf(l):1)===0?"th":"td",f=i&&i.type==="table"?i.align:void 0,h=f?f.length:l.children.length;let p=-1;const m=[];for(;++p<h;){const y=l.children[p],k={},v=f?f[p]:void 0;v&&(k.align=v);let _={type:"element",tagName:o,properties:k,children:[]};y&&(_.children=t.all(y),t.patch(y,_),_=t.applyData(y,_)),m.push(_)}const x={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,x),t.applyData(l,x)}function bS(t,l){const i={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,i),t.applyData(l,i)}const ey=9,ty=32;function vS(t){const l=String(t),i=/\r?\n|\r/g;let r=i.exec(l),s=0;const o=[];for(;r;)o.push(ny(l.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=i.exec(l);return o.push(ny(l.slice(s),s>0,!1)),o.join("")}function ny(t,l,i){let r=0,s=t.length;if(l){let o=t.codePointAt(r);for(;o===ey||o===ty;)r++,o=t.codePointAt(r)}if(i){let o=t.codePointAt(s-1);for(;o===ey||o===ty;)s--,o=t.codePointAt(s-1)}return s>r?t.slice(r,s):""}function kS(t,l){const i={type:"text",value:vS(String(l.value))};return t.patch(l,i),t.applyData(l,i)}function wS(t,l){const i={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,i),t.applyData(l,i)}const SS={blockquote:Pw,break:Ww,code:eS,delete:tS,emphasis:nS,footnoteReference:lS,heading:aS,html:iS,imageReference:rS,image:uS,inlineCode:sS,linkReference:oS,link:cS,listItem:fS,list:hS,paragraph:mS,root:pS,strong:gS,table:yS,tableCell:bS,tableRow:xS,text:kS,thematicBreak:wS,toml:Xu,yaml:Xu,definition:Xu,footnoteDefinition:Xu};function Xu(){}const _x=-1,As=0,Sr=1,ys=2,ld=3,ad=4,id=5,rd=6,Ex=7,Cx=8,_S=typeof self=="object"?self:globalThis,ly=(t,l)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new _S[t](l)},ES=(t,l)=>{const i=(s,o)=>(t.set(o,s),s),r=s=>{if(t.has(s))return t.get(s);const[o,f]=l[s];switch(o){case As:case _x:return i(f,s);case Sr:{const h=i([],s);for(const p of f)h.push(r(p));return h}case ys:{const h=i({},s);for(const[p,m]of f)h[r(p)]=r(m);return h}case ld:return i(new Date(f),s);case ad:{const{source:h,flags:p}=f;return i(new RegExp(h,p),s)}case id:{const h=i(new Map,s);for(const[p,m]of f)h.set(r(p),r(m));return h}case rd:{const h=i(new Set,s);for(const p of f)h.add(r(p));return h}case Ex:{const{name:h,message:p}=f;return i(ly(h,p),s)}case Cx:return i(BigInt(f),s);case"BigInt":return i(Object(BigInt(f)),s);case"ArrayBuffer":return i(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:h}=new Uint8Array(f);return i(new DataView(h),f)}}return i(ly(o,f),s)};return r},ay=t=>ES(new Map,t)(0),ha="",{toString:CS}={},{keys:AS}=Object,xr=t=>{const l=typeof t;if(l!=="object"||!t)return[As,l];const i=CS.call(t).slice(8,-1);switch(i){case"Array":return[Sr,ha];case"Object":return[ys,ha];case"Date":return[ld,ha];case"RegExp":return[ad,ha];case"Map":return[id,ha];case"Set":return[rd,ha];case"DataView":return[Sr,i]}return i.includes("Array")?[Sr,i]:i.includes("Error")?[Ex,i]:[ys,i]},Ju=([t,l])=>t===As&&(l==="function"||l==="symbol"),jS=(t,l,i,r)=>{const s=(f,h)=>{const p=r.push(f)-1;return i.set(h,p),p},o=f=>{if(i.has(f))return i.get(f);let[h,p]=xr(f);switch(h){case As:{let x=f;switch(p){case"bigint":h=Cx,x=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);x=null;break;case"undefined":return s([_x],f)}return s([h,x],f)}case Sr:{if(p){let k=f;return p==="DataView"?k=new Uint8Array(f.buffer):p==="ArrayBuffer"&&(k=new Uint8Array(f)),s([p,[...k]],f)}const x=[],y=s([h,x],f);for(const k of f)x.push(o(k));return y}case ys:{if(p)switch(p){case"BigInt":return s([p,f.toString()],f);case"Boolean":case"Number":case"String":return s([p,f.valueOf()],f)}if(l&&"toJSON"in f)return o(f.toJSON());const x=[],y=s([h,x],f);for(const k of AS(f))(t||!Ju(xr(f[k])))&&x.push([o(k),o(f[k])]);return y}case ld:return s([h,isNaN(f.getTime())?ha:f.toISOString()],f);case ad:{const{source:x,flags:y}=f;return s([h,{source:x,flags:y}],f)}case id:{const x=[],y=s([h,x],f);for(const[k,v]of f)(t||!(Ju(xr(k))||Ju(xr(v))))&&x.push([o(k),o(v)]);return y}case rd:{const x=[],y=s([h,x],f);for(const k of f)(t||!Ju(xr(k)))&&x.push(o(k));return y}}const{message:m}=f;return s([h,{name:p,message:m}],f)};return o},iy=(t,{json:l,lossy:i}={})=>{const r=[];return jS(!(l||i),!!l,new Map,r)(t),r},xs=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ay(iy(t,l)):structuredClone(t):(t,l)=>ay(iy(t,l));function NS(t,l){const i=[{type:"text",value:"↩"}];return l>1&&i.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),i}function TS(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function DS(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=t.options.footnoteBackContent||NS,r=t.options.footnoteBackLabel||TS,s=t.options.footnoteLabel||"Footnotes",o=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},h=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const x=t.all(m),y=String(m.identifier).toUpperCase(),k=bi(y.toLowerCase());let v=0;const _=[],R=t.footnoteCounts.get(y);for(;R!==void 0&&++v<=R;){_.length>0&&_.push({type:"text",value:" "});let Z=typeof i=="string"?i:i(p,v);typeof Z=="string"&&(Z={type:"text",value:Z}),_.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+k+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,v),className:["data-footnote-backref"]},children:Array.isArray(Z)?Z:[Z]})}const H=x[x.length-1];if(H&&H.type==="element"&&H.tagName==="p"){const Z=H.children[H.children.length-1];Z&&Z.type==="text"?Z.value+=" ":H.children.push({type:"text",value:" "}),H.children.push(..._)}else x.push(..._);const N={type:"element",tagName:"li",properties:{id:l+"fn-"+k},children:t.wrap(x,!0)};t.patch(m,N),h.push(N)}if(h.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xs(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
57
57
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(h,!0)},{type:"text",value:`
58
- `}]}}const As=(function(t){if(t==null)return RS;if(typeof t=="function")return Ns(t);if(typeof t=="object")return Array.isArray(t)?zS(t):OS(t);if(typeof t=="string")return MS(t);throw new Error("Expected function, string, or object as test")});function zS(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=As(t[i]);return Ns(r);function r(...s){let o=-1;for(;++o<l.length;)if(l[o].apply(this,s))return!0;return!1}}function OS(t){const l=t;return Ns(i);function i(r){const s=r;let o;for(o in t)if(s[o]!==l[o])return!1;return!0}}function MS(t){return Ns(l);function l(i){return i&&i.type===t}}function Ns(t){return l;function l(i,r,s){return!!(LS(i)&&t.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function RS(){return!0}function LS(t){return t!==null&&typeof t=="object"&&"type"in t}const jx=[],BS=!0,Of=!1,US="skip";function Ax(t,l,i,r){let s;typeof l=="function"&&typeof i!="function"?(r=i,i=l):s=l;const o=As(s),f=r?-1:1;h(t,void 0,[])();function h(p,m,x){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return k;function k(){let v=jx,_,R,H;if((!l||o(p,m,x[x.length-1]||void 0))&&(v=HS(i(p,x)),v[0]===Of))return v;if("children"in p&&p.children){const N=p;if(N.children&&v[0]!==US)for(R=(r?N.children.length:-1)+f,H=x.concat(N);R>-1&&R<N.children.length;){const Z=N.children[R];if(_=h(Z,R,H)(),_[0]===Of)return _;R=typeof _[1]=="number"?_[1]:R+f}}return v}}}function HS(t){return Array.isArray(t)?t:typeof t=="number"?[BS,t]:t==null?jx:[t]}function ud(t,l,i,r){let s,o,f;typeof l=="function"&&typeof i!="function"?(o=void 0,f=l,s=i):(o=l,f=i,s=r),Ax(t,o,h,s);function h(p,m){const x=m[m.length-1],y=x?x.children.indexOf(p):void 0;return f(p,y,x)}}const Mf={}.hasOwnProperty,qS={};function VS(t,l){const i=l||qS,r=new Map,s=new Map,o=new Map,f={...SS,...i.handlers},h={all:m,applyData:IS,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:f,one:p,options:i,patch:YS,wrap:FS};return ud(t,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?r:s,k=String(x.identifier).toUpperCase();y.has(k)||y.set(k,x)}}),h;function p(x,y){const k=x.type,v=h.handlers[k];if(Mf.call(h.handlers,k)&&v)return v(h,x,y);if(h.options.passThrough&&h.options.passThrough.includes(k)){if("children"in x){const{children:R,...H}=x,N=xs(H);return N.children=h.all(x),N}return xs(x)}return(h.options.unknownHandler||ZS)(h,x,y)}function m(x){const y=[];if("children"in x){const k=x.children;let v=-1;for(;++v<k.length;){const _=h.one(k[v],x);if(_){if(v&&k[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ry(_.value)),!Array.isArray(_)&&_.type==="element")){const R=_.children[0];R&&R.type==="text"&&(R.value=ry(R.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function YS(t,l){t.position&&(l.position=N2(t))}function IS(t,l){let i=l;if(t&&t.data){const r=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const f="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:f}}i.type==="element"&&o&&Object.assign(i.properties,xs(o)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function ZS(t,l){const i=l.data||{},r="value"in l&&!(Mf.call(i,"hProperties")||Mf.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function FS(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
58
+ `}]}}const js=(function(t){if(t==null)return RS;if(typeof t=="function")return Ns(t);if(typeof t=="object")return Array.isArray(t)?zS(t):OS(t);if(typeof t=="string")return MS(t);throw new Error("Expected function, string, or object as test")});function zS(t){const l=[];let i=-1;for(;++i<t.length;)l[i]=js(t[i]);return Ns(r);function r(...s){let o=-1;for(;++o<l.length;)if(l[o].apply(this,s))return!0;return!1}}function OS(t){const l=t;return Ns(i);function i(r){const s=r;let o;for(o in t)if(s[o]!==l[o])return!1;return!0}}function MS(t){return Ns(l);function l(i){return i&&i.type===t}}function Ns(t){return l;function l(i,r,s){return!!(LS(i)&&t.call(this,i,typeof r=="number"?r:void 0,s||void 0))}}function RS(){return!0}function LS(t){return t!==null&&typeof t=="object"&&"type"in t}const Ax=[],BS=!0,Of=!1,US="skip";function jx(t,l,i,r){let s;typeof l=="function"&&typeof i!="function"?(r=i,i=l):s=l;const o=js(s),f=r?-1:1;h(t,void 0,[])();function h(p,m,x){const y=p&&typeof p=="object"?p:{};if(typeof y.type=="string"){const v=typeof y.tagName=="string"?y.tagName:typeof y.name=="string"?y.name:void 0;Object.defineProperty(k,"name",{value:"node ("+(p.type+(v?"<"+v+">":""))+")"})}return k;function k(){let v=Ax,_,R,H;if((!l||o(p,m,x[x.length-1]||void 0))&&(v=HS(i(p,x)),v[0]===Of))return v;if("children"in p&&p.children){const N=p;if(N.children&&v[0]!==US)for(R=(r?N.children.length:-1)+f,H=x.concat(N);R>-1&&R<N.children.length;){const Z=N.children[R];if(_=h(Z,R,H)(),_[0]===Of)return _;R=typeof _[1]=="number"?_[1]:R+f}}return v}}}function HS(t){return Array.isArray(t)?t:typeof t=="number"?[BS,t]:t==null?Ax:[t]}function ud(t,l,i,r){let s,o,f;typeof l=="function"&&typeof i!="function"?(o=void 0,f=l,s=i):(o=l,f=i,s=r),jx(t,o,h,s);function h(p,m){const x=m[m.length-1],y=x?x.children.indexOf(p):void 0;return f(p,y,x)}}const Mf={}.hasOwnProperty,qS={};function VS(t,l){const i=l||qS,r=new Map,s=new Map,o=new Map,f={...SS,...i.handlers},h={all:m,applyData:YS,definitionById:r,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:f,one:p,options:i,patch:IS,wrap:FS};return ud(t,function(x){if(x.type==="definition"||x.type==="footnoteDefinition"){const y=x.type==="definition"?r:s,k=String(x.identifier).toUpperCase();y.has(k)||y.set(k,x)}}),h;function p(x,y){const k=x.type,v=h.handlers[k];if(Mf.call(h.handlers,k)&&v)return v(h,x,y);if(h.options.passThrough&&h.options.passThrough.includes(k)){if("children"in x){const{children:R,...H}=x,N=xs(H);return N.children=h.all(x),N}return xs(x)}return(h.options.unknownHandler||ZS)(h,x,y)}function m(x){const y=[];if("children"in x){const k=x.children;let v=-1;for(;++v<k.length;){const _=h.one(k[v],x);if(_){if(v&&k[v-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=ry(_.value)),!Array.isArray(_)&&_.type==="element")){const R=_.children[0];R&&R.type==="text"&&(R.value=ry(R.value))}Array.isArray(_)?y.push(..._):y.push(_)}}}return y}}function IS(t,l){t.position&&(l.position=N2(t))}function YS(t,l){let i=l;if(t&&t.data){const r=t.data.hName,s=t.data.hChildren,o=t.data.hProperties;if(typeof r=="string")if(i.type==="element")i.tagName=r;else{const f="children"in i?i.children:[i];i={type:"element",tagName:r,properties:{},children:f}}i.type==="element"&&o&&Object.assign(i.properties,xs(o)),"children"in i&&i.children&&s!==null&&s!==void 0&&(i.children=s)}return i}function ZS(t,l){const i=l.data||{},r="value"in l&&!(Mf.call(i,"hProperties")||Mf.call(i,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function FS(t,l){const i=[];let r=-1;for(l&&i.push({type:"text",value:`
59
59
  `});++r<t.length;)r&&i.push({type:"text",value:`
60
60
  `}),i.push(t[r]);return l&&t.length>0&&i.push({type:"text",value:`
61
61
  `}),i}function ry(t){let l=0,i=t.charCodeAt(l);for(;i===9||i===32;)l++,i=t.charCodeAt(l);return t.slice(l)}function uy(t,l){const i=VS(t,l),r=i.one(t,void 0),s=DS(i),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
62
- `},s),o}function QS(t,l){return t&&"run"in t?async function(i,r){const s=uy(i,{file:r,...l});await t.run(s,r)}:function(i,r){return uy(i,{file:r,...t||l})}}function sy(t){if(t)throw t}var lf,oy;function GS(){if(oy)return lf;oy=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},o=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var x=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var k;for(k in m);return typeof k>"u"||t.call(m,k)},f=function(m,x){i&&x.name==="__proto__"?i(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},h=function(m,x){if(x==="__proto__")if(t.call(m,x)){if(r)return r(m,x).value}else return;return m[x]};return lf=function p(){var m,x,y,k,v,_,R=arguments[0],H=1,N=arguments.length,Z=!1;for(typeof R=="boolean"&&(Z=R,R=arguments[1]||{},H=2),(R==null||typeof R!="object"&&typeof R!="function")&&(R={});H<N;++H)if(m=arguments[H],m!=null)for(x in m)y=h(R,x),k=h(m,x),R!==k&&(Z&&k&&(o(k)||(v=s(k)))?(v?(v=!1,_=y&&s(y)?y:[]):_=y&&o(y)?y:{},f(R,{name:x,newValue:p(Z,_,k)})):typeof k<"u"&&f(R,{name:x,newValue:k}));return R},lf}var XS=GS();const af=Ay(XS);function Rf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function JS(){const t=[],l={run:i,use:r};return l;function i(...s){let o=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const x=t[++o];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,x?KS(x,h)(...m):f(null,...m)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function KS(t,l){let i;return r;function r(...f){const h=t.length>f.length;let p;h&&f.push(s);try{p=t.apply(this,f)}catch(m){const x=m;if(h&&i)throw x;return s(x)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(f,...h){i||(i=!0,l(f,...h))}function o(f){s(null,f)}}const Mn={basename:$S,dirname:PS,extname:WS,join:e_,sep:"/"};function $S(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Dr(t);let i=0,r=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let f=-1,h=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else f<0&&(o=!0,f=s+1),h>-1&&(t.codePointAt(s)===l.codePointAt(h--)?h<0&&(r=s):(h=-1,r=f));return i===r?r=f:r<0&&(r=t.length),t.slice(i,r)}function PS(t){if(Dr(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function WS(t){Dr(t);let l=t.length,i=-1,r=0,s=-1,o=0,f;for(;l--;){const h=t.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}i<0&&(f=!0,i=l+1),h===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||i<0||o===0||o===1&&s===i-1&&s===r+1?"":t.slice(s,i)}function e_(...t){let l=-1,i;for(;++l<t.length;)Dr(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":t_(i)}function t_(t){Dr(t);const l=t.codePointAt(0)===47;let i=n_(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function n_(t,l){let i="",r=0,s=-1,o=0,f=-1,h,p;for(;++f<=t.length;){if(f<t.length)h=t.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||o===1))if(s!==f-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),s=f,o=0;continue}}else if(i.length>0){i="",r=0,s=f,o=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(s+1,f):i=t.slice(s+1,f),r=f-s-1;s=f,o=0}else h===46&&o>-1?o++:o=-1}return i}function Dr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const l_={cwd:a_};function a_(){return"/"}function Lf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function i_(t){if(typeof t=="string")t=new URL(t);else if(!Lf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return r_(t)}function r_(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const rf=["history","path","basename","stem","extname","dirname"];class Nx{constructor(l){let i;l?Lf(l)?i={path:l}:typeof l=="string"||u_(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":l_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rf.length;){const o=rf[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let s;for(s in i)rf.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(l){sf(l,"basename"),uf(l,"basename"),this.path=Mn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(l){cy(this.basename,"dirname"),this.path=Mn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(l){if(uf(l,"extname"),cy(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Lf(l)&&(l=i_(l)),sf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(l){sf(l,"stem"),uf(l,"stem"),this.path=Mn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const s=this.message(l,i,r);throw s.fatal=!0,s}info(l,i,r){const s=this.message(l,i,r);return s.fatal=void 0,s}message(l,i,r){const s=new Ut(l,i,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function uf(t,l){if(t&&t.includes(Mn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Mn.sep+"`")}function sf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function cy(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function u_(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const s_=(function(t){const r=this.constructor.prototype,s=r[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),o_={}.hasOwnProperty;class sd extends s_{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=JS()}copy(){const l=new sd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(af(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ff("data",this.frozen),this.namespace[l]=i,this):o_.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ff("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=i.call(l,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Ku(l),r=this.parser||this.Parser;return of("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),of("process",this.parser||this.Parser),cf("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(o,f){const h=Ku(l),p=r.parse(h);r.run(p,h,function(x,y,k){if(x||!y||!k)return m(x);const v=y,_=r.stringify(v,k);d_(_)?k.value=_:k.result=_,m(x,k)});function m(x,y){x||!y?f(x):o?o(y):i(void 0,y)}}}processSync(l){let i=!1,r;return this.freeze(),of("processSync",this.parser||this.Parser),cf("processSync",this.compiler||this.Compiler),this.process(l,s),dy("processSync","process",i),r;function s(o,f){i=!0,sy(o),r=f}}run(l,i,r){fy(l),this.freeze();const s=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(f,h){const p=Ku(i);s.run(l,p,m);function m(x,y,k){const v=y||l;x?h(x):f?f(v):r(void 0,v,k)}}}runSync(l,i){let r=!1,s;return this.run(l,i,o),dy("runSync","run",r),s;function o(f,h){sy(f),s=h,r=!0}}stringify(l,i){this.freeze();const r=Ku(i),s=this.compiler||this.Compiler;return cf("stringify",s),fy(l),s(l,r)}use(l,...i){const r=this.attachers,s=this.namespace;if(ff("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[x,...y]=m;p(x,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))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");h(m.plugins),m.settings&&(s.settings=af(!0,s.settings,m.settings))}function h(m){let x=-1;if(m!=null)if(Array.isArray(m))for(;++x<m.length;){const y=m[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,x){let y=-1,k=-1;for(;++y<r.length;)if(r[y][0]===m){k=y;break}if(k===-1)r.push([m,...x]);else if(x.length>0){let[v,..._]=x;const R=r[k][1];Rf(R)&&Rf(v)&&(v=af(!0,R,v)),r[k]=[m,v,..._]}}}}const c_=new sd().freeze();function of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ff(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fy(t){if(!Rf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dy(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Ku(t){return f_(t)?t:new Nx(t)}function f_(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function d_(t){return typeof t=="string"||h_(t)}function h_(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const m_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hy=[],my={allowDangerousHtml:!0},p_=/^(https?|ircs?|mailto|xmpp)$/i,g_=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function y_(t){const l=x_(t),i=b_(t);return v_(l.runSync(l.parse(i),i),t)}function x_(t){const l=t.rehypePlugins||hy,i=t.remarkPlugins||hy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...my}:my;return c_().use($w).use(i).use(QS,r).use(l)}function b_(t){const l=t.children||"",i=new Nx;return typeof l=="string"&&(i.value=l),i}function v_(t,l){const i=l.allowedElements,r=l.allowElement,s=l.components,o=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||k_;for(const x of g_)Object.hasOwn(l,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+m_+x.id,void 0);return ud(t,m),M2(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function m(x,y,k){if(x.type==="raw"&&k&&typeof y=="number")return f?k.children.splice(y,1):k.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let v;for(v in ef)if(Object.hasOwn(ef,v)&&Object.hasOwn(x.properties,v)){const _=x.properties[v],R=ef[v];(R===null||R.includes(x.tagName))&&(x.properties[v]=p(String(_||""),v,x))}}if(x.type==="element"){let v=i?!i.includes(x.tagName):o?o.includes(x.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(x,y,k)),v&&k&&typeof y=="number")return h&&x.children?k.children.splice(y,1,...x.children):k.children.splice(y,1),y}}}function k_(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||i!==-1&&l>i||r!==-1&&l>r||p_.test(t.slice(0,l))?t:""}function py(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,s=i.indexOf(l);for(;s!==-1;)r++,s=i.indexOf(l,s+l.length);return r}function w_(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S_(t,l,i){const s=As((i||{}).ignore||[]),o=__(l);let f=-1;for(;++f<o.length;)Ax(t,"text",h);function h(m,x){let y=-1,k;for(;++y<x.length;){const v=x[y],_=k?k.children:void 0;if(s(v,_?_.indexOf(v):void 0,k))return;k=v}if(k)return p(m,x)}function p(m,x){const y=x[x.length-1],k=o[f][0],v=o[f][1];let _=0;const H=y.children.indexOf(m);let N=!1,Z=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const te=q.index,ee={index:q.index,input:q.input,stack:[...x,m]};let O=v(...q,ee);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?k.lastIndex=te+1:(_!==te&&Z.push({type:"text",value:m.value.slice(_,te)}),Array.isArray(O)?Z.push(...O):O&&Z.push(O),_=te+q[0].length,N=!0),!k.global)break;q=k.exec(m.value)}return N?(_<m.value.length&&Z.push({type:"text",value:m.value.slice(_)}),y.children.splice(H,1,...Z)):Z=[m],H+Z.length}}function __(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const s=i[r];l.push([E_(s[0]),C_(s[1])])}return l}function E_(t){return typeof t=="string"?new RegExp(w_(t),"g"):t}function C_(t){return typeof t=="function"?t:function(){return t}}const df="phrasing",hf=["autolink","link","image","label"];function j_(){return{transforms:[M_],enter:{literalAutolink:N_,literalAutolinkEmail:mf,literalAutolinkHttp:mf,literalAutolinkWww:mf},exit:{literalAutolink:O_,literalAutolinkEmail:z_,literalAutolinkHttp:T_,literalAutolinkWww:D_}}}function A_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:":",before:"[ps]",after:"\\/",inConstruct:df,notInConstruct:hf}]}}function N_(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function mf(t){this.config.enter.autolinkProtocol.call(this,t)}function T_(t){this.config.exit.autolinkProtocol.call(this,t)}function D_(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function z_(t){this.config.exit.autolinkEmail.call(this,t)}function O_(t){this.exit(t)}function M_(t){S_(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L_]],{ignore:["link","linkReference"]})}function R_(t,l,i,r,s){let o="";if(!Tx(s)||(/^w/i.test(l)&&(i=l+i,l="",o="http://"),!B_(i)))return!1;const f=U_(i+r);if(!f[0])return!1;const h={type:"link",title:null,url:o+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function L_(t,l,i,r){return!Tx(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function B_(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function U_(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const s=py(t,"(");let o=py(t,")");for(;r!==-1&&s>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function Tx(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||ka(i)||Es(i))&&(!l||i!==47)}Dx.peek=G_;function H_(){this.buffer()}function q_(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function V_(){this.buffer()}function Y_(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function I_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=An(this.sliceSerialize(t)).toLowerCase(),i.label=l}function Z_(t){this.exit(t)}function F_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=An(this.sliceSerialize(t)).toLowerCase(),i.label=l}function Q_(t){this.exit(t)}function G_(){return"["}function Dx(t,l,i,r){const s=i.createTracker(r);let o=s.move("[^");const f=i.enter("footnoteReference"),h=i.enter("reference");return o+=s.move(i.safe(i.associationId(t),{after:"]",before:o})),h(),f(),o+=s.move("]"),o}function X_(){return{enter:{gfmFootnoteCallString:H_,gfmFootnoteCall:q_,gfmFootnoteDefinitionLabelString:V_,gfmFootnoteDefinition:Y_},exit:{gfmFootnoteCallString:I_,gfmFootnoteCall:Z_,gfmFootnoteDefinitionLabelString:F_,gfmFootnoteDefinition:Q_}}}function J_(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Dx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,o,f){const h=o.createTracker(f);let p=h.move("[^");const m=o.enter("footnoteDefinition"),x=o.enter("label");return p+=h.move(o.safe(o.associationId(r),{before:p,after:"]"})),x(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
62
+ `},s),o}function QS(t,l){return t&&"run"in t?async function(i,r){const s=uy(i,{file:r,...l});await t.run(s,r)}:function(i,r){return uy(i,{file:r,...t||l})}}function sy(t){if(t)throw t}var lf,oy;function GS(){if(oy)return lf;oy=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,i=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},o=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var x=t.call(m,"constructor"),y=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!x&&!y)return!1;var k;for(k in m);return typeof k>"u"||t.call(m,k)},f=function(m,x){i&&x.name==="__proto__"?i(m,x.name,{enumerable:!0,configurable:!0,value:x.newValue,writable:!0}):m[x.name]=x.newValue},h=function(m,x){if(x==="__proto__")if(t.call(m,x)){if(r)return r(m,x).value}else return;return m[x]};return lf=function p(){var m,x,y,k,v,_,R=arguments[0],H=1,N=arguments.length,Z=!1;for(typeof R=="boolean"&&(Z=R,R=arguments[1]||{},H=2),(R==null||typeof R!="object"&&typeof R!="function")&&(R={});H<N;++H)if(m=arguments[H],m!=null)for(x in m)y=h(R,x),k=h(m,x),R!==k&&(Z&&k&&(o(k)||(v=s(k)))?(v?(v=!1,_=y&&s(y)?y:[]):_=y&&o(y)?y:{},f(R,{name:x,newValue:p(Z,_,k)})):typeof k<"u"&&f(R,{name:x,newValue:k}));return R},lf}var XS=GS();const af=jy(XS);function Rf(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function JS(){const t=[],l={run:i,use:r};return l;function i(...s){let o=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);h(null,...s);function h(p,...m){const x=t[++o];let y=-1;if(p){f(p);return}for(;++y<s.length;)(m[y]===null||m[y]===void 0)&&(m[y]=s[y]);s=m,x?KS(x,h)(...m):f(null,...m)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),l}}function KS(t,l){let i;return r;function r(...f){const h=t.length>f.length;let p;h&&f.push(s);try{p=t.apply(this,f)}catch(m){const x=m;if(h&&i)throw x;return s(x)}h||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}function s(f,...h){i||(i=!0,l(f,...h))}function o(f){s(null,f)}}const Mn={basename:$S,dirname:PS,extname:WS,join:e_,sep:"/"};function $S(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');Dr(t);let i=0,r=-1,s=t.length,o;if(l===void 0||l.length===0||l.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else r<0&&(o=!0,r=s+1);return r<0?"":t.slice(i,r)}if(l===t)return"";let f=-1,h=l.length-1;for(;s--;)if(t.codePointAt(s)===47){if(o){i=s+1;break}}else f<0&&(o=!0,f=s+1),h>-1&&(t.codePointAt(s)===l.codePointAt(h--)?h<0&&(r=s):(h=-1,r=f));return i===r?r=f:r<0&&(r=t.length),t.slice(i,r)}function PS(t){if(Dr(t),t.length===0)return".";let l=-1,i=t.length,r;for(;--i;)if(t.codePointAt(i)===47){if(r){l=i;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function WS(t){Dr(t);let l=t.length,i=-1,r=0,s=-1,o=0,f;for(;l--;){const h=t.codePointAt(l);if(h===47){if(f){r=l+1;break}continue}i<0&&(f=!0,i=l+1),h===46?s<0?s=l:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||i<0||o===0||o===1&&s===i-1&&s===r+1?"":t.slice(s,i)}function e_(...t){let l=-1,i;for(;++l<t.length;)Dr(t[l]),t[l]&&(i=i===void 0?t[l]:i+"/"+t[l]);return i===void 0?".":t_(i)}function t_(t){Dr(t);const l=t.codePointAt(0)===47;let i=n_(t,!l);return i.length===0&&!l&&(i="."),i.length>0&&t.codePointAt(t.length-1)===47&&(i+="/"),l?"/"+i:i}function n_(t,l){let i="",r=0,s=-1,o=0,f=-1,h,p;for(;++f<=t.length;){if(f<t.length)h=t.codePointAt(f);else{if(h===47)break;h=47}if(h===47){if(!(s===f-1||o===1))if(s!==f-1&&o===2){if(i.length<2||r!==2||i.codePointAt(i.length-1)!==46||i.codePointAt(i.length-2)!==46){if(i.length>2){if(p=i.lastIndexOf("/"),p!==i.length-1){p<0?(i="",r=0):(i=i.slice(0,p),r=i.length-1-i.lastIndexOf("/")),s=f,o=0;continue}}else if(i.length>0){i="",r=0,s=f,o=0;continue}}l&&(i=i.length>0?i+"/..":"..",r=2)}else i.length>0?i+="/"+t.slice(s+1,f):i=t.slice(s+1,f),r=f-s-1;s=f,o=0}else h===46&&o>-1?o++:o=-1}return i}function Dr(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const l_={cwd:a_};function a_(){return"/"}function Lf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function i_(t){if(typeof t=="string")t=new URL(t);else if(!Lf(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return r_(t)}function r_(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let i=-1;for(;++i<l.length;)if(l.codePointAt(i)===37&&l.codePointAt(i+1)===50){const r=l.codePointAt(i+2);if(r===70||r===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(l)}const rf=["history","path","basename","stem","extname","dirname"];class Nx{constructor(l){let i;l?Lf(l)?i={path:l}:typeof l=="string"||u_(l)?i={value:l}:i=l:i={},this.cwd="cwd"in i?"":l_.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<rf.length;){const o=rf[r];o in i&&i[o]!==void 0&&i[o]!==null&&(this[o]=o==="history"?[...i[o]]:i[o])}let s;for(s in i)rf.includes(s)||(this[s]=i[s])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(l){sf(l,"basename"),uf(l,"basename"),this.path=Mn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(l){cy(this.basename,"dirname"),this.path=Mn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(l){if(uf(l,"extname"),cy(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){Lf(l)&&(l=i_(l)),sf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(l){sf(l,"stem"),uf(l,"stem"),this.path=Mn.join(this.dirname||"",l+(this.extname||""))}fail(l,i,r){const s=this.message(l,i,r);throw s.fatal=!0,s}info(l,i,r){const s=this.message(l,i,r);return s.fatal=void 0,s}message(l,i,r){const s=new Ut(l,i,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function uf(t,l){if(t&&t.includes(Mn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Mn.sep+"`")}function sf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function cy(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function u_(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const s_=(function(t){const r=this.constructor.prototype,s=r[t],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),o_={}.hasOwnProperty;class sd extends s_{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=JS()}copy(){const l=new sd;let i=-1;for(;++i<this.attachers.length;){const r=this.attachers[i];l.use(...r)}return l.data(af(!0,{},this.namespace)),l}data(l,i){return typeof l=="string"?arguments.length===2?(ff("data",this.frozen),this.namespace[l]=i,this):o_.call(this.namespace,l)&&this.namespace[l]||void 0:l?(ff("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[i,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=i.call(l,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const i=Ku(l),r=this.parser||this.Parser;return of("parse",r),r(String(i),i)}process(l,i){const r=this;return this.freeze(),of("process",this.parser||this.Parser),cf("process",this.compiler||this.Compiler),i?s(void 0,i):new Promise(s);function s(o,f){const h=Ku(l),p=r.parse(h);r.run(p,h,function(x,y,k){if(x||!y||!k)return m(x);const v=y,_=r.stringify(v,k);d_(_)?k.value=_:k.result=_,m(x,k)});function m(x,y){x||!y?f(x):o?o(y):i(void 0,y)}}}processSync(l){let i=!1,r;return this.freeze(),of("processSync",this.parser||this.Parser),cf("processSync",this.compiler||this.Compiler),this.process(l,s),dy("processSync","process",i),r;function s(o,f){i=!0,sy(o),r=f}}run(l,i,r){fy(l),this.freeze();const s=this.transformers;return!r&&typeof i=="function"&&(r=i,i=void 0),r?o(void 0,r):new Promise(o);function o(f,h){const p=Ku(i);s.run(l,p,m);function m(x,y,k){const v=y||l;x?h(x):f?f(v):r(void 0,v,k)}}}runSync(l,i){let r=!1,s;return this.run(l,i,o),dy("runSync","run",r),s;function o(f,h){sy(f),s=h,r=!0}}stringify(l,i){this.freeze();const r=Ku(i),s=this.compiler||this.Compiler;return cf("stringify",s),fy(l),s(l,r)}use(l,...i){const r=this.attachers,s=this.namespace;if(ff("use",this.frozen),l!=null)if(typeof l=="function")p(l,i);else if(typeof l=="object")Array.isArray(l)?h(l):f(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function o(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[x,...y]=m;p(x,y)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))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");h(m.plugins),m.settings&&(s.settings=af(!0,s.settings,m.settings))}function h(m){let x=-1;if(m!=null)if(Array.isArray(m))for(;++x<m.length;){const y=m[x];o(y)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,x){let y=-1,k=-1;for(;++y<r.length;)if(r[y][0]===m){k=y;break}if(k===-1)r.push([m,...x]);else if(x.length>0){let[v,..._]=x;const R=r[k][1];Rf(R)&&Rf(v)&&(v=af(!0,R,v)),r[k]=[m,v,..._]}}}}const c_=new sd().freeze();function of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function cf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ff(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function fy(t){if(!Rf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function dy(t,l,i){if(!i)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function Ku(t){return f_(t)?t:new Nx(t)}function f_(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function d_(t){return typeof t=="string"||h_(t)}function h_(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const m_="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",hy=[],my={allowDangerousHtml:!0},p_=/^(https?|ircs?|mailto|xmpp)$/i,g_=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function y_(t){const l=x_(t),i=b_(t);return v_(l.runSync(l.parse(i),i),t)}function x_(t){const l=t.rehypePlugins||hy,i=t.remarkPlugins||hy,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...my}:my;return c_().use($w).use(i).use(QS,r).use(l)}function b_(t){const l=t.children||"",i=new Nx;return typeof l=="string"&&(i.value=l),i}function v_(t,l){const i=l.allowedElements,r=l.allowElement,s=l.components,o=l.disallowedElements,f=l.skipHtml,h=l.unwrapDisallowed,p=l.urlTransform||k_;for(const x of g_)Object.hasOwn(l,x.from)&&(""+x.from+(x.to?"use `"+x.to+"` instead":"remove it")+m_+x.id,void 0);return ud(t,m),M2(t,{Fragment:g.Fragment,components:s,ignoreInvalidStyle:!0,jsx:g.jsx,jsxs:g.jsxs,passKeys:!0,passNode:!0});function m(x,y,k){if(x.type==="raw"&&k&&typeof y=="number")return f?k.children.splice(y,1):k.children[y]={type:"text",value:x.value},y;if(x.type==="element"){let v;for(v in ef)if(Object.hasOwn(ef,v)&&Object.hasOwn(x.properties,v)){const _=x.properties[v],R=ef[v];(R===null||R.includes(x.tagName))&&(x.properties[v]=p(String(_||""),v,x))}}if(x.type==="element"){let v=i?!i.includes(x.tagName):o?o.includes(x.tagName):!1;if(!v&&r&&typeof y=="number"&&(v=!r(x,y,k)),v&&k&&typeof y=="number")return h&&x.children?k.children.splice(y,1,...x.children):k.children.splice(y,1),y}}}function k_(t){const l=t.indexOf(":"),i=t.indexOf("?"),r=t.indexOf("#"),s=t.indexOf("/");return l===-1||s!==-1&&l>s||i!==-1&&l>i||r!==-1&&l>r||p_.test(t.slice(0,l))?t:""}function py(t,l){const i=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,s=i.indexOf(l);for(;s!==-1;)r++,s=i.indexOf(l,s+l.length);return r}function w_(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S_(t,l,i){const s=js((i||{}).ignore||[]),o=__(l);let f=-1;for(;++f<o.length;)jx(t,"text",h);function h(m,x){let y=-1,k;for(;++y<x.length;){const v=x[y],_=k?k.children:void 0;if(s(v,_?_.indexOf(v):void 0,k))return;k=v}if(k)return p(m,x)}function p(m,x){const y=x[x.length-1],k=o[f][0],v=o[f][1];let _=0;const H=y.children.indexOf(m);let N=!1,Z=[];k.lastIndex=0;let q=k.exec(m.value);for(;q;){const te=q.index,ee={index:q.index,input:q.input,stack:[...x,m]};let O=v(...q,ee);if(typeof O=="string"&&(O=O.length>0?{type:"text",value:O}:void 0),O===!1?k.lastIndex=te+1:(_!==te&&Z.push({type:"text",value:m.value.slice(_,te)}),Array.isArray(O)?Z.push(...O):O&&Z.push(O),_=te+q[0].length,N=!0),!k.global)break;q=k.exec(m.value)}return N?(_<m.value.length&&Z.push({type:"text",value:m.value.slice(_)}),y.children.splice(H,1,...Z)):Z=[m],H+Z.length}}function __(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const i=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<i.length;){const s=i[r];l.push([E_(s[0]),C_(s[1])])}return l}function E_(t){return typeof t=="string"?new RegExp(w_(t),"g"):t}function C_(t){return typeof t=="function"?t:function(){return t}}const df="phrasing",hf=["autolink","link","image","label"];function A_(){return{transforms:[M_],enter:{literalAutolink:N_,literalAutolinkEmail:mf,literalAutolinkHttp:mf,literalAutolinkWww:mf},exit:{literalAutolink:O_,literalAutolinkEmail:z_,literalAutolinkHttp:T_,literalAutolinkWww:D_}}}function j_(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:df,notInConstruct:hf},{character:":",before:"[ps]",after:"\\/",inConstruct:df,notInConstruct:hf}]}}function N_(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function mf(t){this.config.enter.autolinkProtocol.call(this,t)}function T_(t){this.config.exit.autolinkProtocol.call(this,t)}function D_(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function z_(t){this.config.exit.autolinkEmail.call(this,t)}function O_(t){this.exit(t)}function M_(t){S_(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R_],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L_]],{ignore:["link","linkReference"]})}function R_(t,l,i,r,s){let o="";if(!Tx(s)||(/^w/i.test(l)&&(i=l+i,l="",o="http://"),!B_(i)))return!1;const f=U_(i+r);if(!f[0])return!1;const h={type:"link",title:null,url:o+l+f[0],children:[{type:"text",value:l+f[0]}]};return f[1]?[h,{type:"text",value:f[1]}]:h}function L_(t,l,i,r){return!Tx(r,!0)||/[-\d_]$/.test(i)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+i,children:[{type:"text",value:l+"@"+i}]}}function B_(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function U_(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let i=l[0],r=i.indexOf(")");const s=py(t,"(");let o=py(t,")");for(;r!==-1&&s>o;)t+=i.slice(0,r+1),i=i.slice(r+1),r=i.indexOf(")"),o++;return[t,i]}function Tx(t,l){const i=t.input.charCodeAt(t.index-1);return(t.index===0||ka(i)||Es(i))&&(!l||i!==47)}Dx.peek=G_;function H_(){this.buffer()}function q_(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function V_(){this.buffer()}function I_(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Y_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=jn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function Z_(t){this.exit(t)}function F_(t){const l=this.resume(),i=this.stack[this.stack.length-1];i.type,i.identifier=jn(this.sliceSerialize(t)).toLowerCase(),i.label=l}function Q_(t){this.exit(t)}function G_(){return"["}function Dx(t,l,i,r){const s=i.createTracker(r);let o=s.move("[^");const f=i.enter("footnoteReference"),h=i.enter("reference");return o+=s.move(i.safe(i.associationId(t),{after:"]",before:o})),h(),f(),o+=s.move("]"),o}function X_(){return{enter:{gfmFootnoteCallString:H_,gfmFootnoteCall:q_,gfmFootnoteDefinitionLabelString:V_,gfmFootnoteDefinition:I_},exit:{gfmFootnoteCallString:Y_,gfmFootnoteCall:Z_,gfmFootnoteDefinitionLabelString:F_,gfmFootnoteDefinition:Q_}}}function J_(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:i,footnoteReference:Dx},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function i(r,s,o,f){const h=o.createTracker(f);let p=h.move("[^");const m=o.enter("footnoteDefinition"),x=o.enter("label");return p+=h.move(o.safe(o.associationId(r),{before:p,after:"]"})),x(),p+=h.move("]:"),r.children&&r.children.length>0&&(h.shift(4),p+=h.move((l?`
63
63
  `:" ")+o.indentLines(o.containerFlow(r,h.current()),l?zx:K_))),m(),p}}function K_(t,l,i){return l===0?t:zx(t,l,i)}function zx(t,l,i){return(i?"":" ")+t}const $_=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Ox.peek=n4;function P_(){return{canContainEols:["delete"],enter:{strikethrough:e4},exit:{strikethrough:t4}}}function W_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$_}],handlers:{delete:Ox}}}function e4(t){this.enter({type:"delete",children:[]},t)}function t4(t){this.exit(t)}function Ox(t,l,i,r){const s=i.createTracker(r),o=i.enter("strikethrough");let f=s.move("~~");return f+=i.containerPhrasing(t,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),o(),f}function n4(){return"~"}function l4(t){return t.length}function a4(t,l){const i=l||{},r=(i.align||[]).concat(),s=i.stringLength||l4,o=[],f=[],h=[],p=[];let m=0,x=-1;for(;++x<t.length;){const R=[],H=[];let N=-1;for(t[x].length>m&&(m=t[x].length);++N<t[x].length;){const Z=i4(t[x][N]);if(i.alignDelimiters!==!1){const q=s(Z);H[N]=q,(p[N]===void 0||q>p[N])&&(p[N]=q)}R.push(Z)}f[x]=R,h[x]=H}let y=-1;if(typeof r=="object"&&"length"in r)for(;++y<m;)o[y]=gy(r[y]);else{const R=gy(r);for(;++y<m;)o[y]=R}y=-1;const k=[],v=[];for(;++y<m;){const R=o[y];let H="",N="";R===99?(H=":",N=":"):R===108?H=":":R===114&&(N=":");let Z=i.alignDelimiters===!1?1:Math.max(1,p[y]-H.length-N.length);const q=H+"-".repeat(Z)+N;i.alignDelimiters!==!1&&(Z=H.length+Z+N.length,Z>p[y]&&(p[y]=Z),v[y]=Z),k[y]=q}f.splice(1,0,k),h.splice(1,0,v),x=-1;const _=[];for(;++x<f.length;){const R=f[x],H=h[x];y=-1;const N=[];for(;++y<m;){const Z=R[y]||"";let q="",te="";if(i.alignDelimiters!==!1){const ee=p[y]-(H[y]||0),O=o[y];O===114?q=" ".repeat(ee):O===99?ee%2?(q=" ".repeat(ee/2+.5),te=" ".repeat(ee/2-.5)):(q=" ".repeat(ee/2),te=q):te=" ".repeat(ee)}i.delimiterStart!==!1&&!y&&N.push("|"),i.padding!==!1&&!(i.alignDelimiters===!1&&Z==="")&&(i.delimiterStart!==!1||y)&&N.push(" "),i.alignDelimiters!==!1&&N.push(q),N.push(Z),i.alignDelimiters!==!1&&N.push(te),i.padding!==!1&&N.push(" "),(i.delimiterEnd!==!1||y!==m-1)&&N.push("|")}_.push(i.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return _.join(`
64
64
  `)}function i4(t){return t==null?"":String(t)}function gy(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function r4(t,l,i,r){const s=i.enter("blockquote"),o=i.createTracker(r);o.move("> "),o.shift(2);const f=i.indentLines(i.containerFlow(t,o.current()),u4);return s(),f}function u4(t,l,i){return">"+(i?"":" ")+t}function s4(t,l){return yy(t,l.inConstruct,!0)&&!yy(t,l.notInConstruct,!1)}function yy(t,l,i){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return i;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function xy(t,l,i,r){let s=-1;for(;++s<i.unsafe.length;)if(i.unsafe[s].character===`
65
65
  `&&s4(i.stack,i.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
@@ -67,13 +67,13 @@ Error generating stack: `+u.message+`
67
67
  `,encode:["`"],...h.current()})),y()}return x+=h.move(`
68
68
  `),o&&(x+=h.move(o+`
69
69
  `)),x+=h.move(p),m(),x}function h4(t,l,i){return(i?"":" ")+t}function od(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function m4(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("definition");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("[");return m+=p.move(i.safe(i.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),h(),!t.url||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":`
70
- `,...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),f(),m}function p4(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function jr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function bs(t,l,i){const r=gi(t),s=gi(l);return r===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mx.peek=g4;function Mx(t,l,i,r){const s=p4(i),o=i.enter("emphasis"),f=i.createTracker(r),h=f.move(s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),x=bs(r.before.charCodeAt(r.before.length-1),m,s);x.inside&&(p=jr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+jr(y));const v=f.move(s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:x.outside},h+p+v}function g4(t,l,i){return i.options.emphasis||"*"}function y4(t,l){let i=!1;return ud(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,Of}),!!((!t.depth||t.depth<3)&&ed(t)&&(l.options.setext||i))}function x4(t,l,i,r){const s=Math.max(Math.min(6,t.depth||1),1),o=i.createTracker(r);if(y4(t,i)){const x=i.enter("headingSetext"),y=i.enter("phrasing"),k=i.containerPhrasing(t,{...o.current(),before:`
70
+ `,...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),f(),m}function p4(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Ar(t){return"&#x"+t.toString(16).toUpperCase()+";"}function bs(t,l,i){const r=gi(t),s=gi(l);return r===void 0?s===void 0?i==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Mx.peek=g4;function Mx(t,l,i,r){const s=p4(i),o=i.enter("emphasis"),f=i.createTracker(r),h=f.move(s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),x=bs(r.before.charCodeAt(r.before.length-1),m,s);x.inside&&(p=Ar(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+Ar(y));const v=f.move(s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:x.outside},h+p+v}function g4(t,l,i){return i.options.emphasis||"*"}function y4(t,l){let i=!1;return ud(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return i=!0,Of}),!!((!t.depth||t.depth<3)&&ed(t)&&(l.options.setext||i))}function x4(t,l,i,r){const s=Math.max(Math.min(6,t.depth||1),1),o=i.createTracker(r);if(y4(t,i)){const x=i.enter("headingSetext"),y=i.enter("phrasing"),k=i.containerPhrasing(t,{...o.current(),before:`
71
71
  `,after:`
72
72
  `});return y(),x(),k+`
73
73
  `+(s===1?"=":"-").repeat(k.length-(Math.max(k.lastIndexOf("\r"),k.lastIndexOf(`
74
74
  `))+1))}const f="#".repeat(s),h=i.enter("headingAtx"),p=i.enter("phrasing");o.move(f+" ");let m=i.containerPhrasing(t,{before:"# ",after:`
75
- `,...o.current()});return/^[\t ]/.test(m)&&(m=jr(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,i.options.closeAtx&&(m+=" "+f),p(),h(),m}Rx.peek=b4;function Rx(t){return t.value||""}function b4(){return"<"}Lx.peek=v4;function Lx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("image");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),f(),m}function v4(){return"!"}Bx.peek=k4;function Bx(t,l,i,r){const s=t.referenceType,o=i.enter("imageReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("![");const m=i.safe(t.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const x=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=x,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function k4(){return"!"}Ux.peek=w4;function Ux(t,l,i){let r=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const f=i.unsafe[o],h=i.compilePattern(f);let p;if(f.atBreak)for(;p=h.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return s+r+s}function w4(){return"`"}function Hx(t,l){const i=ed(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}qx.peek=S4;function qx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.createTracker(r);let h,p;if(Hx(t,i)){const x=i.stack;i.stack=[],h=i.enter("autolink");let y=f.move("<");return y+=f.move(i.containerPhrasing(t,{before:y,after:">",...f.current()})),y+=f.move(">"),h(),i.stack=x,y}h=i.enter("link"),p=i.enter("label");let m=f.move("[");return m+=f.move(i.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(i.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(p=i.enter("destinationRaw"),m+=f.move(i.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),p(),t.title&&(p=i.enter(`title${o}`),m+=f.move(" "+s),m+=f.move(i.safe(t.title,{before:m,after:s,...f.current()})),m+=f.move(s),p()),m+=f.move(")"),h(),m}function S4(t,l,i){return Hx(t,i)?"<":"["}Vx.peek=_4;function Vx(t,l,i,r){const s=t.referenceType,o=i.enter("linkReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const x=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=x,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function _4(){return"["}function cd(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function E4(t){const l=cd(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function C4(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Yx(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function j4(t,l,i,r){const s=i.enter("list"),o=i.bulletCurrent;let f=t.ordered?C4(i):cd(i);const h=t.ordered?f==="."?")":".":E4(i);let p=l&&i.bulletLastUsed?f===i.bulletLastUsed:!1;if(!t.ordered){const x=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&x&&(!x.children||!x.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Yx(i)===f&&x){let y=-1;for(;++y<t.children.length;){const k=t.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),i.bulletCurrent=f;const m=i.containerFlow(t,r);return i.bulletLastUsed=f,i.bulletCurrent=o,s(),m}function A4(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function N4(t,l,i,r){const s=A4(i);let o=i.bulletCurrent||cd(i);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+o);let f=o.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(f=Math.ceil(f/4)*4);const h=i.createTracker(r);h.move(o+" ".repeat(f-o.length)),h.shift(f);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,h.current()),x);return p(),m;function x(y,k,v){return k?(v?"":" ".repeat(f))+y:(v?o:o+" ".repeat(f-o.length))+y}}function T4(t,l,i,r){const s=i.enter("paragraph"),o=i.enter("phrasing"),f=i.containerPhrasing(t,r);return o(),s(),f}const D4=As(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function z4(t,l,i,r){return(t.children.some(function(f){return D4(f)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function O4(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Ix.peek=M4;function Ix(t,l,i,r){const s=O4(i),o=i.enter("strong"),f=i.createTracker(r),h=f.move(s+s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),x=bs(r.before.charCodeAt(r.before.length-1),m,s);x.inside&&(p=jr(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+jr(y));const v=f.move(s+s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:x.outside},h+p+v}function M4(t,l,i){return i.options.strong||"*"}function R4(t,l,i,r){return i.safe(t.value,r)}function L4(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function B4(t,l,i){const r=(Yx(i)+(i.options.ruleSpaces?" ":"")).repeat(L4(i));return i.options.ruleSpaces?r.slice(0,-1):r}const Zx={blockquote:r4,break:xy,code:d4,definition:m4,emphasis:Mx,hardBreak:xy,heading:x4,html:Rx,image:Lx,imageReference:Bx,inlineCode:Ux,link:qx,linkReference:Vx,list:j4,listItem:N4,paragraph:T4,root:z4,strong:Ix,text:R4,thematicBreak:B4};function U4(){return{enter:{table:H4,tableData:by,tableHeader:by,tableRow:V4},exit:{codeText:Y4,table:q4,tableData:pf,tableHeader:pf,tableRow:pf}}}function H4(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function q4(t){this.exit(t),this.data.inTable=void 0}function V4(t){this.enter({type:"tableRow",children:[]},t)}function pf(t){this.exit(t)}function by(t){this.enter({type:"tableCell",children:[]},t)}function Y4(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,I4));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function I4(t,l){return l==="|"?l:t}function Z4(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
75
+ `,...o.current()});return/^[\t ]/.test(m)&&(m=Ar(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,i.options.closeAtx&&(m+=" "+f),p(),h(),m}Rx.peek=b4;function Rx(t){return t.value||""}function b4(){return"<"}Lx.peek=v4;function Lx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.enter("image");let h=i.enter("label");const p=i.createTracker(r);let m=p.move("![");return m+=p.move(i.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),h(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(h=i.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(i.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(h=i.enter("destinationRaw"),m+=p.move(i.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),h(),t.title&&(h=i.enter(`title${o}`),m+=p.move(" "+s),m+=p.move(i.safe(t.title,{before:m,after:s,...p.current()})),m+=p.move(s),h()),m+=p.move(")"),f(),m}function v4(){return"!"}Bx.peek=k4;function Bx(t,l,i,r){const s=t.referenceType,o=i.enter("imageReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("![");const m=i.safe(t.alt,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const x=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=x,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function k4(){return"!"}Ux.peek=w4;function Ux(t,l,i){let r=t.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<i.unsafe.length;){const f=i.unsafe[o],h=i.compilePattern(f);let p;if(f.atBreak)for(;p=h.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return s+r+s}function w4(){return"`"}function Hx(t,l){const i=ed(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(i===t.url||"mailto:"+i===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}qx.peek=S4;function qx(t,l,i,r){const s=od(i),o=s==='"'?"Quote":"Apostrophe",f=i.createTracker(r);let h,p;if(Hx(t,i)){const x=i.stack;i.stack=[],h=i.enter("autolink");let y=f.move("<");return y+=f.move(i.containerPhrasing(t,{before:y,after:">",...f.current()})),y+=f.move(">"),h(),i.stack=x,y}h=i.enter("link"),p=i.enter("label");let m=f.move("[");return m+=f.move(i.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=i.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(i.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(p=i.enter("destinationRaw"),m+=f.move(i.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),p(),t.title&&(p=i.enter(`title${o}`),m+=f.move(" "+s),m+=f.move(i.safe(t.title,{before:m,after:s,...f.current()})),m+=f.move(s),p()),m+=f.move(")"),h(),m}function S4(t,l,i){return Hx(t,i)?"<":"["}Vx.peek=_4;function Vx(t,l,i,r){const s=t.referenceType,o=i.enter("linkReference");let f=i.enter("label");const h=i.createTracker(r);let p=h.move("[");const m=i.containerPhrasing(t,{before:p,after:"]",...h.current()});p+=h.move(m+"]["),f();const x=i.stack;i.stack=[],f=i.enter("reference");const y=i.safe(i.associationId(t),{before:p,after:"]",...h.current()});return f(),i.stack=x,o(),s==="full"||!m||m!==y?p+=h.move(y+"]"):s==="shortcut"?p=p.slice(0,-1):p+=h.move("]"),p}function _4(){return"["}function cd(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function E4(t){const l=cd(t),i=t.options.bulletOther;if(!i)return l==="*"?"-":"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(i===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+i+"`) to be different");return i}function C4(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function Ix(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function A4(t,l,i,r){const s=i.enter("list"),o=i.bulletCurrent;let f=t.ordered?C4(i):cd(i);const h=t.ordered?f==="."?")":".":E4(i);let p=l&&i.bulletLastUsed?f===i.bulletLastUsed:!1;if(!t.ordered){const x=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&x&&(!x.children||!x.children[0])&&i.stack[i.stack.length-1]==="list"&&i.stack[i.stack.length-2]==="listItem"&&i.stack[i.stack.length-3]==="list"&&i.stack[i.stack.length-4]==="listItem"&&i.indexStack[i.indexStack.length-1]===0&&i.indexStack[i.indexStack.length-2]===0&&i.indexStack[i.indexStack.length-3]===0&&(p=!0),Ix(i)===f&&x){let y=-1;for(;++y<t.children.length;){const k=t.children[y];if(k&&k.type==="listItem"&&k.children&&k.children[0]&&k.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(f=h),i.bulletCurrent=f;const m=i.containerFlow(t,r);return i.bulletLastUsed=f,i.bulletCurrent=o,s(),m}function j4(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function N4(t,l,i,r){const s=j4(i);let o=i.bulletCurrent||cd(i);l&&l.type==="list"&&l.ordered&&(o=(typeof l.start=="number"&&l.start>-1?l.start:1)+(i.options.incrementListMarker===!1?0:l.children.indexOf(t))+o);let f=o.length+1;(s==="tab"||s==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(f=Math.ceil(f/4)*4);const h=i.createTracker(r);h.move(o+" ".repeat(f-o.length)),h.shift(f);const p=i.enter("listItem"),m=i.indentLines(i.containerFlow(t,h.current()),x);return p(),m;function x(y,k,v){return k?(v?"":" ".repeat(f))+y:(v?o:o+" ".repeat(f-o.length))+y}}function T4(t,l,i,r){const s=i.enter("paragraph"),o=i.enter("phrasing"),f=i.containerPhrasing(t,r);return o(),s(),f}const D4=js(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function z4(t,l,i,r){return(t.children.some(function(f){return D4(f)})?i.containerPhrasing:i.containerFlow).call(i,t,r)}function O4(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}Yx.peek=M4;function Yx(t,l,i,r){const s=O4(i),o=i.enter("strong"),f=i.createTracker(r),h=f.move(s+s);let p=f.move(i.containerPhrasing(t,{after:s,before:h,...f.current()}));const m=p.charCodeAt(0),x=bs(r.before.charCodeAt(r.before.length-1),m,s);x.inside&&(p=Ar(m)+p.slice(1));const y=p.charCodeAt(p.length-1),k=bs(r.after.charCodeAt(0),y,s);k.inside&&(p=p.slice(0,-1)+Ar(y));const v=f.move(s+s);return o(),i.attentionEncodeSurroundingInfo={after:k.outside,before:x.outside},h+p+v}function M4(t,l,i){return i.options.strong||"*"}function R4(t,l,i,r){return i.safe(t.value,r)}function L4(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function B4(t,l,i){const r=(Ix(i)+(i.options.ruleSpaces?" ":"")).repeat(L4(i));return i.options.ruleSpaces?r.slice(0,-1):r}const Zx={blockquote:r4,break:xy,code:d4,definition:m4,emphasis:Mx,hardBreak:xy,heading:x4,html:Rx,image:Lx,imageReference:Bx,inlineCode:Ux,link:qx,linkReference:Vx,list:A4,listItem:N4,paragraph:T4,root:z4,strong:Yx,text:R4,thematicBreak:B4};function U4(){return{enter:{table:H4,tableData:by,tableHeader:by,tableRow:V4},exit:{codeText:I4,table:q4,tableData:pf,tableHeader:pf,tableRow:pf}}}function H4(t){const l=t._align;this.enter({type:"table",align:l.map(function(i){return i==="none"?null:i}),children:[]},t),this.data.inTable=!0}function q4(t){this.exit(t),this.data.inTable=void 0}function V4(t){this.enter({type:"tableRow",children:[]},t)}function pf(t){this.exit(t)}function by(t){this.enter({type:"tableCell",children:[]},t)}function I4(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,Y4));const i=this.stack[this.stack.length-1];i.type,i.value=l,this.exit(t)}function Y4(t,l){return l==="|"?l:t}function Z4(t){const l=t||{},i=l.tableCellPadding,r=l.tablePipeAlign,s=l.stringLength,o=i?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
76
76
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:k,table:f,tableCell:p,tableRow:h}};function f(v,_,R,H){return m(x(v,R,H),v.align)}function h(v,_,R,H){const N=y(v,R,H),Z=m([N]);return Z.slice(0,Z.indexOf(`
77
- `))}function p(v,_,R,H){const N=R.enter("tableCell"),Z=R.enter("phrasing"),q=R.containerPhrasing(v,{...H,before:o,after:o});return Z(),N(),q}function m(v,_){return a4(v,{align:_,alignDelimiters:r,padding:i,stringLength:s})}function x(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("table");for(;++N<H.length;)Z[N]=y(H[N],_,R);return q(),Z}function y(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("tableRow");for(;++N<H.length;)Z[N]=p(H[N],v,_,R);return q(),Z}function k(v,_,R){let H=Zx.inlineCode(v,_,R);return R.stack.includes("tableCell")&&(H=H.replace(/\|/g,"\\$&")),H}}function F4(){return{exit:{taskListCheckValueChecked:vy,taskListCheckValueUnchecked:vy,paragraph:G4}}}function Q4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X4}}}function vy(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function G4(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const s=l.children;let o=-1,f;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){f=h;break}}f===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function X4(t,l,i,r){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);o&&h.move(f);let p=Zx.listItem(t,l,i,{...r,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(x){return x+f}}function J4(){return[j_(),X_(),P_(),U4(),F4()]}function K4(t){return{extensions:[A_(),J_(t),W_(),Z4(t),Q4()]}}const $4={tokenize:lE,partial:!0},Fx={tokenize:aE,partial:!0},Qx={tokenize:iE,partial:!0},Gx={tokenize:rE,partial:!0},P4={tokenize:uE,partial:!0},Xx={name:"wwwAutolink",tokenize:tE,previous:Kx},Jx={name:"protocolAutolink",tokenize:nE,previous:$x},fl={name:"emailAutolink",tokenize:eE,previous:Px},Un={};function W4(){return{text:Un}}let da=48;for(;da<123;)Un[da]=fl,da++,da===58?da=65:da===91&&(da=97);Un[43]=fl;Un[45]=fl;Un[46]=fl;Un[95]=fl;Un[72]=[fl,Jx];Un[104]=[fl,Jx];Un[87]=[fl,Xx];Un[119]=[fl,Xx];function eE(t,l,i){const r=this;let s,o;return f;function f(y){return!Bf(y)||!Px.call(r,r.previous)||fd(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Bf(y)?(t.consume(y),h):y===64?(t.consume(y),p):i(y)}function p(y){return y===46?t.check(P4,x,m)(y):y===45||y===95||Bt(y)?(o=!0,t.consume(y),p):x(y)}function m(y){return t.consume(y),s=!0,p}function x(y){return o&&s&&Yt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):i(y)}}function tE(t,l,i){const r=this;return s;function s(f){return f!==87&&f!==119||!Kx.call(r,r.previous)||fd(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($4,t.attempt(Fx,t.attempt(Qx,o),i),i)(f))}function o(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(f)}}function nE(t,l,i){const r=this;let s="",o=!1;return f;function f(y){return(y===72||y===104)&&$x.call(r,r.previous)&&!fd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(Yt(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const k=s.toLowerCase();if(k==="http"||k==="https")return t.consume(y),p}return i(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):i(y)}function m(y){return y===null||gs(y)||it(y)||ka(y)||Es(y)?i(y):t.attempt(Fx,t.attempt(Qx,x),i)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function lE(t,l,i){let r=0;return s;function s(f){return(f===87||f===119)&&r<3?(r++,t.consume(f),s):f===46&&r===3?(t.consume(f),o):i(f)}function o(f){return f===null?i(f):l(f)}}function aE(t,l,i){let r,s,o;return f;function f(m){return m===46||m===95?t.check(Gx,p,h)(m):m===null||it(m)||ka(m)||m!==45&&Es(m)?p(m):(o=!0,t.consume(m),f)}function h(m){return m===95?r=!0:(s=r,r=void 0),t.consume(m),f}function p(m){return s||r||!o?i(m):l(m)}}function iE(t,l){let i=0,r=0;return s;function s(f){return f===40?(i++,t.consume(f),s):f===41&&r<i?o(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(Gx,l,o)(f):f===null||it(f)||ka(f)?l(f):(t.consume(f),s)}function o(f){return f===41&&r++,t.consume(f),s}}function rE(t,l,i){return r;function r(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),r):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||it(h)||ka(h)?l(h):i(h)}function s(h){return h===null||h===40||h===91||it(h)||ka(h)?l(h):r(h)}function o(h){return Yt(h)?f(h):i(h)}function f(h){return h===59?(t.consume(h),r):Yt(h)?(t.consume(h),f):i(h)}}function uE(t,l,i){return r;function r(o){return t.consume(o),s}function s(o){return Bt(o)?i(o):l(o)}}function Kx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||it(t)}function $x(t){return!Yt(t)}function Px(t){return!(t===47||Bf(t))}function Bf(t){return t===43||t===45||t===46||t===95||Bt(t)}function fd(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const sE={tokenize:gE,partial:!0};function oE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hE,continuation:{tokenize:mE},exit:pE}},text:{91:{name:"gfmFootnoteCall",tokenize:dE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cE,resolveTo:fE}}}}function cE(t,l,i){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let f;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!f||!f._balanced)return i(p);const m=An(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function fE(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",f,l],["exit",f,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...h),t}function dE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,f;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?i(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!f||y===null||y===91||it(y))return i(y);if(y===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return s.includes(An(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(y)}return it(y)||(f=!0),o++,t.consume(y),y===92?x:m}function x(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function hE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,f=0,h;return p;function p(_){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(_){return _===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):i(_)}function x(_){if(f>999||_===93&&!h||_===null||_===91||it(_))return i(_);if(_===93){t.exit("chunkString");const R=t.exit("gfmFootnoteDefinitionLabelString");return o=An(r.sliceSerialize(R)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return it(_)||(h=!0),f++,t.consume(_),_===92?y:x}function y(_){return _===91||_===92||_===93?(t.consume(_),f++,x):x(_)}function k(_){return _===58?(t.enter("definitionMarker"),t.consume(_),t.exit("definitionMarker"),s.includes(o)||s.push(o),Ye(t,v,"gfmFootnoteDefinitionWhitespace")):i(_)}function v(_){return l(_)}}function mE(t,l,i){return t.check(Tr,l,t.attempt(sE,l,i))}function pE(t){t.exit("gfmFootnoteDefinition")}function gE(t,l,i){const r=this;return Ye(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(o):i(o)}}function yE(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(f,h){let p=-1;for(;++p<f.length;)if(f[p][0]==="enter"&&f[p][1].type==="strikethroughSequenceTemporary"&&f[p][1]._close){let m=p;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[p][1].end.offset-f[p][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[p][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[p][1].end)},y={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[p][1].start)},k=[["enter",x,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",y,h]],v=h.parser.constructs.insideSpan.null;v&&fn(k,k.length,0,Cs(v,f.slice(m+1,p),h)),fn(k,k.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",x,h]]),fn(f,m-1,p-m+3,k),p=m+k.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function o(f,h,p){const m=this.previous,x=this.events;let y=0;return k;function k(_){return m===126&&x[x.length-1][1].type!=="characterEscape"?p(_):(f.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const R=gi(m);if(_===126)return y>1?p(_):(f.consume(_),y++,v);if(y<2&&!i)return p(_);const H=f.exit("strikethroughSequenceTemporary"),N=gi(_);return H._open=!N||N===2&&!!R,H._close=!R||R===2&&!!N,h(_)}}}class xE{constructor(){this.map=[]}add(l,i,r){bE(this,l,i,r)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let s=r.pop();for(;s;){for(const o of s)l.push(o);s=r.pop()}this.map.length=0}}function bE(t,l,i,r){let s=0;if(!(i===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=i,t.map[s][2].push(...r);return}s+=1}t.map.push([l,i,r])}}function vE(t,l){let i=!1;const r=[];for(;l<t.length;){const s=t[l];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function kE(){return{flow:{null:{name:"table",tokenize:wE,resolveAll:SE}}}}function wE(t,l,i){const r=this;let s=0,o=0,f;return h;function h(M){let I=r.events.length-1;for(;I>-1;){const re=r.events[I][1].type;if(re==="lineEnding"||re==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,xe=$==="tableHead"||$==="tableRow"?O:p;return xe===O&&r.parser.lazy[r.now().line]?i(M):xe(M)}function p(M){return t.enter("tableHead"),t.enter("tableRow"),m(M)}function m(M){return M===124||(f=!0,o+=1),x(M)}function x(M){return M===null?i(M):we(M)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),v):i(M):Be(M)?Ye(t,x,"whitespace")(M):(o+=1,f&&(f=!1,s+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),f=!0,x):(t.enter("data"),y(M)))}function y(M){return M===null||M===124||it(M)?(t.exit("data"),x(M)):(t.consume(M),M===92?k:y)}function k(M){return M===92||M===124?(t.consume(M),y):y(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(M):(t.enter("tableDelimiterRow"),f=!1,Be(M)?Ye(t,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?H(M):M===124?(f=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),R):ee(M)}function R(M){return Be(M)?Ye(t,H,"whitespace")(M):H(M)}function H(M){return M===58?(o+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),N):M===45?(o+=1,N(M)):M===null||we(M)?te(M):ee(M)}function N(M){return M===45?(t.enter("tableDelimiterFiller"),Z(M)):ee(M)}function Z(M){return M===45?(t.consume(M),Z):M===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),q):(t.exit("tableDelimiterFiller"),q(M))}function q(M){return Be(M)?Ye(t,te,"whitespace")(M):te(M)}function te(M){return M===124?_(M):M===null||we(M)?!f||s!==o?ee(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(M)):ee(M)}function ee(M){return i(M)}function O(M){return t.enter("tableRow"),P(M)}function P(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),P):M===null||we(M)?(t.exit("tableRow"),l(M)):Be(M)?Ye(t,P,"whitespace")(M):(t.enter("data"),se(M))}function se(M){return M===null||M===124||it(M)?(t.exit("data"),P(M)):(t.consume(M),M===92?me:se)}function me(M){return M===92||M===124?(t.consume(M),se):se(M)}}function SE(t,l){let i=-1,r=!0,s=0,o=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,x,y;const k=new xE;for(;++i<t.length;){const v=t[i],_=v[1];v[0]==="enter"?_.type==="tableHead"?(h=!1,p!==0&&(ky(k,l,p,m,x),x=void 0,p=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",m,l]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,y=void 0,o=[0,0,0,0],f=[0,i+1,0,0],h&&(h=!1,x={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",x,l]])),s=_.type==="tableDelimiterRow"?2:x?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y),o=[0,0,0,0]),f[2]=i)):_.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y)),o=f,f=[o[1],i,0,0])):_.type==="tableHead"?(h=!0,p=i):_.type==="tableRow"||_.type==="tableDelimiterRow"?(p=i,o[1]!==0?(f[0]=f[1],y=$u(k,l,o,s,i,y)):f[1]!==0&&(y=$u(k,l,f,s,i,y)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(f[3]=i)}for(p!==0&&ky(k,l,p,m,x),k.consume(l.events),i=-1;++i<l.events.length;){const v=l.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=vE(l.events,i))}return t}function $u(t,l,i,r,s,o){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(o.end=Object.assign({},di(l.events,i[0])),t.add(i[0],0,[["exit",o,l]]));const p=di(l.events,i[1]);if(o={type:f,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",o,l]]),i[2]!==0){const m=di(l.events,i[2]),x=di(l.events,i[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},x)};if(t.add(i[2],0,[["enter",y,l]]),r!==2){const k=l.events[i[2]],v=l.events[i[3]];if(k[1].end=Object.assign({},v[1].end),k[1].type="chunkText",k[1].contentType="text",i[3]>i[2]+1){const _=i[2]+1,R=i[3]-i[2]-1;t.add(_,R,[])}}t.add(i[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},di(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function ky(t,l,i,r,s){const o=[],f=di(l.events,i);s&&(s.end=Object.assign({},f),o.push(["exit",s,l])),r.end=Object.assign({},f),o.push(["exit",r,l]),t.add(i+1,0,o)}function di(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const _E={name:"tasklistCheck",tokenize:CE};function EE(){return{text:{91:_E}}}function CE(t,l,i){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return it(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),f):i(p)}function f(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(p)}function h(p){return we(p)?l(p):Be(p)?t.check({tokenize:jE},l,i)(p):i(p)}}function jE(t,l,i){return Ye(t,r,"whitespace");function r(s){return s===null?i(s):l(s)}}function AE(t){return ox([W4(),oE(),yE(t),kE(),EE()])}const NE={};function TE(t){const l=this,i=t||NE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(AE(i)),o.push(J4()),f.push(K4(i))}function wa({source:t,className:l=""}){return t.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(y_,{remarkPlugins:[TE],children:t})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function DE(t){const l=t.split(`
78
- `).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Result ready"}function Wx({execResult:t}){const[l,i]=V.useState(!0);if(!t.resultText)return null;const r=Yy(t),s=r.detected,o=t.resultText;return g.jsxs("section",{className:"space-y-2",children:[s&&g.jsxs("div",{className:"rounded-lg border border-red-400/35 bg-red-500/10 px-3 py-2.5",children:[g.jsx("p",{className:"text-sm font-semibold text-red-300",children:"Blocker — agent could not finish"}),r.summary&&g.jsx("p",{className:"text-sm text-red-200/85 mt-1 leading-snug",children:r.summary}),g.jsx("p",{className:"text-xs text-red-200/60 mt-2",children:"Grant the missing permission or adjust settings, then retry with instructions below."})]}),g.jsx("div",{className:`heading-section ${s?"text-red-300":""}`,children:s?"Blocker details":"Result"}),!l&&g.jsxs("button",{type:"button",onClick:()=>i(!0),className:`w-full text-left rounded-xl border px-4 py-3 transition-colors ${s?"border-red-400/30 bg-red-950/20 hover:border-red-400/45":"border-white/10 bg-white/[0.03] hover:border-white/20"}`,children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:DE(o)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full result →"})]}),l&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:`markdown-body-panel markdown-body-panel--flow ${s?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(wa,{source:o})}),g.jsx("button",{type:"button",onClick:()=>i(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]})}function zE(t){return t?Yy(t).detected:!1}function OE(t){const l=Vt(t,"playbook_patch");if(!l)return null;try{return ol(l)}catch{return null}}function ME(t){const l=Vt(t,"reflect_status");if(!l)return null;try{return ol(l)}catch{return null}}function e0({run:t,artifacts:l}){if(!t.playbookId)return null;const i=OE(l),r=ME(l);if((t.runtime??"claude_code")==="cursor_local")return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Playbook learning requires Claude Code runtime (Cursor has no Agent Deck MCP)."})]});if((r==null?void 0:r.status)==="pending"&&!i)return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Analyzing for playbook improvements…"})]});if(!i)return(r==null?void 0:r.status)==="failed"?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error??"Reflect step failed"})]}):(r==null?void 0:r.status)==="completed"&&r.error?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error})]}):null;const o=i.dashboardUrl;return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),i.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[i.playbookTitle," ",i.playbookId&&g.jsxs("span",{className:"text-white/30",children:["(",i.playbookId,")"]})]}),i.rationale&&g.jsx("p",{className:"text-sm text-white/55",children:i.rationale}),g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Proposal ",g.jsx("span",{className:"font-mono text-white/50",children:i.patchId})," queued in Agent Deck — accept or reject in the deck review queue."]}),o&&g.jsx("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-block btn-gold px-4 py-2 text-sm no-underline",children:"Review in Agent Deck"})]})}function t0({exchanges:t,busy:l,onAsk:i}){const[r,s]=V.useState(""),o=t.some(h=>h.status==="pending"),f=!l&&!o&&r.trim().length>0;return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Ask the agent"}),t.map(h=>g.jsxs("div",{className:"space-y-1 rounded-xl border border-white/10 bg-white/[0.03] p-3",children:[g.jsx("p",{className:"text-sm text-white/85",children:h.question}),h.status==="pending"&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Agent is answering…"}),h.status==="failed"&&g.jsxs("p",{className:"text-sm text-red-400/90",children:["Could not answer",h.error?` — ${h.error}`:"",". Ask again."]}),h.status==="answered"&&h.answer&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:h.answer})}),!h.sessionResumed&&g.jsx("p",{className:"text-xs text-white/30",children:"Answered from artifacts — the original session had expired."})]})]},h.exchangeId)),g.jsx("textarea",{className:"field-mono min-h-[72px] resize-y leading-relaxed",placeholder:"Why did you choose this approach? Did you check X?",value:r,disabled:l||o,onChange:h=>s(h.target.value)}),g.jsx("button",{type:"button",disabled:!f,onClick:async()=>{const h=r.trim();s(""),await i(h)},className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:o?"Answering…":"Ask"})]})}function n0(t){const l=[];for(const i of t)if(!(i.kind!=="result_qa"||!i.contentJson))try{l.push(JSON.parse(i.contentJson))}catch{}return Fv(l)}function RE({run:t}){const[l,i]=V.useState([]),[r,s]=V.useState(null),[o,f]=V.useState(null),[h,p]=V.useState(!1),m=V.useCallback(async()=>{const te=await hi(t.id);i(te.artifacts),s(te.usageSummary??null),f(te.traceSummary??null)},[t.id]),x=async te=>{p(!0);try{await te(),await m()}catch(ee){alert(String(ee))}finally{p(!1)}},y=zy(l,"execution_result","execute"),k=Vt(l,"document"),v=k?ol(k):null,_=l.find(te=>te.kind==="approved_plan"),R=LE(l),H=Vt(l,"send_receipt"),N=H?ol(H):null,Z=n0(l),q=Z.some(te=>te.status==="pending");return V.useEffect(()=>{m().catch(console.error)},[m]),V.useEffect(()=>{if(!q)return;const te=setInterval(()=>{m().catch(console.error)},3e3);return()=>clearInterval(te)},[q,m]),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Completed Run (Read-Only)"}),g.jsx("p",{className:"text-body",children:ws(t)})]}),_&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:ts(_)})})]}),v&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Document"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:v.markdown})})]}),g.jsx(t0,{exchanges:Z,busy:h,onAsk:te=>x(()=>Dy(t.id,te))}),y&&g.jsx(Wx,{execResult:y}),R&&g.jsxs("section",{className:"space-y-2",children:[g.jsxs("div",{className:"heading-section",children:["Outbound draft (",R.status,")"]}),g.jsxs("p",{className:"text-sm text-white/45",children:["To: ",R.draft.summary.target]}),g.jsx("textarea",{className:"field-mono min-h-[80px] resize-y",value:R.draft.summary.body,readOnly:!0})]}),N&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Send receipt"}),g.jsxs("p",{className:"text-sm text-white/45",children:["Sent ",new Date(N.sentAt).toLocaleString(),N.permalink&&g.jsxs(g.Fragment,{children:[" · ",g.jsx("a",{href:N.permalink,className:"text-[#92E4DD] hover:underline",target:"_blank",rel:"noreferrer",children:"Open message"})]})]})]}),g.jsx(e0,{run:t,artifacts:l}),r&&g.jsx(_s,{summary:r}),o&&g.jsx(Ss,{trace:o})]})}function LE(t){for(const l of["slack_draft","email_draft","service_draft"]){const i=Vt(t,l);if(i!=null&&i.contentJson)try{return JSON.parse(i.contentJson)}catch{}}return null}function yi(){return{maxTurns:"",maxBudgetUsd:""}}function l0(t){return{maxTurns:(t==null?void 0:t.maxTurns)!=null?String(t.maxTurns):"",maxBudgetUsd:(t==null?void 0:t.maxBudgetUsd)!=null?String(t.maxBudgetUsd):""}}function vr(t){const l=t.maxTurns.trim()?Number(t.maxTurns):null,i=t.maxBudgetUsd.trim()?Number(t.maxBudgetUsd):null;return l==null&&i==null||l!=null&&(!Number.isFinite(l)||l<=0)||i!=null&&(!Number.isFinite(i)||i<=0)?null:{maxTurns:l,maxBudgetUsd:i}}function BE(t,l){const i=Ar(t,l);return!!(i.maxTurns||i.maxBudgetUsd)}function Zl(t,l,i){if(!(!t.maxTurns.trim()&&!t.maxBudgetUsd.trim()&&!BE(l,i)))return vr(t)}function Ar(t,l){const i=Dv(t);return l0(i[l])}function wy(t){return l0(Tv(t))}function UE({run:t,agents:l,onRefresh:i}){const[r,s]=V.useState([]),[o,f]=V.useState(null),[h,p]=V.useState(null),[m,x]=V.useState(""),[y,k]=V.useState(""),[v,_]=V.useState(yi()),[R,H]=V.useState(!1),N=l.find(P=>P.id===t.agentId),Z=t.runtime??(N==null?void 0:N.runtime)??"claude_code",q=V.useCallback(async()=>{const P=await hi(t.id);s(P.artifacts),f(P.usageSummary??null),p(P.traceSummary??null)},[t.id]),te=t.status==="running",ee=t.status==="plan_approved";V.useEffect(()=>{q().catch(console.error)},[q]),V.useEffect(()=>{k(t.executeModel??""),_(Ar(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),V.useEffect(()=>{if(!te&&!ee)return;const P=setInterval(()=>q().catch(console.error),3e3);return()=>clearInterval(P)},[te,ee,q]),V.useEffect(()=>{te&&nv(t.id,"stream_trace").then(x).catch(()=>x(""))},[te,t.id,r.length]);const O=async P=>{H(!0);try{await P(),await q(),i()}catch(se){alert(String(se))}finally{H(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),ee&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),te&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),(()=>{const P=Vt(r,"approved_plan"),se=(P==null?void 0:P.author)==="system"?ol(P):null;return se?g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section text-emerald-200",children:"Auto-approved"}),g.jsx("p",{className:"text-sm text-white/60",children:se.rationale??"Self-triage marked this plan trivial."})]}):null})(),ee&&g.jsxs(g.Fragment,{children:[g.jsx(ma,{phase:"Execution",runtime:Z,model:y,onModelChange:k,budget:v,onBudgetChange:_,defaultModelId:N==null?void 0:N.defaultExecuteModel,disabled:R}),g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>G1(t.id,y||null,Zl(v,t.budgetJson,"execute"))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(Ss,{trace:h}),o&&g.jsx(_s,{summary:o}),m&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Log Tail"}),g.jsx("textarea",{className:"field-mono min-h-[140px] resize-y text-sm",value:m,readOnly:!0})]}),(te||ee)&&g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>Vf(t.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function HE({questions:t,drafts:l,onDraftsChange:i,busy:r}){const s=(o,f)=>{i({...l,[o]:f})};return g.jsxs("div",{className:"space-y-3 rounded-xl border border-amber-400/40 bg-amber-400/5 p-3",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Agent needs your answer"}),t.map(o=>{const f=l[o.id]??{};return g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("p",{className:"text-sm text-white/85",children:o.question}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.options.map(h=>g.jsx("button",{type:"button",disabled:r,title:h.description,onClick:()=>s(o.id,{selectedLabel:h.label}),className:`btn-ghost text-xs px-2 py-1 ${f.selectedLabel===h.label?"ring-1 ring-amber-300 text-amber-200":""}`,children:h.label},h.label))}),g.jsx("input",{className:"field-mono w-full text-xs",placeholder:"Other… (free-form answer triggers a replan)",value:f.freeText??"",disabled:r,onChange:h=>s(o.id,h.target.value?{freeText:h.target.value}:{})})]},o.id)})]})}function qE(t,l){return t.map(i=>({questionId:i.id,...l[i.id]}))}function VE(t,l){return t.every(i=>{var s;const r=l[i.id];return!!(r!=null&&r.selectedLabel||(s=r==null?void 0:r.freeText)!=null&&s.trim())})}function YE(t,l){return t.some(i=>{var r,s;return(s=(r=l[i.id])==null?void 0:r.freeText)==null?void 0:s.trim()})}function dd({title:t,open:l,onToggle:i,children:r,bordered:s=!0}){return g.jsxs("section",{className:`space-y-2 ${s?"border-t border-white/10 pt-3":""}`,children:[g.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between gap-2 text-left",children:[g.jsx("span",{className:"heading-section",children:t}),g.jsx("span",{className:"text-xs text-white/40",children:l?"Hide":"Show"})]}),l&&r]})}function a0({busy:t,onRemoved:l}){const i=()=>{confirm("Remove this task from Operations? It won't be marked done and can't be brought back here.")&&l()};return g.jsxs("div",{className:"pt-2 border-t border-white/10",children:[g.jsx("button",{type:"button",disabled:t,onClick:i,className:"btn-ghost-danger w-full py-2 disabled:cursor-not-allowed disabled:opacity-60",children:"Remove from Operations"}),g.jsx("p",{className:"text-xs text-white/35 text-center mt-1.5",children:"Dismisses the task — not archived to Done."})]})}function IE(t){const l=t.split(`
79
- `).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Plan draft ready"}function ZE({run:t,agents:l,onRefresh:i,onApproved:r,onApprovedAndNext:s}){const[o,f]=V.useState([]),[h,p]=V.useState(null),[m,x]=V.useState(null),[y,k]=V.useState(""),[v,_]=V.useState(""),[R,H]=V.useState(""),[N,Z]=V.useState(yi()),[q,te]=V.useState(yi()),[ee,O]=V.useState({}),[P,se]=V.useState(!1),[me,M]=V.useState(!1),[I,$]=V.useState(""),[xe,re]=V.useState(!1),[W,T]=V.useState(""),[J,ae]=V.useState(""),[Se,E]=V.useState(!1),[j,F]=V.useState(!1),[S,ue]=V.useState(!1),ce=l.find(Ze=>Ze.id===t.agentId),ge=t.runtime??(ce==null?void 0:ce.runtime)??"claude_code",je=V.useCallback(async()=>{const Ze=await hi(t.id);f(Ze.artifacts),p(Ze.usageSummary??null),x(Ze.traceSummary??null);const Q=Vt(Ze.artifacts,"approved_plan"),ie=Vt(Ze.artifacts,"draft_plan"),ve=Q??ie;if(ve){const Ae=ts(ve);k(Ae),ae(Ae)}},[t.id]),pe=o.some(Ze=>Ze.kind==="draft_plan"),ft=t.status==="plan_pending"&&!pe||S,Tt=Vt(o,"plan_triage"),dl=Vt(o,"plan_answers"),Hn=Tt?ol(Tt):null,St=t.status==="plan_pending"&&Hn&&!Hn.consumed&&Hn.questions.length>0&&(!dl||dl.createdAt<=Tt.createdAt)?Hn.questions:[],hl=VE(St,ee),Nn=YE(St,ee);V.useEffect(()=>{je().catch(console.error)},[je]),V.useEffect(()=>{_(t.planModel??""),H(t.executeModel??""),Z(Ar(t.budgetJson,"plan")),te(Ar(t.budgetJson,"execute")),O({}),se(!1),M(!1),$(""),re(!1),T(""),E(!1),ue(!1)},[t.id,t.planModel,t.executeModel,t.budgetJson]),V.useEffect(()=>{if(!ft)return;const Ze=setInterval(()=>{je().catch(console.error),i()},3e3);return()=>clearInterval(Ze)},[ft,je,i]);const _a=async Ze=>{const Q=Date.now()+12e4;for(;Date.now()<Q;){const ie=await hi(t.id);f(ie.artifacts);const ve=Vt(ie.artifacts,"draft_plan");if(ve&&ve.createdAt!==Ze){const Ae=ts(ve);k(Ae),ae(Ae),se(!0);break}await new Promise(Ae=>setTimeout(Ae,2e3))}i()},Gl=async Ze=>{var ie;const Q=(ie=Vt(o,"draft_plan"))==null?void 0:ie.createdAt;ue(!0),F(!0);try{await Q1(t.id,v||null,Zl(N,t.budgetJson,"plan"),Ze),await _a(Q)}catch(ve){alert(String(ve))}finally{ue(!1),F(!1),M(!1),re(!1),$("")}},ml=()=>{re(!1),M(Ze=>!Ze)},pl=()=>{if(M(!1),xe){gl();return}T(y),re(!0)},gl=()=>{W!==J&&!confirm("Discard your edits? Unsaved changes will be lost.")||(T(J),re(!1))},vi=async()=>{if(W.trim()){F(!0);try{await Kc(t.id,W,!1),k(W),ae(W)}catch(Ze){alert(String(Ze)),F(!1);return}await Gl({editedMarkdown:W})}},ki=async()=>{W.trim()&&await gt(async()=>{await Kc(t.id,W,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),re(!1),r==null||r(),s==null||s()})},gt=async Ze=>{F(!0);try{await Ze(),await je(),i()}catch(Q){alert(String(Q))}finally{F(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Plan"}),g.jsx("p",{className:"text-sm text-white/45",children:ws(t)}),ft?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:S?"Agent is replanning…":"Agent is writing the plan…"}),g.jsx("div",{className:"field-mono min-h-[min(200px,30vh)] flex items-center justify-center text-sm text-white/40 rounded border border-white/10",children:"Plan will appear here when the agent finishes…"})]}):y.trim()?g.jsxs(g.Fragment,{children:[!P&&g.jsxs("button",{type:"button",onClick:()=>se(!0),className:"w-full text-left rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 hover:border-white/20 transition-colors",children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:IE(y)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full plan →"})]}),P&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:y})}),g.jsx("button",{type:"button",onClick:()=>se(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]}):g.jsx("p",{className:"text-sm text-white/40",children:"No plan yet."}),pe&&!ft&&g.jsxs("div",{className:"space-y-3 pt-1 border-t border-white/10",children:[g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:j,onClick:ml,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${me?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Replan with feedback"}),g.jsx("button",{type:"button",disabled:j,onClick:pl,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${xe?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Edit & replan / execute"})]}),me&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`replan-feedback-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"What should change?"}),g.jsx("textarea",{id:`replan-feedback-${t.id}`,className:"field-mono min-h-[min(120px,18vh)] resize-y leading-relaxed w-full",value:I,onChange:Ze=>$(Ze.target.value),placeholder:"Comments for the agent — e.g. use a simpler approach, add tests, skip step 2…",disabled:j}),g.jsx(ma,{phase:"Plan",runtime:ge,model:v,onModelChange:_,budget:N,onBudgetChange:Z,defaultModelId:ce==null?void 0:ce.defaultPlanModel,disabled:j}),g.jsx("button",{type:"button",disabled:j||!I.trim(),onClick:()=>Gl({feedback:I.trim()}),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40 w-full sm:w-auto",children:"Replan"})]}),xe&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`plan-edit-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"Edit plan markdown"}),g.jsx("textarea",{id:`plan-edit-${t.id}`,className:"field-mono min-h-[min(280px,35vh)] resize-y leading-relaxed w-full",value:W,onChange:Ze=>T(Ze.target.value),placeholder:"Edit plan markdown",disabled:j}),g.jsx(ma,{phase:"Execution",runtime:ge,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:ce==null?void 0:ce.defaultExecuteModel,disabled:j}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:j||!W.trim(),onClick:()=>void vi(),className:"btn-ghost text-xs px-3 py-1.5 disabled:opacity-40",children:"Replan"}),g.jsx("button",{type:"button",disabled:j||!W.trim(),onClick:()=>void ki(),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40",children:"Execute"}),g.jsx("button",{type:"button",disabled:j,onClick:gl,className:"btn-ghost text-xs px-3 py-1.5",children:"Cancel"})]})]})]})]}),St.length>0&&!ft&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Resolve blocker"}),g.jsx("p",{className:"text-sm text-white/45",children:"Answer before execution can start."}),g.jsx(HE,{questions:St,drafts:ee,onDraftsChange:O,busy:j})]}),pe&&!ft&&g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),!Nn&&g.jsx(ma,{phase:"Execution",runtime:ge,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:ce==null?void 0:ce.defaultExecuteModel,disabled:j}),St.length>0&&g.jsx("button",{type:"button",disabled:j||!hl,className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",onClick:()=>gt(async()=>{(await X1(t.id,qE(St,ee),Nn?void 0:{executeModel:R||null,executeBudget:Zl(q,t.budgetJson,"execute")})).outcome==="approved"?(r==null||r(),s==null||s()):ue(!0)}),children:Nn?"Submit & replan":"Submit & start execution"}),St.length>0&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or skip the questions",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsx("button",{type:"button",disabled:j||!y.trim(),onClick:()=>gt(async()=>{await Kc(t.id,y,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),r==null||r(),s==null||s()}),className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",children:St.length>0?"Proceed — agent decides →":"Approve & next →"}),St.length>0&&g.jsx("p",{className:"text-xs text-white/40",children:"The unanswered questions are passed to the agent, which decides them itself."})]}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:Se,onToggle:()=>E(Ze=>!Ze),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:j,onRemoved:()=>gt(async()=>{await Vf(t.id),s==null||s()})})]})}function FE({content:t,body:l,onBodyChange:i,deliverError:r,onRetrySend:s,retrySendBusy:o,disabled:f}){const{draft:h,bodyMismatch:p}=t,m=V.useMemo(()=>Iv(h,l),[h,l]),x=JSON.stringify(m.toolCall,null,2),[y,k]=V.useState(!!p),v=l!==h.summary.body;return g.jsxs("section",{className:"space-y-3 rounded-lg border border-[#C4B643]/30 bg-[#C4B643]/5 p-3",children:[g.jsx("div",{className:"heading-section text-[#E8DC7A]",children:h.actionType==="service_tool_call"?"Outbound action (will run on approve)":"Outbound message (will send on approve)"}),p&&!v&&g.jsx("p",{className:"text-sm text-amber-300/90",children:"Summary body does not match toolCall arguments — review the exact payload below."}),v&&g.jsx("p",{className:"text-sm text-[#92E4DD]/90",children:h.actionType==="service_tool_call"?"Summary edited — approve to run with the stored tool call (edit tool JSON via Retry if args must change).":"Message edited — approve to send your version."}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"To"}),g.jsx("p",{className:"text-base text-[#E8F6F4] font-medium",children:h.summary.target})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("label",{htmlFor:"outbound-body",className:"text-xs text-white/40 uppercase tracking-wide",children:h.actionType==="service_tool_call"?"Summary":"Message"}),g.jsx("textarea",{id:"outbound-body",className:"field-mono min-h-[100px] resize-y w-full",value:l,onChange:_=>i(_.target.value),disabled:f})]}),g.jsx(dd,{title:"Exact tool call (server sends verbatim)",open:y,onToggle:()=>k(_=>!_),bordered:!1,children:g.jsx("pre",{className:"field-mono text-xs overflow-x-auto whitespace-pre-wrap p-2",children:x})}),r&&g.jsxs("div",{className:"space-y-2 rounded border border-red-500/30 bg-red-500/5 p-2",children:[g.jsxs("p",{className:"text-sm text-red-400/90",children:["Send failed: ",r]}),g.jsx("p",{className:"text-xs text-white/45",children:"Fix the message above or retry send after fixing the deck connection. To change recipient or rewrite from scratch, use Retry with new instructions below."}),s&&g.jsx("button",{type:"button",disabled:o||!l.trim(),onClick:s,className:"btn-gold w-full py-2 disabled:opacity-40",children:"Retry send →"})]})]})}function QE({run:t,agents:l,onRefresh:i,onRetry:r,onDoneAndNext:s}){var je;const[o,f]=V.useState([]),[h,p]=V.useState(null),[m,x]=V.useState(null),[y,k]=V.useState(""),[v,_]=V.useState(""),[R,H]=V.useState(yi()),[N,Z]=V.useState(!1),[q,te]=V.useState(!1),[ee,O]=V.useState(!1),[P,se]=V.useState(null),[me,M]=V.useState(""),I=l.find(pe=>pe.id===t.agentId),$=t.runtime??(I==null?void 0:I.runtime)??"claude_code",xe=V.useCallback(async()=>{var ft;const pe=await hi(t.id);f(pe.artifacts),p(pe.usageSummary??null),x(pe.traceSummary??null);const Te=(ft=pe.events)==null?void 0:ft.filter(Tt=>Tt.type==="deliver_failed").at(-1);if(Te!=null&&Te.payloadJson)try{const Tt=JSON.parse(Te.payloadJson);se(Tt.error??null)}catch{se(null)}},[t.id]),re=zy(o,"execution_result","execute"),W=Vt(o,"document"),T=W?ol(W):null,J=o.find(pe=>pe.kind==="approved_plan"),ae=GE(o),Se=zE(re),E=!!y.trim(),j=n0(o),F=j.some(pe=>pe.status==="pending");V.useEffect(()=>{xe().catch(console.error)},[xe]);const ue=o.some(pe=>{if(pe.kind!=="reflect_status"||!pe.contentJson)return!1;try{return JSON.parse(pe.contentJson).status==="pending"}catch{return!1}})||F;V.useEffect(()=>{if(!ue)return;const pe=setInterval(()=>{xe().catch(console.error)},3e3);return()=>clearInterval(pe)},[ue,xe]),V.useEffect(()=>{te(!1),k(""),O(!1),se(null),M(""),_(t.executeModel??""),H(Ar(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),V.useEffect(()=>{ae&&M(ae.draft.summary.body)},[ae==null?void 0:ae.draft.summary.body,t.id]),V.useEffect(()=>{var Te;if(q||!Se)return;const pe=(Te=re==null?void 0:re.blocker)==null?void 0:Te.summary;pe&&(k(`Please resolve: ${pe}`),te(!0))},[q,Se,(je=re==null?void 0:re.blocker)==null?void 0:je.summary]);const ce=async pe=>{Z(!0);try{await pe(),await xe(),i()}catch(Te){alert(String(Te))}finally{Z(!1)}},ge=async()=>{Z(!0),se(null);try{await J1(t.id,ae&&me.trim()||void 0),await xe(),i(),s==null||s()}catch(pe){const Te=pe instanceof Error?pe.message:String(pe);ae?se(Te):alert(Te)}finally{Z(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),Se&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),t.status==="failed"&&!Se&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),T&&!Se&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Deliverable"}),g.jsx("p",{className:"text-sm text-white/45",children:T.path}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:T.markdown})})]}),re&&g.jsx(Wx,{execResult:re}),g.jsx(t0,{exchanges:j,busy:N,onAsk:pe=>ce(()=>Dy(t.id,pe))}),g.jsxs("section",{className:"space-y-4 border-t border-white/10 pt-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),ae&&t.status==="review"&&!Se&&g.jsx(FE,{content:ae,body:me,onBodyChange:M,deliverError:P,onRetrySend:ge,retrySendBusy:N,disabled:N}),t.status==="review"&&!Se&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:ae?P?"Fix the send issue above, or edit the message and retry.":"Edit the message if needed, then approve to send.":"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:N||!ae&&!!y.trim()||!!ae&&!me.trim(),title:!ae&&y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>void ge(),className:"btn-gold w-full py-2 disabled:opacity-40",children:ae?"Approve & send →":"Mark done & next →"}),!ae&&y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),t.status==="review"&&!Se&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or send back",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsxs("div",{className:"space-y-2",children:[(Se||t.status==="failed")&&g.jsx("p",{className:"text-sm text-white/45",children:"Add instructions and retry — re-runs execution with the same approved plan."}),g.jsx("label",{htmlFor:`retry-${t.id}`,className:"text-xs text-white/40 uppercase tracking-wide",children:"Retry instructions"}),j.some(pe=>pe.status==="answered")&&g.jsx("p",{className:"text-xs text-white/40",children:"This discussion is included automatically if you retry."}),g.jsx("textarea",{id:`retry-${t.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:Se?"What to change after fixing the blocker":ae?"What should change in the draft? (e.g. correct Slack user ID)":"What should the agent do differently?",value:y,onChange:pe=>k(pe.target.value)}),g.jsx(ma,{phase:"Execution",runtime:$,model:v,onModelChange:_,budget:R,onBudgetChange:H,defaultModelId:I==null?void 0:I.defaultExecuteModel,disabled:N}),g.jsx("button",{type:"button",disabled:N||!E,onClick:()=>ce(async()=>{const pe=Zl(R,t.budgetJson,"execute"),Te=await K1(t.id,y,v||null,pe);k(""),se(null),r==null||r(Te)}),className:`w-full py-2 ${E?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]})]}),J&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:ts(J)})})]}),g.jsx(e0,{run:t,artifacts:o}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:ee,onToggle:()=>O(pe=>!pe),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:N,onRemoved:()=>ce(async()=>{await Vf(t.id),s==null||s()})})]})}function GE(t){for(const l of["slack_draft","email_draft","service_draft"]){const i=Vt(t,l);if(i!=null&&i.contentJson)try{const r=JSON.parse(i.contentJson);if(r.status==="pending")return r}catch{}}return null}function hd({onClose:t,header:l,children:i,onKeyDown:r}){return V.useEffect(()=>{const s=o=>{if(o.key==="Escape"){o.preventDefault(),t();return}r==null||r(o)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,r]),g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6",children:[g.jsx("button",{type:"button",className:"absolute inset-0 bg-black/65 backdrop-blur-[2px]",onClick:t,"aria-label":"Close"}),g.jsxs("div",{role:"dialog","aria-modal":"true",className:"relative w-[min(1200px,96vw)] h-[min(92vh,960px)] panel-surface flex flex-col text-[#E8F6F4] rounded-2xl overflow-hidden",children:[g.jsx("div",{className:"p-4 border-b border-white/10 space-y-3 shrink-0",children:l}),g.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:i})]})]})}function XE({run:t,agents:l,onClose:i,onRefresh:r,onApproved:s,onApprovedAndNext:o,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,x]=V.useState(null),y=My(t.status),k=If(t);V.useEffect(()=>{if(t.source!=="linear"){x(null);return}hi(t.id).then(_=>x(lv(_.artifacts))).catch(()=>x(null))},[t.id,t.source]);const v=V.useCallback(_=>{p&&(_.key==="ArrowLeft"&&p.index>0&&(_.preventDefault(),p.onPrev()),_.key==="ArrowRight"&&p.index<p.runs.length-1&&(_.preventDefault(),p.onNext()))},[p]);return g.jsxs(hd,{onClose:i,onKeyDown:v,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.source==="linear"&&m?g.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"inline-flex",title:"Open in Linear",children:g.jsxs(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[ls(t)," ↗"]})}):g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:Yf(t.taskCategory)}),g.jsx(st,{className:vs(t.runtime),children:ga(t.runtime)}),k&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case truncate max-w-[160px]",title:k,children:["◆ ",k]})]}),g.jsx("h2",{className:"font-semibold text-2xl leading-snug pr-2",children:t.title}),g.jsxs("p",{className:"text-sm text-white/45 flex flex-wrap gap-x-2 gap-y-0.5 items-center",children:[g.jsx(st,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(t.updatedAt).toLocaleString(),children:["Updated ",ns(t.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(Ry,{index:p.index,total:p.runs.length,onPrev:p.onPrev,onNext:p.onNext}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:[(t.status==="plan_pending"||t.status==="queued")&&g.jsx(ZE,{run:t,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:o}),(t.status==="plan_approved"||t.status==="running")&&g.jsx(UE,{run:t,agents:l,onRefresh:r}),(t.status==="review"||t.status==="failed")&&g.jsx(QE,{run:t,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),t.status==="done"&&g.jsx(RE,{run:t}),t.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function Sy(t,l){const i=t.find(s=>s.runtime===l);if(!i)return{ok:!1,detail:"no agent"};const r=i.issues.find(s=>s.code==="cli_missing"||s.code==="runtime_auth");return r?{ok:!1,detail:r.message}:{ok:!0,detail:"CLI ready"}}function gf({ok:t}){return g.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${t?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function JE({agents:t,agentDeckOnline:l}){const[i,r]=V.useState(null);V.useEffect(()=>{P1().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=Sy(t,"claude_code"),o=Sy(t,"cursor_local"),f=t.flatMap(h=>h.issues).find(h=>h.code==="mcp_not_registered");return g.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[g.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:s.detail,children:[g.jsx(gf,{ok:s.ok}),g.jsx("span",{className:s.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:o.detail,children:[g.jsx(gf,{ok:o.ok}),g.jsx("span",{className:o.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(f==null?void 0:f.message)??(i?`MCP ${i}`:"Agent Deck optional"),children:[g.jsx(gf,{ok:l&&!f}),g.jsxs("span",{className:l&&!f?"text-[#92E4DD]/80":f?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?f?" (setup needed)":"":" (optional)"]})]})]})}const i0="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",r0="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e";function u0({src:t,className:l}){return g.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:g.jsx("img",{src:t,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function KE({className:t="h-8 w-8"}){return g.jsx(u0,{src:i0,className:t})}function $E({className:t="h-8 w-8"}){return g.jsx(u0,{src:r0,className:t})}function PE({className:t="h-8 w-8"}){return g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,children:[g.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),g.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),g.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function s0({runtime:t,className:l="h-3.5 w-3.5 shrink-0"}){return t==="claude_code"?g.jsx("img",{src:i0,alt:"",className:`object-contain ${l}`,draggable:!1}):t==="cursor_local"?g.jsx("img",{src:r0,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function o0({runtime:t,className:l="h-8 w-8 shrink-0"}){return t==="claude_code"?g.jsx(KE,{className:l}):t==="cursor_local"?g.jsx($E,{className:l}):g.jsx(PE,{className:l})}const Pu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:yi(),defaultExecuteBudget:yi()});function WE({agents:t,agentDeckOnline:l,onRefresh:i}){const[r,s]=V.useState(!1),[o,f]=V.useState(""),[h,p]=V.useState(""),[m,x]=V.useState(Pu()),[y,k]=V.useState(!1),[v,_]=V.useState(null),[R,H]=V.useState(""),[N,Z]=V.useState(""),[q,te]=V.useState(Pu()),ee=async I=>{if(I.preventDefault(),!(!o.trim()||!h.trim())){k(!0);try{const $={name:o.trim(),runtime:m.runtime,workspaceRoot:h.trim(),deckId:m.deckId||void 0,playbookId:m.playbookId||void 0,defaultPlanModel:m.defaultPlanModel||null,defaultExecuteModel:m.defaultExecuteModel||null,defaultPlanBudget:vr(m.defaultPlanBudget),defaultExecuteBudget:vr(m.defaultExecuteBudget)};await Y1($),f(""),p(""),x(Pu()),s(!1),i()}catch($){alert(String($))}finally{k(!1)}}},O=I=>{_(I.id),H(I.name),Z(I.workspaceRoot??""),te({runtime:I.runtime,deckId:I.deckId??"",playbookId:I.playbookId??"",defaultPlanModel:I.defaultPlanModel??"",defaultExecuteModel:I.defaultExecuteModel??"",defaultPlanBudget:wy(I.defaultPlanBudgetJson),defaultExecuteBudget:wy(I.defaultExecuteBudgetJson)})},P=()=>{_(null),te(Pu())},se=async I=>{k(!0);try{const $={name:R.trim(),workspaceRoot:N.trim()||null,runtime:q.runtime,deckId:q.deckId||null,playbookId:q.playbookId||null,defaultPlanModel:q.defaultPlanModel||null,defaultExecuteModel:q.defaultExecuteModel||null,defaultPlanBudget:vr(q.defaultPlanBudget),defaultExecuteBudget:vr(q.defaultExecuteBudget)};await I1(I.id,$),P(),i()}catch($){alert(String($))}finally{k(!1)}},me=async I=>{if(confirm(`Delete agent "${I.name}"?`)){k(!0);try{await Z1(I.id),i()}catch($){alert(String($))}finally{k(!1)}}},M=t.filter(I=>!I.healthy).length;return g.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h1",{className:"heading-page",children:"Agents"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one at Inbox instead of configuring each task"}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[t.length," agent",t.length===1?"":"s",M>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",M," need",M===1?"s":""," attention"]})]})]}),g.jsx(JE,{agents:t,agentDeckOnline:l})]}),g.jsx("div",{className:"space-y-3 mb-6",children:t.map(I=>g.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[g.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[g.jsx(o0,{runtime:I.runtime}),g.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:I.name}),!I.healthy&&g.jsx(st,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.jsx(st,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:ga(I.runtime)}),I.deckName?g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",I.deckName]}):g.jsx(st,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),I.defaultPlanModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:I.defaultPlanModel,children:["plan: ",I.defaultPlanModel]}),I.defaultExecuteModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:I.defaultExecuteModel,children:["exec: ",I.defaultExecuteModel]})]}),v===I.id?g.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field text-sm",value:R,onChange:$=>H($.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field text-sm font-mono",placeholder:"/Users/me/projects/my-app",value:N,onChange:$=>Z($.target.value)})]}),g.jsx(zg,{value:q,onChange:te,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!R.trim()||!N.trim(),onClick:()=>se(I),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),g.jsx("button",{type:"button",onClick:P,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}):g.jsx("p",{className:"text-sm text-white/50 font-mono truncate",title:I.workspaceRoot??void 0,children:I.workspaceRoot?I.workspaceRoot:"No workspace configured"}),I.issues.length>0&&g.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:I.issues.map(($,xe)=>g.jsxs("li",{children:["· ",$.message]},xe))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[v!==I.id&&g.jsx("button",{type:"button",disabled:y,onClick:()=>O(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),g.jsx("button",{type:"button",disabled:y,onClick:()=>me(I),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},I.id))}),r?g.jsxs("form",{onSubmit:ee,className:"panel space-y-3",children:[g.jsx("h2",{className:"heading-panel",children:"New Agent"}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:o,onChange:I=>f(I.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field font-mono text-sm",placeholder:"/Users/me/projects/my-app",value:h,onChange:I=>p(I.target.value)})]}),g.jsx(zg,{value:m,onChange:x,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!o.trim()||!h.trim(),className:"btn-gold px-4 py-2",children:y?"Saving…":"Create agent"}),g.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):g.jsx("button",{type:"button",onClick:()=>s(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function eC({run:t,selected:l,onSelect:i,sent:r}){const s=If(t),o=t.updatedAt;return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] border-l-emerald-400/60 transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 gap-y-1.5 items-center px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-1.5 md:contents",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0 w-fit":"bg-white/5 text-white/55 border-white/15 shrink-0 w-fit",children:ls(t)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(o).toLocaleString(),children:ns(o)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsxs("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate flex items-center gap-2",title:t.title,children:[g.jsx("span",{className:"truncate",children:t.title}),r&&g.jsx(st,{className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35 shrink-0 normal-case text-[10px]",children:"sent"})]}),t.description&&g.jsx("p",{className:"text-xs text-white/40 truncate mt-0.5",title:t.description,children:t.description})]}),g.jsx("div",{className:"hidden md:flex items-center min-w-0",children:g.jsxs(st,{className:`${vs(t.runtime)} normal-case truncate max-w-full`,title:t.agentName??ga(t.runtime),children:[t.runtime&&g.jsx(s0,{runtime:t.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:t.agentName??ga(t.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:Yf(t.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:s??void 0,children:s?`◆ ${s}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(o).toLocaleString(),children:ns(o)})]})})}function tC({runs:t,selectedRunId:l,onSelectRun:i,sentRunIds:r=[]}){const[s,o]=V.useState(""),f=V.useMemo(()=>t.filter(p=>p.status==="done").sort((p,m)=>m.updatedAt.localeCompare(p.updatedAt)),[t]),h=V.useMemo(()=>{const p=s.trim().toLowerCase();return p?f.filter(m=>{var x,y,k,v;return m.title.toLowerCase().includes(p)||((x=m.externalLabel)==null?void 0:x.toLowerCase().includes(p))||((y=m.externalId)==null?void 0:y.toLowerCase().includes(p))||m.source.toLowerCase().includes(p)||m.taskCategory.toLowerCase().includes(p)||((k=m.deckName)==null?void 0:k.toLowerCase().includes(p))||((v=m.agentName)==null?void 0:v.toLowerCase().includes(p))}):f},[f,s]);return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full",children:[g.jsx("h1",{className:"heading-page",children:"Done"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Completed runs — read-only audit trail"}),g.jsx("input",{className:"field mt-3 max-w-xl",placeholder:"Search title, issue id, category, deck…",value:s,onChange:p=>o(p.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[h.length," of ",f.length," completed"]})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 min-h-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full space-y-1.5",children:[h.length>0&&g.jsxs("div",{className:"hidden md:grid grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 px-4 pb-1 text-[10px] uppercase tracking-wider text-white/30","aria-hidden":!0,children:[g.jsx("span",{children:"Source"}),g.jsx("span",{children:"Title"}),g.jsx("span",{children:"Agent"}),g.jsx("span",{children:"Type"}),g.jsx("span",{children:"Deck"}),g.jsx("span",{className:"text-right",children:"Done"})]}),h.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:f.length===0?"No completed runs yet":"No matches for your search"}):h.map(p=>g.jsx(eC,{run:p,selected:l===p.id,onSelect:()=>i(p),sent:r.includes(p.id)},p.id))]})})]})}function nC({candidate:t,selected:l,onSelect:i}){return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"p-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:t.identifier}),t.state&&g.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:t.state})]}),g.jsx("h3",{className:"text-lg font-semibold text-[#E8F6F4] leading-snug line-clamp-2",children:t.title}),t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description})]})})}function _y({title:t,subtitle:l,onClose:i,children:r}){return g.jsx(hd,{onClose:i,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t}),l&&g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:l})]}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1 shrink-0","aria-label":"Close",children:"✕"})]}),children:g.jsx("div",{className:"space-y-4",children:r})})}function c0({className:t="w-3.5 h-3.5"}){return g.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:t,"aria-hidden":!0,children:g.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function f0({agents:t,selectedId:l,onSelect:i,onManage:r,requireHealthy:s}){return t.length===0?g.jsx("p",{className:"text-sm text-white/45",children:"No agents configured."}):g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"heading-section normal-case",children:"Agent"}),r&&g.jsx("button",{type:"button",onClick:r,className:"text-sm text-[#92E4DD] hover:underline",children:"Manage"})]}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:t.map(o=>{var p;const f=o.id===l,h=s&&!o.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>i(o.id),className:`text-left rounded-xl border p-3 transition-colors glass-plate glass-plate-hover ${h?"opacity-50 cursor-not-allowed":f?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(o0,{runtime:o.runtime,className:"h-7 w-7 shrink-0 mt-0.5"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("span",{className:"font-semibold text-[#E8F6F4]",children:o.name}),!o.healthy&&g.jsx("span",{title:o.issues.map(m=>m.message).join("; "),children:g.jsx(c0,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[g.jsx(st,{className:vs(o.runtime),children:ga(o.runtime)}),o.deckName&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",o.deckName]})]}),!o.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=o.issues[0])==null?void 0:p.message})]})]})},o.id)})})]})}function lC({issue:t,agents:l,onPromoted:i,onManageAgents:r}){const[s,o]=V.useState(""),[f,h]=V.useState(""),[p,m]=V.useState(!1);V.useEffect(()=>{qf().then(k=>{k.defaultAgentId&&o(k.defaultAgentId)}).catch(()=>{})},[]),V.useEffect(()=>{l.length>0&&s&&!l.some(k=>k.id===s)&&o(l[0].id),l.length>0&&!s&&o(l[0].id)},[l,s]),V.useEffect(()=>{h("")},[t.id,s]);const x=l.find(k=>k.id===s),y=async()=>{if(s){m(!0);try{await V1(t.id,{agentId:s,planModel:f||null}),i()}catch(k){alert(String(k))}finally{m(!1)}}};return g.jsxs(g.Fragment,{children:[t.description&&g.jsx("div",{className:"rounded-xl p-4 glass-plate font-mono text-sm text-white/70 leading-relaxed whitespace-pre-wrap",children:t.description}),t.url&&g.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"text-sm text-[#AEB4FF] hover:underline inline-block",children:"Open in Linear ↗"}),g.jsx(f0,{agents:l,selectedId:s,onSelect:o,onManage:r,requireHealthy:!0}),x&&g.jsx(Gf,{runtime:x.runtime,label:"Planning model",value:f,onChange:h,defaultModelId:x.defaultPlanModel,disabled:p}),g.jsx("button",{type:"button",disabled:p||!s||!((x==null?void 0:x.healthy)??!1),onClick:y,className:"btn-gold w-full py-2",children:p?"Starting…":"Kick plan & next →"})]})}function aC({issue:t,agents:l,onClose:i,onPromoted:r,onManageAgents:s,queueNav:o}){const f=V.useCallback(h=>{o&&(h.key==="ArrowLeft"&&o.index>0&&(h.preventDefault(),o.onPrev()),h.key==="ArrowRight"&&o.index<o.total-1&&(h.preventDefault(),o.onNext()))},[o]);return g.jsx(hd,{onClose:i,onKeyDown:f,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t.identifier}),g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:t.title})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[o&&g.jsx(Ry,{index:o.index,total:o.total,onPrev:o.onPrev,onNext:o.onNext,label:"In Inbox"}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:g.jsx(lC,{issue:t,agents:l,onPromoted:r,onManageAgents:s})})}function iC({agents:t,onSaved:l}){const[i,r]=V.useState(!1),[s,o]=V.useState(null),[f,h]=V.useState(null),[p,m]=V.useState(null),[x,y]=V.useState(null),[k,v]=V.useState("Todo"),[_,R]=V.useState(""),[H,N]=V.useState(!0),[Z,q]=V.useState(""),[te,ee]=V.useState(!0),[O,P]=V.useState(!1),[se,me]=V.useState(null),M=s==null?void 0:s.envOverrides,I=!!(M!=null&&M.stateFilter||M!=null&&M.teamId),$=async()=>{var T;try{const[J,ae]=await Promise.all([es(),qf()]);h(J.connected),m(((T=J.viewer)==null?void 0:T.name)??null),y(J.error??null),o(ae),v(ae.persisted.stateFilter.join(", ")),R(ae.persisted.teamId??""),N(ae.persisted.assigneeMe),q(ae.persisted.defaultAgentId??""),ee(ae.persisted.syncEnabled)}catch(J){y(String(J))}};V.useEffect(()=>{i&&$()},[i]);const xe=async()=>{var T;P(!0),me(null);try{const J=await es();h(J.connected),m(((T=J.viewer)==null?void 0:T.name)??null),y(J.error??null),me(J.connected?"Connected":"Not connected")}catch(J){y(String(J))}finally{P(!1)}},re=async()=>{P(!0),me(null);try{const T=k.split(",").map(ae=>ae.trim()).filter(Boolean),J=await q1({stateFilter:T.length>0?T:["Todo"],teamId:_.trim()||null,assigneeMe:H,defaultAgentId:Z||null,syncEnabled:te});o(J),me(I?"Saved locally — env still overrides filters (see note below)":"Saved"),l==null||l()}catch(T){me(String(T))}finally{P(!1)}},W=f===null?g.jsx("span",{className:"text-xs text-white/45",children:"Checking…"}):f?g.jsxs("span",{className:"text-xs text-emerald-300/90 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-400/25",children:["Connected",p?` · ${p}`:""]}):g.jsx("span",{className:"text-xs text-amber-200/90 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-400/25",children:"Missing API key"});return g.jsxs("div",{className:"rounded-xl glass-plate overflow-hidden",children:[g.jsxs("button",{type:"button",onClick:()=>r(T=>!T),className:"w-full flex items-center justify-between px-3 py-2 text-sm text-white/70 hover:text-white/90",children:[g.jsx("span",{children:"Linear settings"}),g.jsxs("span",{className:"flex items-center gap-2",children:[W,g.jsx("span",{className:"text-white/35",children:i?"▾":"▸"})]})]}),i&&g.jsxs("div",{className:"border-t border-white/10 px-3 py-3 space-y-3 text-sm",children:[x&&f===!1&&g.jsx("p",{className:"text-red-400/90 text-xs",children:x}),s&&g.jsxs("p",{className:"text-xs text-white/50 rounded-lg bg-black/20 border border-white/10 px-2 py-1.5",children:[g.jsx("span",{className:"text-white/70",children:"Inbox uses:"})," ",s.stateFilter.join(", "),s.assigneeMe?" · assigned to me":"",s.teamId?` · team ${s.teamId.slice(0,8)}…`:""]}),I&&g.jsxs("p",{className:"text-xs text-amber-200/90 rounded-lg bg-amber-500/10 border border-amber-400/20 px-2 py-1.5",children:[g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," or"," ",g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," in env override saved filters. Remove from ",g.jsx("code",{className:"text-white/55",children:"~/.agent-dealer-dev/.env"})," to use the values below."]}),g.jsxs("p",{className:"text-xs text-white/45",children:["API key stays in ",g.jsx("code",{className:"text-white/60",children:"LINEAR_API_KEY"})," env — not stored here."]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"State filter (saved)"}),g.jsx("input",{type:"text",value:k,onChange:T=>v(T.target.value),placeholder:"Todo, Backlog",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Team ID (optional, saved)"}),g.jsx("input",{type:"text",value:_,onChange:T=>R(T.target.value),placeholder:"UUID",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4] font-mono text-xs"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:H,onChange:T=>N(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Assigned to me"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:te,onChange:T=>ee(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Sync status + comments to Linear"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Default agent"}),g.jsxs("select",{value:Z,onChange:T=>q(T.target.value),className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]",children:[g.jsx("option",{value:"",children:"None"}),t.map(T=>g.jsxs("option",{value:T.id,children:[T.name,T.healthy?"":" (needs setup)"]},T.id))]})]}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",onClick:re,disabled:O,className:"btn-gold px-3 py-1.5 flex-1",children:O?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:xe,disabled:O,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),se&&g.jsx("p",{className:"text-xs text-white/50",children:se})]})]})}function rC({agents:t,loading:l,candidateCount:i,onRefresh:r,onConfigSaved:s}){var h;const[o,f]=V.useState(null);return V.useEffect(()=>{es().then(f).catch(()=>f({connected:!1,error:"Failed to check"}))},[]),g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"rounded-xl p-3 glass-plate space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("span",{className:"text-sm text-white/70",children:"Connection"}),o!=null&&o.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=o.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(o==null?void 0:o.error)??"Not connected"})]}),g.jsx("p",{className:"text-sm text-white/45",children:l?"Fetching from Linear…":i===0?"No matching issues — adjust filters below or create issues in Linear.":`${i} issue${i===1?"":"s"} in inbox`}),g.jsx("button",{type:"button",onClick:r,disabled:l,className:"btn-gold w-full py-2",children:l?"Importing…":"Import from Linear"})]}),g.jsx(iC,{agents:t,onSaved:()=>{s(),r()}}),g.jsxs("p",{className:"text-xs text-white/40",children:["Set ",g.jsx("code",{className:"text-white/55",children:"LINEAR_API_KEY"})," in env. Filters are saved locally — not the API key."]})]})}function uC({agents:t,onCreated:l,onManageAgents:i,embedded:r}){const[s,o]=V.useState(""),[f,h]=V.useState(""),[p,m]=V.useState("other"),[x,y]=V.useState(""),[k,v]=V.useState(zv),[_,R]=V.useState(""),[H,N]=V.useState(!1);V.useEffect(()=>{t.length>0&&!t.some(ee=>ee.id===k)&&v(t[0].id)},[t,k]),V.useEffect(()=>{const ee=t.find(O=>O.id===k);if(!ee){R("");return}R(ee.defaultPlanModel??(ee.runtime==="cursor_local"?ps:""))},[k,t]);const Z=t.find(ee=>ee.id===k),q=!!k&&!!s.trim()&&(!!x.trim()||((Z==null?void 0:Z.healthy)??!1)),te=async ee=>{if(ee.preventDefault(),!(!s.trim()||!k)){N(!0);try{await F1({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:x.trim()||void 0,agentId:k,planModel:_||null}),o(""),h(""),l()}catch(O){alert(String(O))}finally{N(!1)}}};return g.jsxs("form",{onSubmit:te,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(f0,{agents:t,selectedId:k,onSelect:v,onManage:i}),Z&&g.jsx(Gf,{runtime:Z.runtime,label:"Planning model",value:_,onChange:R,defaultModelId:Z.defaultPlanModel,disabled:H}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:ee=>o(ee.target.value)}),g.jsx("textarea",{className:"field-mono h-16 resize-y",placeholder:"Description",value:f,onChange:ee=>h(ee.target.value)}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("select",{className:"field flex-1",value:p,onChange:ee=>m(ee.target.value),children:["code","communication","email","research","content","other"].map(ee=>g.jsx("option",{value:ee,children:ee},ee))}),g.jsx("input",{className:"field flex-1",placeholder:"Repo override (optional)",value:x,onChange:ee=>y(ee.target.value)})]}),g.jsx("p",{className:"text-xs text-white/40 -mt-1",children:"Uses agent workspace by default. Override here for a one-off path."}),g.jsx("button",{type:"submit",disabled:H||!q,className:"btn-gold w-full py-2",children:H?"Starting…":"Kick plan"})]})}const sC=["plan_pending","queued"],oC=["review","failed"];function Ey(t,l,i){return sC.includes(t.status)?l.awaitingPlanReview:oC.includes(t.status)?l.resultReviewRuns:t.status==="done"&&i==="done"?l.runs.filter(r=>r.status==="done").sort((r,s)=>s.updatedAt.localeCompare(r.updatedAt)):[]}function md(t,l){return t.findIndex(i=>i.id===l)}function Uf(t,l){const i=md(t,l);if(i<0)return t[0]??null;const r=t.filter(s=>s.id!==l);return r.length===0?null:r[Math.min(i,r.length-1)]??null}function cC({agents:t,onRefresh:l,onGoOperations:i,onManageAgents:r}){const[s,o]=V.useState([]),[f,h]=V.useState(!1),[p,m]=V.useState(null),[x,y]=V.useState(null),[k,v]=V.useState(null),[_,R]=V.useState(null),[H,N]=V.useState(!1),Z=V.useCallback(()=>(h(!0),m(null),Promise.all([H1(),qf(),es()]).then(([$,xe,re])=>(o($),R(xe),N(re.connected),$)).catch($=>(m(String($)),o([]),[])).finally(()=>h(!1))),[]);V.useEffect(()=>{Z()},[Z]);const q=s.find($=>$.id===x)??null,te=x?md(s,x):-1,ee=V.useCallback($=>{const xe=s[$];xe&&(y(xe.id),v("issue"))},[s]),O=V.useCallback(async $=>{const xe=Uf(s,$);l();const re=await Z();if(!xe){v(null),y(null);return}const W=re.find(J=>J.id===xe.id);if(W){y(W.id),v("issue");return}const T=Uf(re,$);T?(y(T.id),v("issue")):(v(null),y(null))},[s,l,Z]),P=()=>{l(),v(null),y(null),Z(),i()},se=()=>{v("import"),Z()},me=()=>{y(null),v("manual")},M=$=>{y($),v("issue")},I=()=>{v(null),y(null)};return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"heading-page",children:"Inbox"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Tasks waiting to kick — import from Linear or add manually"})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-4 py-2 text-sm",children:"Linear Import"}),g.jsx("button",{type:"button",onClick:me,className:"btn-gold px-4 py-2 text-sm",children:"+ Manual Task"})]})]})}),g.jsxs("div",{className:"flex-1 flex flex-col min-h-0 max-w-6xl mx-auto w-full px-6 py-4",children:[p&&g.jsx("p",{className:"text-sm text-red-400/90 mb-3",children:p}),g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:f?"Loading…":`${s.length} task${s.length===1?"":"s"}`}),g.jsx("button",{type:"button",onClick:()=>Z(),disabled:f,className:"btn-ghost px-2 py-1 text-xs",children:"Refresh"})]}),g.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 min-h-0",children:s.length===0&&!f?g.jsxs("div",{className:"py-12 text-center space-y-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:"No tasks in inbox"}),H&&_&&g.jsxs("p",{className:"text-xs text-white/40 max-w-md mx-auto",children:["Filtering Linear: ",_.stateFilter.join(", "),_.assigneeMe?" · assigned to you":"",_.envOverrides.stateFilter||_.envOverrides.teamId?" · some filters from env":""]}),g.jsxs("div",{className:"flex justify-center gap-2",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-3 py-1.5 text-sm",children:"Linear settings"}),g.jsx("button",{type:"button",onClick:me,className:"btn-gold px-3 py-1.5 text-sm",children:"+ Manual Task"})]})]}):s.map($=>g.jsx(nC,{candidate:$,selected:x===$.id&&k==="issue",onSelect:()=>M($.id)},$.id))})]}),k==="import"&&g.jsx(_y,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:I,children:g.jsx(rC,{agents:t,loading:f,candidateCount:s.length,onRefresh:Z,onConfigSaved:Z})}),k==="manual"&&g.jsx(_y,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:I,children:g.jsx(uC,{agents:t,onCreated:P,onManageAgents:r,embedded:!0})}),k==="issue"&&q&&g.jsx(aC,{issue:q,agents:t,onClose:I,onPromoted:()=>O(q.id),onManageAgents:r,queueNav:s.length>1?{index:te,total:s.length,onPrev:()=>ee(te-1),onNext:()=>ee(te+1)}:void 0})]})}const fC=3;function dC(t){const l=Number.isFinite(t)?t:0;return String(Math.min(999,Math.max(0,l))).padStart(fC,"0")}function hC({value:t,label:l}){const i=dC(t).split("");return g.jsx("div",{className:"nixie-housing","aria-hidden":!l,"aria-label":l,children:i.map((r,s)=>g.jsxs("span",{className:"nixie-tube",children:[g.jsx("span",{className:"nixie-tube-ghost",children:"8"}),g.jsx("span",{className:"nixie-tube-digit",children:r})]},`${s}-${r}`))})}function Cy({title:t,total:l,open:i,onToggle:r,accent:s,titleAccent:o,openRing:f="ring-[#92E4DD]/25"}){return g.jsx("section",{className:`flex flex-col self-start glass-column rounded-xl overflow-hidden border-t-2 ${s} ${i?`ring-1 ${f}`:""}`,children:g.jsxs("header",{className:"px-2 pt-2 pb-2 border-b border-white/[0.06] shrink-0 w-full",children:[g.jsx("h2",{className:`text-xs font-semibold leading-tight text-center ${o}`,children:t}),g.jsx("button",{type:"button",onClick:r,className:"nixie-stack-toggle w-full rounded mt-1.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-expanded":i,"aria-label":`${l} in ${t.toLowerCase()}. Click to ${i?"close":"show"} tickets.`,children:g.jsx("div",{className:"nixie-display-wrap",children:g.jsx(hC,{value:l})})})]})})}function pd({run:t,selected:l,onSelect:i,statusOverride:r,timeField:s="updated",compact:o=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1,extraBadge:x}){const y=r??t.status,k=My(y),v=s==="created"?t.createdAt:t.updatedAt,_=If(t),R=f==="active"||f==="running"?"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35":f==="queued"||f==="waiting"?"bg-sky-500/15 text-sky-200 border-sky-400/30":null,H=f==="active"||f==="running";return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] transition-colors ${k.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${o?"p-2.5":"p-3"} space-y-2`,children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0":"bg-white/5 text-white/55 border-white/15 shrink-0",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:Yf(t.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(v).toLocaleString(),children:ns(v)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${o?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:t.title}),!o&&t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[g.jsxs(st,{className:`${vs(t.runtime)} normal-case`,title:t.runtime?ga(t.runtime):void 0,children:[t.runtime&&g.jsx(s0,{runtime:t.runtime}),t.agentName??ga(t.runtime)]}),_&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:_,children:["◆ ",_]}),x&&g.jsx(st,{className:`${x.className} normal-case`,children:x.label}),f?g.jsxs(st,{className:`${R} ml-auto`,children:[H&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),H?h:p]}):m?null:g.jsx(st,{className:`${k.tone} ml-auto`,title:k.hint,children:k.label})]})]})})}function jy({title:t,items:l,activeBadgeLabel:i,selectedId:r,onSelect:s,onClose:o,accent:f,titleAccent:h,empty:p,autoApprovedRunIds:m=[]}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 rounded-xl overflow-hidden border border-white/10 border-t-2 ${f} bg-[#0F0F0C] shadow-2xl`,children:[g.jsxs("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0 flex items-center justify-between gap-3",children:[g.jsx("h2",{className:`heading-column ${h}`,children:t}),g.jsx("button",{type:"button",onClick:o,className:"text-xs text-white/45 hover:text-white/70 px-2 py-1 rounded border border-white/10 hover:border-white/20 transition-colors shrink-0",children:"Close"})]}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:l.length===0?g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:p}):l.map(({run:x,queueBadge:y})=>g.jsx(pd,{run:x,selected:r===x.id,onSelect:()=>s(x),queueBadge:y,queueActiveLabel:i,queueQueuedLabel:"In queue",hideStatusBadge:!0,extraBadge:m.includes(x.id)?{label:"Auto-approved",className:"bg-emerald-400/15 text-emerald-200 border-emerald-400/35"}:void 0},x.id))})]})}function d0({title:t,count:l,children:i,empty:r,isEmpty:s,accent:o,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${o?`border-t-2 ${o}`:"border-t border-white/[0.06]"}`,children:[g.jsx("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[g.jsx("h2",{className:`heading-column ${f??""}`,children:t}),l!==void 0&&g.jsx("span",{className:"text-base tabular-nums text-white/45",children:l})]})}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:s?r:i})]})}function mC({runs:t,openQuestionCounts:l,selectedId:i,onSelect:r}){const s=t.filter(o=>l[o.id]).length;return g.jsx(d0,{title:s>0?`Review Plan · ${s} need answers`:"Review Plan",count:t.length,accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",isEmpty:t.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"No plans ready yet"}),children:t.map(o=>{const f=l[o.id];return g.jsx(pd,{run:o,selected:i===o.id,onSelect:()=>r(o),hideStatusBadge:!0,extraBadge:f?{label:f===1?"1 question":`${f} questions`,className:"bg-amber-400/15 text-amber-200 border-amber-400/35"}:void 0},o.id)})})}function pC({snapshot:t,selectedRunId:l,onSelectRun:i}){const[r,s]=V.useState(null),o=(t==null?void 0:t.awaitingPlanReview)??[],f=(t==null?void 0:t.planningActiveRuns)??[],h=(t==null?void 0:t.planningQueuedRuns)??[],p=(t==null?void 0:t.runningRuns)??[],m=(t==null?void 0:t.waitingExecution)??[],x=(t==null?void 0:t.resultReviewRuns)??[],y=[...f.map(_=>({run:_,queueBadge:"active"})),...h.map(_=>({run:_,queueBadge:"queued"}))],k=[...p.map(_=>({run:_,queueBadge:"active"})),...m.map(_=>({run:_,queueBadge:"queued"}))],v=_=>{s(R=>R===_?null:_)};return g.jsx("div",{className:"flex-1 min-h-0 px-6 py-4 w-full",children:g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 h-full w-full min-h-0",children:[g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Planning",total:y.length,open:r==="planning",onToggle:()=>v("planning"),accent:"border-t-cyber-violet/60",titleAccent:"text-cyber-violet-light/80",openRing:"ring-cyber-violet/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(mC,{runs:o,openQuestionCounts:(t==null?void 0:t.openQuestionCounts)??{},selectedId:l,onSelect:i}),r==="planning"&&g.jsx(jy,{title:"In Planning",items:y,activeBadgeLabel:"Planning",selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",empty:"Nothing planning — promote from Inbox"})]})]}),g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Progress",total:k.length,open:r==="progress",onToggle:()=>v("progress"),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",openRing:"ring-[#C4B643]/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(d0,{title:"Review Result",count:x.length,accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",isEmpty:x.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"Nothing awaiting sign-off"}),children:x.map(_=>{const R=((t==null?void 0:t.pendingSendCounts)??{})[_.id];return g.jsx(pd,{run:_,selected:l===_.id,onSelect:()=>i(_),hideStatusBadge:_.status==="review",extraBadge:R?{label:"will send on approve",className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35"}:void 0},_.id)})}),r==="progress"&&g.jsx(jy,{title:"In Progress",items:k,activeBadgeLabel:"Running",autoApprovedRunIds:(t==null?void 0:t.autoApprovedRunIds)??[],selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",empty:"Queue empty — approve a plan to start"})]})]})]})})}function gC(){return g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[g.jsx("div",{className:"absolute top-16 left-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute bottom-20 right-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:g.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function yC({className:t="w-5 h-5"}){return g.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":!0,children:[g.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),g.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),g.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const xC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function bC({className:t="",size:l=36}){return g.jsx("img",{src:xC,alt:"",width:l,height:l,className:`shrink-0 object-contain ${t}`,"aria-hidden":!0,draggable:!1})}function vC(){var q,te,ee;const[t,l]=V.useState("ops"),[i,r]=V.useState(null),[s,o]=V.useState(null),f=V.useCallback(()=>{wg().then(r).catch(console.error)},[]);V.useEffect(()=>{f();const O=tv(r),P=setInterval(f,5e3);return()=>{O(),clearInterval(P)}},[f]),V.useEffect(()=>{if(!s||!i)return;const O=i.runs.find(P=>P.id===s.id);O&&o(O)},[i,s==null?void 0:s.id]);const h=((q=i==null?void 0:i.resultReviewRuns)==null?void 0:q.length)??0,p=((te=i==null?void 0:i.awaitingPlanReview)==null?void 0:te.length)??0,m=(i==null?void 0:i.runs.filter(O=>O.status==="done").length)??0,x=((ee=i==null?void 0:i.agents)==null?void 0:ee.length)??0,y=(i==null?void 0:i.agentIssueCount)??0,k=p+h,v=V.useMemo(()=>!s||!i?[]:Ey(s,i,t),[s,i,t]),_=s?md(v,s.id):-1,R=V.useCallback(O=>{const P=v[O];P&&o(P)},[v]),H=V.useCallback(async O=>{if(!i)return;const P=Ey(i.runs.find(M=>M.id===O)??s,i,t),se=Uf(P,O),me=await wg();if(r(me),!se){o(null);return}o(me.runs.find(M=>M.id===se.id)??null)},[i,s,t]),N=O=>`px-3 py-2 text-base rounded ${t===O?"bg-[#92E4DD]/20 text-[#92E4DD]":"text-white/60 hover:text-white"}`,Z=()=>l("agents");return g.jsxs(g.Fragment,{children:[g.jsx(gC,{}),g.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[g.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsxs("button",{type:"button",onClick:()=>{l("ops"),o(null)},className:"flex items-center gap-3 text-left rounded cursor-pointer hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-label":"AgentDealer — go to Operations",children:[g.jsx(bC,{size:40}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Kick tasks, approve plans, review results"})]})]}),g.jsxs("nav",{className:"flex gap-1",children:[g.jsxs("button",{type:"button",onClick:()=>l("ops"),className:N("ops"),children:["Operations",k>0&&g.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1 align-middle",children:[p>0&&g.jsx("span",{className:"text-xs leading-none bg-cyber-violet/20 text-cyber-violet-light px-1.5 py-0.5 rounded tabular-nums border border-cyber-violet/35",title:`${p} plan${p===1?"":"s"} ready to review`,children:p}),h>0&&g.jsx("span",{className:"text-xs leading-none bg-[#C4B643]/30 text-[#E8DC7A] px-1.5 py-0.5 rounded tabular-nums",title:`${h} result${h===1?"":"s"} to review`,children:h})]})]}),g.jsx("button",{type:"button",onClick:()=>l("intake"),className:N("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:N("done"),children:["Done",m>0&&g.jsx("span",{className:"ml-1 text-xs bg-white/10 px-1.5 py-0.5 rounded",children:m})]})]})]}),g.jsxs("button",{type:"button",onClick:Z,className:`${N("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(yC,{className:"w-6 h-6 shrink-0"}),x>0&&g.jsx("span",{className:"text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${x} configured agent${x===1?"":"s"}`,children:x}),y>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${y} need${y===1?"s":""} attention`,children:[g.jsx(c0,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[t==="ops"&&g.jsx(pC,{snapshot:i,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o}),t==="intake"&&g.jsx(cC,{agents:(i==null?void 0:i.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Z}),t==="agents"&&g.jsx(WE,{agents:(i==null?void 0:i.agents)??[],agentDeckOnline:(i==null?void 0:i.agentDeckOnline)??!1,onRefresh:f}),t==="done"&&g.jsx(tC,{runs:(i==null?void 0:i.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o,sentRunIds:(i==null?void 0:i.sentRunIds)??[]})]}),s&&g.jsx(XE,{run:s,agents:(i==null?void 0:i.agents)??[],onClose:()=>o(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>H(s.id),onDoneAndNext:()=>H(s.id),queueNav:v.length>1?{runs:v,index:_,onPrev:()=>R(_-1),onNext:()=>R(_+1)}:void 0,onRetry:O=>{o(O),l("ops"),f()}})]})]})}function kC(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}kC();L1.createRoot(document.getElementById("root")).render(g.jsx(V.StrictMode,{children:g.jsx(vC,{})}));
77
+ `))}function p(v,_,R,H){const N=R.enter("tableCell"),Z=R.enter("phrasing"),q=R.containerPhrasing(v,{...H,before:o,after:o});return Z(),N(),q}function m(v,_){return a4(v,{align:_,alignDelimiters:r,padding:i,stringLength:s})}function x(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("table");for(;++N<H.length;)Z[N]=y(H[N],_,R);return q(),Z}function y(v,_,R){const H=v.children;let N=-1;const Z=[],q=_.enter("tableRow");for(;++N<H.length;)Z[N]=p(H[N],v,_,R);return q(),Z}function k(v,_,R){let H=Zx.inlineCode(v,_,R);return R.stack.includes("tableCell")&&(H=H.replace(/\|/g,"\\$&")),H}}function F4(){return{exit:{taskListCheckValueChecked:vy,taskListCheckValueUnchecked:vy,paragraph:G4}}}function Q4(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X4}}}function vy(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function G4(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const i=this.stack[this.stack.length-1];i.type;const r=i.children[0];if(r&&r.type==="text"){const s=l.children;let o=-1,f;for(;++o<s.length;){const h=s[o];if(h.type==="paragraph"){f=h;break}}f===i&&(r.value=r.value.slice(1),r.value.length===0?i.children.shift():i.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,i.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function X4(t,l,i,r){const s=t.children[0],o=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",h=i.createTracker(r);o&&h.move(f);let p=Zx.listItem(t,l,i,{...r,...h.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(x){return x+f}}function J4(){return[A_(),X_(),P_(),U4(),F4()]}function K4(t){return{extensions:[j_(),J_(t),W_(),Z4(t),Q4()]}}const $4={tokenize:lE,partial:!0},Fx={tokenize:aE,partial:!0},Qx={tokenize:iE,partial:!0},Gx={tokenize:rE,partial:!0},P4={tokenize:uE,partial:!0},Xx={name:"wwwAutolink",tokenize:tE,previous:Kx},Jx={name:"protocolAutolink",tokenize:nE,previous:$x},fl={name:"emailAutolink",tokenize:eE,previous:Px},Un={};function W4(){return{text:Un}}let da=48;for(;da<123;)Un[da]=fl,da++,da===58?da=65:da===91&&(da=97);Un[43]=fl;Un[45]=fl;Un[46]=fl;Un[95]=fl;Un[72]=[fl,Jx];Un[104]=[fl,Jx];Un[87]=[fl,Xx];Un[119]=[fl,Xx];function eE(t,l,i){const r=this;let s,o;return f;function f(y){return!Bf(y)||!Px.call(r,r.previous)||fd(r.events)?i(y):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),h(y))}function h(y){return Bf(y)?(t.consume(y),h):y===64?(t.consume(y),p):i(y)}function p(y){return y===46?t.check(P4,x,m)(y):y===45||y===95||Bt(y)?(o=!0,t.consume(y),p):x(y)}function m(y){return t.consume(y),s=!0,p}function x(y){return o&&s&&It(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(y)):i(y)}}function tE(t,l,i){const r=this;return s;function s(f){return f!==87&&f!==119||!Kx.call(r,r.previous)||fd(r.events)?i(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check($4,t.attempt(Fx,t.attempt(Qx,o),i),i)(f))}function o(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(f)}}function nE(t,l,i){const r=this;let s="",o=!1;return f;function f(y){return(y===72||y===104)&&$x.call(r,r.previous)&&!fd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(y),t.consume(y),h):i(y)}function h(y){if(It(y)&&s.length<5)return s+=String.fromCodePoint(y),t.consume(y),h;if(y===58){const k=s.toLowerCase();if(k==="http"||k==="https")return t.consume(y),p}return i(y)}function p(y){return y===47?(t.consume(y),o?m:(o=!0,p)):i(y)}function m(y){return y===null||gs(y)||it(y)||ka(y)||Es(y)?i(y):t.attempt(Fx,t.attempt(Qx,x),i)(y)}function x(y){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(y)}}function lE(t,l,i){let r=0;return s;function s(f){return(f===87||f===119)&&r<3?(r++,t.consume(f),s):f===46&&r===3?(t.consume(f),o):i(f)}function o(f){return f===null?i(f):l(f)}}function aE(t,l,i){let r,s,o;return f;function f(m){return m===46||m===95?t.check(Gx,p,h)(m):m===null||it(m)||ka(m)||m!==45&&Es(m)?p(m):(o=!0,t.consume(m),f)}function h(m){return m===95?r=!0:(s=r,r=void 0),t.consume(m),f}function p(m){return s||r||!o?i(m):l(m)}}function iE(t,l){let i=0,r=0;return s;function s(f){return f===40?(i++,t.consume(f),s):f===41&&r<i?o(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?t.check(Gx,l,o)(f):f===null||it(f)||ka(f)?l(f):(t.consume(f),s)}function o(f){return f===41&&r++,t.consume(f),s}}function rE(t,l,i){return r;function r(h){return h===33||h===34||h===39||h===41||h===42||h===44||h===46||h===58||h===59||h===63||h===95||h===126?(t.consume(h),r):h===38?(t.consume(h),o):h===93?(t.consume(h),s):h===60||h===null||it(h)||ka(h)?l(h):i(h)}function s(h){return h===null||h===40||h===91||it(h)||ka(h)?l(h):r(h)}function o(h){return It(h)?f(h):i(h)}function f(h){return h===59?(t.consume(h),r):It(h)?(t.consume(h),f):i(h)}}function uE(t,l,i){return r;function r(o){return t.consume(o),s}function s(o){return Bt(o)?i(o):l(o)}}function Kx(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||it(t)}function $x(t){return!It(t)}function Px(t){return!(t===47||Bf(t))}function Bf(t){return t===43||t===45||t===46||t===95||Bt(t)}function fd(t){let l=t.length,i=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){i=!0;break}if(r._gfmAutolinkLiteralWalkedInto){i=!1;break}}return t.length>0&&!i&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),i}const sE={tokenize:gE,partial:!0};function oE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hE,continuation:{tokenize:mE},exit:pE}},text:{91:{name:"gfmFootnoteCall",tokenize:dE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cE,resolveTo:fE}}}}function cE(t,l,i){const r=this;let s=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let f;for(;s--;){const p=r.events[s][1];if(p.type==="labelImage"){f=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return h;function h(p){if(!f||!f._balanced)return i(p);const m=jn(r.sliceSerialize({start:f.end,end:r.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?i(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function fE(t,l){let i=t.length;for(;i--;)if(t[i][1].type==="labelImage"&&t[i][0]==="enter"){t[i][1];break}t[i+1][1].type="data",t[i+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[i+3][1].start),end:Object.assign({},t[t.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[i+3][1].end),end:Object.assign({},t[i+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},h=[t[i+1],t[i+2],["enter",r,l],t[i+3],t[i+4],["enter",s,l],["exit",s,l],["enter",o,l],["enter",f,l],["exit",f,l],["exit",o,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(i,t.length-i+1,...h),t}function dE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,f;return h;function h(y){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),p}function p(y){return y!==94?i(y):(t.enter("gfmFootnoteCallMarker"),t.consume(y),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(y){if(o>999||y===93&&!f||y===null||y===91||it(y))return i(y);if(y===93){t.exit("chunkString");const k=t.exit("gfmFootnoteCallString");return s.includes(jn(r.sliceSerialize(k)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(y),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):i(y)}return it(y)||(f=!0),o++,t.consume(y),y===92?x:m}function x(y){return y===91||y===92||y===93?(t.consume(y),o++,m):m(y)}}function hE(t,l,i){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,f=0,h;return p;function p(_){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(_){return _===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",x):i(_)}function x(_){if(f>999||_===93&&!h||_===null||_===91||it(_))return i(_);if(_===93){t.exit("chunkString");const R=t.exit("gfmFootnoteDefinitionLabelString");return o=jn(r.sliceSerialize(R)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(_),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),k}return it(_)||(h=!0),f++,t.consume(_),_===92?y:x}function y(_){return _===91||_===92||_===93?(t.consume(_),f++,x):x(_)}function k(_){return _===58?(t.enter("definitionMarker"),t.consume(_),t.exit("definitionMarker"),s.includes(o)||s.push(o),Ie(t,v,"gfmFootnoteDefinitionWhitespace")):i(_)}function v(_){return l(_)}}function mE(t,l,i){return t.check(Tr,l,t.attempt(sE,l,i))}function pE(t){t.exit("gfmFootnoteDefinition")}function gE(t,l,i){const r=this;return Ie(t,s,"gfmFootnoteDefinitionIndent",5);function s(o){const f=r.events[r.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?l(o):i(o)}}function yE(t){let i=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:s};return i==null&&(i=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(f,h){let p=-1;for(;++p<f.length;)if(f[p][0]==="enter"&&f[p][1].type==="strikethroughSequenceTemporary"&&f[p][1]._close){let m=p;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[p][1].end.offset-f[p][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[p][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const x={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[p][1].end)},y={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[p][1].start)},k=[["enter",x,h],["enter",f[m][1],h],["exit",f[m][1],h],["enter",y,h]],v=h.parser.constructs.insideSpan.null;v&&fn(k,k.length,0,Cs(v,f.slice(m+1,p),h)),fn(k,k.length,0,[["exit",y,h],["enter",f[p][1],h],["exit",f[p][1],h],["exit",x,h]]),fn(f,m-1,p-m+3,k),p=m+k.length-2;break}}for(p=-1;++p<f.length;)f[p][1].type==="strikethroughSequenceTemporary"&&(f[p][1].type="data");return f}function o(f,h,p){const m=this.previous,x=this.events;let y=0;return k;function k(_){return m===126&&x[x.length-1][1].type!=="characterEscape"?p(_):(f.enter("strikethroughSequenceTemporary"),v(_))}function v(_){const R=gi(m);if(_===126)return y>1?p(_):(f.consume(_),y++,v);if(y<2&&!i)return p(_);const H=f.exit("strikethroughSequenceTemporary"),N=gi(_);return H._open=!N||N===2&&!!R,H._close=!R||R===2&&!!N,h(_)}}}class xE{constructor(){this.map=[]}add(l,i,r){bE(this,l,i,r)}consume(l){if(this.map.sort(function(o,f){return o[0]-f[0]}),this.map.length===0)return;let i=this.map.length;const r=[];for(;i>0;)i-=1,r.push(l.slice(this.map[i][0]+this.map[i][1]),this.map[i][2]),l.length=this.map[i][0];r.push(l.slice()),l.length=0;let s=r.pop();for(;s;){for(const o of s)l.push(o);s=r.pop()}this.map.length=0}}function bE(t,l,i,r){let s=0;if(!(i===0&&r.length===0)){for(;s<t.map.length;){if(t.map[s][0]===l){t.map[s][1]+=i,t.map[s][2].push(...r);return}s+=1}t.map.push([l,i,r])}}function vE(t,l){let i=!1;const r=[];for(;l<t.length;){const s=t[l];if(i){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const o=r.length-1;r[o]=r[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(i=!0);l+=1}return r}function kE(){return{flow:{null:{name:"table",tokenize:wE,resolveAll:SE}}}}function wE(t,l,i){const r=this;let s=0,o=0,f;return h;function h(M){let Y=r.events.length-1;for(;Y>-1;){const re=r.events[Y][1].type;if(re==="lineEnding"||re==="linePrefix")Y--;else break}const $=Y>-1?r.events[Y][1].type:null,xe=$==="tableHead"||$==="tableRow"?O:p;return xe===O&&r.parser.lazy[r.now().line]?i(M):xe(M)}function p(M){return t.enter("tableHead"),t.enter("tableRow"),m(M)}function m(M){return M===124||(f=!0,o+=1),x(M)}function x(M){return M===null?i(M):we(M)?o>1?(o=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),v):i(M):Be(M)?Ie(t,x,"whitespace")(M):(o+=1,f&&(f=!1,s+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),f=!0,x):(t.enter("data"),y(M)))}function y(M){return M===null||M===124||it(M)?(t.exit("data"),x(M)):(t.consume(M),M===92?k:y)}function k(M){return M===92||M===124?(t.consume(M),y):y(M)}function v(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?i(M):(t.enter("tableDelimiterRow"),f=!1,Be(M)?Ie(t,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?H(M):M===124?(f=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),R):ee(M)}function R(M){return Be(M)?Ie(t,H,"whitespace")(M):H(M)}function H(M){return M===58?(o+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),N):M===45?(o+=1,N(M)):M===null||we(M)?te(M):ee(M)}function N(M){return M===45?(t.enter("tableDelimiterFiller"),Z(M)):ee(M)}function Z(M){return M===45?(t.consume(M),Z):M===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),q):(t.exit("tableDelimiterFiller"),q(M))}function q(M){return Be(M)?Ie(t,te,"whitespace")(M):te(M)}function te(M){return M===124?_(M):M===null||we(M)?!f||s!==o?ee(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(M)):ee(M)}function ee(M){return i(M)}function O(M){return t.enter("tableRow"),P(M)}function P(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),P):M===null||we(M)?(t.exit("tableRow"),l(M)):Be(M)?Ie(t,P,"whitespace")(M):(t.enter("data"),se(M))}function se(M){return M===null||M===124||it(M)?(t.exit("data"),P(M)):(t.consume(M),M===92?me:se)}function me(M){return M===92||M===124?(t.consume(M),se):se(M)}}function SE(t,l){let i=-1,r=!0,s=0,o=[0,0,0,0],f=[0,0,0,0],h=!1,p=0,m,x,y;const k=new xE;for(;++i<t.length;){const v=t[i],_=v[1];v[0]==="enter"?_.type==="tableHead"?(h=!1,p!==0&&(ky(k,l,p,m,x),x=void 0,p=0),m={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",m,l]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,y=void 0,o=[0,0,0,0],f=[0,i+1,0,0],h&&(h=!1,x={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},k.add(i,0,[["enter",x,l]])),s=_.type==="tableDelimiterRow"?2:x?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,f[2]===0&&(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y),o=[0,0,0,0]),f[2]=i)):_.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(f[0]=f[1],y=$u(k,l,o,s,void 0,y)),o=f,f=[o[1],i,0,0])):_.type==="tableHead"?(h=!0,p=i):_.type==="tableRow"||_.type==="tableDelimiterRow"?(p=i,o[1]!==0?(f[0]=f[1],y=$u(k,l,o,s,i,y)):f[1]!==0&&(y=$u(k,l,f,s,i,y)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(f[3]=i)}for(p!==0&&ky(k,l,p,m,x),k.consume(l.events),i=-1;++i<l.events.length;){const v=l.events[i];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=vE(l.events,i))}return t}function $u(t,l,i,r,s,o){const f=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",h="tableContent";i[0]!==0&&(o.end=Object.assign({},di(l.events,i[0])),t.add(i[0],0,[["exit",o,l]]));const p=di(l.events,i[1]);if(o={type:f,start:Object.assign({},p),end:Object.assign({},p)},t.add(i[1],0,[["enter",o,l]]),i[2]!==0){const m=di(l.events,i[2]),x=di(l.events,i[3]),y={type:h,start:Object.assign({},m),end:Object.assign({},x)};if(t.add(i[2],0,[["enter",y,l]]),r!==2){const k=l.events[i[2]],v=l.events[i[3]];if(k[1].end=Object.assign({},v[1].end),k[1].type="chunkText",k[1].contentType="text",i[3]>i[2]+1){const _=i[2]+1,R=i[3]-i[2]-1;t.add(_,R,[])}}t.add(i[3]+1,0,[["exit",y,l]])}return s!==void 0&&(o.end=Object.assign({},di(l.events,s)),t.add(s,0,[["exit",o,l]]),o=void 0),o}function ky(t,l,i,r,s){const o=[],f=di(l.events,i);s&&(s.end=Object.assign({},f),o.push(["exit",s,l])),r.end=Object.assign({},f),o.push(["exit",r,l]),t.add(i+1,0,o)}function di(t,l){const i=t[l],r=i[0]==="enter"?"start":"end";return i[1][r]}const _E={name:"tasklistCheck",tokenize:CE};function EE(){return{text:{91:_E}}}function CE(t,l,i){const r=this;return s;function s(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?i(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),o)}function o(p){return it(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),f):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),f):i(p)}function f(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),h):i(p)}function h(p){return we(p)?l(p):Be(p)?t.check({tokenize:AE},l,i)(p):i(p)}}function AE(t,l,i){return Ie(t,r,"whitespace");function r(s){return s===null?i(s):l(s)}}function jE(t){return ox([W4(),oE(),yE(t),kE(),EE()])}const NE={};function TE(t){const l=this,i=t||NE,r=l.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),f=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(jE(i)),o.push(J4()),f.push(K4(i))}function wa({source:t,className:l=""}){return t.trim()?g.jsx("div",{className:`markdown-body ${l}`.trim(),children:g.jsx(y_,{remarkPlugins:[TE],children:t})}):g.jsx("p",{className:"text-sm text-white/40 italic",children:"Empty"})}function DE(t){const l=t.split(`
78
+ `).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Result ready"}function Wx({execResult:t}){const[l,i]=V.useState(!0);if(!t.resultText)return null;const r=Iy(t),s=r.detected,o=t.resultText;return g.jsxs("section",{className:"space-y-2",children:[s&&g.jsxs("div",{className:"rounded-lg border border-red-400/35 bg-red-500/10 px-3 py-2.5",children:[g.jsx("p",{className:"text-sm font-semibold text-red-300",children:"Blocker — agent could not finish"}),r.summary&&g.jsx("p",{className:"text-sm text-red-200/85 mt-1 leading-snug",children:r.summary}),g.jsx("p",{className:"text-xs text-red-200/60 mt-2",children:"Grant the missing permission or adjust settings, then retry with instructions below."})]}),g.jsx("div",{className:`heading-section ${s?"text-red-300":""}`,children:s?"Blocker details":"Result"}),!l&&g.jsxs("button",{type:"button",onClick:()=>i(!0),className:`w-full text-left rounded-xl border px-4 py-3 transition-colors ${s?"border-red-400/30 bg-red-950/20 hover:border-red-400/45":"border-white/10 bg-white/[0.03] hover:border-white/20"}`,children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:DE(o)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full result →"})]}),l&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:`markdown-body-panel markdown-body-panel--flow ${s?"border-red-400/30 bg-red-950/20":""}`,children:g.jsx(wa,{source:o})}),g.jsx("button",{type:"button",onClick:()=>i(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]})}function zE(t){return t?Iy(t).detected:!1}function OE(t){const l=Vt(t,"playbook_patch");if(!l)return null;try{return ol(l)}catch{return null}}function ME(t){const l=Vt(t,"reflect_status");if(!l)return null;try{return ol(l)}catch{return null}}function e0({run:t,artifacts:l}){if(!t.playbookId)return null;const i=OE(l),r=ME(l);if((t.runtime??"claude_code")==="cursor_local")return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Playbook learning requires Claude Code runtime (Cursor has no Agent Deck MCP)."})]});if((r==null?void 0:r.status)==="pending"&&!i)return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:"Analyzing for playbook improvements…"})]});if(!i)return(r==null?void 0:r.status)==="failed"?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error??"Reflect step failed"})]}):(r==null?void 0:r.status)==="completed"&&r.error?g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),g.jsx("p",{className:"text-sm text-white/45",children:r.error})]}):null;const o=i.dashboardUrl;return g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Playbook learning"}),i.playbookTitle&&g.jsxs("p",{className:"text-sm text-white/45",children:[i.playbookTitle," ",i.playbookId&&g.jsxs("span",{className:"text-white/30",children:["(",i.playbookId,")"]})]}),i.rationale&&g.jsx("p",{className:"text-sm text-white/55",children:i.rationale}),g.jsxs("p",{className:"text-sm text-[#92E4DD]/80",children:["Proposal ",g.jsx("span",{className:"font-mono text-white/50",children:i.patchId})," queued in Agent Deck — accept or reject in the deck review queue."]}),o&&g.jsx("a",{href:o,target:"_blank",rel:"noreferrer",className:"inline-block btn-gold px-4 py-2 text-sm no-underline",children:"Review in Agent Deck"})]})}function t0({exchanges:t,busy:l,onAsk:i}){const[r,s]=V.useState(""),o=t.some(h=>h.status==="pending"),f=!l&&!o&&r.trim().length>0;return g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Ask the agent"}),t.map(h=>g.jsxs("div",{className:"space-y-1 rounded-xl border border-white/10 bg-white/[0.03] p-3",children:[g.jsx("p",{className:"text-sm text-white/85",children:h.question}),h.status==="pending"&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Agent is answering…"}),h.status==="failed"&&g.jsxs("p",{className:"text-sm text-red-400/90",children:["Could not answer",h.error?` — ${h.error}`:"",". Ask again."]}),h.status==="answered"&&h.answer&&g.jsxs(g.Fragment,{children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:h.answer})}),!h.sessionResumed&&g.jsx("p",{className:"text-xs text-white/30",children:"Answered from artifacts — the original session had expired."})]})]},h.exchangeId)),g.jsx("textarea",{className:"field-mono min-h-[72px] resize-y leading-relaxed",placeholder:"Why did you choose this approach? Did you check X?",value:r,disabled:l||o,onChange:h=>s(h.target.value)}),g.jsx("button",{type:"button",disabled:!f,onClick:async()=>{const h=r.trim();s(""),await i(h)},className:"btn-ghost text-xs px-2 py-1 disabled:opacity-40",children:o?"Answering…":"Ask"})]})}function n0(t){const l=[];for(const i of t)if(!(i.kind!=="result_qa"||!i.contentJson))try{l.push(JSON.parse(i.contentJson))}catch{}return Fv(l)}function RE({run:t}){const[l,i]=V.useState([]),[r,s]=V.useState(null),[o,f]=V.useState(null),[h,p]=V.useState(!1),m=V.useCallback(async()=>{const te=await hi(t.id);i(te.artifacts),s(te.usageSummary??null),f(te.traceSummary??null)},[t.id]),x=async te=>{p(!0);try{await te(),await m()}catch(ee){alert(String(ee))}finally{p(!1)}},y=zy(l,"execution_result","execute"),k=Vt(l,"document"),v=k?ol(k):null,_=l.find(te=>te.kind==="approved_plan"),R=LE(l),H=Vt(l,"send_receipt"),N=H?ol(H):null,Z=n0(l),q=Z.some(te=>te.status==="pending");return V.useEffect(()=>{m().catch(console.error)},[m]),V.useEffect(()=>{if(!q)return;const te=setInterval(()=>{m().catch(console.error)},3e3);return()=>clearInterval(te)},[q,m]),g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Completed Run (Read-Only)"}),g.jsx("p",{className:"text-body",children:ws(t)})]}),_&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:ts(_)})})]}),v&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Document"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:v.markdown})})]}),g.jsx(t0,{exchanges:Z,busy:h,onAsk:te=>x(()=>Dy(t.id,te))}),y&&g.jsx(Wx,{execResult:y}),R&&g.jsxs("section",{className:"space-y-2",children:[g.jsxs("div",{className:"heading-section",children:["Outbound draft (",R.status,")"]}),g.jsxs("p",{className:"text-sm text-white/45",children:["To: ",R.draft.summary.target]}),g.jsx("textarea",{className:"field-mono min-h-[80px] resize-y",value:R.draft.summary.body,readOnly:!0})]}),N&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Send receipt"}),g.jsxs("p",{className:"text-sm text-white/45",children:["Sent ",new Date(N.sentAt).toLocaleString(),N.permalink&&g.jsxs(g.Fragment,{children:[" · ",g.jsx("a",{href:N.permalink,className:"text-[#92E4DD] hover:underline",target:"_blank",rel:"noreferrer",children:"Open message"})]})]})]}),g.jsx(e0,{run:t,artifacts:l}),r&&g.jsx(_s,{summary:r}),o&&g.jsx(Ss,{trace:o})]})}function LE(t){for(const l of["slack_draft","email_draft","service_draft"]){const i=Vt(t,l);if(i!=null&&i.contentJson)try{return JSON.parse(i.contentJson)}catch{}}return null}function yi(){return{maxTurns:"",maxBudgetUsd:""}}function l0(t){return{maxTurns:(t==null?void 0:t.maxTurns)!=null?String(t.maxTurns):"",maxBudgetUsd:(t==null?void 0:t.maxBudgetUsd)!=null?String(t.maxBudgetUsd):""}}function vr(t){const l=t.maxTurns.trim()?Number(t.maxTurns):null,i=t.maxBudgetUsd.trim()?Number(t.maxBudgetUsd):null;return l==null&&i==null||l!=null&&(!Number.isFinite(l)||l<=0)||i!=null&&(!Number.isFinite(i)||i<=0)?null:{maxTurns:l,maxBudgetUsd:i}}function BE(t,l){const i=jr(t,l);return!!(i.maxTurns||i.maxBudgetUsd)}function Zl(t,l,i){if(!(!t.maxTurns.trim()&&!t.maxBudgetUsd.trim()&&!BE(l,i)))return vr(t)}function jr(t,l){const i=Dv(t);return l0(i[l])}function wy(t){return l0(Tv(t))}function UE({run:t,agents:l,onRefresh:i}){const[r,s]=V.useState([]),[o,f]=V.useState(null),[h,p]=V.useState(null),[m,x]=V.useState(""),[y,k]=V.useState(""),[v,_]=V.useState(yi()),[R,H]=V.useState(!1),N=l.find(P=>P.id===t.agentId),Z=t.runtime??(N==null?void 0:N.runtime)??"claude_code",q=V.useCallback(async()=>{const P=await hi(t.id);s(P.artifacts),f(P.usageSummary??null),p(P.traceSummary??null)},[t.id]),te=t.status==="running",ee=t.status==="plan_approved";V.useEffect(()=>{q().catch(console.error)},[q]),V.useEffect(()=>{k(t.executeModel??""),_(jr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),V.useEffect(()=>{if(!te&&!ee)return;const P=setInterval(()=>q().catch(console.error),3e3);return()=>clearInterval(P)},[te,ee,q]),V.useEffect(()=>{te&&nv(t.id,"stream_trace").then(x).catch(()=>x(""))},[te,t.id,r.length]);const O=async P=>{H(!0);try{await P(),await q(),i()}catch(se){alert(String(se))}finally{H(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),ee&&g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Approved — waiting for execution slot…"}),te&&g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:"Executing…"})]}),(()=>{const P=Vt(r,"approved_plan"),se=(P==null?void 0:P.author)==="system"?ol(P):null;return se?g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section text-emerald-200",children:"Auto-approved"}),g.jsx("p",{className:"text-sm text-white/60",children:se.rationale??"Self-triage marked this plan trivial."})]}):null})(),ee&&g.jsxs(g.Fragment,{children:[g.jsx(ma,{phase:"Execution",runtime:Z,model:y,onModelChange:k,budget:v,onBudgetChange:_,defaultModelId:N==null?void 0:N.defaultExecuteModel,disabled:R}),g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>G1(t.id,y||null,Zl(v,t.budgetJson,"execute"))),className:"btn-ghost px-3 py-2 w-full",children:"Run now (skip queue wait)"})]}),h&&g.jsx(Ss,{trace:h}),o&&g.jsx(_s,{summary:o}),m&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Log Tail"}),g.jsx("textarea",{className:"field-mono min-h-[140px] resize-y text-sm",value:m,readOnly:!0})]}),(te||ee)&&g.jsx("button",{type:"button",disabled:R,onClick:()=>O(()=>Vf(t.id)),className:"btn-ghost-danger w-full py-2",children:"Cancel run"})]})}function HE({questions:t,drafts:l,onDraftsChange:i,busy:r}){const s=(o,f)=>{i({...l,[o]:f})};return g.jsxs("div",{className:"space-y-3 rounded-xl border border-amber-400/40 bg-amber-400/5 p-3",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Agent needs your answer"}),t.map(o=>{const f=l[o.id]??{};return g.jsxs("div",{className:"space-y-1.5",children:[g.jsx("p",{className:"text-sm text-white/85",children:o.question}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:o.options.map(h=>g.jsx("button",{type:"button",disabled:r,title:h.description,onClick:()=>s(o.id,{selectedLabel:h.label}),className:`btn-ghost text-xs px-2 py-1 ${f.selectedLabel===h.label?"ring-1 ring-amber-300 text-amber-200":""}`,children:h.label},h.label))}),g.jsx("input",{className:"field-mono w-full text-xs",placeholder:"Other… (free-form answer triggers a replan)",value:f.freeText??"",disabled:r,onChange:h=>s(o.id,h.target.value?{freeText:h.target.value}:{})})]},o.id)})]})}function qE(t,l){return t.map(i=>({questionId:i.id,...l[i.id]}))}function VE(t,l){return t.every(i=>{var s;const r=l[i.id];return!!(r!=null&&r.selectedLabel||(s=r==null?void 0:r.freeText)!=null&&s.trim())})}function IE(t,l){return t.some(i=>{var r,s;return(s=(r=l[i.id])==null?void 0:r.freeText)==null?void 0:s.trim()})}function dd({title:t,open:l,onToggle:i,children:r,bordered:s=!0}){return g.jsxs("section",{className:`space-y-2 ${s?"border-t border-white/10 pt-3":""}`,children:[g.jsxs("button",{type:"button",onClick:i,className:"flex w-full items-center justify-between gap-2 text-left",children:[g.jsx("span",{className:"heading-section",children:t}),g.jsx("span",{className:"text-xs text-white/40",children:l?"Hide":"Show"})]}),l&&r]})}function a0({busy:t,onRemoved:l}){const i=()=>{confirm("Remove this task from Operations? It won't be marked done and can't be brought back here.")&&l()};return g.jsxs("div",{className:"pt-2 border-t border-white/10",children:[g.jsx("button",{type:"button",disabled:t,onClick:i,className:"btn-ghost-danger w-full py-2 disabled:cursor-not-allowed disabled:opacity-60",children:"Remove from Operations"}),g.jsx("p",{className:"text-xs text-white/35 text-center mt-1.5",children:"Dismisses the task — not archived to Done."})]})}function YE(t){const l=t.split(`
79
+ `).map(i=>i.trim()).find(i=>i.length>0&&!i.startsWith("#")&&!i.startsWith("```"));return(l==null?void 0:l.replace(/^[-*]\s+/,"").slice(0,160))??"Plan draft ready"}function ZE({run:t,agents:l,onRefresh:i,onApproved:r,onApprovedAndNext:s}){const[o,f]=V.useState([]),[h,p]=V.useState(null),[m,x]=V.useState(null),[y,k]=V.useState(""),[v,_]=V.useState(""),[R,H]=V.useState(""),[N,Z]=V.useState(yi()),[q,te]=V.useState(yi()),[ee,O]=V.useState({}),[P,se]=V.useState(!1),[me,M]=V.useState(!1),[Y,$]=V.useState(""),[xe,re]=V.useState(!1),[W,T]=V.useState(""),[J,ae]=V.useState(""),[Se,E]=V.useState(!1),[A,F]=V.useState(!1),[S,ue]=V.useState(!1),ce=l.find(Ze=>Ze.id===t.agentId),ge=t.runtime??(ce==null?void 0:ce.runtime)??"claude_code",Ae=V.useCallback(async()=>{const Ze=await hi(t.id);f(Ze.artifacts),p(Ze.usageSummary??null),x(Ze.traceSummary??null);const Q=Vt(Ze.artifacts,"approved_plan"),ie=Vt(Ze.artifacts,"draft_plan"),ve=Q??ie;if(ve){const je=ts(ve);k(je),ae(je)}},[t.id]),pe=o.some(Ze=>Ze.kind==="draft_plan"),ft=t.status==="plan_pending"&&!pe||S,Tt=Vt(o,"plan_triage"),dl=Vt(o,"plan_answers"),Hn=Tt?ol(Tt):null,St=t.status==="plan_pending"&&Hn&&!Hn.consumed&&Hn.questions.length>0&&(!dl||dl.createdAt<=Tt.createdAt)?Hn.questions:[],hl=VE(St,ee),Nn=IE(St,ee);V.useEffect(()=>{Ae().catch(console.error)},[Ae]),V.useEffect(()=>{_(t.planModel??""),H(t.executeModel??""),Z(jr(t.budgetJson,"plan")),te(jr(t.budgetJson,"execute")),O({}),se(!1),M(!1),$(""),re(!1),T(""),E(!1),ue(!1)},[t.id,t.planModel,t.executeModel,t.budgetJson]),V.useEffect(()=>{if(!ft)return;const Ze=setInterval(()=>{Ae().catch(console.error),i()},3e3);return()=>clearInterval(Ze)},[ft,Ae,i]);const _a=async Ze=>{const Q=Date.now()+12e4;for(;Date.now()<Q;){const ie=await hi(t.id);f(ie.artifacts);const ve=Vt(ie.artifacts,"draft_plan");if(ve&&ve.createdAt!==Ze){const je=ts(ve);k(je),ae(je),se(!0);break}await new Promise(je=>setTimeout(je,2e3))}i()},Gl=async Ze=>{var ie;const Q=(ie=Vt(o,"draft_plan"))==null?void 0:ie.createdAt;ue(!0),F(!0);try{await Q1(t.id,v||null,Zl(N,t.budgetJson,"plan"),Ze),await _a(Q)}catch(ve){alert(String(ve))}finally{ue(!1),F(!1),M(!1),re(!1),$("")}},ml=()=>{re(!1),M(Ze=>!Ze)},pl=()=>{if(M(!1),xe){gl();return}T(y),re(!0)},gl=()=>{W!==J&&!confirm("Discard your edits? Unsaved changes will be lost.")||(T(J),re(!1))},vi=async()=>{if(W.trim()){F(!0);try{await Kc(t.id,W,!1),k(W),ae(W)}catch(Ze){alert(String(Ze)),F(!1);return}await Gl({editedMarkdown:W})}},ki=async()=>{W.trim()&&await gt(async()=>{await Kc(t.id,W,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),re(!1),r==null||r(),s==null||s()})},gt=async Ze=>{F(!0);try{await Ze(),await Ae(),i()}catch(Q){alert(String(Q))}finally{F(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Plan"}),g.jsx("p",{className:"text-sm text-white/45",children:ws(t)}),ft?g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"text-sm text-[#92E4DD] animate-pulse",children:S?"Agent is replanning…":"Agent is writing the plan…"}),g.jsx("div",{className:"field-mono min-h-[min(200px,30vh)] flex items-center justify-center text-sm text-white/40 rounded border border-white/10",children:"Plan will appear here when the agent finishes…"})]}):y.trim()?g.jsxs(g.Fragment,{children:[!P&&g.jsxs("button",{type:"button",onClick:()=>se(!0),className:"w-full text-left rounded-xl border border-white/10 bg-white/[0.03] px-4 py-3 hover:border-white/20 transition-colors",children:[g.jsx("p",{className:"text-sm text-white/75 line-clamp-2",children:YE(y)}),g.jsx("p",{className:"text-xs text-[#92E4DD] mt-2",children:"Show full plan →"})]}),P&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:y})}),g.jsx("button",{type:"button",onClick:()=>se(!1),className:"btn-ghost text-xs px-2 py-1",children:"Show summary"})]})]}):g.jsx("p",{className:"text-sm text-white/40",children:"No plan yet."}),pe&&!ft&&g.jsxs("div",{className:"space-y-3 pt-1 border-t border-white/10",children:[g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:A,onClick:ml,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${me?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Replan with feedback"}),g.jsx("button",{type:"button",disabled:A,onClick:pl,className:`btn-ghost text-xs px-3 py-1.5 disabled:opacity-40 ${xe?"border-[#92E4DD]/40 text-[#92E4DD]":""}`,children:"Edit & replan / execute"})]}),me&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`replan-feedback-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"What should change?"}),g.jsx("textarea",{id:`replan-feedback-${t.id}`,className:"field-mono min-h-[min(120px,18vh)] resize-y leading-relaxed w-full",value:Y,onChange:Ze=>$(Ze.target.value),placeholder:"Comments for the agent — e.g. use a simpler approach, add tests, skip step 2…",disabled:A}),g.jsx(ma,{phase:"Plan",runtime:ge,model:v,onModelChange:_,budget:N,onBudgetChange:Z,defaultModelId:ce==null?void 0:ce.defaultPlanModel,disabled:A}),g.jsx("button",{type:"button",disabled:A||!Y.trim(),onClick:()=>Gl({feedback:Y.trim()}),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40 w-full sm:w-auto",children:"Replan"})]}),xe&&g.jsxs("div",{className:"space-y-3 rounded-xl border border-white/10 bg-white/[0.02] p-3",children:[g.jsx("label",{htmlFor:`plan-edit-${t.id}`,className:"text-xs text-white/45 uppercase tracking-wide",children:"Edit plan markdown"}),g.jsx("textarea",{id:`plan-edit-${t.id}`,className:"field-mono min-h-[min(280px,35vh)] resize-y leading-relaxed w-full",value:W,onChange:Ze=>T(Ze.target.value),placeholder:"Edit plan markdown",disabled:A}),g.jsx(ma,{phase:"Execution",runtime:ge,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:ce==null?void 0:ce.defaultExecuteModel,disabled:A}),g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("button",{type:"button",disabled:A||!W.trim(),onClick:()=>void vi(),className:"btn-ghost text-xs px-3 py-1.5 disabled:opacity-40",children:"Replan"}),g.jsx("button",{type:"button",disabled:A||!W.trim(),onClick:()=>void ki(),className:"btn-gold px-4 py-2 text-sm disabled:opacity-40",children:"Execute"}),g.jsx("button",{type:"button",disabled:A,onClick:gl,className:"btn-ghost text-xs px-3 py-1.5",children:"Cancel"})]})]})]})]}),St.length>0&&!ft&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section text-amber-200",children:"Resolve blocker"}),g.jsx("p",{className:"text-sm text-white/45",children:"Answer before execution can start."}),g.jsx(HE,{questions:St,drafts:ee,onDraftsChange:O,busy:A})]}),pe&&!ft&&g.jsxs("section",{className:"space-y-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),!Nn&&g.jsx(ma,{phase:"Execution",runtime:ge,model:R,onModelChange:H,budget:q,onBudgetChange:te,defaultModelId:ce==null?void 0:ce.defaultExecuteModel,disabled:A}),St.length>0&&g.jsx("button",{type:"button",disabled:A||!hl,className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",onClick:()=>gt(async()=>{(await X1(t.id,qE(St,ee),Nn?void 0:{executeModel:R||null,executeBudget:Zl(q,t.budgetJson,"execute")})).outcome==="approved"?(r==null||r(),s==null||s()):ue(!0)}),children:Nn?"Submit & replan":"Submit & start execution"}),St.length>0&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or skip the questions",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsx("button",{type:"button",disabled:A||!y.trim(),onClick:()=>gt(async()=>{await Kc(t.id,y,!0,{planModel:v||null,executeModel:R||null,planBudget:Zl(N,t.budgetJson,"plan"),executeBudget:Zl(q,t.budgetJson,"execute")}),r==null||r(),s==null||s()}),className:"btn-gold px-5 py-2 disabled:opacity-40 w-full sm:w-auto",children:St.length>0?"Proceed — agent decides →":"Approve & next →"}),St.length>0&&g.jsx("p",{className:"text-xs text-white/40",children:"The unanswered questions are passed to the agent, which decides them itself."})]}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:Se,onToggle:()=>E(Ze=>!Ze),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:A,onRemoved:()=>gt(async()=>{await Vf(t.id),s==null||s()})})]})}function FE({content:t,body:l,onBodyChange:i,deliverError:r,onRetrySend:s,retrySendBusy:o,disabled:f}){const{draft:h,bodyMismatch:p}=t,m=V.useMemo(()=>Yv(h,l),[h,l]),x=JSON.stringify(m.toolCall,null,2),[y,k]=V.useState(!!p),v=l!==h.summary.body;return g.jsxs("section",{className:"space-y-3 rounded-lg border border-[#C4B643]/30 bg-[#C4B643]/5 p-3",children:[g.jsx("div",{className:"heading-section text-[#E8DC7A]",children:h.actionType==="service_tool_call"?"Outbound action (will run on approve)":"Outbound message (will send on approve)"}),p&&!v&&g.jsx("p",{className:"text-sm text-amber-300/90",children:"Summary body does not match toolCall arguments — review the exact payload below."}),v&&g.jsx("p",{className:"text-sm text-[#92E4DD]/90",children:h.actionType==="service_tool_call"?"Summary edited — approve to run with the stored tool call (edit tool JSON via Retry if args must change).":"Message edited — approve to send your version."}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("p",{className:"text-xs text-white/40 uppercase tracking-wide",children:"To"}),g.jsx("p",{className:"text-base text-[#E8F6F4] font-medium",children:h.summary.target})]}),g.jsxs("div",{className:"space-y-1",children:[g.jsx("label",{htmlFor:"outbound-body",className:"text-xs text-white/40 uppercase tracking-wide",children:h.actionType==="service_tool_call"?"Summary":"Message"}),g.jsx("textarea",{id:"outbound-body",className:"field-mono min-h-[100px] resize-y w-full",value:l,onChange:_=>i(_.target.value),disabled:f})]}),g.jsx(dd,{title:"Exact tool call (server sends verbatim)",open:y,onToggle:()=>k(_=>!_),bordered:!1,children:g.jsx("pre",{className:"field-mono text-xs overflow-x-auto whitespace-pre-wrap p-2",children:x})}),r&&g.jsxs("div",{className:"space-y-2 rounded border border-red-500/30 bg-red-500/5 p-2",children:[g.jsxs("p",{className:"text-sm text-red-400/90",children:["Send failed: ",r]}),g.jsx("p",{className:"text-xs text-white/45",children:"Fix the message above or retry send after fixing the deck connection. To change recipient or rewrite from scratch, use Retry with new instructions below."}),s&&g.jsx("button",{type:"button",disabled:o||!l.trim(),onClick:s,className:"btn-gold w-full py-2 disabled:opacity-40",children:"Retry send →"})]})]})}function QE({run:t,agents:l,onRefresh:i,onRetry:r,onDoneAndNext:s}){var Ae;const[o,f]=V.useState([]),[h,p]=V.useState(null),[m,x]=V.useState(null),[y,k]=V.useState(""),[v,_]=V.useState(""),[R,H]=V.useState(yi()),[N,Z]=V.useState(!1),[q,te]=V.useState(!1),[ee,O]=V.useState(!1),[P,se]=V.useState(null),[me,M]=V.useState(""),Y=l.find(pe=>pe.id===t.agentId),$=t.runtime??(Y==null?void 0:Y.runtime)??"claude_code",xe=V.useCallback(async()=>{var ft;const pe=await hi(t.id);f(pe.artifacts),p(pe.usageSummary??null),x(pe.traceSummary??null);const Te=(ft=pe.events)==null?void 0:ft.filter(Tt=>Tt.type==="deliver_failed").at(-1);if(Te!=null&&Te.payloadJson)try{const Tt=JSON.parse(Te.payloadJson);se(Tt.error??null)}catch{se(null)}},[t.id]),re=zy(o,"execution_result","execute"),W=Vt(o,"document"),T=W?ol(W):null,J=o.find(pe=>pe.kind==="approved_plan"),ae=GE(o),Se=zE(re),E=!!y.trim(),A=n0(o),F=A.some(pe=>pe.status==="pending");V.useEffect(()=>{xe().catch(console.error)},[xe]);const ue=o.some(pe=>{if(pe.kind!=="reflect_status"||!pe.contentJson)return!1;try{return JSON.parse(pe.contentJson).status==="pending"}catch{return!1}})||F;V.useEffect(()=>{if(!ue)return;const pe=setInterval(()=>{xe().catch(console.error)},3e3);return()=>clearInterval(pe)},[ue,xe]),V.useEffect(()=>{te(!1),k(""),O(!1),se(null),M(""),_(t.executeModel??""),H(jr(t.budgetJson,"execute"))},[t.id,t.executeModel,t.budgetJson]),V.useEffect(()=>{ae&&M(ae.draft.summary.body)},[ae==null?void 0:ae.draft.summary.body,t.id]),V.useEffect(()=>{var Te;if(q||!Se)return;const pe=(Te=re==null?void 0:re.blocker)==null?void 0:Te.summary;pe&&(k(`Please resolve: ${pe}`),te(!0))},[q,Se,(Ae=re==null?void 0:re.blocker)==null?void 0:Ae.summary]);const ce=async pe=>{Z(!0);try{await pe(),await xe(),i()}catch(Te){alert(String(Te))}finally{Z(!1)}},ge=async()=>{Z(!0),se(null);try{await J1(t.id,ae&&me.trim()||void 0),await xe(),i(),s==null||s()}catch(pe){const Te=pe instanceof Error?pe.message:String(pe);ae?se(Te):alert(Te)}finally{Z(!1)}};return g.jsxs("div",{className:"space-y-4",children:[g.jsxs("section",{className:"space-y-1",children:[g.jsx("div",{className:"heading-section",children:"Agent"}),g.jsx("p",{className:"text-body",children:ws(t)}),Se&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Blocked — resolve the issue below, then retry"}),t.status==="failed"&&!Se&&g.jsx("p",{className:"text-sm text-red-400/90",children:"Execution failed — retry with new instructions"})]}),T&&!Se&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Deliverable"}),g.jsx("p",{className:"text-sm text-white/45",children:T.path}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:T.markdown})})]}),re&&g.jsx(Wx,{execResult:re}),g.jsx(t0,{exchanges:A,busy:N,onAsk:pe=>ce(()=>Dy(t.id,pe))}),g.jsxs("section",{className:"space-y-4 border-t border-white/10 pt-3",children:[g.jsx("div",{className:"heading-section",children:"Your Decision"}),ae&&t.status==="review"&&!Se&&g.jsx(FE,{content:ae,body:me,onBodyChange:M,deliverError:P,onRetrySend:ge,retrySendBusy:N,disabled:N}),t.status==="review"&&!Se&&g.jsxs("div",{className:"space-y-2",children:[g.jsx("p",{className:"text-sm text-white/45",children:ae?P?"Fix the send issue above, or edit the message and retry.":"Edit the message if needed, then approve to send.":"Looks good? Accept and move on."}),g.jsx("button",{type:"button",disabled:N||!ae&&!!y.trim()||!!ae&&!me.trim(),title:!ae&&y.trim()?"Clear retry instructions below to mark done":void 0,onClick:()=>void ge(),className:"btn-gold w-full py-2 disabled:opacity-40",children:ae?"Approve & send →":"Mark done & next →"}),!ae&&y.trim()&&g.jsx("p",{className:"text-xs text-white/40",children:"Clear the retry field below to accept this result."})]}),t.status==="review"&&!Se&&g.jsxs("div",{className:"flex items-center gap-3 text-xs text-white/30 uppercase tracking-wide",children:[g.jsx("span",{className:"h-px flex-1 bg-white/10"}),"or send back",g.jsx("span",{className:"h-px flex-1 bg-white/10"})]}),g.jsxs("div",{className:"space-y-2",children:[(Se||t.status==="failed")&&g.jsx("p",{className:"text-sm text-white/45",children:"Add instructions and retry — re-runs execution with the same approved plan."}),g.jsx("label",{htmlFor:`retry-${t.id}`,className:"text-xs text-white/40 uppercase tracking-wide",children:"Retry instructions"}),A.some(pe=>pe.status==="answered")&&g.jsx("p",{className:"text-xs text-white/40",children:"This discussion is included automatically if you retry."}),g.jsx("textarea",{id:`retry-${t.id}`,className:"field-mono min-h-[min(140px,22vh)] resize-y leading-relaxed",placeholder:Se?"What to change after fixing the blocker":ae?"What should change in the draft? (e.g. correct Slack user ID)":"What should the agent do differently?",value:y,onChange:pe=>k(pe.target.value)}),g.jsx(ma,{phase:"Execution",runtime:$,model:v,onModelChange:_,budget:R,onBudgetChange:H,defaultModelId:Y==null?void 0:Y.defaultExecuteModel,disabled:N}),g.jsx("button",{type:"button",disabled:N||!E,onClick:()=>ce(async()=>{const pe=Zl(R,t.budgetJson,"execute"),Te=await K1(t.id,y,v||null,pe);k(""),se(null),r==null||r(Te)}),className:`w-full py-2 ${E?"btn-retry-ready":"btn-retry"}`,children:"Retry with new instructions"})]})]}),J&&g.jsxs("section",{className:"space-y-2",children:[g.jsx("div",{className:"heading-section",children:"Approved Plan"}),g.jsx("div",{className:"markdown-body-panel markdown-body-panel--flow",children:g.jsx(wa,{source:ts(J)})})]}),g.jsx(e0,{run:t,artifacts:o}),h&&g.jsx("section",{className:"border-t border-white/10 pt-3",children:g.jsx(_s,{summary:h})}),m&&g.jsx(dd,{title:"Trace",open:ee,onToggle:()=>O(pe=>!pe),children:g.jsx(Ss,{trace:m,showHeading:!1})}),g.jsx(a0,{busy:N,onRemoved:()=>ce(async()=>{await Vf(t.id),s==null||s()})})]})}function GE(t){for(const l of["slack_draft","email_draft","service_draft"]){const i=Vt(t,l);if(i!=null&&i.contentJson)try{const r=JSON.parse(i.contentJson);if(r.status==="pending")return r}catch{}}return null}function XE(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const l=t.tagName;if(l==="TEXTAREA"||l==="SELECT")return!0;if(l!=="INPUT")return!1;const i=t.type;return!["button","submit","reset","checkbox","radio","file","hidden","image","range","color"].includes(i)}function hd({onClose:t,header:l,children:i,onKeyDown:r}){return V.useEffect(()=>{const s=o=>{if(o.key==="Escape"){o.preventDefault(),t();return}XE(o.target)||r==null||r(o)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[t,r]),g.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-3 sm:p-6",children:[g.jsx("button",{type:"button",className:"absolute inset-0 bg-black/65 backdrop-blur-[2px]",onClick:t,"aria-label":"Close"}),g.jsxs("div",{role:"dialog","aria-modal":"true",className:"relative w-[min(1200px,96vw)] h-[min(92vh,960px)] panel-surface flex flex-col text-[#E8F6F4] rounded-2xl overflow-hidden",children:[g.jsx("div",{className:"p-4 border-b border-white/10 space-y-3 shrink-0",children:l}),g.jsx("div",{className:"flex-1 overflow-y-auto p-5",children:i})]})]})}function JE({run:t,agents:l,onClose:i,onRefresh:r,onApproved:s,onApprovedAndNext:o,onDoneAndNext:f,onRetry:h,queueNav:p}){const[m,x]=V.useState(null),y=My(t.status),k=Yf(t);V.useEffect(()=>{if(t.source!=="linear"){x(null);return}hi(t.id).then(_=>x(lv(_.artifacts))).catch(()=>x(null))},[t.id,t.source]);const v=V.useCallback(_=>{p&&(_.key==="ArrowLeft"&&p.index>0&&(_.preventDefault(),p.onPrev()),_.key==="ArrowRight"&&p.index<p.runs.length-1&&(_.preventDefault(),p.onNext()))},[p]);return g.jsxs(hd,{onClose:i,onKeyDown:v,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-2",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5",children:[t.source==="linear"&&m?g.jsx("a",{href:m,target:"_blank",rel:"noreferrer",className:"inline-flex",title:"Open in Linear",children:g.jsxs(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 hover:bg-[#5E6AD2]/25 transition-colors",children:[ls(t)," ↗"]})}):g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 normal-case",children:If(t.taskCategory)}),g.jsx(st,{className:vs(t.runtime),children:ga(t.runtime)}),k&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case truncate max-w-[160px]",title:k,children:["◆ ",k]})]}),g.jsx("h2",{className:"font-semibold text-2xl leading-snug pr-2",children:t.title}),g.jsxs("p",{className:"text-sm text-white/45 flex flex-wrap gap-x-2 gap-y-0.5 items-center",children:[g.jsx(st,{className:y.tone,children:y.label}),g.jsxs("span",{title:new Date(t.updatedAt).toLocaleString(),children:["Updated ",ns(t.updatedAt)]})]})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[p&&g.jsx(Ry,{index:p.index,total:p.runs.length,onPrev:p.onPrev,onNext:p.onNext}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:[(t.status==="plan_pending"||t.status==="queued")&&g.jsx(ZE,{run:t,agents:l,onRefresh:r,onApproved:s,onApprovedAndNext:o}),(t.status==="plan_approved"||t.status==="running")&&g.jsx(UE,{run:t,agents:l,onRefresh:r}),(t.status==="review"||t.status==="failed")&&g.jsx(QE,{run:t,agents:l,onRefresh:r,onRetry:h,onDoneAndNext:f}),t.status==="done"&&g.jsx(RE,{run:t}),t.status==="cancelled"&&g.jsx("p",{className:"text-sm text-white/50",children:"This task was removed from Operations."})]})}function Sy(t,l){const i=t.find(s=>s.runtime===l);if(!i)return{ok:!1,detail:"no agent"};const r=i.issues.find(s=>s.code==="cli_missing"||s.code==="runtime_auth");return r?{ok:!1,detail:r.message}:{ok:!0,detail:"CLI ready"}}function gf({ok:t}){return g.jsx("span",{className:`inline-block w-1.5 h-1.5 rounded-full shrink-0 ${t?"bg-emerald-400":"bg-amber-400"}`,"aria-hidden":!0})}function KE({agents:t,agentDeckOnline:l}){const[i,r]=V.useState(null);V.useEffect(()=>{P1().then(h=>r(h.mcpUrl)).catch(()=>r(null))},[l]);const s=Sy(t,"claude_code"),o=Sy(t,"cursor_local"),f=t.flatMap(h=>h.issues).find(h=>h.code==="mcp_not_registered");return g.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-x-4 gap-y-1.5 text-xs text-white/45",children:[g.jsx("span",{className:"uppercase tracking-wider text-white/30",children:"Connections"}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:s.detail,children:[g.jsx(gf,{ok:s.ok}),g.jsx("span",{className:s.ok?"text-white/55":"text-amber-200/90",children:"Claude"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:o.detail,children:[g.jsx(gf,{ok:o.ok}),g.jsx("span",{className:o.ok?"text-white/55":"text-amber-200/90",children:"Cursor"})]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",title:(f==null?void 0:f.message)??(i?`MCP ${i}`:"Agent Deck optional"),children:[g.jsx(gf,{ok:l&&!f}),g.jsxs("span",{className:l&&!f?"text-[#92E4DD]/80":f?"text-amber-200/90":"text-white/35",children:["Agent Deck MCP",l?f?" (setup needed)":"":" (optional)"]})]})]})}const i0="data:image/svg+xml,%3csvg%20viewBox='0%200%20248%20248'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20d='M52.4285%20162.873L98.7844%20136.879L99.5485%20134.602L98.7844%20133.334H96.4921L88.7237%20132.862L62.2346%20132.153L39.3113%20131.207L17.0249%20130.026L11.4214%20128.844L6.2%20121.873L6.7094%20118.447L11.4214%20115.257L18.171%20115.847L33.0711%20116.911L55.485%20118.447L71.6586%20119.392L95.728%20121.873H99.5485L100.058%20120.337L98.7844%20119.392L97.7656%20118.447L74.5877%20102.732L49.4995%2086.1905L36.3823%2076.62L29.3779%2071.7757L25.8121%2067.2858L24.2839%2057.3608L30.6515%2050.2716L39.3113%2050.8623L41.4763%2051.4531L50.2636%2058.1879L68.9842%2072.7209L93.4357%2090.6804L97.0015%2093.6343L98.4374%2092.6652L98.6571%2091.9801L97.0015%2089.2625L83.757%2065.2772L69.621%2040.8192L63.2534%2030.6579L61.5978%2024.632C60.9565%2022.1032%2060.579%2020.0111%2060.579%2017.4246L67.8381%207.49965L71.9133%206.19995L81.7193%207.49965L85.7946%2011.0443L91.9074%2024.9865L101.714%2046.8451L116.996%2076.62L121.453%2085.4816L123.873%2093.6343L124.764%2096.1155H126.292V94.6976L127.566%2077.9197L129.858%2057.3608L132.15%2030.8942L132.915%2023.4505L136.608%2014.4708L143.994%209.62643L149.725%2012.344L154.437%2019.0788L153.8%2023.4505L150.998%2041.6463L145.522%2070.1215L141.957%2089.2625H143.994L146.414%2086.7813L156.093%2074.0206L172.266%2053.698L179.398%2045.6635L187.803%2036.802L193.152%2032.5484H203.34L210.726%2043.6549L207.415%2055.1159L196.972%2068.3492L188.312%2079.5739L175.896%2096.2095L168.191%20109.585L168.882%20110.689L170.738%20110.53L198.755%20104.504L213.91%20101.787L231.994%2098.7149L240.144%20102.496L241.036%20106.395L237.852%20114.311L218.495%20119.037L195.826%20123.645L162.07%20131.592L161.696%20131.893L162.137%20132.547L177.36%20133.925L183.855%20134.279H199.774L229.447%20136.524L237.215%20141.605L241.8%20147.867L241.036%20152.711L229.065%20158.737L213.019%20154.956L175.45%20145.977L162.587%20142.787H160.805V143.85L171.502%20154.366L191.242%20172.089L215.82%20195.011L217.094%20200.682L213.91%20205.172L210.599%20204.699L188.949%20188.394L180.544%20181.069L161.696%20165.118H160.422V166.772L164.752%20173.152L187.803%20207.771L188.949%20218.405L187.294%20221.832L181.308%20223.959L174.813%20222.777L161.187%20203.754L147.305%20182.486L136.098%20163.345L134.745%20164.2L128.075%20235.42L125.019%20239.082L117.887%20241.8L111.902%20237.31L108.718%20229.984L111.902%20215.452L115.722%20196.547L118.779%20181.541L121.58%20162.873L123.291%20156.636L123.14%20156.219L121.773%20156.449L107.699%20175.752L86.304%20204.699L69.3663%20222.777L65.291%20224.431L58.2867%20220.768L58.9235%20214.27L62.8713%20208.48L86.304%20178.705L100.44%20160.155L109.551%20149.507L109.462%20147.967L108.959%20147.924L46.6977%20188.512L35.6182%20189.93L30.7788%20185.44L31.4156%20178.115L33.7079%20175.752L52.4285%20162.873Z'%20fill='%23D97757'/%3e%3c/svg%3e",r0="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20aria-hidden='true'%3e%3cpath%20fill='%23EDEDED'%20d='M11.503.131%201.891%205.678a.84.84%200%200%200-.42.726v11.188c0%20.3.162.575.42.724l9.609%205.55a1%201%200%200%200%20.998%200l9.61-5.55a.84.84%200%200%200%20.42-.724V6.404a.84.84%200%200%200-.42-.726L12.497.131a1.01%201.01%200%200%200-.996%200M2.657%206.338h18.55c.263%200%20.43.287.297.515L12.23%2022.918c-.062.107-.229.064-.229-.06V12.335a.59.59%200%200%200-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23'/%3e%3c/svg%3e";function u0({src:t,className:l}){return g.jsx("span",{className:`inline-flex items-center justify-center rounded-lg bg-white/[0.04] ${l??"h-8 w-8"}`,children:g.jsx("img",{src:t,alt:"",className:"h-[70%] w-[70%] object-contain",draggable:!1})})}function $E({className:t="h-8 w-8"}){return g.jsx(u0,{src:i0,className:t})}function PE({className:t="h-8 w-8"}){return g.jsx(u0,{src:r0,className:t})}function WE({className:t="h-8 w-8"}){return g.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:t,"aria-hidden":!0,children:[g.jsx("rect",{width:"32",height:"32",rx:"8",fill:"white",fillOpacity:"0.06"}),g.jsx("circle",{cx:"16",cy:"13",r:"4.5",stroke:"#92E4DD",strokeWidth:"1.75"}),g.jsx("path",{d:"M8.5 24.5c1.2-3.5 3.8-5.5 7.5-5.5s6.3 2 7.5 5.5",stroke:"#92E4DD",strokeWidth:"1.75",strokeLinecap:"round"})]})}function s0({runtime:t,className:l="h-3.5 w-3.5 shrink-0"}){return t==="claude_code"?g.jsx("img",{src:i0,alt:"",className:`object-contain ${l}`,draggable:!1}):t==="cursor_local"?g.jsx("img",{src:r0,alt:"",className:`object-contain ${l}`,draggable:!1}):null}function o0({runtime:t,className:l="h-8 w-8 shrink-0"}){return t==="claude_code"?g.jsx($E,{className:l}):t==="cursor_local"?g.jsx(PE,{className:l}):g.jsx(WE,{className:l})}const Pu=()=>({runtime:"claude_code",deckId:"",playbookId:"",defaultPlanModel:"",defaultExecuteModel:"",defaultPlanBudget:yi(),defaultExecuteBudget:yi()});function eC({agents:t,agentDeckOnline:l,onRefresh:i}){const[r,s]=V.useState(!1),[o,f]=V.useState(""),[h,p]=V.useState(""),[m,x]=V.useState(Pu()),[y,k]=V.useState(!1),[v,_]=V.useState(null),[R,H]=V.useState(""),[N,Z]=V.useState(""),[q,te]=V.useState(Pu()),ee=async Y=>{if(Y.preventDefault(),!(!o.trim()||!h.trim())){k(!0);try{const $={name:o.trim(),runtime:m.runtime,workspaceRoot:h.trim(),deckId:m.deckId||void 0,playbookId:m.playbookId||void 0,defaultPlanModel:m.defaultPlanModel||null,defaultExecuteModel:m.defaultExecuteModel||null,defaultPlanBudget:vr(m.defaultPlanBudget),defaultExecuteBudget:vr(m.defaultExecuteBudget)};await I1($),f(""),p(""),x(Pu()),s(!1),i()}catch($){alert(String($))}finally{k(!1)}}},O=Y=>{_(Y.id),H(Y.name),Z(Y.workspaceRoot??""),te({runtime:Y.runtime,deckId:Y.deckId??"",playbookId:Y.playbookId??"",defaultPlanModel:Y.defaultPlanModel??"",defaultExecuteModel:Y.defaultExecuteModel??"",defaultPlanBudget:wy(Y.defaultPlanBudgetJson),defaultExecuteBudget:wy(Y.defaultExecuteBudgetJson)})},P=()=>{_(null),te(Pu())},se=async Y=>{k(!0);try{const $={name:R.trim(),workspaceRoot:N.trim()||null,runtime:q.runtime,deckId:q.deckId||null,playbookId:q.playbookId||null,defaultPlanModel:q.defaultPlanModel||null,defaultExecuteModel:q.defaultExecuteModel||null,defaultPlanBudget:vr(q.defaultPlanBudget),defaultExecuteBudget:vr(q.defaultExecuteBudget)};await Y1(Y.id,$),P(),i()}catch($){alert(String($))}finally{k(!1)}},me=async Y=>{if(confirm(`Delete agent "${Y.name}"?`)){k(!0);try{await Z1(Y.id),i()}catch($){alert(String($))}finally{k(!1)}}},M=t.filter(Y=>!Y.healthy).length;return g.jsxs("div",{className:"flex-1 overflow-y-auto px-6 py-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{className:"mb-6 flex flex-col sm:flex-row sm:items-start sm:justify-between gap-4",children:[g.jsxs("div",{className:"min-w-0",children:[g.jsx("h1",{className:"heading-page",children:"Agents"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Saved execution profiles — pick one at Inbox instead of configuring each task"}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[t.length," agent",t.length===1?"":"s",M>0&&g.jsxs("span",{className:"text-red-400 ml-2",children:["· ",M," need",M===1?"s":""," attention"]})]})]}),g.jsx(KE,{agents:t,agentDeckOnline:l})]}),g.jsx("div",{className:"space-y-3 mb-6",children:t.map(Y=>g.jsxs("div",{className:"panel flex flex-col sm:flex-row sm:items-start gap-3 justify-between",children:[g.jsxs("div",{className:"flex gap-3 min-w-0 flex-1",children:[g.jsx(o0,{runtime:Y.runtime}),g.jsxs("div",{className:"space-y-2 min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[g.jsx("span",{className:"text-lg font-semibold text-[#E8F6F4]",children:Y.name}),!Y.healthy&&g.jsx(st,{className:"bg-red-500/15 text-red-300 border-red-400/30 normal-case",children:"Needs fix"})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[g.jsx(st,{className:"bg-white/5 text-white/55 border-white/15 normal-case",children:ga(Y.runtime)}),Y.deckName?g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",Y.deckName]}):g.jsx(st,{className:"bg-white/5 text-white/40 border-white/10 normal-case",children:"No deck"}),Y.defaultPlanModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:Y.defaultPlanModel,children:["plan: ",Y.defaultPlanModel]}),Y.defaultExecuteModel&&g.jsxs(st,{className:"bg-white/5 text-white/50 border-white/10 normal-case truncate max-w-[10rem]",title:Y.defaultExecuteModel,children:["exec: ",Y.defaultExecuteModel]})]}),v===Y.id?g.jsxs("div",{className:"space-y-3 pt-2 border-t border-white/10",children:[g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field text-sm",value:R,onChange:$=>H($.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field text-sm font-mono",placeholder:"/Users/me/projects/my-app",value:N,onChange:$=>Z($.target.value)})]}),g.jsx(zg,{value:q,onChange:te,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",disabled:y||!R.trim()||!N.trim(),onClick:()=>se(Y),className:"btn-gold text-sm px-3 py-1.5",children:"Save"}),g.jsx("button",{type:"button",onClick:P,className:"btn-ghost text-sm px-3 py-1.5",children:"Cancel"})]})]}):g.jsx("p",{className:"text-sm text-white/50 font-mono truncate",title:Y.workspaceRoot??void 0,children:Y.workspaceRoot?Y.workspaceRoot:"No workspace configured"}),Y.issues.length>0&&g.jsx("ul",{className:"text-sm text-red-300/90 space-y-1",children:Y.issues.map(($,xe)=>g.jsxs("li",{children:["· ",$.message]},xe))})]})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[v!==Y.id&&g.jsx("button",{type:"button",disabled:y,onClick:()=>O(Y),className:"btn-ghost text-sm px-3 py-1.5",children:"Edit"}),g.jsx("button",{type:"button",disabled:y,onClick:()=>me(Y),className:"btn-ghost text-sm px-3 py-1.5",children:"Delete"})]})]},Y.id))}),r?g.jsxs("form",{onSubmit:ee,className:"panel space-y-3",children:[g.jsx("h2",{className:"heading-panel",children:"New Agent"}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Name"}),g.jsx("input",{className:"field",placeholder:"e.g. Claude · Work",value:o,onChange:Y=>f(Y.target.value)})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs text-[#A8C4C0] uppercase",children:"Workspace"}),g.jsx("input",{className:"field font-mono text-sm",placeholder:"/Users/me/projects/my-app",value:h,onChange:Y=>p(Y.target.value)})]}),g.jsx(zg,{value:m,onChange:x,agentDeckOnline:l}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("button",{type:"submit",disabled:y||!o.trim()||!h.trim(),className:"btn-gold px-4 py-2",children:y?"Saving…":"Create agent"}),g.jsx("button",{type:"button",onClick:()=>s(!1),className:"btn-ghost px-4 py-2",children:"Cancel"})]})]}):g.jsx("button",{type:"button",onClick:()=>s(!0),className:"btn-gold px-4 py-2",children:"Add agent"})]})}function tC({run:t,selected:l,onSelect:i,sent:r}){const s=Yf(t),o=t.updatedAt;return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] border-l-emerald-400/60 transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 gap-y-1.5 items-center px-4 py-3",children:[g.jsxs("div",{className:"flex items-center gap-1.5 md:contents",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0 w-fit":"bg-white/5 text-white/55 border-white/15 shrink-0 w-fit",children:ls(t)}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums md:hidden ml-auto shrink-0",title:new Date(o).toLocaleString(),children:ns(o)})]}),g.jsxs("div",{className:"min-w-0 md:col-start-2",children:[g.jsxs("p",{className:"font-semibold text-[#E8F6F4] leading-snug truncate flex items-center gap-2",title:t.title,children:[g.jsx("span",{className:"truncate",children:t.title}),r&&g.jsx(st,{className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35 shrink-0 normal-case text-[10px]",children:"sent"})]}),t.description&&g.jsx("p",{className:"text-xs text-white/40 truncate mt-0.5",title:t.description,children:t.description})]}),g.jsx("div",{className:"hidden md:flex items-center min-w-0",children:g.jsxs(st,{className:`${vs(t.runtime)} normal-case truncate max-w-full`,title:t.agentName??ga(t.runtime),children:[t.runtime&&g.jsx(s0,{runtime:t.runtime,className:"h-3 w-3"}),g.jsx("span",{className:"truncate",children:t.agentName??ga(t.runtime)})]})}),g.jsx("span",{className:"hidden md:block text-xs text-white/45 uppercase tracking-wide",children:If(t.taskCategory)}),g.jsx("span",{className:"hidden md:block text-xs text-[#92E4DD]/80 truncate",title:s??void 0,children:s?`◆ ${s}`:"—"}),g.jsx("time",{className:"hidden md:block text-xs text-white/40 tabular-nums text-right",title:new Date(o).toLocaleString(),children:ns(o)})]})})}function nC({runs:t,selectedRunId:l,onSelectRun:i,sentRunIds:r=[]}){const[s,o]=V.useState(""),f=V.useMemo(()=>t.filter(p=>p.status==="done").sort((p,m)=>m.updatedAt.localeCompare(p.updatedAt)),[t]),h=V.useMemo(()=>{const p=s.trim().toLowerCase();return p?f.filter(m=>{var x,y,k,v;return m.title.toLowerCase().includes(p)||((x=m.externalLabel)==null?void 0:x.toLowerCase().includes(p))||((y=m.externalId)==null?void 0:y.toLowerCase().includes(p))||m.source.toLowerCase().includes(p)||m.taskCategory.toLowerCase().includes(p)||((k=m.deckName)==null?void 0:k.toLowerCase().includes(p))||((v=m.agentName)==null?void 0:v.toLowerCase().includes(p))}):f},[f,s]);return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full",children:[g.jsx("h1",{className:"heading-page",children:"Done"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Completed runs — read-only audit trail"}),g.jsx("input",{className:"field mt-3 max-w-xl",placeholder:"Search title, issue id, category, deck…",value:s,onChange:p=>o(p.target.value)}),g.jsxs("p",{className:"text-sm text-white/45 mt-2",children:[h.length," of ",f.length," completed"]})]})}),g.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4 min-h-0",children:g.jsxs("div",{className:"max-w-6xl mx-auto w-full space-y-1.5",children:[h.length>0&&g.jsxs("div",{className:"hidden md:grid grid-cols-[7rem_minmax(0,1fr)_8rem_6rem_7rem_5rem] gap-x-4 px-4 pb-1 text-[10px] uppercase tracking-wider text-white/30","aria-hidden":!0,children:[g.jsx("span",{children:"Source"}),g.jsx("span",{children:"Title"}),g.jsx("span",{children:"Agent"}),g.jsx("span",{children:"Type"}),g.jsx("span",{children:"Deck"}),g.jsx("span",{className:"text-right",children:"Done"})]}),h.length===0?g.jsx("p",{className:"text-sm text-white/45 py-8 text-center",children:f.length===0?"No completed runs yet":"No matches for your search"}):h.map(p=>g.jsx(tC,{run:p,selected:l===p.id,onSelect:()=>i(p),sent:r.includes(p.id)},p.id))]})})]})}function lC({candidate:t,selected:l,onSelect:i}){return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border transition-colors ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"p-3 space-y-1.5",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx(st,{className:"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35",children:t.identifier}),t.state&&g.jsx("span",{className:"text-xs text-white/45 uppercase tracking-wide",children:t.state})]}),g.jsx("h3",{className:"text-lg font-semibold text-[#E8F6F4] leading-snug line-clamp-2",children:t.title}),t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description})]})})}function _y({title:t,subtitle:l,onClose:i,children:r}){return g.jsx(hd,{onClose:i,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t}),l&&g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:l})]}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1 shrink-0","aria-label":"Close",children:"✕"})]}),children:g.jsx("div",{className:"space-y-4",children:r})})}function c0({className:t="w-3.5 h-3.5"}){return g.jsx("svg",{viewBox:"0 0 16 16",fill:"currentColor",className:t,"aria-hidden":!0,children:g.jsx("path",{fillRule:"evenodd",d:"M8.982 1.566a1.13 1.13 0 0 0-1.964 0L.165 13.233c-.457.778.091 1.767.982 1.767h13.706c.891 0 1.439-.99.982-1.767L8.982 1.566zM8 5.697a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 5.697zm0 7.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"})})}function f0({agents:t,selectedId:l,onSelect:i,onManage:r,requireHealthy:s}){return t.length===0?g.jsx("p",{className:"text-sm text-white/45",children:"No agents configured."}):g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("div",{className:"heading-section normal-case",children:"Agent"}),r&&g.jsx("button",{type:"button",onClick:r,className:"text-sm text-[#92E4DD] hover:underline",children:"Manage"})]}),g.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:t.map(o=>{var p;const f=o.id===l,h=s&&!o.healthy;return g.jsx("button",{type:"button",disabled:h,onClick:()=>i(o.id),className:`text-left rounded-xl border p-3 transition-colors glass-plate glass-plate-hover ${h?"opacity-50 cursor-not-allowed":f?"glass-plate-selected":""}`,children:g.jsxs("div",{className:"flex items-start gap-2.5",children:[g.jsx(o0,{runtime:o.runtime,className:"h-7 w-7 shrink-0 mt-0.5"}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("span",{className:"font-semibold text-[#E8F6F4]",children:o.name}),!o.healthy&&g.jsx("span",{title:o.issues.map(m=>m.message).join("; "),children:g.jsx(c0,{className:"w-3.5 h-3.5 text-red-400 shrink-0"})})]}),g.jsxs("div",{className:"flex flex-wrap gap-1.5 mt-2",children:[g.jsx(st,{className:vs(o.runtime),children:ga(o.runtime)}),o.deckName&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case",children:["◆ ",o.deckName]})]}),!o.healthy&&g.jsx("p",{className:"text-xs text-red-300/90 mt-2 leading-snug",children:(p=o.issues[0])==null?void 0:p.message})]})]})},o.id)})})]})}function aC({issue:t,agents:l,onPromoted:i,onManageAgents:r}){const[s,o]=V.useState(""),[f,h]=V.useState(""),[p,m]=V.useState(!1);V.useEffect(()=>{qf().then(k=>{k.defaultAgentId&&o(k.defaultAgentId)}).catch(()=>{})},[]),V.useEffect(()=>{l.length>0&&s&&!l.some(k=>k.id===s)&&o(l[0].id),l.length>0&&!s&&o(l[0].id)},[l,s]),V.useEffect(()=>{h("")},[t.id,s]);const x=l.find(k=>k.id===s),y=async()=>{if(s){m(!0);try{await V1(t.id,{agentId:s,planModel:f||null}),i()}catch(k){alert(String(k))}finally{m(!1)}}};return g.jsxs(g.Fragment,{children:[t.description&&g.jsx("div",{className:"rounded-xl p-4 glass-plate font-mono text-sm text-white/70 leading-relaxed whitespace-pre-wrap",children:t.description}),t.url&&g.jsx("a",{href:t.url,target:"_blank",rel:"noreferrer",className:"text-sm text-[#AEB4FF] hover:underline inline-block",children:"Open in Linear ↗"}),g.jsx(f0,{agents:l,selectedId:s,onSelect:o,onManage:r,requireHealthy:!0}),x&&g.jsx(Gf,{runtime:x.runtime,label:"Planning model",value:f,onChange:h,defaultModelId:x.defaultPlanModel,disabled:p}),g.jsx("button",{type:"button",disabled:p||!s||!((x==null?void 0:x.healthy)??!1),onClick:y,className:"btn-gold w-full py-2",children:p?"Starting…":"Kick plan & next →"})]})}function iC({issue:t,agents:l,onClose:i,onPromoted:r,onManageAgents:s,queueNav:o}){const f=V.useCallback(h=>{o&&(h.key==="ArrowLeft"&&o.index>0&&(h.preventDefault(),o.onPrev()),h.key==="ArrowRight"&&o.index<o.total-1&&(h.preventDefault(),o.onNext()))},[o]);return g.jsx(hd,{onClose:i,onKeyDown:f,header:g.jsxs("div",{className:"flex justify-between items-start gap-3",children:[g.jsxs("div",{className:"min-w-0 flex-1 space-y-1",children:[g.jsx("h2",{className:"font-semibold text-2xl leading-snug",children:t.identifier}),g.jsx("p",{className:"text-sm text-white/55 leading-snug",children:t.title})]}),g.jsxs("div",{className:"flex items-start gap-2 shrink-0",children:[o&&g.jsx(Ry,{index:o.index,total:o.total,onPrev:o.onPrev,onNext:o.onNext,label:"In Inbox"}),g.jsx("button",{type:"button",onClick:i,className:"text-white/60 hover:text-white px-1","aria-label":"Close",children:"✕"})]})]}),children:g.jsx(aC,{issue:t,agents:l,onPromoted:r,onManageAgents:s})})}function rC({agents:t,onSaved:l}){const[i,r]=V.useState(!1),[s,o]=V.useState(null),[f,h]=V.useState(null),[p,m]=V.useState(null),[x,y]=V.useState(null),[k,v]=V.useState("Todo"),[_,R]=V.useState(""),[H,N]=V.useState(!0),[Z,q]=V.useState(""),[te,ee]=V.useState(!0),[O,P]=V.useState(!1),[se,me]=V.useState(null),M=s==null?void 0:s.envOverrides,Y=!!(M!=null&&M.stateFilter||M!=null&&M.teamId),$=async()=>{var T;try{const[J,ae]=await Promise.all([es(),qf()]);h(J.connected),m(((T=J.viewer)==null?void 0:T.name)??null),y(J.error??null),o(ae),v(ae.persisted.stateFilter.join(", ")),R(ae.persisted.teamId??""),N(ae.persisted.assigneeMe),q(ae.persisted.defaultAgentId??""),ee(ae.persisted.syncEnabled)}catch(J){y(String(J))}};V.useEffect(()=>{i&&$()},[i]);const xe=async()=>{var T;P(!0),me(null);try{const J=await es();h(J.connected),m(((T=J.viewer)==null?void 0:T.name)??null),y(J.error??null),me(J.connected?"Connected":"Not connected")}catch(J){y(String(J))}finally{P(!1)}},re=async()=>{P(!0),me(null);try{const T=k.split(",").map(ae=>ae.trim()).filter(Boolean),J=await q1({stateFilter:T.length>0?T:["Todo"],teamId:_.trim()||null,assigneeMe:H,defaultAgentId:Z||null,syncEnabled:te});o(J),me(Y?"Saved locally — env still overrides filters (see note below)":"Saved"),l==null||l()}catch(T){me(String(T))}finally{P(!1)}},W=f===null?g.jsx("span",{className:"text-xs text-white/45",children:"Checking…"}):f?g.jsxs("span",{className:"text-xs text-emerald-300/90 bg-emerald-500/10 px-2 py-0.5 rounded-full border border-emerald-400/25",children:["Connected",p?` · ${p}`:""]}):g.jsx("span",{className:"text-xs text-amber-200/90 bg-amber-500/10 px-2 py-0.5 rounded-full border border-amber-400/25",children:"Missing API key"});return g.jsxs("div",{className:"rounded-xl glass-plate overflow-hidden",children:[g.jsxs("button",{type:"button",onClick:()=>r(T=>!T),className:"w-full flex items-center justify-between px-3 py-2 text-sm text-white/70 hover:text-white/90",children:[g.jsx("span",{children:"Linear settings"}),g.jsxs("span",{className:"flex items-center gap-2",children:[W,g.jsx("span",{className:"text-white/35",children:i?"▾":"▸"})]})]}),i&&g.jsxs("div",{className:"border-t border-white/10 px-3 py-3 space-y-3 text-sm",children:[x&&f===!1&&g.jsx("p",{className:"text-red-400/90 text-xs",children:x}),s&&g.jsxs("p",{className:"text-xs text-white/50 rounded-lg bg-black/20 border border-white/10 px-2 py-1.5",children:[g.jsx("span",{className:"text-white/70",children:"Inbox uses:"})," ",s.stateFilter.join(", "),s.assigneeMe?" · assigned to me":"",s.teamId?` · team ${s.teamId.slice(0,8)}…`:""]}),Y&&g.jsxs("p",{className:"text-xs text-amber-200/90 rounded-lg bg-amber-500/10 border border-amber-400/20 px-2 py-1.5",children:[g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_STATE_FILTER"})," or"," ",g.jsx("code",{className:"text-amber-100/90",children:"LINEAR_TEAM_ID"})," in env override saved filters. Remove from ",g.jsx("code",{className:"text-white/55",children:"~/.agent-dealer-dev/.env"})," to use the values below."]}),g.jsxs("p",{className:"text-xs text-white/45",children:["API key stays in ",g.jsx("code",{className:"text-white/60",children:"LINEAR_API_KEY"})," env — not stored here."]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"State filter (saved)"}),g.jsx("input",{type:"text",value:k,onChange:T=>v(T.target.value),placeholder:"Todo, Backlog",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Team ID (optional, saved)"}),g.jsx("input",{type:"text",value:_,onChange:T=>R(T.target.value),placeholder:"UUID",className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4] font-mono text-xs"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:H,onChange:T=>N(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Assigned to me"})]}),g.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[g.jsx("input",{type:"checkbox",checked:te,onChange:T=>ee(T.target.checked),className:"rounded"}),g.jsx("span",{children:"Sync status + comments to Linear"})]}),g.jsxs("label",{className:"block space-y-1",children:[g.jsx("span",{className:"text-xs uppercase tracking-wide text-white/45",children:"Default agent"}),g.jsxs("select",{value:Z,onChange:T=>q(T.target.value),className:"w-full rounded-lg bg-black/20 border border-white/10 px-2 py-1.5 text-[#E8F6F4]",children:[g.jsx("option",{value:"",children:"None"}),t.map(T=>g.jsxs("option",{value:T.id,children:[T.name,T.healthy?"":" (needs setup)"]},T.id))]})]}),g.jsxs("div",{className:"flex gap-2 pt-1",children:[g.jsx("button",{type:"button",onClick:re,disabled:O,className:"btn-gold px-3 py-1.5 flex-1",children:O?"Saving…":"Save"}),g.jsx("button",{type:"button",onClick:xe,disabled:O,className:"btn-ghost px-3 py-1.5",children:"Test"})]}),se&&g.jsx("p",{className:"text-xs text-white/50",children:se})]})]})}function uC({agents:t,loading:l,candidateCount:i,onRefresh:r,onConfigSaved:s}){var h;const[o,f]=V.useState(null);return V.useEffect(()=>{es().then(f).catch(()=>f({connected:!1,error:"Failed to check"}))},[]),g.jsxs(g.Fragment,{children:[g.jsxs("div",{className:"rounded-xl p-3 glass-plate space-y-2",children:[g.jsxs("div",{className:"flex items-center justify-between gap-2",children:[g.jsx("span",{className:"text-sm text-white/70",children:"Connection"}),o!=null&&o.connected?g.jsxs("span",{className:"text-xs text-emerald-300/90",children:["Connected · ",(h=o.viewer)==null?void 0:h.name]}):g.jsx("span",{className:"text-xs text-amber-200/90",children:(o==null?void 0:o.error)??"Not connected"})]}),g.jsx("p",{className:"text-sm text-white/45",children:l?"Fetching from Linear…":i===0?"No matching issues — adjust filters below or create issues in Linear.":`${i} issue${i===1?"":"s"} in inbox`}),g.jsx("button",{type:"button",onClick:r,disabled:l,className:"btn-gold w-full py-2",children:l?"Importing…":"Import from Linear"})]}),g.jsx(rC,{agents:t,onSaved:()=>{s(),r()}}),g.jsxs("p",{className:"text-xs text-white/40",children:["Set ",g.jsx("code",{className:"text-white/55",children:"LINEAR_API_KEY"})," in env. Filters are saved locally — not the API key."]})]})}function sC({agents:t,onCreated:l,onManageAgents:i,embedded:r}){const[s,o]=V.useState(""),[f,h]=V.useState(""),[p,m]=V.useState("other"),[x,y]=V.useState(""),[k,v]=V.useState(zv),[_,R]=V.useState(""),[H,N]=V.useState(!1);V.useEffect(()=>{t.length>0&&!t.some(ee=>ee.id===k)&&v(t[0].id)},[t,k]),V.useEffect(()=>{const ee=t.find(O=>O.id===k);if(!ee){R("");return}R(ee.defaultPlanModel??(ee.runtime==="cursor_local"?ps:""))},[k,t]);const Z=t.find(ee=>ee.id===k),q=!!k&&!!s.trim()&&(!!x.trim()||((Z==null?void 0:Z.healthy)??!1)),te=async ee=>{if(ee.preventDefault(),!(!s.trim()||!k)){N(!0);try{await F1({title:s.trim(),description:f.trim()||void 0,taskCategory:p,repo:x.trim()||void 0,agentId:k,planModel:_||null}),o(""),h(""),l()}catch(O){alert(String(O))}finally{N(!1)}}};return g.jsxs("form",{onSubmit:te,className:r?"space-y-3":"panel space-y-3",children:[!r&&g.jsx("h2",{className:"heading-panel",children:"Manual Task"}),g.jsx(f0,{agents:t,selectedId:k,onSelect:v,onManage:i}),Z&&g.jsx(Gf,{runtime:Z.runtime,label:"Planning model",value:_,onChange:R,defaultModelId:Z.defaultPlanModel,disabled:H}),g.jsx("input",{className:"field",placeholder:"Title",value:s,onChange:ee=>o(ee.target.value)}),g.jsx("textarea",{className:"field-mono h-16 resize-y",placeholder:"Description",value:f,onChange:ee=>h(ee.target.value)}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("select",{className:"field flex-1",value:p,onChange:ee=>m(ee.target.value),children:["code","communication","email","research","content","other"].map(ee=>g.jsx("option",{value:ee,children:ee},ee))}),g.jsx("input",{className:"field flex-1",placeholder:"Repo override (optional)",value:x,onChange:ee=>y(ee.target.value)})]}),g.jsx("p",{className:"text-xs text-white/40 -mt-1",children:"Uses agent workspace by default. Override here for a one-off path."}),g.jsx("button",{type:"submit",disabled:H||!q,className:"btn-gold w-full py-2",children:H?"Starting…":"Kick plan"})]})}const oC=["plan_pending","queued"],cC=["review","failed"];function Ey(t,l,i){return oC.includes(t.status)?l.awaitingPlanReview:cC.includes(t.status)?l.resultReviewRuns:t.status==="done"&&i==="done"?l.runs.filter(r=>r.status==="done").sort((r,s)=>s.updatedAt.localeCompare(r.updatedAt)):[]}function md(t,l){return t.findIndex(i=>i.id===l)}function Uf(t,l){const i=md(t,l);if(i<0)return t[0]??null;const r=t.filter(s=>s.id!==l);return r.length===0?null:r[Math.min(i,r.length-1)]??null}function fC({agents:t,onRefresh:l,onGoOperations:i,onManageAgents:r}){const[s,o]=V.useState([]),[f,h]=V.useState(!1),[p,m]=V.useState(null),[x,y]=V.useState(null),[k,v]=V.useState(null),[_,R]=V.useState(null),[H,N]=V.useState(!1),Z=V.useCallback(()=>(h(!0),m(null),Promise.all([H1(),qf(),es()]).then(([$,xe,re])=>(o($),R(xe),N(re.connected),$)).catch($=>(m(String($)),o([]),[])).finally(()=>h(!1))),[]);V.useEffect(()=>{Z()},[Z]);const q=s.find($=>$.id===x)??null,te=x?md(s,x):-1,ee=V.useCallback($=>{const xe=s[$];xe&&(y(xe.id),v("issue"))},[s]),O=V.useCallback(async $=>{const xe=Uf(s,$);l();const re=await Z();if(!xe){v(null),y(null);return}const W=re.find(J=>J.id===xe.id);if(W){y(W.id),v("issue");return}const T=Uf(re,$);T?(y(T.id),v("issue")):(v(null),y(null))},[s,l,Z]),P=()=>{l(),v(null),y(null),Z(),i()},se=()=>{v("import"),Z()},me=()=>{y(null),v("manual")},M=$=>{y($),v("issue")},Y=()=>{v(null),y(null)};return g.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[g.jsx("div",{className:"px-6 pt-4 pb-3 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4 max-w-6xl mx-auto w-full",children:[g.jsxs("div",{children:[g.jsx("h1",{className:"heading-page",children:"Inbox"}),g.jsx("p",{className:"text-sm text-white/50 mt-1",children:"Tasks waiting to kick — import from Linear or add manually"})]}),g.jsxs("div",{className:"flex gap-2 shrink-0",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-4 py-2 text-sm",children:"Linear Import"}),g.jsx("button",{type:"button",onClick:me,className:"btn-gold px-4 py-2 text-sm",children:"+ Manual Task"})]})]})}),g.jsxs("div",{className:"flex-1 flex flex-col min-h-0 max-w-6xl mx-auto w-full px-6 py-4",children:[p&&g.jsx("p",{className:"text-sm text-red-400/90 mb-3",children:p}),g.jsxs("div",{className:"flex items-center justify-between gap-2 mb-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:f?"Loading…":`${s.length} task${s.length===1?"":"s"}`}),g.jsx("button",{type:"button",onClick:()=>Z(),disabled:f,className:"btn-ghost px-2 py-1 text-xs",children:"Refresh"})]}),g.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 min-h-0",children:s.length===0&&!f?g.jsxs("div",{className:"py-12 text-center space-y-3",children:[g.jsx("p",{className:"text-sm text-white/45",children:"No tasks in inbox"}),H&&_&&g.jsxs("p",{className:"text-xs text-white/40 max-w-md mx-auto",children:["Filtering Linear: ",_.stateFilter.join(", "),_.assigneeMe?" · assigned to you":"",_.envOverrides.stateFilter||_.envOverrides.teamId?" · some filters from env":""]}),g.jsxs("div",{className:"flex justify-center gap-2",children:[g.jsx("button",{type:"button",onClick:se,className:"btn-ghost px-3 py-1.5 text-sm",children:"Linear settings"}),g.jsx("button",{type:"button",onClick:me,className:"btn-gold px-3 py-1.5 text-sm",children:"+ Manual Task"})]})]}):s.map($=>g.jsx(lC,{candidate:$,selected:x===$.id&&k==="issue",onSelect:()=>M($.id)},$.id))})]}),k==="import"&&g.jsx(_y,{title:"Linear Import",subtitle:"Fetch issues assigned to you",onClose:Y,children:g.jsx(uC,{agents:t,loading:f,candidateCount:s.length,onRefresh:Z,onConfigSaved:Z})}),k==="manual"&&g.jsx(_y,{title:"Manual Task",subtitle:"Add work that isn't in Linear yet",onClose:Y,children:g.jsx(sC,{agents:t,onCreated:P,onManageAgents:r,embedded:!0})}),k==="issue"&&q&&g.jsx(iC,{issue:q,agents:t,onClose:Y,onPromoted:()=>O(q.id),onManageAgents:r,queueNav:s.length>1?{index:te,total:s.length,onPrev:()=>ee(te-1),onNext:()=>ee(te+1)}:void 0})]})}const dC=3;function hC(t){const l=Number.isFinite(t)?t:0;return String(Math.min(999,Math.max(0,l))).padStart(dC,"0")}function mC({value:t,label:l}){const i=hC(t).split("");return g.jsx("div",{className:"nixie-housing","aria-hidden":!l,"aria-label":l,children:i.map((r,s)=>g.jsxs("span",{className:"nixie-tube",children:[g.jsx("span",{className:"nixie-tube-ghost",children:"8"}),g.jsx("span",{className:"nixie-tube-digit",children:r})]},`${s}-${r}`))})}function Cy({title:t,total:l,open:i,onToggle:r,accent:s,titleAccent:o,openRing:f="ring-[#92E4DD]/25"}){return g.jsx("section",{className:`flex flex-col self-start glass-column rounded-xl overflow-hidden border-t-2 ${s} ${i?`ring-1 ${f}`:""}`,children:g.jsxs("header",{className:"px-2 pt-2 pb-2 border-b border-white/[0.06] shrink-0 w-full",children:[g.jsx("h2",{className:`text-xs font-semibold leading-tight text-center ${o}`,children:t}),g.jsx("button",{type:"button",onClick:r,className:"nixie-stack-toggle w-full rounded mt-1.5 focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-expanded":i,"aria-label":`${l} in ${t.toLowerCase()}. Click to ${i?"close":"show"} tickets.`,children:g.jsx("div",{className:"nixie-display-wrap",children:g.jsx(mC,{value:l})})})]})})}function pd({run:t,selected:l,onSelect:i,statusOverride:r,timeField:s="updated",compact:o=!1,queueBadge:f,queueActiveLabel:h="Running",queueQueuedLabel:p="In queue",hideStatusBadge:m=!1,extraBadge:x}){const y=r??t.status,k=My(y),v=s==="created"?t.createdAt:t.updatedAt,_=Yf(t),R=f==="active"||f==="running"?"bg-[#92E4DD]/15 text-[#92E4DD] border-[#92E4DD]/35":f==="queued"||f==="waiting"?"bg-sky-500/15 text-sky-200 border-sky-400/30":null,H=f==="active"||f==="running";return g.jsx("button",{type:"button",onClick:i,className:`task-card w-full text-left rounded-xl border-l-[3px] transition-colors ${k.accent} ${l?"glass-plate-selected":""}`,children:g.jsxs("div",{className:`${o?"p-2.5":"p-3"} space-y-2`,children:[g.jsxs("div",{className:"flex items-center justify-between gap-2 min-w-0",children:[g.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[g.jsx(st,{className:t.source==="linear"?"bg-[#5E6AD2]/15 text-[#AEB4FF] border-[#5E6AD2]/35 shrink-0":"bg-white/5 text-white/55 border-white/15 shrink-0",children:ls(t)}),g.jsx(st,{className:"bg-white/5 text-white/45 border-white/10 shrink-0 normal-case",children:If(t.taskCategory)})]}),g.jsx("time",{className:"text-xs text-white/40 tabular-nums shrink-0",title:new Date(v).toLocaleString(),children:ns(v)})]}),g.jsx("h3",{className:`font-semibold text-[#E8F6F4] leading-snug ${o?"text-base line-clamp-2":"text-lg line-clamp-2"}`,children:t.title}),!o&&t.description&&g.jsx("p",{className:"text-sm text-white/45 line-clamp-2 leading-relaxed",children:t.description}),g.jsxs("div",{className:"flex flex-wrap items-center gap-1.5 pt-0.5",children:[g.jsxs(st,{className:`${vs(t.runtime)} normal-case`,title:t.runtime?ga(t.runtime):void 0,children:[t.runtime&&g.jsx(s0,{runtime:t.runtime}),t.agentName??ga(t.runtime)]}),_&&g.jsxs(st,{className:"bg-[#92E4DD]/10 text-[#92E4DD] border-[#92E4DD]/25 normal-case max-w-[140px] truncate",title:_,children:["◆ ",_]}),x&&g.jsx(st,{className:`${x.className} normal-case`,children:x.label}),f?g.jsxs(st,{className:`${R} ml-auto`,children:[H&&g.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-[#92E4DD] animate-pulse mr-0.5"}),H?h:p]}):m?null:g.jsx(st,{className:`${k.tone} ml-auto`,title:k.hint,children:k.label})]})]})})}function Ay({title:t,items:l,activeBadgeLabel:i,selectedId:r,onSelect:s,onClose:o,accent:f,titleAccent:h,empty:p,autoApprovedRunIds:m=[]}){return g.jsxs("section",{className:`absolute inset-0 z-10 flex flex-col min-h-0 rounded-xl overflow-hidden border border-white/10 border-t-2 ${f} bg-[#0F0F0C] shadow-2xl`,children:[g.jsxs("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0 flex items-center justify-between gap-3",children:[g.jsx("h2",{className:`heading-column ${h}`,children:t}),g.jsx("button",{type:"button",onClick:o,className:"text-xs text-white/45 hover:text-white/70 px-2 py-1 rounded border border-white/10 hover:border-white/20 transition-colors shrink-0",children:"Close"})]}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:l.length===0?g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:p}):l.map(({run:x,queueBadge:y})=>g.jsx(pd,{run:x,selected:r===x.id,onSelect:()=>s(x),queueBadge:y,queueActiveLabel:i,queueQueuedLabel:"In queue",hideStatusBadge:!0,extraBadge:m.includes(x.id)?{label:"Auto-approved",className:"bg-emerald-400/15 text-emerald-200 border-emerald-400/35"}:void 0},x.id))})]})}function d0({title:t,count:l,children:i,empty:r,isEmpty:s,accent:o,titleAccent:f}){return g.jsxs("section",{className:`flex flex-col min-w-0 h-full glass-column rounded-xl overflow-hidden ${o?`border-t-2 ${o}`:"border-t border-white/[0.06]"}`,children:[g.jsx("header",{className:"px-4 pt-3 pb-2.5 border-b border-white/[0.06] shrink-0",children:g.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[g.jsx("h2",{className:`heading-column ${f??""}`,children:t}),l!==void 0&&g.jsx("span",{className:"text-base tabular-nums text-white/45",children:l})]})}),g.jsx("div",{className:"flex-1 min-h-0 p-2 space-y-2 overflow-y-auto",children:s?r:i})]})}function pC({runs:t,openQuestionCounts:l,selectedId:i,onSelect:r}){const s=t.filter(o=>l[o.id]).length;return g.jsx(d0,{title:s>0?`Review Plan · ${s} need answers`:"Review Plan",count:t.length,accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",isEmpty:t.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"No plans ready yet"}),children:t.map(o=>{const f=l[o.id];return g.jsx(pd,{run:o,selected:i===o.id,onSelect:()=>r(o),hideStatusBadge:!0,extraBadge:f?{label:f===1?"1 question":`${f} questions`,className:"bg-amber-400/15 text-amber-200 border-amber-400/35"}:void 0},o.id)})})}function gC({snapshot:t,selectedRunId:l,onSelectRun:i}){const[r,s]=V.useState(null),o=(t==null?void 0:t.awaitingPlanReview)??[],f=(t==null?void 0:t.planningActiveRuns)??[],h=(t==null?void 0:t.planningQueuedRuns)??[],p=(t==null?void 0:t.runningRuns)??[],m=(t==null?void 0:t.waitingExecution)??[],x=(t==null?void 0:t.resultReviewRuns)??[],y=[...f.map(_=>({run:_,queueBadge:"active"})),...h.map(_=>({run:_,queueBadge:"queued"}))],k=[...p.map(_=>({run:_,queueBadge:"active"})),...m.map(_=>({run:_,queueBadge:"queued"}))],v=_=>{s(R=>R===_?null:_)};return g.jsx("div",{className:"flex-1 min-h-0 px-6 py-4 w-full",children:g.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 h-full w-full min-h-0",children:[g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Planning",total:y.length,open:r==="planning",onToggle:()=>v("planning"),accent:"border-t-cyber-violet/60",titleAccent:"text-cyber-violet-light/80",openRing:"ring-cyber-violet/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(pC,{runs:o,openQuestionCounts:(t==null?void 0:t.openQuestionCounts)??{},selectedId:l,onSelect:i}),r==="planning"&&g.jsx(Ay,{title:"In Planning",items:y,activeBadgeLabel:"Planning",selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-cyber-violet",titleAccent:"text-cyber-violet-light",empty:"Nothing planning — promote from Inbox"})]})]}),g.jsxs("div",{className:"grid grid-cols-[8rem_minmax(0,1fr)] gap-3 h-full min-h-0 items-start",children:[g.jsx(Cy,{title:"In Progress",total:k.length,open:r==="progress",onToggle:()=>v("progress"),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",openRing:"ring-[#C4B643]/25"}),g.jsxs("div",{className:"relative min-h-0 h-full w-full self-stretch",children:[g.jsx(d0,{title:"Review Result",count:x.length,accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",isEmpty:x.length===0,empty:g.jsx("p",{className:"text-sm text-white/45 py-4 text-center",children:"Nothing awaiting sign-off"}),children:x.map(_=>{const R=((t==null?void 0:t.pendingSendCounts)??{})[_.id];return g.jsx(pd,{run:_,selected:l===_.id,onSelect:()=>i(_),hideStatusBadge:_.status==="review",extraBadge:R?{label:"will send on approve",className:"bg-[#C4B643]/15 text-[#E8DC7A] border-[#C4B643]/35"}:void 0},_.id)})}),r==="progress"&&g.jsx(Ay,{title:"In Progress",items:k,activeBadgeLabel:"Running",autoApprovedRunIds:(t==null?void 0:t.autoApprovedRunIds)??[],selectedId:l,onSelect:i,onClose:()=>s(null),accent:"border-t-[#C4B643]",titleAccent:"text-[#E8DC7A]",empty:"Queue empty — approve a plan to start"})]})]})]})})}function yC(){return g.jsxs("div",{className:"fixed inset-0 pointer-events-none z-0 overflow-hidden","aria-hidden":!0,children:[g.jsx("div",{className:"absolute top-16 left-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-a w-[26rem] h-[26rem] rounded-full bg-cyan-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute bottom-20 right-12",children:g.jsx("div",{className:"ambient-orb ambient-orb-b w-[26rem] h-[26rem] rounded-full bg-pink-500/10 blur-3xl"})}),g.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:g.jsx("div",{className:"ambient-orb ambient-orb-c w-[22rem] h-[22rem] rounded-full bg-blue-500/[0.07] blur-3xl"})})]})}function xC({className:t="w-5 h-5"}){return g.jsxs("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:t,"aria-hidden":!0,children:[g.jsx("circle",{cx:"6.75",cy:"6.25",r:"3.25"}),g.jsx("circle",{cx:"13.5",cy:"6.75",r:"2.85",opacity:"0.85"}),g.jsx("path",{d:"M1.75 16v-1.1c0-2.35 1.928-4.25 4.3-4.25 1.16 0 2.21.456 3 1.2.79-.744 1.84-1.2 3-1.2 2.372 0 4.3 1.9 4.3 4.25V16H1.75z"})]})}const bC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAN5UlEQVR4AeydXagdVxmGF7loIKSpN/WHttqKktpAvWkVoRctp4gRtf4QbxRrREEb0wtRGkRovLCmKC1Y641CFGpBCtpIsVfHRvAm5KpIrMGfCCJUa8GmTWl6k+5nznlPvzOZ2Xtmz5o1a/Z8Ie/+vjU/a6351nPe/Xv22bFr185LLq9BbAZ2BP/nFeihAg5WD0X1LkNwsJyCXirgYPVSVu/UwXIGeqmAg9VLWTPsNPGUHKzEBZ/KcA7WVFY68XU6WIkLPpXhHKyprHTi63SwEhc89nDv37cndpdR+nOwopQxfScA9dDRfQGRM4O1ew+Fd3/wVtLB5WANtgTLDQxEwITI6eXoDz8dHvjrmbB2+J6ZDrFpcDlYgy9BswkAETAhcnvWnlfOBsS2G2aOlYNrOVisRsYCImBC5HVTveb5327tWjs8vGs5WFvLkVcCRMCEyO3szu/ea5tFjmMhGjm4loPFSmQkIAImRG6nBlDPvedbAZHbfeQ5uZaDxYpkICACJkRupwREwIR+c3w9fPu9+8LRb/7aHlLkOBaiMbRrOViswoACImBC5HYqVUCt/+jR4pBnz5wPqGiYm1xcy8F6c1GSZkAETIjcDj4PKHvcL574l20WuRyLxpCu5WCxAgkFRMCEyO3QTYHSOTgWUlvx2gyeITpYWo2eIxABEyK3w7UFyp5b5Vr27nAo13Kw7Cr1kAMRMCFyO0QXoNQPjoXUVhzatRwsrUTkCETAhMht9zGAsv3l6FoOll2hCDkQARMit13GBkp941hIbcUhXcvB0ip0jEAETIjcdtcXUHaM3Fwra7Bs4XLNgQiYELmdZwqgNB6OhdRWHMq1HCytQMsIRMCEyO3pKYGy4+bkWg6WXZkGORABEyK3pwwFlOaAYyG1FYdwLQdL1V8QgQiYELk93AJ16dyt4R2PXxNueXm/PSRZnotrOVgLlhyIgAmR28MtULw5/NID58LuP11ZHHLj9bcFVDQS3uBYqDxkatdysMorsNkGImBC5Jubi1AGik8b8ObwiWeOFft1c9cdR5QmjTm4loNVWnIgAiZEbnfXAaVj/vLPPwakNo6F1E4VcSxUHi+la7UDqzzTFWsDE2oLlC2Du9ZGNRysjTrU3sqliOdOnQ7c5dUePNuBY6FZWvzHsVDRSHiDY6HykKlcy8EylT91+l2mtZHy+SZEq+knBdy1gn+jH8DgKPcdfCp85AOPh4uv3symbbIfQ2nyGzA4FlIn9I/UThVxLFQeL4VrTdqxWGyAQhQfGF564XOk24RjITa6a1GFxZokWGWgHjz+sYC4C3vtws0r5Vp1CPTtWpMCqw4onIoFIKJVcC2e2fIMF3FtVjwRQdpW4cLatXScBFiLgLLVS+lad3/2urD+xIcCENg5dMnpC5gQue2Lx49/3/Odyt9LbPLY0fa1KF9psNoApULhWKhP1xJQXzhwbTHs3QeuK2KXGyACJkRu++IB/DeOngl/OPnxcOncLXbXVh7btVYSrGWA2qrwLDk7ewW9j8daV139y/Dhj34vCKjZUMV/QEBFo+UN5wETIrenCyigIseNr/jPznDFf3faw7bymK61UmB1BUoVfnLzPb9YrvX8ha+Fd960P1x19WMa4rLY1rWACJgQue0QiIAJkWsfToyu3HyjXNsVY7rWSoAVCygVmHji5LHQ1bXKd3n0WyfgQHX7tZ1jgAmRazsRiIAJkbOtrFSuNWqw+gBKC9HVtVj08l0effNsjO9gINK2muda9AdMiNyeB0TAhMjtvnKOY6G+XWuUYPUJlF2ILq718u69oQoe+mf7v9/+CdJtAhhkN9IGJkRu9wERMCFyu29ensK1RgVWKqC0KMu4Ft+m95XHfh6+PFMVPLyCj4ALaSxFuRYQARMi134iEAETImdbG+FYqE/XGgVYqYGyi9TGtQQUD4Lpg0VH5FZ677EKPCACJkRuz6MvYELkdl/bvG/XyhqsIYHSQrVxLQHFx2t+9vkvhp/OVPVpThwL4VhIYyn2CZTGwLFQX66VJVg5AKUFIDZ1LY4VUP84dZpm8R1WVe4i1+KxWHFgxQ3n4U6IvOKQTpv6dK2swMoNKK1aU9fS8eVY51rv+9sPggArnwNIfQGlsXAs1IdrZQFWrkBpAYi4FndbiLaVhaPq1WsgQfYccu4OiUOqL9caFKwxAKVFx7V4O+SFHQc2NplbAEFs4nEWzwzJrZ7983nbrM0Bl9e5fvz0rtpjYu7AsVBs1xoErDEBZRcR1+JNXBbfbievcy0eiPMMr+rFUs6T6BOgfvfi7eGhr34/6DGa9vcZ+3CtpGCNFSgtahvX+tSX7iz+zg1QAZf6KMcyUDyTTAkV88GxUEzXSgLW2IGi+NIi19rzytnAg/Kv779w2eesgAjRF9E61BBAMQ8ptmv1CtYqAaUFWORaQAVcOp4oiACJF0WJussbGijmh3AsFMu1egFrFYGi+NI819IxRAsUOdt4dshjqFyAYk5STNeKCtaqA6UFmOdaHANEuBIiZ5t9NT71YyjGbyIcC8VwrShg5QFUk9LFO6bKtYAImBC5Riu/Gq/tOcZYrtUJrCkCJRisawERMCFyHTPGiGOhrq61FFhTBsrCgms99/vXKn/rxR5X9Wq83Z9bHsO1WoHlQG1HANd6+MHPBB4/ofVHfrL9gM1W3avxm7uzCzgW6uJajcByoOavPc/wEN9EA2BVR0/NteaC5UBVITJ/2/ojj1YeMDXXqgTLgapko9FGXkpw1yp9jVFkoBotxCoeNCXXqlu/wrEsUOQ82+HbV3gAV3eib6+vwKRc695DlYUowGIPQBHR3utvI7g6VGAqrrV2+J7KKhVg4UxIRwAZUttj+wpM3bUKsCgbL4oRpaG+o1zjr0KcsmttgYVjIS0ojoXU9ti+AlN2rS2wKJu7FlWIq0m41qxk5cda28DCsdDsuOI/joWKht8sVYGputY2sKicuxZViKsputZlYOFYSKXFsZDaHttXYIqudRlYlM1diyrE1dRcqxIsHAuptDgWUttj+wpMzbUqwaJs7lpUIa6m5Fq1YOFYSKXFsZDaHttXIJ1rtZ9b2zMwHr5yoOobmPl0Ry1YDMTJRMlfjVcllo+r4lqvv+1iePHO/4XX33pxqxgApV8cmQsWjoV0Jo6F1PbYvgJjdy2+8ETfXCioLFBcH1WZCxYHuGtRhbgao2tZoPg0LBWpAortaCFYOBbiYIRjIXLXchXgp5pFqTp77XD155uqjk2xrS1QmtNCsDjQXYsqxFXurrUsUKpSI7BwLKSTcCyktsf2FcjVtboCpUo0AouD3bWowtKqPDEn14oFlC60MVg4FtKJOBZS22P7CuTgWrGBUhUag8UJ7lpUIa6Gcq2+gFJ1WoGFYyGdjGMhtT22r0Bq1+obKFWgFVic5K5FFeIqhWulAkqVaQ0WjoXUAY6F1PbYvgJ9ulZqoHT1rcHiRHctqhBXsV1rKKBUlaXAwrGQOsGxkNpjiLnNMZZrDQ2U6roUWJzsrkUV4qqLa+UClCqyNFg4FlJHOBZS22P7CizjWrkBpateGiw6cNeiCnHV1LVyBUrV6AQWjoXUGY6F1PbYvgKLXCt3oHTFncCiE3ctqhBX81yLvzXd5PNQcWfUvrfOYOFYSEPjWEhtj+0rMM+16I3PcukjwBzLttzUGSwuKIpr0ZFrqwJVrjUGoHQBUcDCsZA6xbGQ2h7bVYDaHbjp/qDfgBkTULrSKGDRmbsWVegmgLrv4FMB0RNf7537XR7zrFI0sHAspEEoElLbY30FqBMwIY7i+1/R0796OOlfWmXsWIoGFhNy16IKzVUHlP0Bbd5bXkdGBYuCIF0ihUNqe9yoADXBnRBbcCdka8f2MSsqWBTCXYsqVGsKQOnK54ClQ9pFfuqQzqKYSO0pRq4fd0JcP+6EbJ3YvkqKDhbFcdeiCiFMEaiNKy/9yRNt7Br5SUTqhwIjtVc9cq24E+JacSdka8L2VVYvjkXBpuhaDhQrv6HewOKnE20Ms3G3QOHVXqXIdeFOiOvCnZC9frZPSb2BRRFX3bUcKFa5Wr2CxU8s0tAsBFJ7rJFrwJ0Q14A7IXutbB+L+phnr2Ax4VVyLQeKFW2m3sHipxhpOiwOUnsMkfniToj54k7IXhfbXW9WoHewGGqsruVAsXrLKQlY/GQjTZEFQ2rnFpkb7oSYG+6E7DWw3VVfgSRgMfwYXOuTdxwJx7/7/63PQwETcqBYwXZKBhaLgzQ9XAGpPWQUUHfdfiQwR2BC5EPOa8xjJwOLIpVd68Ybhv3b09kCRbFGrqRg4QBINcMhlKeMDlT/1U4KFpdTdi0Wme0pxFg8hgJoAOfuDpGnGH9KYyQHi0VEKjKLrLyv6ED1Vdn6fpODxVRSuZYDRbWH0SBg4VhIlxzbtSxQJ04eCwfvf0vwuzxVO00cBCwurQ/XqgLqyWeOMZwrcQUGAwvHQrreLq7VP1CapcemFRgMLCbY1bUcKKqYpwYFC8dCKk1T13KgVLF846BgUZY2ruVAUbFxaHCwcCykclW5lgOl6ownDg4WpapzLQeK6oxTWYCFYyGVENfSWy96HcpfNlB1xhGzAItSlV1rAVCc4sq4AtmAhWMhBypjWlpMLRuwmDNvu/hdHpUYv7ICa/zl9CtQBRwsVcJj1Ao4WFHL6Z2pAg6WKuExagWigRV1Vt7Z6CvgYI1+CfO8AAcrz3UZ/awcrNEvYZ4X4GDluS6jn5WDNfolzPMCHKw81yXjWTWb2hsAAAD//0DhVxwAAAAGSURBVAMA8NLI/5AoLlwAAAAASUVORK5CYII=";function vC({className:t="",size:l=36}){return g.jsx("img",{src:bC,alt:"",width:l,height:l,className:`shrink-0 object-contain ${t}`,"aria-hidden":!0,draggable:!1})}function kC(){var q,te,ee;const[t,l]=V.useState("ops"),[i,r]=V.useState(null),[s,o]=V.useState(null),f=V.useCallback(()=>{wg().then(r).catch(console.error)},[]);V.useEffect(()=>{f();const O=tv(r),P=setInterval(f,5e3);return()=>{O(),clearInterval(P)}},[f]),V.useEffect(()=>{if(!s||!i)return;const O=i.runs.find(P=>P.id===s.id);O&&o(O)},[i,s==null?void 0:s.id]);const h=((q=i==null?void 0:i.resultReviewRuns)==null?void 0:q.length)??0,p=((te=i==null?void 0:i.awaitingPlanReview)==null?void 0:te.length)??0,m=(i==null?void 0:i.runs.filter(O=>O.status==="done").length)??0,x=((ee=i==null?void 0:i.agents)==null?void 0:ee.length)??0,y=(i==null?void 0:i.agentIssueCount)??0,k=p+h,v=V.useMemo(()=>!s||!i?[]:Ey(s,i,t),[s,i,t]),_=s?md(v,s.id):-1,R=V.useCallback(O=>{const P=v[O];P&&o(P)},[v]),H=V.useCallback(async O=>{if(!i)return;const P=Ey(i.runs.find(M=>M.id===O)??s,i,t),se=Uf(P,O),me=await wg();if(r(me),!se){o(null);return}o(me.runs.find(M=>M.id===se.id)??null)},[i,s,t]),N=O=>`px-3 py-2 text-base rounded ${t===O?"bg-[#92E4DD]/20 text-[#92E4DD]":"text-white/60 hover:text-white"}`,Z=()=>l("agents");return g.jsxs(g.Fragment,{children:[g.jsx(yC,{}),g.jsxs("div",{className:"relative z-10 min-h-screen flex flex-col",children:[g.jsxs("header",{className:"px-6 py-4 border-b border-white/10 flex flex-wrap gap-4 items-center justify-between glass-header shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-6",children:[g.jsxs("button",{type:"button",onClick:()=>{l("ops"),o(null)},className:"flex items-center gap-3 text-left rounded cursor-pointer hover:opacity-90 transition-opacity focus-visible:outline focus-visible:outline-2 focus-visible:outline-[#92E4DD]/45","aria-label":"AgentDealer — go to Operations",children:[g.jsx(vC,{size:40}),g.jsxs("div",{children:[g.jsx("h1",{className:"text-xl font-bold sm:text-2xl",style:{background:"linear-gradient(to right, #C4B643, #D4C760)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"AgentDealer"}),g.jsx("p",{className:"text-sm text-[#92E4DD]",children:"Kick tasks, approve plans, review results"})]})]}),g.jsxs("nav",{className:"flex gap-1",children:[g.jsxs("button",{type:"button",onClick:()=>l("ops"),className:N("ops"),children:["Operations",k>0&&g.jsxs("span",{className:"ml-1.5 inline-flex items-center gap-1 align-middle",children:[p>0&&g.jsx("span",{className:"text-xs leading-none bg-cyber-violet/20 text-cyber-violet-light px-1.5 py-0.5 rounded tabular-nums border border-cyber-violet/35",title:`${p} plan${p===1?"":"s"} ready to review`,children:p}),h>0&&g.jsx("span",{className:"text-xs leading-none bg-[#C4B643]/30 text-[#E8DC7A] px-1.5 py-0.5 rounded tabular-nums",title:`${h} result${h===1?"":"s"} to review`,children:h})]})]}),g.jsx("button",{type:"button",onClick:()=>l("intake"),className:N("intake"),children:"Inbox"}),g.jsxs("button",{type:"button",onClick:()=>l("done"),className:N("done"),children:["Done",m>0&&g.jsx("span",{className:"ml-1 text-xs bg-white/10 px-1.5 py-0.5 rounded",children:m})]})]})]}),g.jsxs("button",{type:"button",onClick:Z,className:`${N("agents")} inline-flex items-center gap-1.5 transition-colors`,"aria-label":"Agents",title:"Agents",children:[g.jsx(xC,{className:"w-6 h-6 shrink-0"}),x>0&&g.jsx("span",{className:"text-xs leading-none bg-white/10 text-white/55 px-1.5 py-0.5 rounded tabular-nums border border-white/10",title:`${x} configured agent${x===1?"":"s"}`,children:x}),y>0&&g.jsxs("span",{className:"inline-flex items-center gap-0.5 text-xs leading-none bg-red-500/20 text-red-300 px-1.5 py-0.5 rounded tabular-nums border border-red-400/30",title:`${y} need${y===1?"s":""} attention`,children:[g.jsx(c0,{className:"w-3 h-3 shrink-0"}),y]})]})]}),g.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[t==="ops"&&g.jsx(gC,{snapshot:i,selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o}),t==="intake"&&g.jsx(fC,{agents:(i==null?void 0:i.agents)??[],onRefresh:f,onGoOperations:()=>l("ops"),onManageAgents:Z}),t==="agents"&&g.jsx(eC,{agents:(i==null?void 0:i.agents)??[],agentDeckOnline:(i==null?void 0:i.agentDeckOnline)??!1,onRefresh:f}),t==="done"&&g.jsx(nC,{runs:(i==null?void 0:i.runs)??[],selectedRunId:(s==null?void 0:s.id)??null,onSelectRun:o,sentRunIds:(i==null?void 0:i.sentRunIds)??[]})]}),s&&g.jsx(JE,{run:s,agents:(i==null?void 0:i.agents)??[],onClose:()=>o(null),onRefresh:f,onApproved:f,onApprovedAndNext:()=>H(s.id),onDoneAndNext:()=>H(s.id),queueNav:v.length>1?{runs:v,index:_,onPrev:()=>R(_-1),onNext:()=>R(_+1)}:void 0,onRetry:O=>{o(O),l("ops"),f()}})]})]})}function wC(){return typeof document>"u"?Promise.resolve():document.fonts.load('13px "Monaco"').then(()=>{}).catch(()=>{})}wC();L1.createRoot(document.getElementById("root")).render(g.jsx(V.StrictMode,{children:g.jsx(kC,{})}));